HEX
Server: Apache
System: Linux web2213.uni5.net 5.4.282-1.el8.elrepo.x86_64 #1 SMP Mon Aug 19 18:33:22 EDT 2024 x86_64
User: clinicamaciel (596848)
PHP: 7.3.33
Disabled: apache_child_terminate,c99_buff_prepare,c99_sess_put,dl,eval,exec,leak,link,myshellexec,openlog,passthru,pclose,pcntl_exec,php_check_syntax,php_strip_whitespace,popen,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,symlink,system,socket_listen,socket_create_listen,putenv
Upload Files
File: /home/clinicamaciel/www/wp-content/plugins/vc-extensions-bundle/testimonialcarousel/js/tc_init.js
jQuery(document).ready(function($) {

  $('.cq-testimonialcarousel').each(function() {
      var _this = $(this);
      var _italic = $(this).data('italic') == 'on' ? 'italic' : 'normal';
      var _tnumber = $(this).data('tnumber');
      var _twidth = $(this).data('twidth');
      var _avatarwidth = $(this).data('avatarwidth');
      var _avatarheight = $(this).data('avatarheight');
      var _tmargin = $(this).data('tmargin');
      var _tpadding = $(this).data('tpadding');
      var _arrowmarginleft = $(this).data('arrowmarginleft');
      var _namemargin = $(this).data('namemargin');
      var _avatarmarginleft = $(this).data('avatarmarginleft');
      var _tbackgroundcolor = $(this).data('tbackgroundcolor');
      var _ttextcolor = $(this).data('ttextcolor');
      var _autoplay = $(this).data('autoplay') == "on" ? true:false;
      var _autoplayspeed = $(this).data('autoplayspeed');
      var _noloop = $(this).data('noloop') == "on" ? false:true;
      var _font = $(this).data('font');
      var _fontsize = $(this).data('fontsize');
      var _namesize = $(this).data('namesize');
      var _subtitlesize = $(this).data('subtitlesize');
      var _notooltip = $(this).data('notooltip') == "on" ? true:false;

      // $(this).find('.testimonial-wrap').each(function(index) {
        // $(this).delay(100*index).animate({opacity: 1}, 300);
        // $(this).delay(100*index).css('visibility', 'visible');;
      // });

      $(this).find('.headshot').each(function(index) {
        $(this).css({
          'margin-left': _avatarmarginleft,
          'width': _avatarwidth,
          'height': _avatarheight
        });
      });


      if(_namemargin!=""){
        $(this).find('.testimonial-info').css({
          'margin': _namemargin
        });
      }

      if(_namesize!=""){
        $(this).find('.testimonial-info > h4').css({
          'font-size': _namesize
        });
      }

      if(_subtitlesize!=""){
        $(this).find('.testimonial-info > p').css({
          'font-size': _subtitlesize
        });
      }


      if(_arrowmarginleft!=""){
        $(this).find('.arrow-down').css({
          'margin-left': _arrowmarginleft
        });
      }


      $(this).find('.testimonial').each(function(index) {
        var _color = $(this).data('color');
        var _background = $(this).data('background');
        if(_twidth!=""&&_twidth>0){
          $(this).css({
            'width': _twidth
          });
        }
        if(_tmargin!=""){
          $(this).css({
            'margin': _tmargin
          });
        }
        if(_fontsize!=""){
          $(this).css({
            'font-size': _fontsize
          });
        }

        if(_tpadding!=""){
          $(this).css({
            'padding': _tpadding
          });
        }

        if(_font!=""){
          $(this).css({
            'font-family': _font
          });
        }


        var _bg = _background || _tbackgroundcolor;
        var _tcolor = _color || _ttextcolor;

        $(this).css({
          'font-style': _italic,
          'color': _tcolor,
          'background-color': _bg
        });
        $(this).next('.arrow-down').css({
          'border-top-color': _bg
        });

      });


      // the tooltip
      function _updateTooltip(){
        $('.testimonial-info', _this).find('i').each(function(index) {
          var _title = $(this).attr('title');
          $(this).tooltipster({
            // content: _title,
            delay: 2600,
            animation: 'grow',
            position: 'top',
            offsetY: -4,
            delay: 50,
            theme: 'tooltipster-shadow'
          });
        });
      }
      // _updateTooltip();


      _this.slick({
          // centerMode: true,
          dots: true,
          arrows: false,
          autoplay: _autoplay,
          autoplaySpeed: _autoplayspeed,
          infinite: _noloop,
          // infinite: false,
          speed: 300,
          slidesToShow: _tnumber,
          slidesToScroll: 1,
          onInit: function(){
            if(!_notooltip) _updateTooltip();
          },
          responsive: [{
                breakpoint: 1024,
                settings: {
                    slidesToShow: _tnumber,
                    // slidesToScroll: 1,
                    // infinite: true
                    arrows: false,
                    dots: true
                }
            }, {
                breakpoint: 960,
                settings: {
                    arrows: false,
                    slidesToShow: (_tnumber-1)>0?(_tnumber-1):1,
                    slidesToScroll: 1,
                    dots: true
                }
            },{
                breakpoint: 640,
                settings: {
                    arrows: false,
                    slidesToShow: (_tnumber-2)>0?(_tnumber-2):1,
                    slidesToScroll: 1,
                    dots: true
                }
            }, {
                breakpoint: 480,
                settings: {
                    arrows: false,
                    slidesToShow: 1,
                    slidesToScroll: 1,
                    dots: true
                }
            }]
      });



  });

});