PageSourceSearch

https://lpaarizona.org/heritage/wp-content/themes/acs-hes-school-r…?ver=97fe659e9e4d8b4ba4eccb4044561483

js lpaarizona.org collected 2026-10-10 00:42:33 UTC 87,648 bytes, 2,994 lines download raw bytes

1jQuery(document).foundation();
2jQuery(document).ready(function($) {
3		
4	jQuery('#home-slider').slick({
5		slidesToShow: 1,
6		slidesToScroll: 1,
7		autoplay: true,
8		autoplaySpeed: 9000,
9		fade: true,
10		arrows: false,
11		dots: true,
12		dotsClass: 'home-slider-dots',
13		responsive: [
14			    {
15			      breakpoint: 1023,
16			      settings: {
17			        dots: false,
18			      }
19			    }
20			]
21  	});
22}); /* end of as page load scripts */
23jQuery(document).ready(function() {
24
25  jQuery(".top-bar .search .search-field").focus(function(){
26
27    jQuery(".top-bar .top-bar-right .menu").addClass("hide-this");
28
29  }).blur(function(){
30
31    jQuery(".top-bar .top-bar-right .menu").removeClass("hide-this");
32
33  });
34});
35/*
36     _ _      _       _
37 ___| (_) ___| | __  (_)___
38/ __| | |/ __| |/ /  | / __|
39\__ \ | | (__|   < _ | \__ \
40|___/_|_|\___|_|\_(_)/ |___/
41                   |__/
42
43 Version: 1.6.0
44  Author: Ken Wheeler
45 Website: http://kenwheeler.github.io
46    Docs: http://kenwheeler.github.io/slick
47    Repo: http://github.com/kenwheeler/slick
48  Issues: http://github.com/kenwheeler/slick/issues
49
50 */
51/* global window, document, define, jQuery, setInterval, clearInterval */
52(function(factory) {
53    'use strict';
54    if (typeof define === 'function' && define.amd) {
55        define(['jquery'], factory);
56    } else if (typeof exports !== 'undefined') {
57        module.exports = factory(require('jquery'));
58    } else {
59        factory(jQuery);
60    }
61
62}(function($) {
63    'use strict';
64    var Slick = window.Slick || {};
65
66    Slick = (function() {
67
68        var instanceUid = 0;
69
70        function Slick(element, settings) {
71
72            var _ = this, dataSettings;
73
74            _.defaults = {
75                accessibility: true,
76                adaptiveHeight: false,
77                appendArrows: $(element),
78                appendDots: $(element),
79                arrows: true,
80                asNavFor: null,
81                prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',
82                nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',
83                autoplay: false,
84                autoplaySpeed: 3000,
85                centerMode: false,
86                centerPadding: '50px',
87                cssEase: 'ease',
88                customPaging: function(slider, i) {
89                    return $('<button type="button" data-role="none" role="button" tabindex="0" />').text(i + 1);
90                },
91                dots: false,
92                dotsClass: 'slick-dots',
93                draggable: true,
94                easing: 'linear',
95                edgeFriction: 0.35,
96                fade: false,
97                focusOnSelect: false,
98                infinite: true,
99                initialSlide: 0,
100                lazyLoad: 'ondemand',
101                mobileFirst: false,
102                pauseOnHover: true,
103                pauseOnFocus: true,
104                pauseOnDotsHover: false,
105                respondTo: 'window',
106                responsive: null,
107                rows: 1,
108                rtl: false,
109                slide: '',
110                slidesPerRow: 1,
111                slidesToShow: 1,
112                slidesToScroll: 1,
113                speed: 500,
114                swipe: true,
115                swipeToSlide: false,
116                touchMove: true,
117                touchThreshold: 5,
118                useCSS: true,
119                useTransform: true,
120                variableWidth: false,
121                vertical: false,
122                verticalSwiping: false,
123                waitForAnimate: true,
124                zIndex: 1000
125            };
126
127            _.initials = {
128                animating: false,
129                dragging: false,
130                autoPlayTimer: null,
131                currentDirection: 0,
132                currentLeft: null,
133                currentSlide: 0,
134                direction: 1,
135                $dots: null,
136                listWidth: null,
137                listHeight: null,
138                loadIndex: 0,
139                $nextArrow: null,
140                $prevArrow: null,
141                slideCount: null,
142                slideWidth: null,
143                $slideTrack: null,
144                $slides: null,
145                sliding: false,
146                slideOffset: 0,
147                swipeLeft: null
vendor: 11,177 bytes, lines 147-530
147,
148                $list: null,
149                touchObject: {},
150                transformsEnabled: false,
151                unslicked: false
152            };
153
154            $.extend(_, _.initials);
155
156            _.activeBreakpoint = null;
157            _.animType = null;
158            _.animProp = null;
159            _.breakpoints = [];
160            _.breakpointSettings = [];
161            _.cssTransitions = false;
162            _.focussed = false;
163            _.interrupted = false;
164            _.hidden = 'hidden';
165            _.paused = true;
166            _.positionProp = null;
167            _.respondTo = null;
168            _.rowCount = 1;
169            _.shouldClick = true;
170            _.$slider = $(element);
171            _.$slidesCache = null;
172            _.transformType = null;
173            _.transitionType = null;
174            _.visibilityChange = 'visibilitychange';
175            _.windowWidth = 0;
176            _.windowTimer = null;
177
178            dataSettings = $(element).data('slick') || {};
179
180            _.options = $.extend({}, _.defaults, settings, dataSettings);
181
182            _.currentSlide = _.options.initialSlide;
183
184            _.originalSettings = _.options;
185
186            if (typeof document.mozHidden !== 'undefined') {
187                _.hidden = 'mozHidden';
188                _.visibilityChange = 'mozvisibilitychange';
189            } else if (typeof document.webkitHidden !== 'undefined') {
190                _.hidden = 'webkitHidden';
191                _.visibilityChange = 'webkitvisibilitychange';
192            }
193
194            _.autoPlay = $.proxy(_.autoPlay, _);
195            _.autoPlayClear = $.proxy(_.autoPlayClear, _);
196            _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
197            _.changeSlide = $.proxy(_.changeSlide, _);
198            _.clickHandler = $.proxy(_.clickHandler, _);
199            _.selectHandler = $.proxy(_.selectHandler, _);
200            _.setPosition = $.proxy(_.setPosition, _);
201            _.swipeHandler = $.proxy(_.swipeHandler, _);
202            _.dragHandler = $.proxy(_.dragHandler, _);
203            _.keyHandler = $.proxy(_.keyHandler, _);
204
205            _.instanceUid = instanceUid++;
206
207            // A simple way to check for HTML strings
208            // Strict HTML recognition (must start with <)
209            // Extracted from jQuery v1.11 source
210            _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;
211
212
213            _.registerBreakpoints();
214            _.init(true);
215
216        }
217
218        return Slick;
219
220    }());
221
222    Slick.prototype.activateADA = function() {
223        var _ = this;
224
225        _.$slideTrack.find('.slick-active').attr({
226            'aria-hidden': 'false'
227        }).find('a, input, button, select').attr({
228            'tabindex': '0'
229        });
230
231    };
232
233    Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) {
234
235        var _ = this;
236
237        if (typeof(index) === 'boolean') {
238            addBefore = index;
239            index = null;
240        } else if (index < 0 || (index >= _.slideCount)) {
241            return false;
242        }
243
244        _.unload();
245
246        if (typeof(index) === 'number') {
247            if (index === 0 && _.$slides.length === 0) {
248                $(markup).appendTo(_.$slideTrack);
249            } else if (addBefore) {
250                $(markup).insertBefore(_.$slides.eq(index));
251            } else {
252                $(markup).insertAfter(_.$slides.eq(index));
253            }
254        } else {
255            if (addBefore === true) {
256                $(markup).prependTo(_.$slideTrack);
257            } else {
258                $(markup).appendTo(_.$slideTrack);
259            }
260        }
261
262        _.$slides = _.$slideTrack.children(this.options.slide);
263
264        _.$slideTrack.children(this.options.slide).detach();
265
266        _.$slideTrack.append(_.$slides);
267
268        _.$slides.each(function(index, element) {
269            $(element).attr('data-slick-index', index);
270        });
271
272        _.$slidesCache = _.$slides;
273
274        _.reinit();
275
276    };
277
278    Slick.prototype.animateHeight = function() {
279        var _ = this;
280        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
281            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
282            _.$list.animate({
283                height: targetHeight
284            }, _.options.speed);
285        }
286    };
287
288    Slick.prototype.animateSlide = function(targetLeft, callback) {
289
290        var animProps = {},
291            _ = this;
292
293        _.animateHeight();
294
295        if (_.options.rtl === true && _.options.vertical === false) {
296            targetLeft = -targetLeft;
297        }
298        if (_.transformsEnabled === false) {
299            if (_.options.vertical === false) {
300                _.$slideTrack.animate({
301                    left: targetLeft
302                }, _.options.speed, _.options.easing, callback);
303            } else {
304                _.$slideTrack.animate({
305                    top: targetLeft
306                }, _.options.speed, _.options.easing, callback);
307            }
308
309        } else {
310
311            if (_.cssTransitions === false) {
312                if (_.options.rtl === true) {
313                    _.currentLeft = -(_.currentLeft);
314                }
315                $({
316                    animStart: _.currentLeft
317                }).animate({
318                    animStart: targetLeft
319                }, {
320                    duration: _.options.speed,
321                    easing: _.options.easing,
322                    step: function(now) {
323                        now = Math.ceil(now);
324                        if (_.options.vertical === false) {
325                            animProps[_.animType] = 'translate(' +
326                                now + 'px, 0px)';
327                            _.$slideTrack.css(animProps);
328                        } else {
329                            animProps[_.animType] = 'translate(0px,' +
330                                now + 'px)';
331                            _.$slideTrack.css(animProps);
332                        }
333                    },
334                    complete: function() {
335                        if (callback) {
336                            callback.call();
337                        }
338                    }
339                });
340
341            } else {
342
343                _.applyTransition();
344                targetLeft = Math.ceil(targetLeft);
345
346                if (_.options.vertical === false) {
347                    animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
348                } else {
349                    animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
350                }
351                _.$slideTrack.css(animProps);
352
353                if (callback) {
354                    setTimeout(function() {
355
356                        _.disableTransition();
357
358                        callback.call();
359                    }, _.options.speed);
360                }
361
362            }
363
364        }
365
366    };
367
368    Slick.prototype.getNavTarget = function() {
369
370        var _ = this,
371            asNavFor = _.options.asNavFor;
372
373        if ( asNavFor && asNavFor !== null ) {
374            asNavFor = $(asNavFor).not(_.$slider);
375        }
376
377        return asNavFor;
378
379    };
380
381    Slick.prototype.asNavFor = function(index) {
382
383        var _ = this,
384            asNavFor = _.getNavTarget();
385
386        if ( asNavFor !== null && typeof asNavFor === 'object' ) {
387            asNavFor.each(function() {
388                var target = $(this).slick('getSlick');
389                if(!target.unslicked) {
390                    target.slideHandler(index, true);
391                }
392            });
393        }
394
395    };
396
397    Slick.prototype.applyTransition = function(slide) {
398
399        var _ = this,
400            transition = {};
401
402        if (_.options.fade === false) {
403            transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
404        } else {
405            transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
406        }
407
408        if (_.options.fade === false) {
409            _.$slideTrack.css(transition);
410        } else {
411            _.$slides.eq(slide).css(transition);
412        }
413
414    };
415
416    Slick.prototype.autoPlay = function() {
417
418        var _ = this;
419
420        _.autoPlayClear();
421
422        if ( _.slideCount > _.options.slidesToShow ) {
423            _.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed );
424        }
425
426    };
427
428    Slick.prototype.autoPlayClear = function() {
429
430        var _ = this;
431
432        if (_.autoPlayTimer) {
433            clearInterval(_.autoPlayTimer);
434        }
435
436    };
437
438    Slick.prototype.autoPlayIterator = function() {
439
440        var _ = this,
441            slideTo = _.currentSlide + _.options.slidesToScroll;
442
443        if ( !_.paused && !_.interrupted && !_.focussed ) {
444
445            if ( _.options.infinite === false ) {
446
447                if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) {
448                    _.direction = 0;
449                }
450
451                else if ( _.direction === 0 ) {
452
453                    slideTo = _.currentSlide - _.options.slidesToScroll;
454
455                    if ( _.currentSlide - 1 === 0 ) {
456                        _.direction = 1;
457                    }
458
459                }
460
461            }
462
463            _.slideHandler( slideTo );
464
465        }
466
467    };
468
469    Slick.prototype.buildArrows = function() {
470
471        var _ = this;
472
473        if (_.options.arrows === true ) {
474
475            _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
476            _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');
477
478            if( _.slideCount > _.options.slidesToShow ) {
479
480                _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
481                _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
482
483                if (_.htmlExpr.test(_.options.prevArrow)) {
484                    _.$prevArrow.prependTo(_.options.appendArrows);
485                }
486
487                if (_.htmlExpr.test(_.options.nextArrow)) {
488                    _.$nextArrow.appendTo(_.options.appendArrows);
489                }
490
491                if (_.options.infinite !== true) {
492                    _.$prevArrow
493                        .addClass('slick-disabled')
494                        .attr('aria-disabled', 'true');
495                }
496
497            } else {
498
499                _.$prevArrow.add( _.$nextArrow )
500
501                    .addClass('slick-hidden')
502                    .attr({
503                        'aria-disabled': 'true',
504                        'tabindex': '-1'
505                    });
506
507            }
508
509        }
510
511    };
512
513    Slick.prototype.buildDots = function() {
514
515        var _ = this,
516            i, dot;
517
518        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
519
520            _.$slider.addClass('slick-dotted');
521
522            dot = $('<ul />').addClass(_.options.dotsClass);
523
524            for (i = 0; i <= _.getDotCount(); i += 1) {
525                dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));
526            }
527
528            _.$dots = dot.appendTo(_.options.appendDots);
529
530            _.$dots.find('li').first().addClass('slick-active')
vendor: 14,789 bytes, lines 530-1015
530.attr('aria-hidden', 'false');
531
532        }
533
534    };
535
536    Slick.prototype.buildOut = function() {
537
538        var _ = this;
539
540        _.$slides =
541            _.$slider
542                .children( _.options.slide + ':not(.slick-cloned)')
543                .addClass('slick-slide');
544
545        _.slideCount = _.$slides.length;
546
547        _.$slides.each(function(index, element) {
548            $(element)
549                .attr('data-slick-index', index)
550                .data('originalStyling', $(element).attr('style') || '');
551        });
552
553        _.$slider.addClass('slick-slider');
554
555        _.$slideTrack = (_.slideCount === 0) ?
556            $('<div class="slick-track"/>').appendTo(_.$slider) :
557            _.$slides.wrapAll('<div class="slick-track"/>').parent();
558
559        _.$list = _.$slideTrack.wrap(
560            '<div aria-live="polite" class="slick-list"/>').parent();
561        _.$slideTrack.css('opacity', 0);
562
563        if (_.options.centerMode === true || _.options.swipeToSlide === true) {
564            _.options.slidesToScroll = 1;
565        }
566
567        $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');
568
569        _.setupInfinite();
570
571        _.buildArrows();
572
573        _.buildDots();
574
575        _.updateDots();
576
577
578        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
579
580        if (_.options.draggable === true) {
581            _.$list.addClass('draggable');
582        }
583
584    };
585
586    Slick.prototype.buildRows = function() {
587
588        var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection;
589
590        newSlides = document.createDocumentFragment();
591        originalSlides = _.$slider.children();
592
593        if(_.options.rows > 1) {
594
595            slidesPerSection = _.options.slidesPerRow * _.options.rows;
596            numOfSlides = Math.ceil(
597                originalSlides.length / slidesPerSection
598            );
599
600            for(a = 0; a < numOfSlides; a++){
601                var slide = document.createElement('div');
602                for(b = 0; b < _.options.rows; b++) {
603                    var row = document.createElement('div');
604                    for(c = 0; c < _.options.slidesPerRow; c++) {
605                        var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));
606                        if (originalSlides.get(target)) {
607                            row.appendChild(originalSlides.get(target));
608                        }
609                    }
610                    slide.appendChild(row);
611                }
612                newSlides.appendChild(slide);
613            }
614
615            _.$slider.empty().append(newSlides);
616            _.$slider.children().children().children()
617                .css({
618                    'width':(100 / _.options.slidesPerRow) + '%',
619                    'display': 'inline-block'
620                });
621
622        }
623
624    };
625
626    Slick.prototype.checkResponsive = function(initial, forceUpdate) {
627
628        var _ = this,
629            breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;
630        var sliderWidth = _.$slider.width();
631        var windowWidth = window.innerWidth || $(window).width();
632
633        if (_.respondTo === 'window') {
634            respondToWidth = windowWidth;
635        } else if (_.respondTo === 'slider') {
636            respondToWidth = sliderWidth;
637        } else if (_.respondTo === 'min') {
638            respondToWidth = Math.min(windowWidth, sliderWidth);
639        }
640
641        if ( _.options.responsive &&
642            _.options.responsive.length &&
643            _.options.responsive !== null) {
644
645            targetBreakpoint = null;
646
647            for (breakpoint in _.breakpoints) {
648                if (_.breakpoints.hasOwnProperty(breakpoint)) {
649                    if (_.originalSettings.mobileFirst === false) {
650                        if (respondToWidth < _.breakpoints[breakpoint]) {
651                            targetBreakpoint = _.breakpoints[breakpoint];
652                        }
653                    } else {
654                        if (respondToWidth > _.breakpoints[breakpoint]) {
655                            targetBreakpoint = _.breakpoints[breakpoint];
656                        }
657                    }
658                }
659            }
660
661            if (targetBreakpoint !== null) {
662                if (_.activeBreakpoint !== null) {
663                    if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
664                        _.activeBreakpoint =
665                            targetBreakpoint;
666                        if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
667                            _.unslick(targetBreakpoint);
668                        } else {
669                            _.options = $.extend({}, _.originalSettings,
670                                _.breakpointSettings[
671                                    targetBreakpoint]);
672                            if (initial === true) {
673                                _.currentSlide = _.options.initialSlide;
674                            }
675                            _.refresh(initial);
676                        }
677                        triggerBreakpoint = targetBreakpoint;
678                    }
679                } else {
680                    _.activeBreakpoint = targetBreakpoint;
681                    if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
682                        _.unslick(targetBreakpoint);
683                    } else {
684                        _.options = $.extend({}, _.originalSettings,
685                            _.breakpointSettings[
686                                targetBreakpoint]);
687                        if (initial === true) {
688                            _.currentSlide = _.options.initialSlide;
689                        }
690                        _.refresh(initial);
691                    }
692                    triggerBreakpoint = targetBreakpoint;
693                }
694            } else {
695                if (_.activeBreakpoint !== null) {
696                    _.activeBreakpoint = null;
697                    _.options = _.originalSettings;
698                    if (initial === true) {
699                        _.currentSlide = _.options.initialSlide;
700                    }
701                    _.refresh(initial);
702                    triggerBreakpoint = targetBreakpoint;
703                }
704            }
705
706            // only trigger breakpoints during an actual break. not on initialize.
707            if( !initial && triggerBreakpoint !== false ) {
708                _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
709            }
710        }
711
712    };
713
714    Slick.prototype.changeSlide = function(event, dontAnimate) {
715
716        var _ = this,
717            $target = $(event.currentTarget),
718            indexOffset, slideOffset, unevenOffset;
719
720        // If target is a link, prevent default action.
721        if($target.is('a')) {
722            event.preventDefault();
723        }
724
725        // If target is not the <li> element (ie: a child), find the <li>.
726        if(!$target.is('li')) {
727            $target = $target.closest('li');
728        }
729
730        unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
731        indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;
732
733        switch (event.data.message) {
734
735            case 'previous':
736                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
737                if (_.slideCount > _.options.slidesToShow) {
738                    _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
739                }
740                break;
741
742            case 'next':
743                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
744                if (_.slideCount > _.options.slidesToShow) {
745                    _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
746                }
747                break;
748
749            case 'index':
750                var index = event.data.index === 0 ? 0 :
751                    event.data.index || $target.index() * _.options.slidesToScroll;
752
753                _.slideHandler(_.checkNavigable(index), false, dontAnimate);
754                $target.children().trigger('focus');
755                break;
756
757            default:
758                return;
759        }
760
761    };
762
763    Slick.prototype.checkNavigable = function(index) {
764
765        var _ = this,
766            navigables, prevNavigable;
767
768        navigables = _.getNavigableIndexes();
769        prevNavigable = 0;
770        if (index > navigables[navigables.length - 1]) {
771            index = navigables[navigables.length - 1];
772        } else {
773            for (var n in navigables) {
774                if (index < navigables[n]) {
775                    index = prevNavigable;
776                    break;
777                }
778                prevNavigable = navigables[n];
779            }
780        }
781
782        return index;
783    };
784
785    Slick.prototype.cleanUpEvents = function() {
786
787        var _ = this;
788
789        if (_.options.dots && _.$dots !== null) {
790
791            $('li', _.$dots)
792                .off('click.slick', _.changeSlide)
793                .off('mouseenter.slick', $.proxy(_.interrupt, _, true))
794                .off('mouseleave.slick', $.proxy(_.interrupt, _, false));
795
796        }
797
798        _.$slider.off('focus.slick blur.slick');
799
800        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
801            _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
802            _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
803        }
804
805        _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
806        _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
807        _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
808        _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);
809
810        _.$list.off('click.slick', _.clickHandler);
811
812        $(document).off(_.visibilityChange, _.visibility);
813
814        _.cleanUpSlideEvents();
815
816        if (_.options.accessibility === true) {
817            _.$list.off('keydown.slick', _.keyHandler);
818        }
819
820        if (_.options.focusOnSelect === true) {
821            $(_.$slideTrack).children().off('click.slick', _.selectHandler);
822        }
823
824        $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);
825
826        $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);
827
828        $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);
829
830        $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
831
832    };
833
834    Slick.prototype.cleanUpSlideEvents = function() {
835
836        var _ = this;
837
838        _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));
839        _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));
840
841    };
842
843    Slick.prototype.cleanUpRows = function() {
844
845        var _ = this, originalSlides;
846
847        if(_.options.rows > 1) {
848            originalSlides = _.$slides.children().children();
849            originalSlides.removeAttr('style');
850            _.$slider.empty().append(originalSlides);
851        }
852
853    };
854
855    Slick.prototype.clickHandler = function(event) {
856
857        var _ = this;
858
859        if (_.shouldClick === false) {
860            event.stopImmediatePropagation();
861            event.stopPropagation();
862            event.preventDefault();
863        }
864
865    };
866
867    Slick.prototype.destroy = function(refresh) {
868
869        var _ = this;
870
871        _.autoPlayClear();
872
873        _.touchObject = {};
874
875        _.cleanUpEvents();
876
877        $('.slick-cloned', _.$slider).detach();
878
879        if (_.$dots) {
880            _.$dots.remove();
881        }
882
883        if ( _.$prevArrow && _.$prevArrow.length ) {
884
885            _.$prevArrow
886                .removeClass('slick-disabled slick-arrow slick-hidden')
887                .removeAttr('aria-hidden aria-disabled tabindex')
888                .css('display','');
889
890            if ( _.htmlExpr.test( _.options.prevArrow )) {
891                _.$prevArrow.remove();
892            }
893        }
894
895        if ( _.$nextArrow && _.$nextArrow.length ) {
896
897            _.$nextArrow
898                .removeClass('slick-disabled slick-arrow slick-hidden')
899                .removeAttr('aria-hidden aria-disabled tabindex')
900                .css('display','');
901
902            if ( _.htmlExpr.test( _.options.nextArrow )) {
903                _.$nextArrow.remove();
904            }
905        }
906
907
908        if (_.$slides) {
909
910            _.$slides
911                .removeClass('slick-slide slick-active slick-center slick-visible slick-current')
912                .removeAttr('aria-hidden')
913                .removeAttr('data-slick-index')
914                .each(function(){
915                    $(this).attr('style', $(this).data('originalStyling'));
916                });
917
918            _.$slideTrack.children(this.options.slide).detach();
919
920            _.$slideTrack.detach();
921
922            _.$list.detach();
923
924            _.$slider.append(_.$slides);
925        }
926
927        _.cleanUpRows();
928
929        _.$slider.removeClass('slick-slider');
930        _.$slider.removeClass('slick-initialized');
931        _.$slider.removeClass('slick-dotted');
932
933        _.unslicked = true;
934
935        if(!refresh) {
936            _.$slider.trigger('destroy', [_]);
937        }
938
939    };
940
941    Slick.prototype.disableTransition = function(slide) {
942
943        var _ = this,
944            transition = {};
945
946        transition[_.transitionType] = '';
947
948        if (_.options.fade === false) {
949            _.$slideTrack.css(transition);
950        } else {
951            _.$slides.eq(slide).css(transition);
952        }
953
954    };
955
956    Slick.prototype.fadeSlide = function(slideIndex, callback) {
957
958        var _ = this;
959
960        if (_.cssTransitions === false) {
961
962            _.$slides.eq(slideIndex).css({
963                zIndex: _.options.zIndex
964            });
965
966            _.$slides.eq(slideIndex).animate({
967                opacity: 1
968            }, _.options.speed, _.options.easing, callback);
969
970        } else {
971
972            _.applyTransition(slideIndex);
973
974            _.$slides.eq(slideIndex).css({
975                opacity: 1,
976                zIndex: _.options.zIndex
977            });
978
979            if (callback) {
980                setTimeout(function() {
981
982                    _.disableTransition(slideIndex);
983
984                    callback.call();
985                }, _.options.speed);
986            }
987
988        }
989
990    };
991
992    Slick.prototype.fadeSlideOut = function(slideIndex) {
993
994        var _ = this;
995
996        if (_.cssTransitions === false) {
997
998            _.$slides.eq(slideIndex).animate({
999                opacity: 0,
1000                zIndex: _.options.zIndex - 2
1001            }, _.options.speed, _.options.easing);
1002
1003        } else {
1004
1005            _.applyTransition(slideIndex);
1006
1007            _.$slides.eq(slideIndex).css({
1008                opacity: 0,
1009                zIndex: _.options.zIndex - 2
1010            });
1011
1012        }
1013
1014    };
1015
1016    Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) {
1017
1018        var _ = this;
1019
1020        if (filter !== null) {
1021
1022            _.$slidesCache = _.$slides;
1023
1024            _.unload();
1025
1026            _.$slideTrack.children(this.options.slide).detach();
1027
1028            _.$slidesCache.filter(filter).appendTo(_.$slideTrack);
1029
1030            _.reinit();
1031
1032        }
1033
1034    };
1035
1036    Slick.prototype.focusHandler = function() {
1037
1038        var _ = this;
1039
1040        _.$slider
1041            .off('focus.slick blur.slick')
1042            .on('focus.slick blur.slick',
1043                '*:not(.slick-arrow)', function(event) {
1044
1045            event.stopImmediatePropagation();
1046            var $sf = $(this);
1047
1048            setTimeout(function() {
1049
1050                if( _.options.pauseOnFocus ) {
1051                    _.focussed = $sf.is(':focus');
1052                    _.autoPlay();
1053                }
1054
1055            }, 0);
1056
1057        });
1058    };
1059
1060    Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() {
1061
1062        var _ = this;
1063        return _.currentSlide;
1064
1065    };
1066
1067    Slick.prototype.getDotCount = function() {
1068
1069        var _ = this;
1070
1071        var breakPoint = 0;
1072        var counter = 0;
1073        var pagerQty = 0;
1074
1075        if (_.options.infinite === true) {
1076            while (breakPoint < _.slideCount) {
1077                ++pagerQty;
1078                breakPoint = counter + _.options.slidesToScroll;
1079                counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1080            }
1081        } else if (_.options.centerMode === true) {
1082            pagerQty = _.slideCount;
1083        } else if(!_.options.asNavFor) {
1084            pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
1085        }else {
1086            while (breakPoint < _.slideCount) {
1087                ++pagerQty;
1088                breakPoint = counter + _.options.slidesToScroll;
1089                counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1090            }
1091        }
1092
1093        return pagerQty - 1;
1094
1095    };
1096
1097    Slick.prototype.getLeft = function(slideIndex) {
1098
1099        var _ = this,
1100            targetLeft,
1101            verticalHeight,
1102            verticalOffset = 0,
1103            targetSlide;
1104
1105        _.slideOffset = 0;
1106        verticalHeight = _.$slides.first().outerHeight(true);
1107
1108        if (_.options.infinite === true) {
1109            if (_.slideCount > _.options.slidesToShow) {
1110                _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
1111                verticalOffset = (verticalHeight * _.options.slidesToShow) * -1
vendor: 6,628 bytes, lines 1111-1311
1111;
1112            }
1113            if (_.slideCount % _.options.slidesToScroll !== 0) {
1114                if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
1115                    if (slideIndex > _.slideCount) {
1116                        _.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
1117                        verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
1118                    } else {
1119                        _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
1120                        verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
1121                    }
1122                }
1123            }
1124        } else {
1125            if (slideIndex + _.options.slidesToShow > _.slideCount) {
1126                _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
1127                verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
1128            }
1129        }
1130
1131        if (_.slideCount <= _.options.slidesToShow) {
1132            _.slideOffset = 0;
1133            verticalOffset = 0;
1134        }
1135
1136        if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) {
1137            _.slideOffset = ((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2) - ((_.slideWidth * _.slideCount) / 2);
1138        } else if (_.options.centerMode === true && _.options.infinite === true) {
1139            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
1140        } else if (_.options.centerMode === true) {
1141            _.slideOffset = 0;
1142            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
1143        }
1144
1145        if (_.options.vertical === false) {
1146            targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
1147        } else {
1148            targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
1149        }
1150
1151        if (_.options.variableWidth === true) {
1152
1153            if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
1154                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
1155            } else {
1156                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
1157            }
1158
1159            if (_.options.rtl === true) {
1160                if (targetSlide[0]) {
1161                    targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
1162                } else {
1163                    targetLeft =  0;
1164                }
1165            } else {
1166                targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
1167            }
1168
1169            if (_.options.centerMode === true) {
1170                if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
1171                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
1172                } else {
1173                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
1174                }
1175
1176                if (_.options.rtl === true) {
1177                    if (targetSlide[0]) {
1178                        targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
1179                    } else {
1180                        targetLeft =  0;
1181                    }
1182                } else {
1183                    targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
1184                }
1185
1186                targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
1187            }
1188        }
1189
1190        return targetLeft;
1191
1192    };
1193
1194    Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) {
1195
1196        var _ = this;
1197
1198        return _.options[option];
1199
1200    };
1201
1202    Slick.prototype.getNavigableIndexes = function() {
1203
1204        var _ = this,
1205            breakPoint = 0,
1206            counter = 0,
1207            indexes = [],
1208            max;
1209
1210        if (_.options.infinite === false) {
1211            max = _.slideCount;
1212        } else {
1213            breakPoint = _.options.slidesToScroll * -1;
1214            counter = _.options.slidesToScroll * -1;
1215            max = _.slideCount * 2;
1216        }
1217
1218        while (breakPoint < max) {
1219            indexes.push(breakPoint);
1220            breakPoint = counter + _.options.slidesToScroll;
1221            counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1222        }
1223
1224        return indexes;
1225
1226    };
1227
1228    Slick.prototype.getSlick = function() {
1229
1230        return this;
1231
1232    };
1233
1234    Slick.prototype.getSlideCount = function() {
1235
1236        var _ = this,
1237            slidesTraversed, swipedSlide, centerOffset;
1238
1239        centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;
1240
1241        if (_.options.swipeToSlide === true) {
1242            _.$slideTrack.find('.slick-slide').each(function(index, slide) {
1243                if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {
1244                    swipedSlide = slide;
1245                    return false;
1246                }
1247            });
1248
1249            slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;
1250
1251            return slidesTraversed;
1252
1253        } else {
1254            return _.options.slidesToScroll;
1255        }
1256
1257    };
1258
1259    Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) {
1260
1261        var _ = this;
1262
1263        _.changeSlide({
1264            data: {
1265                message: 'index',
1266                index: parseInt(slide)
1267            }
1268        }, dontAnimate);
1269
1270    };
1271
1272    Slick.prototype.init = function(creation) {
1273
1274        var _ = this;
1275
1276        if (!$(_.$slider).hasClass('slick-initialized')) {
1277
1278            $(_.$slider).addClass('slick-initialized');
1279
1280            _.buildRows();
1281            _.buildOut();
1282            _.setProps();
1283            _.startLoad();
1284            _.loadSlider();
1285            _.initializeEvents();
1286            _.updateArrows();
1287            _.updateDots();
1288            _.checkResponsive(true);
1289            _.focusHandler();
1290
1291        }
1292
1293        if (creation) {
1294            _.$slider.trigger('init', [_]);
1295        }
1296
1297        if (_.options.accessibility === true) {
1298            _.initADA();
1299        }
1300
1301        if ( _.options.autoplay ) {
1302
1303            _.paused = false;
1304            _.autoPlay();
1305
1306        }
1307
1308    };
1309
1310    Slick.prototype.initADA = function() {
1311        var _ = this
1311;
1312        _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
1313            'aria-hidden': 'true',
1314            'tabindex': '-1'
1315        }).find('a, input, button, select').attr({
1316            'tabindex': '-1'
1317        });
1318
1319        _.$slideTrack.attr('role', 'listbox');
1320
1321        _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {
1322            $(this).attr('role', 'option');
1323
1324            //Evenly distribute aria-describedby tags through available dots.
1325            var describedBySlideId = _.options.centerMode ? i : Math.floor(i / _.options.slidesToShow);
1326
1327            if (_.options.dots === true) {
1328                $(this).attr('aria-describedby', 'slick-slide' + _.instanceUid + describedBySlideId + '');
1329            }
1330        });
1331
1332        if (_.$dots !== null) {
1333            _.$dots.attr('role', 'tablist').find('li').each(function(i) {
1334                $(this).attr({
1335                    'role': 'presentation',
1336                    'aria-selected': 'false',
1337                    'aria-controls': 'navigation' + _.instanceUid + i + '',
1338                    'id': 'slick-slide' + _.instanceUid + i + ''
1339                });
1340            })
1341                .first().attr('aria-selected', 'true').end()
1342                .find('button').attr('role', 'button').end()
1343                .closest('div').attr('role', 'toolbar');
1344        }
1345        _.activateADA();
1346
1347    };
1348
1349    Slick.prototype.initArrowEvents = function() {
1350
1351        var _ = this;
1352
1353        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
1354            _.$prevArrow
1355               .off('click.slick')
1356               .on('click.slick', {
1357                    message: 'previous'
1358               }, _.changeSlide);
1359            _.$nextArrow
1360               .off('click.slick')
1361               .on('click.slick', {
1362                    message: 'next'
1363               }, _.changeSlide);
1364        }
1365
1366    };
1367
1368    Slick.prototype.initDotEvents = function() {
1369
1370        var _ = this;
1371
1372        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
1373            $('li', _.$dots).on('click.slick', {
1374                message: 'index'
1375            }, _.changeSlide);
1376        }
1377
1378        if ( _.options.dots === true && _.options.pauseOnDotsHover === true ) {
1379
1380            $('li', _.$dots)
1381                .on('mouseenter.slick', $.proxy(_.interrupt, _, true))
1382                .on('mouseleave.slick', $.proxy(_.interrupt, _, false));
1383
1384        }
1385
1386    };
1387
1388    Slick.prototype.initSlideEvents = function() {
1389
1390        var _ = this;
1391
1392        if ( _.options.pauseOnHover ) {
1393
1394            _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
1395            _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));
1396
1397        }
1398
1399    };
1400
1401    Slick.prototype.initializeEvents = function() {
1402
1403        var _ = this;
1404
1405        _.initArrowEvents();
1406
1407        _.initDotEvents();
1408        _.initSlideEvents();
1409
1410        _.$list.on('touchstart.slick mousedown.slick', {
1411            action: 'start'
1412        }, _.swipeHandler);
1413        _.$list.on('touchmove.slick mousemove.slick', {
1414            action: 'move'
1415        }, _.swipeHandler);
1416        _.$list.on('touchend.slick mouseup.slick', {
1417            action: 'end'
1418        }, _.swipeHandler);
vendor: 7,590 bytes, lines 1419-1676
1419        _.$list.on('touchcancel.slick mouseleave.slick', {
1420            action: 'end'
1421        }, _.swipeHandler);
1422
1423        _.$list.on('click.slick', _.clickHandler);
1424
1425        $(document).on(_.visibilityChange, $.proxy(_.visibility, _));
1426
1427        if (_.options.accessibility === true) {
1428            _.$list.on('keydown.slick', _.keyHandler);
1429        }
1430
1431        if (_.options.focusOnSelect === true) {
1432            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
1433        }
1434
1435        $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));
1436
1437        $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));
1438
1439        $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);
1440
1441        $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
1442        $(document).ready(_.setPosition);
1443
1444    };
1445
1446    Slick.prototype.initUI = function() {
1447
1448        var _ = this;
1449
1450        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
1451
1452            _.$prevArrow.show();
1453            _.$nextArrow.show();
1454
1455        }
1456
1457        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
1458
1459            _.$dots.show();
1460
1461        }
1462
1463    };
1464
1465    Slick.prototype.keyHandler = function(event) {
1466
1467        var _ = this;
1468         //Dont slide if the cursor is inside the form fields and arrow keys are pressed
1469        if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
1470            if (event.keyCode === 37 && _.options.accessibility === true) {
1471                _.changeSlide({
1472                    data: {
1473                        message: _.options.rtl === true ? 'next' :  'previous'
1474                    }
1475                });
1476            } else if (event.keyCode === 39 && _.options.accessibility === true) {
1477                _.changeSlide({
1478                    data: {
1479                        message: _.options.rtl === true ? 'previous' : 'next'
1480                    }
1481                });
1482            }
1483        }
1484
1485    };
1486
1487    Slick.prototype.lazyLoad = function() {
1488
1489        var _ = this,
1490            loadRange, cloneRange, rangeStart, rangeEnd;
1491
1492        function loadImages(imagesScope) {
1493
1494            $('img[data-lazy]', imagesScope).each(function() {
1495
1496                var image = $(this),
1497                    imageSource = $(this).attr('data-lazy'),
1498                    imageSrcSet = $(this).attr('data-srcset'),
1499                    imageSizes  = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'),
1500                    imageToLoad = document.createElement('img');
1501
1502                imageToLoad.onload = function() {
1503
1504                    image
1505                        .animate({ opacity: 0 }, 100, function() {
1506
1507                            if (imageSrcSet) {
1508                                image
1509                                    .attr('srcset', imageSrcSet );
1510
1511                                if (imageSizes) {
1512                                    image
1513                                        .attr('sizes', imageSizes );
1514                                }
1515                            }
1516
1517                            image
1518                                .attr('src', imageSource)
1519                                .animate({ opacity: 1 }, 200, function() {
1520                                    image
1521                                        .removeAttr('data-lazy data-srcset data-sizes')
1522                                        .removeClass('slick-loading');
1523                                });
1524                            _.$slider.trigger('lazyLoaded', [_, image, imageSource]);
1525                        });
1526
1527                };
1528
1529                imageToLoad.onerror = function() {
1530
1531                    image
1532                        .removeAttr( 'data-lazy' )
1533                        .removeClass( 'slick-loading' )
1534                        .addClass( 'slick-lazyload-error' );
1535
1536                    _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
1537
1538                };
1539
1540                imageToLoad.src = imageSource;
1541
1542            });
1543
1544        }
1545
1546        if (_.options.centerMode === true) {
1547            if (_.options.infinite === true) {
1548                rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
1549                rangeEnd = rangeStart + _.options.slidesToShow + 2;
1550            } else {
1551                rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
1552                rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
1553            }
1554        } else {
1555            rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
1556            rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);
1557            if (_.options.fade === true) {
1558                if (rangeStart > 0) rangeStart--;
1559                if (rangeEnd <= _.slideCount) rangeEnd++;
1560            }
1561        }
1562
1563        loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
1564
1565        if (_.options.lazyLoad === 'anticipated') {
1566            var prevSlide = rangeStart - 1,
1567                nextSlide = rangeEnd,
1568                $slides = _.$slider.find('.slick-slide');
1569
1570            for (var i = 0; i < _.options.slidesToScroll; i++) {
1571                if (prevSlide < 0) prevSlide = _.slideCount - 1;
1572                loadRange = loadRange.add($slides.eq(prevSlide));
1573                loadRange = loadRange.add($slides.eq(nextSlide));
1574                prevSlide--;
1575                nextSlide++;
1576            }
1577        }
1578
1579        loadImages(loadRange);
1580
1581        if (_.slideCount <= _.options.slidesToShow) {
1582            cloneRange = _.$slider.find('.slick-slide');
1583            loadImages(cloneRange);
1584        } else
1585        if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
1586            cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
1587            loadImages(cloneRange);
1588        } else if (_.currentSlide === 0) {
1589            cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
1590            loadImages(cloneRange);
1591        }
1592
1593    };
1594
1595    Slick.prototype.loadSlider = function() {
1596
1597        var _ = this;
1598
1599        _.setPosition();
1600
1601        _.$slideTrack.css({
1602            opacity: 1
1603        });
1604
1605        _.$slider.removeClass('slick-loading');
1606
1607        _.initUI();
1608
1609        if (_.options.lazyLoad === 'progressive') {
1610            _.progressiveLazyLoad();
1611        }
1612
1613    };
1614
1615    Slick.prototype.next = Slick.prototype.slickNext = function() {
1616
1617        var _ = this;
1618
1619        _.changeSlide({
1620            data: {
1621                message: 'next'
1622            }
1623        });
1624
1625    };
1626
1627    Slick.prototype.orientationChange = function() {
1628
1629        var _ = this;
1630
1631        _.checkResponsive();
1632        _.setPosition();
1633
1634    };
1635
1636    Slick.prototype.pause = Slick.prototype.slickPause = function() {
1637
1638        var _ = this;
1639
1640        _.autoPlayClear();
1641        _.paused = true;
1642
1643    };
1644
1645    Slick.prototype.play = Slick.prototype.slickPlay = function() {
1646
1647        var _ = this;
1648
1649        _.autoPlay();
1650        _.options.autoplay = true;
1651        _.paused = false;
1652        _.focussed = false;
1653        _.interrupted = false;
1654
1655    };
1656
1657    Slick.prototype.postSlide = function(index) {
1658
1659        var _ = this;
1660
1661        if( !_.unslicked ) {
1662
1663            _.$slider.trigger('afterChange', [_, index]);
1664
1665            _.animating = false;
1666
1667            _.setPosition();
1668
1669            _.swipeLeft = null;
1670
1671            if ( _.options.autoplay ) {
1672                _.autoPlay();
1673            }
1674
1675            if (_.options.accessibility === true) {
1676                _.initADA();
vendor: 16,676 bytes, lines 1676-2271
1676
1677            }
1678
1679        }
1680
1681    };
1682
1683    Slick.prototype.prev = Slick.prototype.slickPrev = function() {
1684
1685        var _ = this;
1686
1687        _.changeSlide({
1688            data: {
1689                message: 'previous'
1690            }
1691        });
1692
1693    };
1694
1695    Slick.prototype.preventDefault = function(event) {
1696
1697        event.preventDefault();
1698
1699    };
1700
1701    Slick.prototype.progressiveLazyLoad = function( tryCount ) {
1702
1703        tryCount = tryCount || 1;
1704
1705        var _ = this,
1706            $imgsToLoad = $( 'img[data-lazy]', _.$slider ),
1707            image,
1708            imageSource,
1709            imageSrcSet,
1710            imageSizes,
1711            imageToLoad;
1712
1713        if ( $imgsToLoad.length ) {
1714
1715            image = $imgsToLoad.first();
1716            imageSource = image.attr('data-lazy');
1717            imageSrcSet = image.attr('data-srcset');
1718            imageSizes  = image.attr('data-sizes') || _.$slider.attr('data-sizes');
1719            imageToLoad = document.createElement('img');
1720
1721            imageToLoad.onload = function() {
1722
1723                if (imageSrcSet) {
1724                    image
1725                        .attr('srcset', imageSrcSet );
1726
1727                    if (imageSizes) {
1728                        image
1729                            .attr('sizes', imageSizes );
1730                    }
1731                }
1732
1733                image
1734                    .attr( 'src', imageSource )
1735                    .removeAttr('data-lazy data-srcset data-sizes')
1736                    .removeClass('slick-loading');
1737
1738                if ( _.options.adaptiveHeight === true ) {
1739                    _.setPosition();
1740                }
1741
1742                _.$slider.trigger('lazyLoaded', [ _, image, imageSource ]);
1743                _.progressiveLazyLoad();
1744
1745            };
1746
1747            imageToLoad.onerror = function() {
1748
1749                if ( tryCount < 3 ) {
1750
1751                    /**
1752                     * try to load the image 3 times,
1753                     * leave a slight delay so we don't get
1754                     * servers blocking the request.
1755                     */
1756                    setTimeout( function() {
1757                        _.progressiveLazyLoad( tryCount + 1 );
1758                    }, 500 );
1759
1760                } else {
1761
1762                    image
1763                        .removeAttr( 'data-lazy' )
1764                        .removeClass( 'slick-loading' )
1765                        .addClass( 'slick-lazyload-error' );
1766
1767                    _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
1768
1769                    _.progressiveLazyLoad();
1770
1771                }
1772
1773            };
1774
1775            imageToLoad.src = imageSource;
1776
1777        } else {
1778
1779            _.$slider.trigger('allImagesLoaded', [ _ ]);
1780
1781        }
1782
1783    };
1784
1785    Slick.prototype.refresh = function( initializing ) {
1786
1787        var _ = this, currentSlide, lastVisibleIndex;
1788
1789        lastVisibleIndex = _.slideCount - _.options.slidesToShow;
1790
1791        // in non-infinite sliders, we don't want to go past the
1792        // last visible index.
1793        if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) {
1794            _.currentSlide = lastVisibleIndex;
1795        }
1796
1797        // if less slides than to show, go to start.
1798        if ( _.slideCount <= _.options.slidesToShow ) {
1799            _.currentSlide = 0;
1800
1801        }
1802
1803        currentSlide = _.currentSlide;
1804
1805        _.destroy(true);
1806
1807        $.extend(_, _.initials, { currentSlide: currentSlide });
1808
1809        _.init();
1810
1811        if( !initializing ) {
1812
1813            _.changeSlide({
1814                data: {
1815                    message: 'index',
1816                    index: currentSlide
1817                }
1818            }, false);
1819
1820        }
1821
1822    };
1823
1824    Slick.prototype.registerBreakpoints = function() {
1825
1826        var _ = this, breakpoint, currentBreakpoint, l,
1827            responsiveSettings = _.options.responsive || null;
1828
1829        if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) {
1830
1831            _.respondTo = _.options.respondTo || 'window';
1832
1833            for ( breakpoint in responsiveSettings ) {
1834
1835                l = _.breakpoints.length-1;
1836
1837                if (responsiveSettings.hasOwnProperty(breakpoint)) {
1838                    currentBreakpoint = responsiveSettings[breakpoint].breakpoint;
1839
1840                    // loop through the breakpoints and cut out any existing
1841                    // ones with the same breakpoint number, we don't want dupes.
1842                    while( l >= 0 ) {
1843                        if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) {
1844                            _.breakpoints.splice(l,1);
1845                        }
1846                        l--;
1847                    }
1848
1849                    _.breakpoints.push(currentBreakpoint);
1850                    _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;
1851
1852                }
1853
1854            }
1855
1856            _.breakpoints.sort(function(a, b) {
1857                return ( _.options.mobileFirst ) ? a-b : b-a;
1858            });
1859
1860        }
1861
1862    };
1863
1864    Slick.prototype.reinit = function() {
1865
1866        var _ = this;
1867
1868        _.$slides =
1869            _.$slideTrack
1870                .children(_.options.slide)
1871                .addClass('slick-slide');
1872
1873        _.slideCount = _.$slides.length;
1874
1875        if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
1876            _.currentSlide = _.currentSlide - _.options.slidesToScroll;
1877        }
1878
1879        if (_.slideCount <= _.options.slidesToShow) {
1880            _.currentSlide = 0;
1881        }
1882
1883        _.registerBreakpoints();
1884
1885        _.setProps();
1886        _.setupInfinite();
1887        _.buildArrows();
1888        _.updateArrows();
1889        _.initArrowEvents();
1890        _.buildDots();
1891        _.updateDots();
1892        _.initDotEvents();
1893        _.cleanUpSlideEvents();
1894        _.initSlideEvents();
1895
1896        _.checkResponsive(false, true);
1897
1898        if (_.options.focusOnSelect === true) {
1899            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
1900        }
1901
1902        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
1903
1904        _.setPosition();
1905        _.focusHandler();
1906
1907        _.paused = !_.options.autoplay;
1908        _.autoPlay();
1909
1910        _.$slider.trigger('reInit', [_]);
1911
1912    };
1913
1914    Slick.prototype.resize = function() {
1915
1916        var _ = this;
1917
1918        if ($(window).width() !== _.windowWidth) {
1919            clearTimeout(_.windowDelay);
1920            _.windowDelay = window.setTimeout(function() {
1921                _.windowWidth = $(window).width();
1922                _.checkResponsive();
1923                if( !_.unslicked ) { _.setPosition(); }
1924            }, 50);
1925        }
1926    };
1927
1928    Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) {
1929
1930        var _ = this;
1931
1932        if (typeof(index) === 'boolean') {
1933            removeBefore = index;
1934            index = removeBefore === true ? 0 : _.slideCount - 1;
1935        } else {
1936            index = removeBefore === true ? --index : index;
1937        }
1938
1939        if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
1940            return false;
1941        }
1942
1943        _.unload();
1944
1945        if (removeAll === true) {
1946            _.$slideTrack.children().remove();
1947        } else {
1948            _.$slideTrack.children(this.options.slide).eq(index).remove();
1949        }
1950
1951        _.$slides = _.$slideTrack.children(this.options.slide);
1952
1953        _.$slideTrack.children(this.options.slide).detach();
1954
1955        _.$slideTrack.append(_.$slides);
1956
1957        _.$slidesCache = _.$slides;
1958
1959        _.reinit();
1960
1961    };
1962
1963    Slick.prototype.setCSS = function(position) {
1964
1965        var _ = this,
1966            positionProps = {},
1967            x, y;
1968
1969        if (_.options.rtl === true) {
1970            position = -position;
1971        }
1972        x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
1973        y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';
1974
1975        positionProps[_.positionProp] = position;
1976
1977        if (_.transformsEnabled === false) {
1978            _.$slideTrack.css(positionProps);
1979        } else {
1980            positionProps = {};
1981            if (_.cssTransitions === false) {
1982                positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
1983                _.$slideTrack.css(positionProps);
1984            } else {
1985                positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
1986                _.$slideTrack.css(positionProps);
1987            }
1988        }
1989
1990    };
1991
1992    Slick.prototype.setDimensions = function() {
1993
1994        var _ = this;
1995
1996        if (_.options.vertical === false) {
1997            if (_.options.centerMode === true) {
1998                _.$list.css({
1999                    padding: ('0px ' + _.options.centerPadding)
2000                });
2001            }
2002        } else {
2003            _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
2004            if (_.options.centerMode === true) {
2005                _.$list.css({
2006                    padding: (_.options.centerPadding + ' 0px')
2007                });
2008            }
2009        }
2010
2011        _.listWidth = _.$list.width();
2012        _.listHeight = _.$list.height();
2013
2014
2015        if (_.options.vertical === false && _.options.variableWidth === false) {
2016            _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
2017            _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));
2018
2019        } else if (_.options.variableWidth === true) {
2020            _.$slideTrack.width(5000 * _.slideCount);
2021        } else {
2022            _.slideWidth = Math.ceil(_.listWidth);
2023            _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
2024        }
2025
2026        var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
2027        if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);
2028
2029    };
2030
2031    Slick.prototype.setFade = function() {
2032
2033        var _ = this,
2034            targetLeft;
2035
2036        _.$slides.each(function(index, element) {
2037            targetLeft = (_.slideWidth * index) * -1;
2038            if (_.options.rtl === true) {
2039                $(element).css({
2040                    position: 'relative',
2041                    right: targetLeft,
2042                    top: 0,
2043                    zIndex: _.options.zIndex - 2,
2044                    opacity: 0
2045                });
2046            } else {
2047                $(element).css({
2048                    position: 'relative',
2049                    left: targetLeft,
2050                    top: 0,
2051                    zIndex: _.options.zIndex - 2,
2052                    opacity: 0
2053                });
2054            }
2055        });
2056
2057        _.$slides.eq(_.currentSlide).css({
2058            zIndex: _.options.zIndex - 1,
2059            opacity: 1
2060        });
2061
2062    };
2063
2064    Slick.prototype.setHeight = function() {
2065
2066        var _ = this;
2067
2068        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
2069            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
2070            _.$list.css('height', targetHeight);
2071        }
2072
2073    };
2074
2075    Slick.prototype.setOption =
2076    Slick.prototype.slickSetOption = function() {
2077
2078        /**
2079         * accepts arguments in format of:
2080         *
2081         *  - for changing a single option's value:
2082         *     .slick("setOption", option, value, refresh )
2083         *
2084         *  - for changing a set of responsive options:
2085         *     .slick("setOption", 'responsive', [{}, ...], refresh )
2086         *
2087         *  - for updating multiple values at once (not responsive)
2088         *     .slick("setOption", { 'option': value, ... }, refresh )
2089         */
2090
2091        var _ = this, l, item, option, value, refresh = false, type;
2092
2093        if( $.type( arguments[0] ) === 'object' ) {
2094
2095            option =  arguments[0];
2096            refresh = arguments[1];
2097            type = 'multiple';
2098
2099        } else if ( $.type( arguments[0] ) === 'string' ) {
2100
2101            option =  arguments[0];
2102            value = arguments[1];
2103            refresh = arguments[2];
2104
2105            if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) {
2106
2107                type = 'responsive';
2108
2109            } else if ( typeof arguments[1] !== 'undefined' ) {
2110
2111                type = 'single';
2112
2113            }
2114
2115        }
2116
2117        if ( type === 'single' ) {
2118
2119            _.options[option] = value;
2120
2121
2122        } else if ( type === 'multiple' ) {
2123
2124            $.each( option , function( opt, val ) {
2125
2126                _.options[opt] = val;
2127
2128            });
2129
2130
2131        } else if ( type === 'responsive' ) {
2132
2133            for ( item in value ) {
2134
2135                if( $.type( _.options.responsive ) !== 'array' ) {
2136
2137                    _.options.responsive = [ value[item] ];
2138
2139                } else {
2140
2141                    l = _.options.responsive.length-1;
2142
2143                    // loop through the responsive object and splice out duplicates.
2144                    while( l >= 0 ) {
2145
2146                        if( _.options.responsive[l].breakpoint === value[item].breakpoint ) {
2147
2148                            _.options.responsive.splice(l,1);
2149
2150                        }
2151
2152                        l--;
2153
2154                    }
2155
2156                    _.options.responsive.push( value[item] );
2157
2158                }
2159
2160            }
2161
2162        }
2163
2164        if ( refresh ) {
2165
2166            _.unload();
2167            _.reinit();
2168
2169        }
2170
2171    };
2172
2173    Slick.prototype.setPosition = function() {
2174
2175        var _ = this;
2176
2177        _.setDimensions();
2178
2179        _.setHeight();
2180
2181        if (_.options.fade === false) {
2182            _.setCSS(_.getLeft(_.currentSlide));
2183        } else {
2184            _.setFade();
2185        }
2186
2187        _.$slider.trigger('setPosition', [_]);
2188
2189    };
2190
2191    Slick.prototype.setProps = function() {
2192
2193        var _ = this,
2194            bodyStyle = document.body.style;
2195
2196        _.positionProp = _.options.vertical === true ? 'top' : 'left';
2197
2198        if (_.positionProp === 'top') {
2199            _.$slider.addClass('slick-vertical');
2200        } else {
2201            _.$slider.removeClass('slick-vertical');
2202        }
2203
2204        if (bodyStyle.WebkitTransition !== undefined ||
2205            bodyStyle.MozTransition !== undefined ||
2206            bodyStyle.msTransition !== undefined) {
2207            if (_.options.useCSS === true) {
2208                _.cssTransitions = true;
2209            }
2210        }
2211
2212        if ( _.options.fade ) {
2213            if ( typeof _.options.zIndex === 'number' ) {
2214                if( _.options.zIndex < 3 ) {
2215                    _.options.zIndex = 3;
2216                }
2217            } else {
2218                _.options.zIndex = _.defaults.zIndex;
2219            }
2220        }
2221
2222        if (bodyStyle.OTransform !== undefined) {
2223            _.animType = 'OTransform';
2224            _.transformType = '-o-transform';
2225            _.transitionType = 'OTransition';
2226            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
2227        }
2228        if (bodyStyle.MozTransform !== undefined) {
2229            _.animType = 'MozTransform';
2230            _.transformType = '-moz-transform';
2231            _.transitionType = 'MozTransition';
2232            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
2233        }
2234        if (bodyStyle.webkitTransform !== undefined) {
2235            _.animType = 'webkitTransform';
2236            _.transformType = '-webkit-transform';
2237            _.transitionType = 'webkitTransition';
2238            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
2239        }
2240        if (bodyStyle.msTransform !== undefined) {
2241            _.animType = 'msTransform';
2242            _.transformType = '-ms-transform';
2243            _.transitionType = 'msTransition';
2244            if (bodyStyle.msTransform === undefined) _.animType = false;
2245        }
2246        if (bodyStyle.transform !== undefined && _.animType !== false) {
2247            _.animType = 'transform';
2248            _.transformType = 'transform';
2249            _.transitionType = 'transition';
2250        }
2251        _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
2252    };
2253
2254
2255    Slick.prototype.setSlideClasses = function(index) {
2256
2257        var _ = this,
2258            centerOffset, allSlides, indexOffset, remainder;
2259
2260        allSlides = _.$slider
2261            .find('.slick-slide')
2262            .removeClass('slick-active slick-center slick-current')
2263            .attr('aria-hidden', 'true');
2264
2265        _.$slides
2266            .eq(index)
2267            .addClass('slick-current');
2268
2269        if (_.options.centerMode === true) {
2270
2271            
vendor: 17,913 bytes, lines 2271-2896
2271centerOffset = Math.floor(_.options.slidesToShow / 2);
2272
2273            if (_.options.infinite === true) {
2274
2275                if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {
2276
2277                    _.$slides
2278                        .slice(index - centerOffset, index + centerOffset + 1)
2279                        .addClass('slick-active')
2280                        .attr('aria-hidden', 'false');
2281
2282                } else {
2283
2284                    indexOffset = _.options.slidesToShow + index;
2285                    allSlides
2286                        .slice(indexOffset - centerOffset + 1, indexOffset + centerOffset + 2)
2287                        .addClass('slick-active')
2288                        .attr('aria-hidden', 'false');
2289
2290                }
2291
2292                if (index === 0) {
2293
2294                    allSlides
2295                        .eq(allSlides.length - 1 - _.options.slidesToShow)
2296                        .addClass('slick-center');
2297
2298                } else if (index === _.slideCount - 1) {
2299
2300                    allSlides
2301                        .eq(_.options.slidesToShow)
2302                        .addClass('slick-center');
2303
2304                }
2305
2306            }
2307
2308            _.$slides
2309                .eq(index)
2310                .addClass('slick-center');
2311
2312        } else {
2313
2314            if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {
2315
2316                _.$slides
2317                    .slice(index, index + _.options.slidesToShow)
2318                    .addClass('slick-active')
2319                    .attr('aria-hidden', 'false');
2320
2321            } else if (allSlides.length <= _.options.slidesToShow) {
2322
2323                allSlides
2324                    .addClass('slick-active')
2325                    .attr('aria-hidden', 'false');
2326
2327            } else {
2328
2329                remainder = _.slideCount % _.options.slidesToShow;
2330                indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;
2331
2332                if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {
2333
2334                    allSlides
2335                        .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)
2336                        .addClass('slick-active')
2337                        .attr('aria-hidden', 'false');
2338
2339                } else {
2340
2341                    allSlides
2342                        .slice(indexOffset, indexOffset + _.options.slidesToShow)
2343                        .addClass('slick-active')
2344                        .attr('aria-hidden', 'false');
2345
2346                }
2347
2348            }
2349
2350        }
2351
2352        if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') {
2353            _.lazyLoad();
2354        }
2355    };
2356
2357    Slick.prototype.setupInfinite = function() {
2358
2359        var _ = this,
2360            i, slideIndex, infiniteCount;
2361
2362        if (_.options.fade === true) {
2363            _.options.centerMode = false;
2364        }
2365
2366        if (_.options.infinite === true && _.options.fade === false) {
2367
2368            slideIndex = null;
2369
2370            if (_.slideCount > _.options.slidesToShow) {
2371
2372                if (_.options.centerMode === true) {
2373                    infiniteCount = _.options.slidesToShow + 1;
2374                } else {
2375                    infiniteCount = _.options.slidesToShow;
2376                }
2377
2378                for (i = _.slideCount; i > (_.slideCount -
2379                        infiniteCount); i -= 1) {
2380                    slideIndex = i - 1;
2381                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
2382                        .attr('data-slick-index', slideIndex - _.slideCount)
2383                        .prependTo(_.$slideTrack).addClass('slick-cloned');
2384                }
2385                for (i = 0; i < infiniteCount; i += 1) {
2386                    slideIndex = i;
2387                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
2388                        .attr('data-slick-index', slideIndex + _.slideCount)
2389                        .appendTo(_.$slideTrack).addClass('slick-cloned');
2390                }
2391                _.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
2392                    $(this).attr('id', '');
2393                });
2394
2395            }
2396
2397        }
2398
2399    };
2400
2401    Slick.prototype.interrupt = function( toggle ) {
2402
2403        var _ = this;
2404
2405        if( !toggle ) {
2406            _.autoPlay();
2407        }
2408        _.interrupted = toggle;
2409
2410    };
2411
2412    Slick.prototype.selectHandler = function(event) {
2413
2414        var _ = this;
2415
2416        var targetElement =
2417            $(event.target).is('.slick-slide') ?
2418                $(event.target) :
2419                $(event.target).parents('.slick-slide');
2420
2421        var index = parseInt(targetElement.attr('data-slick-index'));
2422
2423        if (!index) index = 0;
2424
2425        if (_.slideCount <= _.options.slidesToShow) {
2426
2427            _.setSlideClasses(index);
2428            _.asNavFor(index);
2429            return;
2430
2431        }
2432
2433        _.slideHandler(index);
2434
2435    };
2436
2437    Slick.prototype.slideHandler = function(index, sync, dontAnimate) {
2438
2439        var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
2440            _ = this, navTarget;
2441
2442        sync = sync || false;
2443
2444        if (_.animating === true && _.options.waitForAnimate === true) {
2445            return;
2446        }
2447
2448        if (_.options.fade === true && _.currentSlide === index) {
2449            return;
2450        }
2451
2452        if (_.slideCount <= _.options.slidesToShow) {
2453            return;
2454        }
2455
2456        if (sync === false) {
2457            _.asNavFor(index);
2458        }
2459
2460        targetSlide = index;
2461        targetLeft = _.getLeft(targetSlide);
2462        slideLeft = _.getLeft(_.currentSlide);
2463
2464        _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;
2465
2466        if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
2467            if (_.options.fade === false) {
2468                targetSlide = _.currentSlide;
2469                if (dontAnimate !== true) {
2470                    _.animateSlide(slideLeft, function() {
2471                        _.postSlide(targetSlide);
2472                    });
2473                } else {
2474                    _.postSlide(targetSlide);
2475                }
2476            }
2477            return;
2478        } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
2479            if (_.options.fade === false) {
2480                targetSlide = _.currentSlide;
2481                if (dontAnimate !== true) {
2482                    _.animateSlide(slideLeft, function() {
2483                        _.postSlide(targetSlide);
2484                    });
2485                } else {
2486                    _.postSlide(targetSlide);
2487                }
2488            }
2489            return;
2490        }
2491
2492        if ( _.options.autoplay ) {
2493            clearInterval(_.autoPlayTimer);
2494        }
2495
2496        if (targetSlide < 0) {
2497            if (_.slideCount % _.options.slidesToScroll !== 0) {
2498                animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
2499            } else {
2500                animSlide = _.slideCount + targetSlide;
2501            }
2502        } else if (targetSlide >= _.slideCount) {
2503            if (_.slideCount % _.options.slidesToScroll !== 0) {
2504                animSlide = 0;
2505            } else {
2506                animSlide = targetSlide - _.slideCount;
2507            }
2508        } else {
2509            animSlide = targetSlide;
2510        }
2511
2512        _.animating = true;
2513
2514        _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);
2515
2516        oldSlide = _.currentSlide;
2517        _.currentSlide = animSlide;
2518
2519        _.setSlideClasses(_.currentSlide);
2520
2521        if ( _.options.asNavFor ) {
2522
2523            navTarget = _.getNavTarget();
2524            navTarget = navTarget.slick('getSlick');
2525
2526            if ( navTarget.slideCount <= navTarget.options.slidesToShow ) {
2527                navTarget.setSlideClasses(_.currentSlide);
2528            }
2529
2530        }
2531
2532        _.updateDots();
2533        _.updateArrows();
2534
2535        if (_.options.fade === true) {
2536            if (dontAnimate !== true) {
2537
2538                _.fadeSlideOut(oldSlide);
2539
2540                _.fadeSlide(animSlide, function() {
2541                    _.postSlide(animSlide);
2542                });
2543
2544            } else {
2545                _.postSlide(animSlide);
2546            }
2547            _.animateHeight();
2548            return;
2549        }
2550
2551        if (dontAnimate !== true) {
2552            _.animateSlide(targetLeft, function() {
2553                _.postSlide(animSlide);
2554            });
2555        } else {
2556            _.postSlide(animSlide);
2557        }
2558
2559    };
2560
2561    Slick.prototype.startLoad = function() {
2562
2563        var _ = this;
2564
2565        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
2566
2567            _.$prevArrow.hide();
2568            _.$nextArrow.hide();
2569
2570        }
2571
2572        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
2573
2574            _.$dots.hide();
2575
2576        }
2577
2578        _.$slider.addClass('slick-loading');
2579
2580    };
2581
2582    Slick.prototype.swipeDirection = function() {
2583
2584        var xDist, yDist, r, swipeAngle, _ = this;
2585
2586        xDist = _.touchObject.startX - _.touchObject.curX;
2587        yDist = _.touchObject.startY - _.touchObject.curY;
2588        r = Math.atan2(yDist, xDist);
2589
2590        swipeAngle = Math.round(r * 180 / Math.PI);
2591        if (swipeAngle < 0) {
2592            swipeAngle = 360 - Math.abs(swipeAngle);
2593        }
2594
2595        if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
2596            return (_.options.rtl === false ? 'left' : 'right');
2597        }
2598        if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
2599            return (_.options.rtl === false ? 'left' : 'right');
2600        }
2601        if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
2602            return (_.options.rtl === false ? 'right' : 'left');
2603        }
2604        if (_.options.verticalSwiping === true) {
2605            if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
2606                return 'down';
2607            } else {
2608                return 'up';
2609            }
2610        }
2611
2612        return 'vertical';
2613
2614    };
2615
2616    Slick.prototype.swipeEnd = function(event) {
2617
2618        var _ = this,
2619            slideCount,
2620            direction;
2621
2622        _.dragging = false;
2623        _.interrupted = false;
2624        _.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true;
2625
2626        if ( _.touchObject.curX === undefined ) {
2627            return false;
2628        }
2629
2630        if ( _.touchObject.edgeHit === true ) {
2631            _.$slider.trigger('edge', [_, _.swipeDirection() ]);
2632        }
2633
2634        if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) {
2635
2636            direction = _.swipeDirection();
2637
2638            switch ( direction ) {
2639
2640                case 'left':
2641                case 'down':
2642
2643                    slideCount =
2644                        _.options.swipeToSlide ?
2645                            _.checkNavigable( _.currentSlide + _.getSlideCount() ) :
2646                            _.currentSlide + _.getSlideCount();
2647
2648                    _.currentDirection = 0;
2649
2650                    break;
2651
2652                case 'right':
2653                case 'up':
2654
2655                    slideCount =
2656                        _.options.swipeToSlide ?
2657                            _.checkNavigable( _.currentSlide - _.getSlideCount() ) :
2658                            _.currentSlide - _.getSlideCount();
2659
2660                    _.currentDirection = 1;
2661
2662                    break;
2663
2664                default:
2665
2666
2667            }
2668
2669            if( direction != 'vertical' ) {
2670
2671                _.slideHandler( slideCount );
2672                _.touchObject = {};
2673                _.$slider.trigger('swipe', [_, direction ]);
2674
2675            }
2676
2677        } else {
2678
2679            if ( _.touchObject.startX !== _.touchObject.curX ) {
2680
2681                _.slideHandler( _.currentSlide );
2682                _.touchObject = {};
2683
2684            }
2685
2686        }
2687
2688    };
2689
2690    Slick.prototype.swipeHandler = function(event) {
2691
2692        var _ = this;
2693
2694        if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
2695            return;
2696        } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
2697            return;
2698        }
2699
2700        _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
2701            event.originalEvent.touches.length : 1;
2702
2703        _.touchObject.minSwipe = _.listWidth / _.options
2704            .touchThreshold;
2705
2706        if (_.options.verticalSwiping === true) {
2707            _.touchObject.minSwipe = _.listHeight / _.options
2708                .touchThreshold;
2709        }
2710
2711        switch (event.data.action) {
2712
2713            case 'start':
2714                _.swipeStart(event);
2715                break;
2716
2717            case 'move':
2718                _.swipeMove(event);
2719                break;
2720
2721            case 'end':
2722                _.swipeEnd(event);
2723                break;
2724
2725        }
2726
2727    };
2728
2729    Slick.prototype.swipeMove = function(event) {
2730
2731        var _ = this,
2732            edgeWasHit = false,
2733            curLeft, swipeDirection, swipeLength, positionOffset, touches;
2734
2735        touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;
2736
2737        if (!_.dragging || touches && touches.length !== 1) {
2738            return false;
2739        }
2740
2741        curLeft = _.getLeft(_.currentSlide);
2742
2743        _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
2744        _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
2745
2746        _.touchObject.swipeLength = Math.round(Math.sqrt(
2747            Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));
2748
2749        if (_.options.verticalSwiping === true) {
2750            _.touchObject.swipeLength = Math.round(Math.sqrt(
2751                Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
2752        }
2753
2754        swipeDirection = _.swipeDirection();
2755
2756        if (swipeDirection === 'vertical') {
2757            return;
2758        }
2759
2760        if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
2761            event.preventDefault();
2762        }
2763
2764        positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
2765        if (_.options.verticalSwiping === true) {
2766            positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
2767        }
2768
2769
2770        swipeLength = _.touchObject.swipeLength;
2771
2772        _.touchObject.edgeHit = false;
2773
2774        if (_.options.infinite === false) {
2775            if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
2776                swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
2777                _.touchObject.edgeHit = true;
2778            }
2779        }
2780
2781        if (_.options.vertical === false) {
2782            _.swipeLeft = curLeft + swipeLength * positionOffset;
2783        } else {
2784            _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
2785        }
2786        if (_.options.verticalSwiping === true) {
2787            _.swipeLeft = curLeft + swipeLength * positionOffset;
2788        }
2789
2790        if (_.options.fade === true || _.options.touchMove === false) {
2791            return false;
2792        }
2793
2794        if (_.animating === true) {
2795            _.swipeLeft = null;
2796            return false;
2797        }
2798
2799        _.setCSS(_.swipeLeft);
2800
2801    };
2802
2803    Slick.prototype.swipeStart = function(event) {
2804
2805        var _ = this,
2806            touches;
2807
2808        _.interrupted = true;
2809
2810        if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
2811            _.touchObject = {};
2812            return false;
2813        }
2814
2815        if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
2816            touches = event.originalEvent.touches[0];
2817        }
2818
2819        _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
2820        _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;
2821
2822        _.dragging = true;
2823
2824    };
2825
2826    Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() {
2827
2828        var _ = this;
2829
2830        if (_.$slidesCache !== null) {
2831
2832            _.unload();
2833
2834            _.$slideTrack.children(this.options.slide).detach();
2835
2836            _.$slidesCache.appendTo(_.$slideTrack);
2837
2838            _.reinit();
2839
2840        }
2841
2842    };
2843
2844    Slick.prototype.unload = function() {
2845
2846        var _ = this;
2847
2848        $('.slick-cloned', _.$slider).remove();
2849
2850        if (_.$dots) {
2851            _.$dots.remove();
2852        }
2853
2854        if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
2855            _.$prevArrow.remove();
2856        }
2857
2858        if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
2859            _.$nextArrow.remove();
2860        }
2861
2862        _.$slides
2863            .removeClass('slick-slide slick-active slick-visible slick-current')
2864            .attr('aria-hidden', 'true')
2865            .css('width', '');
2866
2867    };
2868
2869    Slick.prototype.unslick = function(fromBreakpoint) {
2870
2871        var _ = this;
2872        _.$slider.trigger('unslick', [_, fromBreakpoint]);
2873        _.destroy();
2874
2875    };
2876
2877    Slick.prototype.updateArrows = function() {
2878
2879        var _ = this,
2880            centerOffset;
2881
2882        centerOffset = Math.floor(_.options.slidesToShow / 2);
2883
2884        if ( _.options.arrows === true &&
2885            _.slideCount > _.options.slidesToShow &&
2886            !_.options.infinite ) {
2887
2888            _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2889            _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2890
2891            if (_.currentSlide === 0) {
2892
2893                _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2894                _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2895
2896            } else if (_.currentSlide >
2896= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {
2897
2898                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2899                _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2900
2901            } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {
2902
2903                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
2904                _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
2905
2906            }
2907
2908        }
2909
2910    };
2911
2912    Slick.prototype.updateDots = function() {
2913
2914        var _ = this;
2915
2916        if (_.$dots !== null) {
2917
2918            _.$dots
2919                .find('li')
2920                .removeClass('slick-active')
2921                .attr('aria-hidden', 'true');
2922
2923            _.$dots
2924                .find('li')
2925                .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
2926                .addClass('slick-active')
2927                .attr('aria-hidden', 'false');
2928
2929        }
2930
2931    };
2932
2933    Slick.prototype.visibility = function() {
2934
2935        var _ = this;
2936
2937        if ( _.options.autoplay ) {
2938
2939            if ( document[_.hidden] ) {
2940
2941                _.interrupted = true;
2942
2943            } else {
2944
2945                _.interrupted = false;
2946
2947            }
2948
2949        }
2950
2951    };
2952
2953    $.fn.slick = function() {
2954        var _ = this,
2955            opt = arguments[0],
2956            args = Array.prototype.slice.call(arguments, 1),
2957            l = _.length,
2958            i,
2959            ret;
2960        for (i = 0; i < l; i++) {
2961            if (typeof opt == 'object' || typeof opt == 'undefined')
2962                _[i].slick = new Slick(_[i], opt);
2963            else
2964                ret = _[i].slick[opt].apply(_[i].slick, args);
2965            if (typeof ret != 'undefined') return ret;
2966        }
2967        return _;
2968    };
2969
2970}));
2971
2972/*
2973These functions make sure WordPress
2974and Foundation play nice together.
2975*/
2976
2977jQuery(document).ready(function() {
2978
2979    // Remove empty P tags created by WP inside of Accordion and Orbit
2980    jQuery('.accordion p:empty, .orbit p:empty').remove();
2981
2982	 // Makes sure last grid item floats left
2983	jQuery('.archive-grid .columns').last().addClass( 'end' );
2984
2985	// Adds Flex Video to YouTube and Vimeo Embeds
2986  jQuery('iframe[src*="youtube.com"], iframe[src*="vimeo.com"]').each(function() {
2987    if ( jQuery(this).innerWidth() / jQuery(this).innerHeight() > 1.5 ) {
2988      jQuery(this).wrap("<div class='widescreen flex-video'/>");
2989    } else {
2990      jQuery(this).wrap("<div class='flex-video'/>");
2991    }
2992  });
2993
2994});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.