/* _ _ _ _ ___| (_) ___| | __ (_)___ / __| | |/ __| |/ / | / __| \__ \ | | (__| < _ | \__ \ |___/_|_|\___|_|\_(_)/ |___/ |__/ Version: 1.8.1 Author: Ken Wheeler Website: http://kenwheeler.github.io Docs: http://kenwheeler.github.io/slick Repo: http://github.com/kenwheeler/slick Issues: http://github.com/kenwheeler/slick/issues */ /* global window, document, define, jQuery, setInterval, clearInterval */ ;(function(factory) { 'use strict'; if (typeof define === 'function' && define.amd) { define(['jquery'], factory); } else if (typeof exports !== 'undefined') { module.exports = factory(require('jquery')); } else { factory(jQuery); } }(function($) { 'use strict'; var Slick = window.Slick || {}; Slick = (function() { var instanceUid = 0; function Slick(element, settings) { var _ = this, dataSettings; _.defaults = { accessibility: true, adaptiveHeight: false, appendArrows: $(element), appendDots: $(element), arrows: true, asNavFor: null, prevArrow: '', nextArrow: '', autoplay: false, autoplaySpeed: 3000, centerMode: false, centerPadding: '50px', cssEase: 'ease', customPaging: function(slider, i) { return $(''; opt.nextArrow = ''; // Sync with another carousel if ( x.data( 'sync' ) ) { x.removeClass( x.data( 'class' ) ); dis.addClass( x.data( 'class' ) ); $( '.cz_disable_links a' ).on( 'click', function( e ) { e.preventDefault(); }); } // Front-end if ( dis.closest( '.vc_cz_carousel' ).length && $( sls, dis ).length ) { var slides = $( sls, dis ); dis.removeClass( 'slick-initialized slick-slider slick-dotted' ); // Fix front-end editor if ( $( '.compose-mode' ).length ) { dis.html( '' ); } // Add Slides slides.addClass( 'slicked' ).removeClass( 'slick-slide slick-current slick-cloned slick-active slick-center' ).removeAttr( 'style data-slick-index aria-describedby' ); slides.appendTo( dis ); } // On init. if ( opt.counts ) { // Counter. dis.on( 'init reInit beforeChange', function( event, slick, currentSlide, nextSlide ) { setTimeout( function() { if ( ! dis.find( '.xtra-slick-counts' ).length ) { dis.append( '
1 / ' + dis.find( '.slick-slide' ).length + '
' ); } }, 1000 ); dis.find( '.xtra-slick-current' ).html( nextSlide + 1 ); }); } // By mouse wheel/scroll. if ( dis.hasClass( 'cz_mousewheel' ) || dis.closest( '.cz_mousewheel' ).length ) { slick = dis.slick( opt ); slick.on( 'mousewheel DOMMouseScroll', function ( e ) { var delta = e.deltaY || e.originalEvent.wheelDelta; slick.slick( e.originalEvent.wheelDelta < 0 ? 'slickNext' : 'slickPrev' ); e.preventDefault(); }); // Slick. } else { slick = dis.slick( opt ); } setTimeout( function() { dis.slick( 'refresh' ); }, 500 ); dis.addClass( 'xtra-slick-done' ).find( '.slick-dots button' ).addClass( 'slick-dots-btn' ); // Fix jumping bug slick.on( 'beforeChange', function( e, s, c, n ) { if ( n == 0 ) { var cls = 'slick-current slick-active'; setTimeout(function() { $( '[data-slick-index="' + s.$slides.length + '"]', dis ).addClass( cls + ( opt.centerMode ? ' slick-center' : '' ) ).next().removeClass( 'slick-center' ).siblings().removeClass( cls ); for( var i = s.options.slidesToShow - 1; i >= 0; i-- ) { $( '[data-slick-index="' + i + '"]', dis ).addClass( cls ); } }, 10 ); } }); // Refresh for VC content changes. if ( wpb && typeof Codevz != 'undefined' ) { Codevz.heightChanged( dis, function() { setTimeout( function() { dis.slick( 'refresh' ); }, 1500 ); }); } $( 'body' ).on( 'click', '.vc_tta-tabs-list', function() { setTimeout( function() { dis.slick( 'refresh' ); }, 500 ); }); // Update lightbox. setTimeout( function() { Codevz_Plus.lightGallery( dis ); }, 2000 ); }); }; Codevz_Plus.slick(); });