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/tabs/js/script.js
jQuery(document).ready(function($) {
    $('.cq-tabs').each(function(index) {
        var _this = $(this);
        var _tabsstyle = $(this).data('tabsstyle');
        var _titlecolor = $(this).data('titlecolor');
        var _titlebg = $(this).data('titlebg');
        var _titlehovercolor = $(this).data('titlehovercolor');
        var _titlehoverbg = $(this).data('titlehoverbg');
        var _rotatetabs = parseInt($(this).data('rotatetabs'));
        var _tabnumbers = $(this).find('ul.cq-tabmenu li').length;
        var _currentIndex = 0;
        $(this).find('ul.cq-tabmenu').addClass('active').find('> li:eq(0)').addClass('current');
        $(this).find('ul.cq-tabmenu li').each(function(index) {
            if(index==0){
                if(_tabsstyle=="style2"||_tabsstyle=="style1"){
                    $(this).find('a').css({
                       'background': _titlehoverbg,
                       'color': _titlehovercolor
                    });

                }else{
                    $(this).find('a').css({
                       'color': _titlehovercolor
                    });
                    $(this).css({
                       'background': _titlehoverbg,
                       'color': _titlehovercolor
                   });

                }

            }
            $(this).on('mouseover', function(event) {
                if(_tabsstyle=="style2"||_tabsstyle=="style1"){
                    $(this).find('a').css({
                       'background': _titlehoverbg,
                       'color': _titlehovercolor
                   });

                }else{
                    $(this).find('a').css({
                       'color': _titlehovercolor
                    });
                    $(this).css({
                       'background': _titlehoverbg,
                       'color': _titlehovercolor
                   });

                }

            }).on('mouseleave', function(event) {
                if(!$(this).hasClass('current')){
                    if(_tabsstyle=="style2"||_tabsstyle=="style1"){
                        $(this).find('a').css({
                           'background': _titlebg,
                           'color': _titlecolor
                        });
                    }else{
                        $(this).find('a').css({
                           'color': _titlecolor
                        });
                        $(this).css({
                           'background': _titlebg,
                           'color': _titlecolor
                        });
                    }
                }
            });

        });


        $(this).find('ul.cq-tabmenu li a').click(function (g) {
            var tab = $(this).closest('.cq-tabs'),
                index = $(this).closest('li').index();
            tab.find('ul.cq-tabmenu > li').removeClass('current');
            if(_tabsstyle=="style2"||_tabsstyle=="style1"){
                tab.find('ul.cq-tabmenu > li').find('a').css({'background': _titlebg, 'color': _titlecolor });
            }else{
                tab.find('ul.cq-tabmenu > li').find('a').css({'color': _titlecolor });
                tab.find('ul.cq-tabmenu > li').css({'background': _titlebg, 'color': _titlecolor });
            }
            var _current = $(this).closest('li').addClass('current');
            if(_tabsstyle=="style2"||_tabsstyle=="style1"){
                _current.find('a').css({'background': _titlehoverbg, 'color': _titlehovercolor });
            }else{
                _current.find('a').css({'color': _titlehovercolor });
                _current.css({'background': _titlehoverbg, 'color': _titlehovercolor });
            }

            tab.find('.cq-tabcontent').find('div.cq-tabitem').not('div.cq-tabitem:eq(' + index + ')').slideUp(400, function(){
                if(_rotatetabs>0){
                    _slideshow();
                }

            });
            tab.find('.cq-tabcontent').find('div.cq-tabitem:eq(' + index + ')').slideDown();
            _currentIndex = index;
            g.preventDefault();
        });

        var _slideID = 0;
        function _slideshow(){
            clearTimeout(_slideID);
            _currentIndex++;
            if(_currentIndex>_tabnumbers-1) _currentIndex = 0;
            _slideID = setTimeout(function() {
                _this.find('ul.cq-tabmenu li').each(function(index) {
                    if(_currentIndex==index){
                        $(this).find('a').trigger('click');
                    }
                });

            }, _rotatetabs*1000);
        }
        if(_rotatetabs>0){
            _slideshow();
        }

      });


});