PageSourceSearch

https://sunnicorn.com/ind-script/optimizer_user.php?filename=jc_BC…afb8a3877e93b96d63f0f99&t=1778636916&user=T

js sunnicorn.com collected 2026-10-07 13:09:30 UTC 119,902 bytes, 3,811 lines download raw bytes

1$(function(){ 
2    if($(".menuCategory > li").length==0){
3         $(".menuCategory").hide();
4    };
5    
6    
7    $('.prd_menu_middle > li  ').each(function(i,o){
8         if($(this).hasClass('selected')) {
9            $('.prd_menu_middle').after($(this).children('ul')).show();
10        };
11    });
12    
13     $('.prd_menu_small > li ').each(function(i,o){
14         if($(this).hasClass('selected')) {
15            $('.prd_menu_middle').after($(this).parent('.prd_menu_small')).show();
16        };
17    });
18});
19
20
21/**
22 * 카테고리 리스트 상품 정렬
23 */
24var aUrl = location.href.split('?');
25var sQueryString = aUrl[1];
26
27/**
28 * 파라미터가 있을경우에만 처리
29 */
30$(function(){
31    if (sQueryString && sQueryString.indexOf('sort_method') > -1) {
32        for (var i=0; i<$('#selArray option').length; i++) {
33            if ($('#selArray option').eq(i).val().indexOf(sQueryString) > -1) {
34                $('#selArray option').eq(i).prop("selected", true);
35            }
36        }
37    }
38});
39
40$('#selArray').on('change', function() {
41    if ($('#selArray').val()) {
42        location.href=$('#selArray').val();
43    }
44});
45
46function goThumg(url) {
47    location.href = url+'?'+sQueryString;
48}
49/**
50 * 할인기간 레이어
51 */
52$(function(){
53    $(document).on('click', '.discountPeriod > a', function() {
54        $(this).parent().find('.layerDiscountPeriod').show();
55    });
56
57    $(document).on('click', '.btnClose, button.submit', function() {
58        $(this).parents('.layerDiscountPeriod').hide();
59    });
60});
61// 썸네일 이미지 엑박일경우 기본값 설정
62$(window).on('load', function() {
63    $(".thumbnail img, img.thumbImage, img.bigImage").each(function($i,$item){
64        var $img = new Image();
65        $img.onerror = function () {
66            $item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif";
67        }
68        $img.src = this.src;
69    });
70});
71
72$(function(){
73    // 토글
74    $('div.eToggle .title').on('click', function(){
75        var toggle = $(this).parent('.eToggle');
76        if(toggle.hasClass('disable') == false){
77            $(this).parent('.eToggle').toggleClass('selected')
78        }
79    });
80
81    $('dl.eToggle dt').on('click', function(){
82        $(this).toggleClass('selected');
83        $(this).next('dd').toggleClass('selected');
84    });
85
86    //장바구니 페이지 수량폼 Type 변경
87    $('[id^="quantity"]').each(function() {
88        $(this).get(0).type = 'tel';
89    });
90
91    // 모바일에서 공급사 테이블 th 강제조절
92    $('.xans-mall-supplyinfo, .supplyInfo').find('table > colgroup').find('col').eq(0).width(98);
93    $('.xans-mall-supplyinfo, .supplyInfo').find('th, td').css({padding:'13px 10px 12px'});
94
95    /**
96     *  메인카테고리 toggle
97     
98    $('.xans-product-listmain h2').on('click', function() {
99        var bClosed = !!$(this).data('is_closed');
100        var sUrl;
101        if (bClosed) {
102            sUrl = "//img.echosting.cafe24.com/skin/mobile_ko_KR/layout/bg_title_close.gif";
103        } else {
104            sUrl = "//img.echosting.cafe24.com/skin/mobile_ko_KR/layout/bg_title_open.gif";
105        }
106        $(this).css('background-image', 'url("'+ sUrl +'")');
107        $(this).siblings().toggle();
108        $(this).parent().find('div.ec-base-paginate').toggle();
109        $(this).parent().next('div.xans-product-listmore').toggle();
110        $(this).data('is_closed', !bClosed);
111    });*/
112
113    /**
114     *  상단탑버튼
115     */
116    var globalTopBtnScrollFunc = function() {
117        // 탑버튼 관련변수
118        var $btnTop = $('#btnTop');
119
120        $(window).on('scroll', function() {
121            try {
122                var iCurScrollPos = $(this).scrollTop();
123
124                if (iCurScrollPos > ($(this).height() / 2)) {
125                    $btnTop.fadeIn('fast');
126                } else {
127                    $btnTop.fadeOut('fast');
128                }
129            } catch(e) { }
130        });
131    };
132
133    /**
134     *  구매버튼
135     */
136    var globalBuyBtnScrollFunc = function() {
137        // 구매버튼 관련변수
138        var sFixId = $('#orderFixItem').length > 0  ? 'orderFixItem' : 'fixedActionButton',
139            $area = $('#orderFixArea'),
140            $item = $('#' + sFixId + '').not($area);
141
142        $(window).on('scroll', function(){
143            try {
144                 // 구매버튼 관련변수
145                var iCurrentHeightPos = $(this).scrollTop() + $(this).height(),
146                    iButtonHeightPos = $item.offset().top;
147
148                if (iCurrentHeightPos > iButtonHeightPos || iButtonHeightPos < $(this).scrollTop() + $item.height()) {
149                    if (iButtonHeightPos < $(this).scrollTop() - $item.height()) {
150                        $area.fadeIn('fast');
151                    } else {
152                        $area.hide();
153                    }
154                } else {
155                    $area.fadeIn('fast');
156                }
157            } catch(e) { }
158        });
159    };
160
161    globalTopBtnScrollFunc();
162    //globalBuyBtnScrollFunc();
163});
164
165// 공통레이어팝업 오픈
166var globalLayerOpenFunc = function(_this) {
167    this.id = $(_this).data('id');
168    this.param = $(_this).data('param');
169    this.basketType = $('#basket_type').val();
170    this.url = $(_this).data('url');
171    this.layerId = 'ec_temp_mobile_layer';
172    this.layerIframeId = 'ec_temp_mobile_iframe_layer';
173
174    var _this = this;
175
176    function paramSetUrl() {
177        if (this.param) {
178            // if isset param
179        } else {
180            this.url = this.basketType ?  this.url + '?basket_type=' + this.basketType : this.url;
181        }
182    };
183
184    if (this.url) {
185        window.ecScrollTop = $(window).scrollTop();
186        $.ajax({
187            url : this.url,
188            success : function (data) {
189                if (data.indexOf('404 페이지 없음') == -1) {
190                    // 있다면 삭제
191                    try { $(_this).remove(); } catch ( e ) { }
192
193                    var $layer = $('<div>', {
194                        html: $("<iframe>", { src: _this.url, id: _this.layerIframeId, scrolling: 'auto', css: { width: '100%', height: '100%', overflowY: 'auto', border: 0 } } ),
195                        id: _this.layerId,
196                        css : { position: 'absolute', top: 0, left:0, width: '100%', height: $(window).height(), 'z-index': 9999 }
197                    });
198
199                    $('body').append($layer);
200                    $('html, body').css({'overflowY': 'hidden', height: '100%', width: '100%'});
201                    $('#' + this.layerId).show();
202                }
203            }
204        });
205    }
206};
207
208// 공통레이어팝업 닫기
209var globalLayerCloseFunc = function() {
210    this.layerId = 'ec_temp_mobile_layer';
211
212    if (window.parent === window)
213        self.close();
214    else {
215        parent.$('html, body').css({'overflowY': 'auto', height: 'auto', width: '100%'});
216        parent.$('html, body').scrollTop(parent.window.ecScrollTop);
217        parent.$('#' + this.layerId).remove();
218    }
219};
220
221/**
222 * document.location.href split
223 * return array Param
224 */
225var getQueryString = function(sKey)
226{
227    var sQueryString = document.location.search.substring(1);
228    var aParam = {};
229
230    if (sQueryString) {
231        var aFields = sQueryString.split("&");
232        var aField  = [];
233        for (var i=0; i<aFields.length; i++) {
234            aField = aFields[i].split('=');
235            aParam[aField[0]] = aField[1];
236        }
237    }
238
239    aParam.page = aParam.page ? aParam.page : 1;
240    return sKey ? aParam[sKey] : aParam;
241};
242
243// PC버전 바로 가기
244var isPCver = function() {
245    var sUrl = window.location.hostname;
246    var aTemp = sUrl.split(".");
247
248    var pattern = /^(mobile[\-]{2}shop[0-9]+)$/;
249
250    if (aTemp[0] == 'm' || aTemp[0] == 'skin-mobile' || aTemp[0] == 'mobile') {
251        sUrl = sUrl.replace(aTemp[0]+'.', '');
252    } else if (pattern.test(aTemp[0]) === true) {
253        var aExplode = aTemp[0].split('--');
254        aTemp[0] = aExplode[1];
255        sUrl = aTemp.join('.');
256    }
257    window.location.href = '//'+sUrl+'/?is_pcver=T';
258};
259
260/* 도움말 */
261$('body').on('click', '.ec-base-tooltip-area .eTip', function(e){
262    var findArea = $($(this).parents('.ec-base-tooltip-area'));
263    var findTarget = $($(this).siblings('.ec-base-tooltip'));
264    var findTooltip = $('.ec-base-tooltip');
265    $('.ec-base-tooltip-area').removeClass('show');
266    $(this).parents('.ec-base-tooltip-area').first().addClass('show');
267    findTooltip.hide();
268    findTarget.show();
269    e.preventDefault();
270});
271
272$('body').on('click', '.ec-base-tooltip-area .eClose', function(e){
273    var findTarget = $(this).parents('.ec-base-tooltip').first();
274    $('.ec-base-tooltip-area').removeClass('show');
275    findTarget.hide();
276    e.preventDefault();
277});
278
279$('.ec-base-tooltip-area').find('input').on('focusout', function() {
280    var findTarget = $(this).parents('.ec-base-tooltip-area').find('.ec-base-tooltip');
281    $('.ec-base-tooltip-area').removeClass('show');
282    findTarget.hide();
283});
284/*
285     _ _      _       _
286 ___| (_) ___| | __  (_)___
287/ __| | |/ __| |/ /  | / __|
288\__ \ | | (__|   < _ | \__ \
289|___/_|_|\___|_|\_(_)/ |___/
290                   |__/
291
292 Version: 1.6.0
293  Author: Ken Wheeler
294 Website: http://kenwheeler.github.io
295    Docs: http://kenwheeler.github.io/slick
296    Repo: http://github.com/kenwheeler/slick
297  Issues: http://github.com/kenwheeler/slick/issues
298
299 */
300/* global window, document, define, jQuery, setInterval, clearInterval */
301
302(function(factory) {
303    'use strict';
304    if (typeof define === 'function' && define.amd) {
305        define(['jquery'], factory);
306    } else if (typeof exports !== 'undefined') {
307        module.exports = factory(require('jquery'));
308    } else {
309        factory(jQuery);
310    }
311
312}(function($) {
313    'use strict';
314    var Slick = window.Slick || {};
315
316    Slick = (function() {
317
318        var instanceUid = 0;
319
320        function Slick(element, settings) {
321
322            var _ = this, dataSettings;
323
324            _.defaults = {
325                accessibility: true,
326                adaptiveHeight: false,
327                appendArrows: $(element),
328                appendDots: $(element),
329                arrows: true,
330                asNavFor: null,
331                prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',
332                nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',
333                autoplay: false,
334                autoplaySpeed: 3000,
335                centerMode: false,
336                centerPadding: '50px',
337                cssEase: 'ease',
338                customPaging: function(slider, i) {
339                    return $('<button type="button" data-role="none" role="button" tabindex="0" />').text(i + 1);
340                },
341                dots: false,
342                dotsClass: 'slick-dots',
343                draggable: true,
344                easing: 'linear',
345                edgeFriction: 0.35,
346                fade: false,
347                focusOnSelect: false,
348                infinite: true,
349                initialSlide: 0,
350                lazyLoad: 'ondemand',
351                mobileFirst: false,
352                pauseOnHover: true,
353                pauseOnFocus: true,
354                pauseOnDotsHover: false,
355                respondTo: 'window',
356                responsive: null,
357                rows: 1,
358                rtl: false,
359                slide: '',
360                slidesPerRow: 1,
361                slidesToShow: 1,
362                slidesToScroll: 1,
363                speed: 500,
364                swipe: true,
365                swipeToSlide: false,
366                touchMove: true,
367                touchThreshold: 5,
368                useCSS: true,
369                useTransform: true,
370                variableWidth: false,
371                vertical: false,
372                verticalSwiping: false,
373                waitForAnimate: true,
374                zIndex: 1000
375            };
376
377            _.initials = {
378                animating: false,
379                dragging: false,
380                autoPlayTimer: null,
381                currentDirection: 0,
382                currentLeft: null,
383                currentSlide: 0,
384                direction: 1,
385                $dots: null,
386                listWidth: null,
387                listHeight: null,
388                loadIndex: 0,
389                $nextArrow: null,
390                $prevArrow: null,
391                slideCount: null,
392                slideWidth: null,
393                $slideTrack: null,
394                $slides: null,
395                sliding: false,
396                slideOffset: 0,
397                swipeLeft: null
vendor: 11,177 bytes, lines 397-780
397,
398                $list: null,
399                touchObject: {},
400                transformsEnabled: false,
401                unslicked: false
402            };
403
404            $.extend(_, _.initials);
405
406            _.activeBreakpoint = null;
407            _.animType = null;
408            _.animProp = null;
409            _.breakpoints = [];
410            _.breakpointSettings = [];
411            _.cssTransitions = false;
412            _.focussed = false;
413            _.interrupted = false;
414            _.hidden = 'hidden';
415            _.paused = true;
416            _.positionProp = null;
417            _.respondTo = null;
418            _.rowCount = 1;
419            _.shouldClick = true;
420            _.$slider = $(element);
421            _.$slidesCache = null;
422            _.transformType = null;
423            _.transitionType = null;
424            _.visibilityChange = 'visibilitychange';
425            _.windowWidth = 0;
426            _.windowTimer = null;
427
428            dataSettings = $(element).data('slick') || {};
429
430            _.options = $.extend({}, _.defaults, settings, dataSettings);
431
432            _.currentSlide = _.options.initialSlide;
433
434            _.originalSettings = _.options;
435
436            if (typeof document.mozHidden !== 'undefined') {
437                _.hidden = 'mozHidden';
438                _.visibilityChange = 'mozvisibilitychange';
439            } else if (typeof document.webkitHidden !== 'undefined') {
440                _.hidden = 'webkitHidden';
441                _.visibilityChange = 'webkitvisibilitychange';
442            }
443
444            _.autoPlay = $.proxy(_.autoPlay, _);
445            _.autoPlayClear = $.proxy(_.autoPlayClear, _);
446            _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
447            _.changeSlide = $.proxy(_.changeSlide, _);
448            _.clickHandler = $.proxy(_.clickHandler, _);
449            _.selectHandler = $.proxy(_.selectHandler, _);
450            _.setPosition = $.proxy(_.setPosition, _);
451            _.swipeHandler = $.proxy(_.swipeHandler, _);
452            _.dragHandler = $.proxy(_.dragHandler, _);
453            _.keyHandler = $.proxy(_.keyHandler, _);
454
455            _.instanceUid = instanceUid++;
456
457            // A simple way to check for HTML strings
458            // Strict HTML recognition (must start with <)
459            // Extracted from jQuery v1.11 source
460            _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;
461
462
463            _.registerBreakpoints();
464            _.init(true);
465
466        }
467
468        return Slick;
469
470    }());
471
472    Slick.prototype.activateADA = function() {
473        var _ = this;
474
475        _.$slideTrack.find('.slick-active').attr({
476            'aria-hidden': 'false'
477        }).find('a, input, button, select').attr({
478            'tabindex': '0'
479        });
480
481    };
482
483    Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) {
484
485        var _ = this;
486
487        if (typeof(index) === 'boolean') {
488            addBefore = index;
489            index = null;
490        } else if (index < 0 || (index >= _.slideCount)) {
491            return false;
492        }
493
494        _.unload();
495
496        if (typeof(index) === 'number') {
497            if (index === 0 && _.$slides.length === 0) {
498                $(markup).appendTo(_.$slideTrack);
499            } else if (addBefore) {
500                $(markup).insertBefore(_.$slides.eq(index));
501            } else {
502                $(markup).insertAfter(_.$slides.eq(index));
503            }
504        } else {
505            if (addBefore === true) {
506                $(markup).prependTo(_.$slideTrack);
507            } else {
508                $(markup).appendTo(_.$slideTrack);
509            }
510        }
511
512        _.$slides = _.$slideTrack.children(this.options.slide);
513
514        _.$slideTrack.children(this.options.slide).detach();
515
516        _.$slideTrack.append(_.$slides);
517
518        _.$slides.each(function(index, element) {
519            $(element).attr('data-slick-index', index);
520        });
521
522        _.$slidesCache = _.$slides;
523
524        _.reinit();
525
526    };
527
528    Slick.prototype.animateHeight = function() {
529        var _ = this;
530        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
531            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
532            _.$list.animate({
533                height: targetHeight
534            }, _.options.speed);
535        }
536    };
537
538    Slick.prototype.animateSlide = function(targetLeft, callback) {
539
540        var animProps = {},
541            _ = this;
542
543        _.animateHeight();
544
545        if (_.options.rtl === true && _.options.vertical === false) {
546            targetLeft = -targetLeft;
547        }
548        if (_.transformsEnabled === false) {
549            if (_.options.vertical === false) {
550                _.$slideTrack.animate({
551                    left: targetLeft
552                }, _.options.speed, _.options.easing, callback);
553            } else {
554                _.$slideTrack.animate({
555                    top: targetLeft
556                }, _.options.speed, _.options.easing, callback);
557            }
558
559        } else {
560
561            if (_.cssTransitions === false) {
562                if (_.options.rtl === true) {
563                    _.currentLeft = -(_.currentLeft);
564                }
565                $({
566                    animStart: _.currentLeft
567                }).animate({
568                    animStart: targetLeft
569                }, {
570                    duration: _.options.speed,
571                    easing: _.options.easing,
572                    step: function(now) {
573                        now = Math.ceil(now);
574                        if (_.options.vertical === false) {
575                            animProps[_.animType] = 'translate(' +
576                                now + 'px, 0px)';
577                            _.$slideTrack.css(animProps);
578                        } else {
579                            animProps[_.animType] = 'translate(0px,' +
580                                now + 'px)';
581                            _.$slideTrack.css(animProps);
582                        }
583                    },
584                    complete: function() {
585                        if (callback) {
586                            callback.call();
587                        }
588                    }
589                });
590
591            } else {
592
593                _.applyTransition();
594                targetLeft = Math.ceil(targetLeft);
595
596                if (_.options.vertical === false) {
597                    animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
598                } else {
599                    animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
600                }
601                _.$slideTrack.css(animProps);
602
603                if (callback) {
604                    setTimeout(function() {
605
606                        _.disableTransition();
607
608                        callback.call();
609                    }, _.options.speed);
610                }
611
612            }
613
614        }
615
616    };
617
618    Slick.prototype.getNavTarget = function() {
619
620        var _ = this,
621            asNavFor = _.options.asNavFor;
622
623        if ( asNavFor && asNavFor !== null ) {
624            asNavFor = $(asNavFor).not(_.$slider);
625        }
626
627        return asNavFor;
628
629    };
630
631    Slick.prototype.asNavFor = function(index) {
632
633        var _ = this,
634            asNavFor = _.getNavTarget();
635
636        if ( asNavFor !== null && typeof asNavFor === 'object' ) {
637            asNavFor.each(function() {
638                var target = $(this).slick('getSlick');
639                if(!target.unslicked) {
640                    target.slideHandler(index, true);
641                }
642            });
643        }
644
645    };
646
647    Slick.prototype.applyTransition = function(slide) {
648
649        var _ = this,
650            transition = {};
651
652        if (_.options.fade === false) {
653            transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
654        } else {
655            transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
656        }
657
658        if (_.options.fade === false) {
659            _.$slideTrack.css(transition);
660        } else {
661            _.$slides.eq(slide).css(transition);
662        }
663
664    };
665
666    Slick.prototype.autoPlay = function() {
667
668        var _ = this;
669
670        _.autoPlayClear();
671
672        if ( _.slideCount > _.options.slidesToShow ) {
673            _.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed );
674        }
675
676    };
677
678    Slick.prototype.autoPlayClear = function() {
679
680        var _ = this;
681
682        if (_.autoPlayTimer) {
683            clearInterval(_.autoPlayTimer);
684        }
685
686    };
687
688    Slick.prototype.autoPlayIterator = function() {
689
690        var _ = this,
691            slideTo = _.currentSlide + _.options.slidesToScroll;
692
693        if ( !_.paused && !_.interrupted && !_.focussed ) {
694
695            if ( _.options.infinite === false ) {
696
697                if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) {
698                    _.direction = 0;
699                }
700
701                else if ( _.direction === 0 ) {
702
703                    slideTo = _.currentSlide - _.options.slidesToScroll;
704
705                    if ( _.currentSlide - 1 === 0 ) {
706                        _.direction = 1;
707                    }
708
709                }
710
711            }
712
713            _.slideHandler( slideTo );
714
715        }
716
717    };
718
719    Slick.prototype.buildArrows = function() {
720
721        var _ = this;
722
723        if (_.options.arrows === true ) {
724
725            _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
726            _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');
727
728            if( _.slideCount > _.options.slidesToShow ) {
729
730                _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
731                _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
732
733                if (_.htmlExpr.test(_.options.prevArrow)) {
734                    _.$prevArrow.prependTo(_.options.appendArrows);
735                }
736
737                if (_.htmlExpr.test(_.options.nextArrow)) {
738                    _.$nextArrow.appendTo(_.options.appendArrows);
739                }
740
741                if (_.options.infinite !== true) {
742                    _.$prevArrow
743                        .addClass('slick-disabled')
744                        .attr('aria-disabled', 'true');
745                }
746
747            } else {
748
749                _.$prevArrow.add( _.$nextArrow )
750
751                    .addClass('slick-hidden')
752                    .attr({
753                        'aria-disabled': 'true',
754                        'tabindex': '-1'
755                    });
756
757            }
758
759        }
760
761    };
762
763    Slick.prototype.buildDots = function() {
764
765        var _ = this,
766            i, dot;
767
768        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
769
770            _.$slider.addClass('slick-dotted');
771
772            dot = $('<ul />').addClass(_.options.dotsClass);
773
774            for (i = 0; i <= _.getDotCount(); i += 1) {
775                dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));
776            }
777
778            _.$dots = dot.appendTo(_.options.appendDots);
779
780            _.$dots.find('li').first().addClass('slick-active')
vendor: 14,869 bytes, lines 780-1268
780.attr('aria-hidden', 'false');
781
782        }
783
784    };
785
786    Slick.prototype.buildOut = function() {
787
788        var _ = this;
789
790        _.$slides =
791            _.$slider
792                .children( _.options.slide + ':not(.slick-cloned)')
793                .addClass('slick-slide');
794
795        _.slideCount = _.$slides.length;
796
797        _.$slides.each(function(index, element) {
798            $(element)
799                .attr('data-slick-index', index)
800                .data('originalStyling', $(element).attr('style') || '');
801        });
802
803        _.$slider.addClass('slick-slider');
804
805        _.$slideTrack = (_.slideCount === 0) ?
806            $('<div class="slick-track"/>').appendTo(_.$slider) :
807            _.$slides.wrapAll('<div class="slick-track"/>').parent();
808
809        _.$list = _.$slideTrack.wrap(
810            '<div aria-live="polite" class="slick-list"/>').parent();
811        _.$slideTrack.css('opacity', 0);
812
813        if (_.options.centerMode === true || _.options.swipeToSlide === true) {
814            _.options.slidesToScroll = 1;
815        }
816
817        $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');
818
819        _.setupInfinite();
820
821        _.buildArrows();
822
823        _.buildDots();
824
825        _.updateDots();
826
827
828        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
829
830        if (_.options.draggable === true) {
831            _.$list.addClass('draggable');
832        }
833
834    };
835
836    Slick.prototype.buildRows = function() {
837
838        var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection;
839
840        newSlides = document.createDocumentFragment();
841        originalSlides = _.$slider.children();
842
843        if(_.options.rows > 1) {
844
845            slidesPerSection = _.options.slidesPerRow * _.options.rows;
846            numOfSlides = Math.ceil(
847                originalSlides.length / slidesPerSection
848            );
849
850            for(a = 0; a < numOfSlides; a++){
851                var slide = document.createElement('div');
852                for(b = 0; b < _.options.rows; b++) {
853                    var row = document.createElement('div');
854                    for(c = 0; c < _.options.slidesPerRow; c++) {
855                        var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));
856                        if (originalSlides.get(target)) {
857                            row.appendChild(originalSlides.get(target));
858                        }
859                    }
860                    slide.appendChild(row);
861                }
862                newSlides.appendChild(slide);
863            }
864
865            _.$slider.empty().append(newSlides);
866            _.$slider.children().children().children()
867                .css({
868                    'width':(100 / _.options.slidesPerRow) + '%',
869                    'display': 'inline-block'
870                });
871
872        }
873
874    };
875
876    Slick.prototype.checkResponsive = function(initial, forceUpdate) {
877
878        var _ = this,
879            breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;
880        var sliderWidth = _.$slider.width();
881        var windowWidth = window.innerWidth || $(window).width();
882
883        if (_.respondTo === 'window') {
884            respondToWidth = windowWidth;
885        } else if (_.respondTo === 'slider') {
886            respondToWidth = sliderWidth;
887        } else if (_.respondTo === 'min') {
888            respondToWidth = Math.min(windowWidth, sliderWidth);
889        }
890
891        if ( _.options.responsive &&
892            _.options.responsive.length &&
893            _.options.responsive !== null) {
894
895            targetBreakpoint = null;
896
897            for (breakpoint in _.breakpoints) {
898                if (_.breakpoints.hasOwnProperty(breakpoint)) {
899                    if (_.originalSettings.mobileFirst === false) {
900                        if (respondToWidth < _.breakpoints[breakpoint]) {
901                            targetBreakpoint = _.breakpoints[breakpoint];
902                        }
903                    } else {
904                        if (respondToWidth > _.breakpoints[breakpoint]) {
905                            targetBreakpoint = _.breakpoints[breakpoint];
906                        }
907                    }
908                }
909            }
910
911            if (targetBreakpoint !== null) {
912                if (_.activeBreakpoint !== null) {
913                    if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
914                        _.activeBreakpoint =
915                            targetBreakpoint;
916                        if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
917                            _.unslick(targetBreakpoint);
918                        } else {
919                            _.options = $.extend({}, _.originalSettings,
920                                _.breakpointSettings[
921                                    targetBreakpoint]);
922                            if (initial === true) {
923                                _.currentSlide = _.options.initialSlide;
924                            }
925                            _.refresh(initial);
926                        }
927                        triggerBreakpoint = targetBreakpoint;
928                    }
929                } else {
930                    _.activeBreakpoint = targetBreakpoint;
931                    if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
932                        _.unslick(targetBreakpoint);
933                    } else {
934                        _.options = $.extend({}, _.originalSettings,
935                            _.breakpointSettings[
936                                targetBreakpoint]);
937                        if (initial === true) {
938                            _.currentSlide = _.options.initialSlide;
939                        }
940                        _.refresh(initial);
941                    }
942                    triggerBreakpoint = targetBreakpoint;
943                }
944            } else {
945                if (_.activeBreakpoint !== null) {
946                    _.activeBreakpoint = null;
947                    _.options = _.originalSettings;
948                    if (initial === true) {
949                        _.currentSlide = _.options.initialSlide;
950                    }
951                    _.refresh(initial);
952                    triggerBreakpoint = targetBreakpoint;
953                }
954            }
955
956            // only trigger breakpoints during an actual break. not on initialize.
957            if( !initial && triggerBreakpoint !== false ) {
958                _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
959            }
960        }
961
962    };
963
964    Slick.prototype.changeSlide = function(event, dontAnimate) {
965
966        var _ = this,
967            $target = $(event.currentTarget),
968            indexOffset, slideOffset, unevenOffset;
969
970        // If target is a link, prevent default action.
971        if($target.is('a')) {
972            event.preventDefault();
973        }
974
975        // If target is not the <li> element (ie: a child), find the <li>.
976        if(!$target.is('li')) {
977            $target = $target.closest('li');
978        }
979
980        unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
981        indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;
982
983        switch (event.data.message) {
984
985            case 'previous':
986                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
987                if (_.slideCount > _.options.slidesToShow) {
988                    _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
989                }
990                break;
991
992            case 'next':
993                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
994                if (_.slideCount > _.options.slidesToShow) {
995                    _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
996                }
997                break;
998
999            case 'index':
1000                var index = event.data.index === 0 ? 0 :
1001                    event.data.index || $target.index() * _.options.slidesToScroll;
1002
1003                _.slideHandler(_.checkNavigable(index), false, dontAnimate);
1004                $target.children().trigger('focus');
1005                break;
1006
1007            default:
1008                return;
1009        }
1010
1011    };
1012
1013    Slick.prototype.checkNavigable = function(index) {
1014
1015        var _ = this,
1016            navigables, prevNavigable;
1017
1018        navigables = _.getNavigableIndexes();
1019        prevNavigable = 0;
1020        if (index > navigables[navigables.length - 1]) {
1021            index = navigables[navigables.length - 1];
1022        } else {
1023            for (var n in navigables) {
1024                if (index < navigables[n]) {
1025                    index = prevNavigable;
1026                    break;
1027                }
1028                prevNavigable = navigables[n];
1029            }
1030        }
1031
1032        return index;
1033    };
1034
1035    Slick.prototype.cleanUpEvents = function() {
1036
1037        var _ = this;
1038
1039        if (_.options.dots && _.$dots !== null) {
1040
1041            $('li', _.$dots)
1042                .off('click.slick', _.changeSlide)
1043                .off('mouseenter.slick', $.proxy(_.interrupt, _, true))
1044                .off('mouseleave.slick', $.proxy(_.interrupt, _, false));
1045
1046        }
1047
1048        _.$slider.off('focus.slick blur.slick');
1049
1050        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
1051            _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
1052            _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
1053        }
1054
1055        _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
1056        _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
1057        _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
1058        _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);
1059
1060        _.$list.off('click.slick', _.clickHandler);
1061
1062        $(document).off(_.visibilityChange, _.visibility);
1063
1064        _.cleanUpSlideEvents();
1065
1066        if (_.options.accessibility === true) {
1067            _.$list.off('keydown.slick', _.keyHandler);
1068        }
1069
1070        if (_.options.focusOnSelect === true) {
1071            $(_.$slideTrack).children().off('click.slick', _.selectHandler);
1072        }
1073
1074        $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);
1075
1076        $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);
1077
1078        $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);
1079
1080        $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
1081        $(document).off('ready.slick.slick-' + _.instanceUid, _.setPosition);
1082
1083    };
1084
1085    Slick.prototype.cleanUpSlideEvents = function() {
1086
1087        var _ = this;
1088
1089        _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));
1090        _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));
1091
1092    };
1093
1094    Slick.prototype.cleanUpRows = function() {
1095
1096        var _ = this, originalSlides;
1097
1098        if(_.options.rows > 1) {
1099            originalSlides = _.$slides.children().children();
1100            originalSlides.removeAttr('style');
1101            _.$slider.empty().append(originalSlides);
1102        }
1103
1104    };
1105
1106    Slick.prototype.clickHandler = function(event) {
1107
1108        var _ = this;
1109
1110        if (_.shouldClick === false) {
1111            event.stopImmediatePropagation();
1112            event.stopPropagation();
1113            event.preventDefault();
1114        }
1115
1116    };
1117
1118    Slick.prototype.destroy = function(refresh) {
1119
1120        var _ = this;
1121
1122        _.autoPlayClear();
1123
1124        _.touchObject = {};
1125
1126        _.cleanUpEvents();
1127
1128        $('.slick-cloned', _.$slider).detach();
1129
1130        if (_.$dots) {
1131            _.$dots.remove();
1132        }
1133
1134
1135        if ( _.$prevArrow && _.$prevArrow.length ) {
1136
1137            _.$prevArrow
1138                .removeClass('slick-disabled slick-arrow slick-hidden')
1139                .removeAttr('aria-hidden aria-disabled tabindex')
1140                .css('display','');
1141
1142            if ( _.htmlExpr.test( _.options.prevArrow )) {
1143                _.$prevArrow.remove();
1144            }
1145        }
1146
1147        if ( _.$nextArrow && _.$nextArrow.length ) {
1148
1149            _.$nextArrow
1150                .removeClass('slick-disabled slick-arrow slick-hidden')
1151                .removeAttr('aria-hidden aria-disabled tabindex')
1152                .css('display','');
1153
1154            if ( _.htmlExpr.test( _.options.nextArrow )) {
1155                _.$nextArrow.remove();
1156            }
1157
1158        }
1159
1160
1161        if (_.$slides) {
1162
1163            _.$slides
1164                .removeClass('slick-slide slick-active slick-center slick-visible slick-current')
1165                .removeAttr('aria-hidden')
1166                .removeAttr('data-slick-index')
1167                .each(function(){
1168                    $(this).attr('style', $(this).data('originalStyling'));
1169                });
1170
1171            _.$slideTrack.children(this.options.slide).detach();
1172
1173            _.$slideTrack.detach();
1174
1175            _.$list.detach();
1176
1177            _.$slider.append(_.$slides);
1178        }
1179
1180        _.cleanUpRows();
1181
1182        _.$slider.removeClass('slick-slider');
1183        _.$slider.removeClass('slick-initialized');
1184        _.$slider.removeClass('slick-dotted');
1185
1186        _.unslicked = true;
1187
1188        if(!refresh) {
1189            _.$slider.trigger('destroy', [_]);
1190        }
1191
1192    };
1193
1194    Slick.prototype.disableTransition = function(slide) {
1195
1196        var _ = this,
1197            transition = {};
1198
1199        transition[_.transitionType] = '';
1200
1201        if (_.options.fade === false) {
1202            _.$slideTrack.css(transition);
1203        } else {
1204            _.$slides.eq(slide).css(transition);
1205        }
1206
1207    };
1208
1209    Slick.prototype.fadeSlide = function(slideIndex, callback) {
1210
1211        var _ = this;
1212
1213        if (_.cssTransitions === false) {
1214
1215            _.$slides.eq(slideIndex).css({
1216                zIndex: _.options.zIndex
1217            });
1218
1219            _.$slides.eq(slideIndex).animate({
1220                opacity: 1
1221            }, _.options.speed, _.options.easing, callback);
1222
1223        } else {
1224
1225            _.applyTransition(slideIndex);
1226
1227            _.$slides.eq(slideIndex).css({
1228                opacity: 1,
1229                zIndex: _.options.zIndex
1230            });
1231
1232            if (callback) {
1233                setTimeout(function() {
1234
1235                    _.disableTransition(slideIndex);
1236
1237                    callback.call();
1238                }, _.options.speed);
1239            }
1240
1241        }
1242
1243    };
1244
1245    Slick.prototype.fadeSlideOut = function(slideIndex) {
1246
1247        var _ = this;
1248
1249        if (_.cssTransitions === false) {
1250
1251            _.$slides.eq(slideIndex).animate({
1252                opacity: 0,
1253                zIndex: _.options.zIndex - 2
1254            }, _.options.speed, _.options.easing);
1255
1256        } else {
1257
1258            _.applyTransition(slideIndex);
1259
1260            _.$slides.eq(slideIndex).css({
1261                opacity: 0,
1262                zIndex: _.options.zIndex - 2
1263            });
1264
1265        }
1266
1267    };
1268
1269    Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) {
1270
1271        var _ = this;
1272
1273        if (filter !== null) {
1274
1275            _.$slidesCache = _.$slides;
1276
1277            _.unload();
1278
1279            _.$slideTrack.children(this.options.slide).detach();
1280
1281            _.$slidesCache.filter(filter).appendTo(_.$slideTrack);
1282
1283            _.reinit();
1284
1285        }
1286
1287    };
1288
1289    Slick.prototype.focusHandler = function() {
1290
1291        var _ = this;
1292
1293        _.$slider
1294            .off('focus.slick blur.slick')
1295            .on('focus.slick blur.slick',
1296                '*:not(.slick-arrow)', function(event) {
1297
1298            event.stopImmediatePropagation();
1299            var $sf = $(this);
1300
1301            setTimeout(function() {
1302
1303                if( _.options.pauseOnFocus ) {
1304                    _.focussed = $sf.is(':focus');
1305                    _.autoPlay();
1306                }
1307
1308            }, 0);
1309
1310        });
1311    };
1312
1313    Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() {
1314
1315        var _ = this;
1316        return _.currentSlide;
1317
1318    };
1319
1320    Slick.prototype.getDotCount = function() {
1321
1322        var _ = this;
1323
1324        var breakPoint = 0;
1325        var counter = 0;
1326        var pagerQty = 0;
1327
1328        if (_.options.infinite === true) {
1329            while (breakPoint < _.slideCount) {
1330                ++pagerQty;
1331                breakPoint = counter + _.options.slidesToScroll;
1332                counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1333            }
1334        } else if (_.options.centerMode === true) {
1335            pagerQty = _.slideCount;
1336        } else if(!_.options.asNavFor) {
1337            pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
1338        }else {
1339            while (breakPoint < _.slideCount) {
1340                ++pagerQty;
1341                breakPoint = counter + _.options.slidesToScroll;
1342                counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1343            }
1344        }
1345
1346        return pagerQty - 1;
1347
1348    };
1349
1350    Slick.prototype.getLeft = function(slideIndex) {
1351
1352        var _ = this,
1353            targetLeft,
1354            verticalHeight,
1355            verticalOffset = 0,
1356            targetSlide;
1357
1358        _.slideOffset = 0;
1359        verticalHeight = _.$slides.first().outerHeight(true);
1360
1361        if (_.options.infinite === true) {
1362            if (_.slideCount > _.options.slidesToShow) {
1363                _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
1364                verticalOffset = (verticalHeight * _.options.slidesToShow) * -1;
1365            }
1366            if (_.slideCount % _.options.slidesToScroll !== 0) {
1367                if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
1368                    if (slideIndex > _.slideCount) {
1369                        _.slideOffset = ((_.options.slidesToShow - (sl
vendor: 921 bytes, lines 1369-1389
1369ideIndex - _.slideCount)) * _.slideWidth) * -1;
1370                        verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
1371                    } else {
1372                        _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
1373                        verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
1374                    }
1375                }
1376            }
1377        } else {
1378            if (slideIndex + _.options.slidesToShow > _.slideCount) {
1379                _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
1380                verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
1381            }
1382        }
1383
1384        if (_.slideCount <= _.options.slidesToShow) {
1385            _.slideOffset = 0;
1386            verticalOffset = 0;
1387        }
1388
1389       
vendor: 5,167 bytes, lines 1389-1562
1389 if (_.options.centerMode === true && _.options.infinite === true) {
1390            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
1391        } else if (_.options.centerMode === true) {
1392            _.slideOffset = 0;
1393            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
1394        }
1395
1396        if (_.options.vertical === false) {
1397            targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
1398        } else {
1399            targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
1400        }
1401
1402        if (_.options.variableWidth === true) {
1403
1404            if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
1405                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
1406            } else {
1407                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
1408            }
1409
1410            if (_.options.rtl === true) {
1411                if (targetSlide[0]) {
1412                    targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
1413                } else {
1414                    targetLeft =  0;
1415                }
1416            } else {
1417                targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
1418            }
1419
1420            if (_.options.centerMode === true) {
1421                if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
1422                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
1423                } else {
1424                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
1425                }
1426
1427                if (_.options.rtl === true) {
1428                    if (targetSlide[0]) {
1429                        targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
1430                    } else {
1431                        targetLeft =  0;
1432                    }
1433                } else {
1434                    targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
1435                }
1436
1437                targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
1438            }
1439        }
1440
1441        return targetLeft;
1442
1443    };
1444
1445    Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) {
1446
1447        var _ = this;
1448
1449        return _.options[option];
1450
1451    };
1452
1453    Slick.prototype.getNavigableIndexes = function() {
1454
1455        var _ = this,
1456            breakPoint = 0,
1457            counter = 0,
1458            indexes = [],
1459            max;
1460
1461        if (_.options.infinite === false) {
1462            max = _.slideCount;
1463        } else {
1464            breakPoint = _.options.slidesToScroll * -1;
1465            counter = _.options.slidesToScroll * -1;
1466            max = _.slideCount * 2;
1467        }
1468
1469        while (breakPoint < max) {
1470            indexes.push(breakPoint);
1471            breakPoint = counter + _.options.slidesToScroll;
1472            counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
1473        }
1474
1475        return indexes;
1476
1477    };
1478
1479    Slick.prototype.getSlick = function() {
1480
1481        return this;
1482
1483    };
1484
1485    Slick.prototype.getSlideCount = function() {
1486
1487        var _ = this,
1488            slidesTraversed, swipedSlide, centerOffset;
1489
1490        centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;
1491
1492        if (_.options.swipeToSlide === true) {
1493            _.$slideTrack.find('.slick-slide').each(function(index, slide) {
1494                if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {
1495                    swipedSlide = slide;
1496                    return false;
1497                }
1498            });
1499
1500            slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;
1501
1502            return slidesTraversed;
1503
1504        } else {
1505            return _.options.slidesToScroll;
1506        }
1507
1508    };
1509
1510    Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) {
1511
1512        var _ = this;
1513
1514        _.changeSlide({
1515            data: {
1516                message: 'index',
1517                index: parseInt(slide)
1518            }
1519        }, dontAnimate);
1520
1521    };
1522
1523    Slick.prototype.init = function(creation) {
1524
1525        var _ = this;
1526
1527        if (!$(_.$slider).hasClass('slick-initialized')) {
1528
1529            $(_.$slider).addClass('slick-initialized');
1530
1531            _.buildRows();
1532            _.buildOut();
1533            _.setProps();
1534            _.startLoad();
1535            _.loadSlider();
1536            _.initializeEvents();
1537            _.updateArrows();
1538            _.updateDots();
1539            _.checkResponsive(true);
1540            _.focusHandler();
1541
1542        }
1543
1544        if (creation) {
1545            _.$slider.trigger('init', [_]);
1546        }
1547
1548        if (_.options.accessibility === true) {
1549            _.initADA();
1550        }
1551
1552        if ( _.options.autoplay ) {
1553
1554            _.paused = false;
1555            _.autoPlay();
1556
1557        }
1558
1559    };
1560
1561    Slick.prototype.initADA = function() {
1562        var _ = this
1562;
1563        _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
1564            'aria-hidden': 'true',
1565            'tabindex': '-1'
1566        }).find('a, input, button, select').attr({
1567            'tabindex': '-1'
1568        });
1569
1570        _.$slideTrack.attr('role', 'listbox');
1571
1572        _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {
1573            $(this).attr({
1574                'role': 'option',
1575                'aria-describedby': 'slick-slide' + _.instanceUid + i + ''
1576            });
1577        });
1578
1579        if (_.$dots !== null) {
1580            _.$dots.attr('role', 'tablist').find('li').each(function(i) {
1581                $(this).attr({
1582                    'role': 'presentation',
1583                    'aria-selected': 'false',
1584                    'aria-controls': 'navigation' + _.instanceUid + i + '',
1585                    'id': 'slick-slide' + _.instanceUid + i + ''
1586                });
1587            })
1588                .first().attr('aria-selected', 'true').end()
1589                .find('button').attr('role', 'button').end()
1590                .closest('div').attr('role', 'toolbar');
1591        }
1592        _.activateADA();
1593
1594    };
1595
1596    Slick.prototype.initArrowEvents = function() {
1597
1598        var _ = this;
1599
1600        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
1601            _.$prevArrow
1602               .off('click.slick')
1603               .on('click.slick', {
1604                    message: 'previous'
1605               }, _.changeSlide);
1606            _.$nextArrow
1607               .off('click.slick')
1608               .on('click.slick', {
1609                    message: 'next'
1610               }, _.changeSlide);
1611        }
1612
1613    };
1614
1615    Slick.prototype.initDotEvents = function() {
1616
1617        var _ = this;
1618
1619        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
1620            $('li', _.$dots).on('click.slick', {
1621                message: 'index'
1622            }, _.changeSlide);
1623        }
1624
1625        if ( _.options.dots === true && _.options.pauseOnDotsHover === true ) {
1626
1627            $('li', _.$dots)
1628                .on('mouseenter.slick', $.proxy(_.interrupt, _, true))
1629                .on('mouseleave.slick', $.proxy(_.interrupt, _, false));
1630
1631        }
1632
1633    };
1634
1635    Slick.prototype.initSlideEvents = function() {
1636
1637        var _ = this;
1638
1639        if ( _.options.pauseOnHover ) {
1640
1641            _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
1642            _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));
1643
1644        }
1645
1646    };
1647
1648    Slick.prototype.initializeEvents = function() {
1649
1650        var _ = this;
1651
1652        _.initArrowEvents();
1653
1654        _.initDotEvents();
1655        _.initSlideEvents();
1656
1657        _.$list.on('touchstart.slick mousedown.slick', {
1658            action: 'start'
1659        }, _.swipeHandler);
1660        _.$list.on('touchmove.slick mousemove.slick', {
1661            action: 'move'
1662        }, _.swipeHandler);
1663        _.$list.on('touchend.slick mouseup.slick', {
1664            action: 'end'
1665        }, _.swipeHandler);
vendor: 10,240 bytes, lines 1666-2043
1666        _.$list.on('touchcancel.slick mouseleave.slick', {
1667            action: 'end'
1668        }, _.swipeHandler);
1669
1670        _.$list.on('click.slick', _.clickHandler);
1671
1672        $(document).on(_.visibilityChange, $.proxy(_.visibility, _));
1673
1674        if (_.options.accessibility === true) {
1675            _.$list.on('keydown.slick', _.keyHandler);
1676        }
1677
1678        if (_.options.focusOnSelect === true) {
1679            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
1680        }
1681
1682        $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));
1683
1684        $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));
1685
1686        $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);
1687
1688        $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
1689        $(document).on('ready.slick.slick-' + _.instanceUid, _.setPosition);
1690
1691    };
1692
1693    Slick.prototype.initUI = function() {
1694
1695        var _ = this;
1696
1697        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
1698
1699            _.$prevArrow.show();
1700            _.$nextArrow.show();
1701
1702        }
1703
1704        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
1705
1706            _.$dots.show();
1707
1708        }
1709
1710    };
1711
1712    Slick.prototype.keyHandler = function(event) {
1713
1714        var _ = this;
1715         //Dont slide if the cursor is inside the form fields and arrow keys are pressed
1716        if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
1717            if (event.keyCode === 37 && _.options.accessibility === true) {
1718                _.changeSlide({
1719                    data: {
1720                        message: _.options.rtl === true ? 'next' :  'previous'
1721                    }
1722                });
1723            } else if (event.keyCode === 39 && _.options.accessibility === true) {
1724                _.changeSlide({
1725                    data: {
1726                        message: _.options.rtl === true ? 'previous' : 'next'
1727                    }
1728                });
1729            }
1730        }
1731
1732    };
1733
1734    Slick.prototype.lazyLoad = function() {
1735
1736        var _ = this,
1737            loadRange, cloneRange, rangeStart, rangeEnd;
1738
1739        function loadImages(imagesScope) {
1740
1741            $('img[data-lazy]', imagesScope).each(function() {
1742
1743                var image = $(this),
1744                    imageSource = $(this).attr('data-lazy'),
1745                    imageToLoad = document.createElement('img');
1746
1747                imageToLoad.onload = function() {
1748
1749                    image
1750                        .animate({ opacity: 0 }, 100, function() {
1751                            image
1752                                .attr('src', imageSource)
1753                                .animate({ opacity: 1 }, 200, function() {
1754                                    image
1755                                        .removeAttr('data-lazy')
1756                                        .removeClass('slick-loading');
1757                                });
1758                            _.$slider.trigger('lazyLoaded', [_, image, imageSource]);
1759                        });
1760
1761                };
1762
1763                imageToLoad.onerror = function() {
1764
1765                    image
1766                        .removeAttr( 'data-lazy' )
1767                        .removeClass( 'slick-loading' )
1768                        .addClass( 'slick-lazyload-error' );
1769
1770                    _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
1771
1772                };
1773
1774                imageToLoad.src = imageSource;
1775
1776            });
1777
1778        }
1779
1780        if (_.options.centerMode === true) {
1781            if (_.options.infinite === true) {
1782                rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
1783                rangeEnd = rangeStart + _.options.slidesToShow + 2;
1784            } else {
1785                rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
1786                rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
1787            }
1788        } else {
1789            rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
1790            rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);
1791            if (_.options.fade === true) {
1792                if (rangeStart > 0) rangeStart--;
1793                if (rangeEnd <= _.slideCount) rangeEnd++;
1794            }
1795        }
1796
1797        loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
1798        loadImages(loadRange);
1799
1800        if (_.slideCount <= _.options.slidesToShow) {
1801            cloneRange = _.$slider.find('.slick-slide');
1802            loadImages(cloneRange);
1803        } else
1804        if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
1805            cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
1806            loadImages(cloneRange);
1807        } else if (_.currentSlide === 0) {
1808            cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
1809            loadImages(cloneRange);
1810        }
1811
1812    };
1813
1814    Slick.prototype.loadSlider = function() {
1815
1816        var _ = this;
1817
1818        _.setPosition();
1819
1820        _.$slideTrack.css({
1821            opacity: 1
1822        });
1823
1824        _.$slider.removeClass('slick-loading');
1825
1826        _.initUI();
1827
1828        if (_.options.lazyLoad === 'progressive') {
1829            _.progressiveLazyLoad();
1830        }
1831
1832    };
1833
1834    Slick.prototype.next = Slick.prototype.slickNext = function() {
1835
1836        var _ = this;
1837
1838        _.changeSlide({
1839            data: {
1840                message: 'next'
1841            }
1842        });
1843
1844    };
1845
1846    Slick.prototype.orientationChange = function() {
1847
1848        var _ = this;
1849
1850        _.checkResponsive();
1851        _.setPosition();
1852
1853    };
1854
1855    Slick.prototype.pause = Slick.prototype.slickPause = function() {
1856
1857        var _ = this;
1858
1859        _.autoPlayClear();
1860        _.paused = true;
1861
1862    };
1863
1864    Slick.prototype.play = Slick.prototype.slickPlay = function() {
1865
1866        var _ = this;
1867
1868        _.autoPlay();
1869        _.options.autoplay = true;
1870        _.paused = false;
1871        _.focussed = false;
1872        _.interrupted = false;
1873
1874    };
1875
1876    Slick.prototype.postSlide = function(index) {
1877
1878        var _ = this;
1879
1880        if( !_.unslicked ) {
1881
1882            _.$slider.trigger('afterChange', [_, index]);
1883
1884            _.animating = false;
1885
1886            _.setPosition();
1887
1888            _.swipeLeft = null;
1889
1890            if ( _.options.autoplay ) {
1891                _.autoPlay();
1892            }
1893
1894            if (_.options.accessibility === true) {
1895                _.initADA();
1896            }
1897
1898        }
1899
1900    };
1901
1902    Slick.prototype.prev = Slick.prototype.slickPrev = function() {
1903
1904        var _ = this;
1905
1906        _.changeSlide({
1907            data: {
1908                message: 'previous'
1909            }
1910        });
1911
1912    };
1913
1914    Slick.prototype.preventDefault = function(event) {
1915
1916        event.preventDefault();
1917
1918    };
1919
1920    Slick.prototype.progressiveLazyLoad = function( tryCount ) {
1921
1922        tryCount = tryCount || 1;
1923
1924        var _ = this,
1925            $imgsToLoad = $( 'img[data-lazy]', _.$slider ),
1926            image,
1927            imageSource,
1928            imageToLoad;
1929
1930        if ( $imgsToLoad.length ) {
1931
1932            image = $imgsToLoad.first();
1933            imageSource = image.attr('data-lazy');
1934            imageToLoad = document.createElement('img');
1935
1936            imageToLoad.onload = function() {
1937
1938                image
1939                    .attr( 'src', imageSource )
1940                    .removeAttr('data-lazy')
1941                    .removeClass('slick-loading');
1942
1943                if ( _.options.adaptiveHeight === true ) {
1944                    _.setPosition();
1945                }
1946
1947                _.$slider.trigger('lazyLoaded', [ _, image, imageSource ]);
1948                _.progressiveLazyLoad();
1949
1950            };
1951
1952            imageToLoad.onerror = function() {
1953
1954                if ( tryCount < 3 ) {
1955
1956                    /**
1957                     * try to load the image 3 times,
1958                     * leave a slight delay so we don't get
1959                     * servers blocking the request.
1960                     */
1961                    setTimeout( function() {
1962                        _.progressiveLazyLoad( tryCount + 1 );
1963                    }, 500 );
1964
1965                } else {
1966
1967                    image
1968                        .removeAttr( 'data-lazy' )
1969                        .removeClass( 'slick-loading' )
1970                        .addClass( 'slick-lazyload-error' );
1971
1972                    _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
1973
1974                    _.progressiveLazyLoad();
1975
1976                }
1977
1978            };
1979
1980            imageToLoad.src = imageSource;
1981
1982        } else {
1983
1984            _.$slider.trigger('allImagesLoaded', [ _ ]);
1985
1986        }
1987
1988    };
1989
1990    Slick.prototype.refresh = function( initializing ) {
1991
1992        var _ = this, currentSlide, lastVisibleIndex;
1993
1994        lastVisibleIndex = _.slideCount - _.options.slidesToShow;
1995
1996        // in non-infinite sliders, we don't want to go past the
1997        // last visible index.
1998        if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) {
1999            _.currentSlide = lastVisibleIndex;
2000        }
2001
2002        // if less slides than to show, go to start.
2003        if ( _.slideCount <= _.options.slidesToShow ) {
2004            _.currentSlide = 0;
2005
2006        }
2007
2008        currentSlide = _.currentSlide;
2009
2010        _.destroy(true);
2011
2012        $.extend(_, _.initials, { currentSlide: currentSlide });
2013
2014        _.init();
2015
2016        if( !initializing ) {
2017
2018            _.changeSlide({
2019                data: {
2020                    message: 'index',
2021                    index: currentSlide
2022                }
2023            }, false);
2024
2025        }
2026
2027    };
2028
2029    Slick.prototype.registerBreakpoints = function() {
2030
2031        var _ = this, breakpoint, currentBreakpoint, l,
2032            responsiveSettings = _.options.responsive || null;
2033
2034        if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) {
2035
2036            _.respondTo = _.options.respondTo || 'window';
2037
2038            for ( breakpoint in responsiveSettings ) {
2039
2040                l = _.breakpoints.length-1;
2041                currentBreakpoint = responsiveSettings[breakpoint].breakpoint;
2042
2043                if (responsiveSettings.hasOwnProperty(breakpoint)) {
vendor: 12,466 bytes, lines 2043-2476
2043
2044
2045                    // loop through the breakpoints and cut out any existing
2046                    // ones with the same breakpoint number, we don't want dupes.
2047                    while( l >= 0 ) {
2048                        if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) {
2049                            _.breakpoints.splice(l,1);
2050                        }
2051                        l--;
2052                    }
2053
2054                    _.breakpoints.push(currentBreakpoint);
2055                    _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;
2056
2057                }
2058
2059            }
2060
2061            _.breakpoints.sort(function(a, b) {
2062                return ( _.options.mobileFirst ) ? a-b : b-a;
2063            });
2064
2065        }
2066
2067    };
2068
2069    Slick.prototype.reinit = function() {
2070
2071        var _ = this;
2072
2073        _.$slides =
2074            _.$slideTrack
2075                .children(_.options.slide)
2076                .addClass('slick-slide');
2077
2078        _.slideCount = _.$slides.length;
2079
2080        if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
2081            _.currentSlide = _.currentSlide - _.options.slidesToScroll;
2082        }
2083
2084        if (_.slideCount <= _.options.slidesToShow) {
2085            _.currentSlide = 0;
2086        }
2087
2088        _.registerBreakpoints();
2089
2090        _.setProps();
2091        _.setupInfinite();
2092        _.buildArrows();
2093        _.updateArrows();
2094        _.initArrowEvents();
2095        _.buildDots();
2096        _.updateDots();
2097        _.initDotEvents();
2098        _.cleanUpSlideEvents();
2099        _.initSlideEvents();
2100
2101        _.checkResponsive(false, true);
2102
2103        if (_.options.focusOnSelect === true) {
2104            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
2105        }
2106
2107        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
2108
2109        _.setPosition();
2110        _.focusHandler();
2111
2112        _.paused = !_.options.autoplay;
2113        _.autoPlay();
2114
2115        _.$slider.trigger('reInit', [_]);
2116
2117    };
2118
2119    Slick.prototype.resize = function() {
2120
2121        var _ = this;
2122
2123        if ($(window).width() !== _.windowWidth) {
2124            clearTimeout(_.windowDelay);
2125            _.windowDelay = window.setTimeout(function() {
2126                _.windowWidth = $(window).width();
2127                _.checkResponsive();
2128                if( !_.unslicked ) { _.setPosition(); }
2129            }, 50);
2130        }
2131    };
2132
2133    Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) {
2134
2135        var _ = this;
2136
2137        if (typeof(index) === 'boolean') {
2138            removeBefore = index;
2139            index = removeBefore === true ? 0 : _.slideCount - 1;
2140        } else {
2141            index = removeBefore === true ? --index : index;
2142        }
2143
2144        if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
2145            return false;
2146        }
2147
2148        _.unload();
2149
2150        if (removeAll === true) {
2151            _.$slideTrack.children().remove();
2152        } else {
2153            _.$slideTrack.children(this.options.slide).eq(index).remove();
2154        }
2155
2156        _.$slides = _.$slideTrack.children(this.options.slide);
2157
2158        _.$slideTrack.children(this.options.slide).detach();
2159
2160        _.$slideTrack.append(_.$slides);
2161
2162        _.$slidesCache = _.$slides;
2163
2164        _.reinit();
2165
2166    };
2167
2168    Slick.prototype.setCSS = function(position) {
2169
2170        var _ = this,
2171            positionProps = {},
2172            x, y;
2173
2174        if (_.options.rtl === true) {
2175            position = -position;
2176        }
2177        x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
2178        y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';
2179
2180        positionProps[_.positionProp] = position;
2181
2182        if (_.transformsEnabled === false) {
2183            _.$slideTrack.css(positionProps);
2184        } else {
2185            positionProps = {};
2186            if (_.cssTransitions === false) {
2187                positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
2188                _.$slideTrack.css(positionProps);
2189            } else {
2190                positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
2191                _.$slideTrack.css(positionProps);
2192            }
2193        }
2194
2195    };
2196
2197    Slick.prototype.setDimensions = function() {
2198
2199        var _ = this;
2200
2201        if (_.options.vertical === false) {
2202            if (_.options.centerMode === true) {
2203                _.$list.css({
2204                    padding: ('0px ' + _.options.centerPadding)
2205                });
2206            }
2207        } else {
2208            _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
2209            if (_.options.centerMode === true) {
2210                _.$list.css({
2211                    padding: (_.options.centerPadding + ' 0px')
2212                });
2213            }
2214        }
2215
2216        _.listWidth = _.$list.width();
2217        _.listHeight = _.$list.height();
2218
2219
2220        if (_.options.vertical === false && _.options.variableWidth === false) {
2221            _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
2222            _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));
2223
2224        } else if (_.options.variableWidth === true) {
2225            _.$slideTrack.width(5000 * _.slideCount);
2226        } else {
2227            _.slideWidth = Math.ceil(_.listWidth);
2228            _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
2229        }
2230
2231        var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
2232        if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);
2233
2234    };
2235
2236    Slick.prototype.setFade = function() {
2237
2238        var _ = this,
2239            targetLeft;
2240
2241        _.$slides.each(function(index, element) {
2242            targetLeft = (_.slideWidth * index) * -1;
2243            if (_.options.rtl === true) {
2244                $(element).css({
2245                    position: 'relative',
2246                    right: targetLeft,
2247                    top: 0,
2248                    zIndex: _.options.zIndex - 2,
2249                    opacity: 0
2250                });
2251            } else {
2252                $(element).css({
2253                    position: 'relative',
2254                    left: targetLeft,
2255                    top: 0,
2256                    zIndex: _.options.zIndex - 2,
2257                    opacity: 0
2258                });
2259            }
2260        });
2261
2262        _.$slides.eq(_.currentSlide).css({
2263            zIndex: _.options.zIndex - 1,
2264            opacity: 1
2265        });
2266
2267    };
2268
2269    Slick.prototype.setHeight = function() {
2270
2271        var _ = this;
2272
2273        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
2274            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
2275            _.$list.css('height', targetHeight);
2276        }
2277
2278    };
2279
2280    Slick.prototype.setOption =
2281    Slick.prototype.slickSetOption = function() {
2282
2283        /**
2284         * accepts arguments in format of:
2285         *
2286         *  - for changing a single option's value:
2287         *     .slick("setOption", option, value, refresh )
2288         *
2289         *  - for changing a set of responsive options:
2290         *     .slick("setOption", 'responsive', [{}, ...], refresh )
2291         *
2292         *  - for updating multiple values at once (not responsive)
2293         *     .slick("setOption", { 'option': value, ... }, refresh )
2294         */
2295
2296        var _ = this, l, item, option, value, refresh = false, type;
2297
2298        if( $.type( arguments[0] ) === 'object' ) {
2299
2300            option =  arguments[0];
2301            refresh = arguments[1];
2302            type = 'multiple';
2303
2304        } else if ( $.type( arguments[0] ) === 'string' ) {
2305
2306            option =  arguments[0];
2307            value = arguments[1];
2308            refresh = arguments[2];
2309
2310            if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) {
2311
2312                type = 'responsive';
2313
2314            } else if ( typeof arguments[1] !== 'undefined' ) {
2315
2316                type = 'single';
2317
2318            }
2319
2320        }
2321
2322        if ( type === 'single' ) {
2323
2324            _.options[option] = value;
2325
2326
2327        } else if ( type === 'multiple' ) {
2328
2329            $.each( option , function( opt, val ) {
2330
2331                _.options[opt] = val;
2332
2333            });
2334
2335
2336        } else if ( type === 'responsive' ) {
2337
2338            for ( item in value ) {
2339
2340                if( $.type( _.options.responsive ) !== 'array' ) {
2341
2342                    _.options.responsive = [ value[item] ];
2343
2344                } else {
2345
2346                    l = _.options.responsive.length-1;
2347
2348                    // loop through the responsive object and splice out duplicates.
2349                    while( l >= 0 ) {
2350
2351                        if( _.options.responsive[l].breakpoint === value[item].breakpoint ) {
2352
2353                            _.options.responsive.splice(l,1);
2354
2355                        }
2356
2357                        l--;
2358
2359                    }
2360
2361                    _.options.responsive.push( value[item] );
2362
2363                }
2364
2365            }
2366
2367        }
2368
2369        if ( refresh ) {
2370
2371            _.unload();
2372            _.reinit();
2373
2374        }
2375
2376    };
2377
2378    Slick.prototype.setPosition = function() {
2379
2380        var _ = this;
2381
2382        _.setDimensions();
2383
2384        _.setHeight();
2385
2386        if (_.options.fade === false) {
2387            _.setCSS(_.getLeft(_.currentSlide));
2388        } else {
2389            _.setFade();
2390        }
2391
2392        _.$slider.trigger('setPosition', [_]);
2393
2394    };
2395
2396    Slick.prototype.setProps = function() {
2397
2398        var _ = this,
2399            bodyStyle = document.body.style;
2400
2401        _.positionProp = _.options.vertical === true ? 'top' : 'left';
2402
2403        if (_.positionProp === 'top') {
2404            _.$slider.addClass('slick-vertical');
2405        } else {
2406            _.$slider.removeClass('slick-vertical');
2407        }
2408
2409        if (bodyStyle.WebkitTransition !== undefined ||
2410            bodyStyle.MozTransition !== undefined ||
2411            bodyStyle.msTransition !== undefined) {
2412            if (_.options.useCSS === true) {
2413                _.cssTransitions = true;
2414            }
2415        }
2416
2417        if ( _.options.fade ) {
2418            if ( typeof _.options.zIndex === 'number' ) {
2419                if( _.options.zIndex < 3 ) {
2420                    _.options.zIndex = 3;
2421                }
2422            } else {
2423                _.options.zIndex = _.defaults.zIndex;
2424            }
2425        }
2426
2427        if (bodyStyle.OTransform !== undefined) {
2428            _.animType = 'OTransform';
2429            _.transformType = '-o-transform';
2430            _.transitionType = 'OTransition';
2431            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
2432        }
2433        if (bodyStyle.MozTransform !== undefined) {
2434            _.animType = 'MozTransform';
2435            _.transformType = '-moz-transform';
2436            _.transitionType = 'MozTransition';
2437            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
2438        }
2439        if (bodyStyle.webkitTransform !== undefined) {
2440            _.animType = 'webkitTransform';
2441            _.transformType = '-webkit-transform';
2442            _.transitionType = 'webkitTransition';
2443            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
2444        }
2445        if (bodyStyle.msTransform !== undefined) {
2446            _.animType = 'msTransform';
2447            _.transformType = '-ms-transform';
2448            _.transitionType = 'msTransition';
2449            if (bodyStyle.msTransform === undefined) _.animType = false;
2450        }
2451        if (bodyStyle.transform !== undefined && _.animType !== false) {
2452            _.animType = 'transform';
2453            _.transformType = 'transform';
2454            _.transitionType = 'transition';
2455        }
2456        _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
2457    };
2458
2459
2460    Slick.prototype.setSlideClasses = function(index) {
2461
2462        var _ = this,
2463            centerOffset, allSlides, indexOffset, remainder;
2464
2465        allSlides = _.$slider
2466            .find('.slick-slide')
2467            .removeClass('slick-active slick-center slick-current')
2468            .attr('aria-hidden', 'true');
2469
2470        _.$slides
2471            .eq(index)
2472            .addClass('slick-current');
2473
2474        if (_.options.centerMode === true) {
2475
2476            
2476centerOffset = Math.floor(_.options.slidesToShow / 2);
2477
2478            if (_.options.infinite === true) {
2479
2480                if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {
2481
2482                    _.$slides
2483                        .slice(index - centerOffset, index + centerOffset + 1)
2484                        .addClass('slick-active')
2485                        .attr('aria-hidden', 'false');
2486
2487                } else {
2488
2489                    indexOffset = _.options.slidesToShow + index;
2490                    allSlides
2491                        .slice(indexOffset - centerOffset + 1, indexOffset + centerOffset + 2)
2492                        .addClass('slick-active')
2493                        .attr('aria-hidden', 'false');
2494
2495                }
2496
2497                if (index === 0) {
2498
2499                    allSlides
2500                        .eq(allSlides.length - 1 - _.options.slidesToShow)
2501                        .addClass('slick-center');
2502
2503                } else if (index === _.slideCount - 1) {
2504
2505                    allSlides
2506                        .eq(_.options.slidesToShow)
2507                        .addClass('slick-center');
2508
2509                }
2510
2511            }
2512
2513            _.$slides
2514                .eq(index)
2515                .addClass('slick-center');
2516
2517        } else {
2518
2519            if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {
2520
2521                _.$slides
2522                    .slice(index, index + _.options.slidesToShow)
2523                    .addClass('slick-active')
2524                    .attr('aria-hidden', 'false');
2525
2526            } else if (allSlides.length <= _.options.slidesToShow) {
2527
2528                allSlides
2529                    .addClass('slick-active')
2530                    .attr('aria-hidden', 'false');
2531
2532            } else {
2533
2534                remainder = _.slideCount % _.options.slidesToShow;
2535                indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;
2536
2537                if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {
2538
2539                    allSlides
2540                        .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)
2541                        .addClass('slick-active')
2542                        .attr('aria-hidden', 'false');
2543
2544                } else {
2545
2546                    allSlides
2547                        .slice(indexOffset, indexOffset + _.options.slidesToShow)
2548                        .addClass('slick-active')
2549                        .attr('aria-hidden', 'false');
2550
2551                }
2552
2553            }
2554
2555        }
2556
2557        if (_.options.lazyLoad === 'ondemand') {
2558            _.lazyLoad();
2559        }
2560
2561    };
2562
2563    Slick.prototype.setupInfinite = function() {
2564
2565        var _ = this,
2566            i, slideIndex, infiniteCount;
2567
2568        if (_.options.fade === true) {
vendor: 17,036 bytes, lines 2569-3179
2569            _.options.centerMode = false;
2570        }
2571
2572        if (_.options.infinite === true && _.options.fade === false) {
2573
2574            slideIndex = null;
2575
2576            if (_.slideCount > _.options.slidesToShow) {
2577
2578                if (_.options.centerMode === true) {
2579                    infiniteCount = _.options.slidesToShow + 1;
2580                } else {
2581                    infiniteCount = _.options.slidesToShow;
2582                }
2583
2584                for (i = _.slideCount; i > (_.slideCount -
2585                        infiniteCount); i -= 1) {
2586                    slideIndex = i - 1;
2587                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
2588                        .attr('data-slick-index', slideIndex - _.slideCount)
2589                        .prependTo(_.$slideTrack).addClass('slick-cloned');
2590                }
2591                for (i = 0; i < infiniteCount; i += 1) {
2592                    slideIndex = i;
2593                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
2594                        .attr('data-slick-index', slideIndex + _.slideCount)
2595                        .appendTo(_.$slideTrack).addClass('slick-cloned');
2596                }
2597                _.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
2598                    $(this).attr('id', '');
2599                });
2600
2601            }
2602
2603        }
2604
2605    };
2606
2607    Slick.prototype.interrupt = function( toggle ) {
2608
2609        var _ = this;
2610
2611        if( !toggle ) {
2612            _.autoPlay();
2613        }
2614        _.interrupted = toggle;
2615
2616    };
2617
2618    Slick.prototype.selectHandler = function(event) {
2619
2620        var _ = this;
2621
2622        var targetElement =
2623            $(event.target).is('.slick-slide') ?
2624                $(event.target) :
2625                $(event.target).parents('.slick-slide');
2626
2627        var index = parseInt(targetElement.attr('data-slick-index'));
2628
2629        if (!index) index = 0;
2630
2631        if (_.slideCount <= _.options.slidesToShow) {
2632
2633            _.setSlideClasses(index);
2634            _.asNavFor(index);
2635            return;
2636
2637        }
2638
2639        _.slideHandler(index);
2640
2641    };
2642
2643    Slick.prototype.slideHandler = function(index, sync, dontAnimate) {
2644
2645        var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
2646            _ = this, navTarget;
2647
2648        sync = sync || false;
2649
2650        if (_.animating === true && _.options.waitForAnimate === true) {
2651            return;
2652        }
2653
2654        if (_.options.fade === true && _.currentSlide === index) {
2655            return;
2656        }
2657
2658        if (_.slideCount <= _.options.slidesToShow) {
2659            return;
2660        }
2661
2662        if (sync === false) {
2663            _.asNavFor(index);
2664        }
2665
2666        targetSlide = index;
2667        targetLeft = _.getLeft(targetSlide);
2668        slideLeft = _.getLeft(_.currentSlide);
2669
2670        _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;
2671
2672        if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
2673            if (_.options.fade === false) {
2674                targetSlide = _.currentSlide;
2675                if (dontAnimate !== true) {
2676                    _.animateSlide(slideLeft, function() {
2677                        _.postSlide(targetSlide);
2678                    });
2679                } else {
2680                    _.postSlide(targetSlide);
2681                }
2682            }
2683            return;
2684        } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
2685            if (_.options.fade === false) {
2686                targetSlide = _.currentSlide;
2687                if (dontAnimate !== true) {
2688                    _.animateSlide(slideLeft, function() {
2689                        _.postSlide(targetSlide);
2690                    });
2691                } else {
2692                    _.postSlide(targetSlide);
2693                }
2694            }
2695            return;
2696        }
2697
2698        if ( _.options.autoplay ) {
2699            clearInterval(_.autoPlayTimer);
2700        }
2701
2702        if (targetSlide < 0) {
2703            if (_.slideCount % _.options.slidesToScroll !== 0) {
2704                animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
2705            } else {
2706                animSlide = _.slideCount + targetSlide;
2707            }
2708        } else if (targetSlide >= _.slideCount) {
2709            if (_.slideCount % _.options.slidesToScroll !== 0) {
2710                animSlide = 0;
2711            } else {
2712                animSlide = targetSlide - _.slideCount;
2713            }
2714        } else {
2715            animSlide = targetSlide;
2716        }
2717
2718        _.animating = true;
2719
2720        _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);
2721
2722        oldSlide = _.currentSlide;
2723        _.currentSlide = animSlide;
2724
2725        _.setSlideClasses(_.currentSlide);
2726
2727        if ( _.options.asNavFor ) {
2728
2729            navTarget = _.getNavTarget();
2730            navTarget = navTarget.slick('getSlick');
2731
2732            if ( navTarget.slideCount <= navTarget.options.slidesToShow ) {
2733                navTarget.setSlideClasses(_.currentSlide);
2734            }
2735
2736        }
2737
2738        _.updateDots();
2739        _.updateArrows();
2740
2741        if (_.options.fade === true) {
2742            if (dontAnimate !== true) {
2743
2744                _.fadeSlideOut(oldSlide);
2745
2746                _.fadeSlide(animSlide, function() {
2747                    _.postSlide(animSlide);
2748                });
2749
2750            } else {
2751                _.postSlide(animSlide);
2752            }
2753            _.animateHeight();
2754            return;
2755        }
2756
2757        if (dontAnimate !== true) {
2758            _.animateSlide(targetLeft, function() {
2759                _.postSlide(animSlide);
2760            });
2761        } else {
2762            _.postSlide(animSlide);
2763        }
2764
2765    };
2766
2767    Slick.prototype.startLoad = function() {
2768
2769        var _ = this;
2770
2771        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
2772
2773            _.$prevArrow.hide();
2774            _.$nextArrow.hide();
2775
2776        }
2777
2778        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
2779
2780            _.$dots.hide();
2781
2782        }
2783
2784        _.$slider.addClass('slick-loading');
2785
2786    };
2787
2788    Slick.prototype.swipeDirection = function() {
2789
2790        var xDist, yDist, r, swipeAngle, _ = this;
2791
2792        xDist = _.touchObject.startX - _.touchObject.curX;
2793        yDist = _.touchObject.startY - _.touchObject.curY;
2794        r = Math.atan2(yDist, xDist);
2795
2796        swipeAngle = Math.round(r * 180 / Math.PI);
2797        if (swipeAngle < 0) {
2798            swipeAngle = 360 - Math.abs(swipeAngle);
2799        }
2800
2801        if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
2802            return (_.options.rtl === false ? 'left' : 'right');
2803        }
2804        if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
2805            return (_.options.rtl === false ? 'left' : 'right');
2806        }
2807        if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
2808            return (_.options.rtl === false ? 'right' : 'left');
2809        }
2810        if (_.options.verticalSwiping === true) {
2811            if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
2812                return 'down';
2813            } else {
2814                return 'up';
2815            }
2816        }
2817
2818        return 'vertical';
2819
2820    };
2821
2822    Slick.prototype.swipeEnd = function(event) {
2823
2824        var _ = this,
2825            slideCount,
2826            direction;
2827
2828        _.dragging = false;
2829        _.interrupted = false;
2830        _.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true;
2831
2832        if ( _.touchObject.curX === undefined ) {
2833            return false;
2834        }
2835
2836        if ( _.touchObject.edgeHit === true ) {
2837            _.$slider.trigger('edge', [_, _.swipeDirection() ]);
2838        }
2839
2840        if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) {
2841
2842            direction = _.swipeDirection();
2843
2844            switch ( direction ) {
2845
2846                case 'left':
2847                case 'down':
2848
2849                    slideCount =
2850                        _.options.swipeToSlide ?
2851                            _.checkNavigable( _.currentSlide + _.getSlideCount() ) :
2852                            _.currentSlide + _.getSlideCount();
2853
2854                    _.currentDirection = 0;
2855
2856                    break;
2857
2858                case 'right':
2859                case 'up':
2860
2861                    slideCount =
2862                        _.options.swipeToSlide ?
2863                            _.checkNavigable( _.currentSlide - _.getSlideCount() ) :
2864                            _.currentSlide - _.getSlideCount();
2865
2866                    _.currentDirection = 1;
2867
2868                    break;
2869
2870                default:
2871
2872
2873            }
2874
2875            if( direction != 'vertical' ) {
2876
2877                _.slideHandler( slideCount );
2878                _.touchObject = {};
2879                _.$slider.trigger('swipe', [_, direction ]);
2880
2881            }
2882
2883        } else {
2884
2885            if ( _.touchObject.startX !== _.touchObject.curX ) {
2886
2887                _.slideHandler( _.currentSlide );
2888                _.touchObject = {};
2889
2890            }
2891
2892        }
2893
2894    };
2895
2896    Slick.prototype.swipeHandler = function(event) {
2897
2898        var _ = this;
2899
2900        if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
2901            return;
2902        } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
2903            return;
2904        }
2905
2906        _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
2907            event.originalEvent.touches.length : 1;
2908
2909        _.touchObject.minSwipe = _.listWidth / _.options
2910            .touchThreshold;
2911
2912        if (_.options.verticalSwiping === true) {
2913            _.touchObject.minSwipe = _.listHeight / _.options
2914                .touchThreshold;
2915        }
2916
2917        switch (event.data.action) {
2918
2919            case 'start':
2920                _.swipeStart(event);
2921                break;
2922
2923            case 'move':
2924                _.swipeMove(event);
2925                break;
2926
2927            case 'end':
2928                _.swipeEnd(event);
2929                break;
2930
2931        }
2932
2933    };
2934
2935    Slick.prototype.swipeMove = function(event) {
2936
2937        var _ = this,
2938            edgeWasHit = false,
2939            curLeft, swipeDirection, swipeLength, positionOffset, touches;
2940
2941        touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;
2942
2943        if (!_.dragging || touches && touches.length !== 1) {
2944            return false;
2945        }
2946
2947        curLeft = _.getLeft(_.currentSlide);
2948
2949        _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
2950        _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
2951
2952        _.touchObject.swipeLength = Math.round(Math.sqrt(
2953            Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));
2954
2955        if (_.options.verticalSwiping === true) {
2956            _.touchObject.swipeLength = Math.round(Math.sqrt(
2957                Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
2958        }
2959
2960        swipeDirection = _.swipeDirection();
2961
2962        if (swipeDirection === 'vertical') {
2963            return;
2964        }
2965
2966        if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
2967            event.preventDefault();
2968        }
2969
2970        positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
2971        if (_.options.verticalSwiping === true) {
2972            positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
2973        }
2974
2975
2976        swipeLength = _.touchObject.swipeLength;
2977
2978        _.touchObject.edgeHit = false;
2979
2980        if (_.options.infinite === false) {
2981            if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
2982                swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
2983                _.touchObject.edgeHit = true;
2984            }
2985        }
2986
2987        if (_.options.vertical === false) {
2988            _.swipeLeft = curLeft + swipeLength * positionOffset;
2989        } else {
2990            _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
2991        }
2992        if (_.options.verticalSwiping === true) {
2993            _.swipeLeft = curLeft + swipeLength * positionOffset;
2994        }
2995
2996        if (_.options.fade === true || _.options.touchMove === false) {
2997            return false;
2998        }
2999
3000        if (_.animating === true) {
3001            _.swipeLeft = null;
3002            return false;
3003        }
3004
3005        _.setCSS(_.swipeLeft);
3006
3007    };
3008
3009    Slick.prototype.swipeStart = function(event) {
3010
3011        var _ = this,
3012            touches;
3013
3014        _.interrupted = true;
3015
3016        if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
3017            _.touchObject = {};
3018            return false;
3019        }
3020
3021        if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
3022            touches = event.originalEvent.touches[0];
3023        }
3024
3025        _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
3026        _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;
3027
3028        _.dragging = true;
3029
3030    };
3031
3032    Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() {
3033
3034        var _ = this;
3035
3036        if (_.$slidesCache !== null) {
3037
3038            _.unload();
3039
3040            _.$slideTrack.children(this.options.slide).detach();
3041
3042            _.$slidesCache.appendTo(_.$slideTrack);
3043
3044            _.reinit();
3045
3046        }
3047
3048    };
3049
3050    Slick.prototype.unload = function() {
3051
3052        var _ = this;
3053
3054        $('.slick-cloned', _.$slider).remove();
3055
3056        if (_.$dots) {
3057            _.$dots.remove();
3058        }
3059
3060        if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
3061            _.$prevArrow.remove();
3062        }
3063
3064        if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
3065            _.$nextArrow.remove();
3066        }
3067
3068        _.$slides
3069            .removeClass('slick-slide slick-active slick-visible slick-current')
3070            .attr('aria-hidden', 'true')
3071            .css('width', '');
3072
3073    };
3074
3075    Slick.prototype.unslick = function(fromBreakpoint) {
3076
3077        var _ = this;
3078        _.$slider.trigger('unslick', [_, fromBreakpoint]);
3079        _.destroy();
3080
3081    };
3082
3083    Slick.prototype.updateArrows = function() {
3084
3085        var _ = this,
3086            centerOffset;
3087
3088        centerOffset = Math.floor(_.options.slidesToShow / 2);
3089
3090        if ( _.options.arrows === true &&
3091            _.slideCount > _.options.slidesToShow &&
3092            !_.options.infinite ) {
3093
3094            _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
3095            _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
3096
3097            if (_.currentSlide === 0) {
3098
3099                _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
3100                _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
3101
3102            } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {
3103
3104                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
3105                _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
3106
3107            } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {
3108
3109                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
3110                _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
3111
3112            }
3113
3114        }
3115
3116    };
3117
3118    Slick.prototype.updateDots = function() {
3119
3120        var _ = this;
3121
3122        if (_.$dots !== null) {
3123
3124            _.$dots
3125                .find('li')
3126                .removeClass('slick-active')
3127                .attr('aria-hidden', 'true');
3128
3129            _.$dots
3130                .find('li')
3131                .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
3132                .addClass('slick-active')
3133                .attr('aria-hidden', 'false');
3134
3135        }
3136
3137    };
3138
3139    Slick.prototype.visibility = function() {
3140
3141        var _ = this;
3142
3143        if ( _.options.autoplay ) {
3144
3145            if ( document[_.hidden] ) {
3146
3147                _.interrupted = true;
3148
3149            } else {
3150
3151                _.interrupted = false;
3152
3153            }
3154
3155        }
3156
3157    };
3158
3159    $.fn.slick = function() {
3160        var _ = this,
3161            opt = arguments[0],
3162            args = Array.prototype.slice.call(arguments, 1),
3163            l = _.length,
3164            i,
3165            ret;
3166        for (i = 0; i < l; i++) {
3167            if (typeof opt == 'object' || typeof opt == 'undefined')
3168                _[i].slick = new Slick(_[i], opt);
3169            else
3170                ret = _[i].slick[opt].apply(_[i].slick, args);
3171            if (typeof ret != 'undefined') return ret;
3172        }
3173        return _;
3174    };
3175
3176}));
3177
3178if (!document.getElementById('dfbm-script-65972')){
3179  var dfbm_src = '/web/upload/appfiles/ZaReJam3QiELznoZeGGkMG/c958eafffb0b94ff87beb33857ccea34.js';
3180  document.write('<script id="dfbm-script-65972" src="' + dfbm_src + '?v=' + Date.now() + '"><\/script>');
3181}
3182
3183
3184
3185// 서브메뉴 onoff
3186$('.main_menu_shop').mouseenter(function(){
3187    $('.mm_list_shop').css('display', 'flex');
3188    $(this).addClass('on');
3189});
3190$('.main_menu_shop').mouseleave(function(){
3191    $('.mm_list_shop').hide();
3192    $(this).removeClass('on');
3193});
3194$('.main_menu_about').mouseenter(function(){
3195    $('.mm_list_about').show();
3196    $(this).addClass('on');
3197});
3198$('.main_menu_about').mouseleave(function(){
3199    $('.mm_list_about').hide();
3200    $(this).removeClass('on');
3201});
3202$('.main_menu_commu').mouseenter(function(){
3203    $('.mm_list_commu').show();
3204    $(this).addClass('on');
3205});
3206$('.main_menu_commu').mouseleave(function(){
3207    $('.mm_list_commu').hide();
3208    $(this).removeClass('on');
3209});
3210$('.main_menu_global').mouseenter(function(){
3211    $('.mm_list_global').show();
3212});
3213$('.main_menu_global').mouseleave(function(){
3214    $('.mm_list_global').hide();
3215});
3216
3217
3218$('.search_icon').click(function(){
3219    $('body').addClass('search_on');
3220});
3221$('.top_search_close_btn').click(function(){
3222    $('body').removeClass('search_on');
3223});
3224
3225
3226$('.global_list li').each(function(){
3227    if($(this).find('.name').text() === 'English') {
3228        $(this).find('.name').text('EN'); 
3229    }
3230});
3231
3232
3233$(window).scroll(function() {
3234
3235    // 스크롤시 헤더고정
3236    if ($(this).scrollTop() > 0) {
3237        $('body').addClass('fix_head');
3238    }else {
3239        $('body').removeClass('fix_head');
3240    };
3241
3242});
3243
3244
3245$('.search_icon').click(function(){
3246    if($('.search_icon').hasClass('on')) {
3247        $('.search_icon').removeClass('on');
3248        $('#header').removeClass('searchon');
3249        $('.search_form').hide();
3250    } else {
3251        $('.shop_btn').removeClass('on');
3252        $('.search_icon').addClass('on');
3253        $('#header').addClass('searchon');
3254        $('.search_form').show();
3255        $('#keyword').focus();
3256    }
3257});
3258
3259
3260
3261//좌측 슬라이딩 메뉴 이벤트
3262$('.slide_btn').click(function(){
3263    if($('body').hasClass('sidebar_on')) {
3264        $('body').removeClass('sidebar_on');
3265    } else {
3266        $('body').addClass('sidebar_on');
3267    }
3268});
3269$('.sidebar_close_btn').click(function(){
3270    if($('body').hasClass('sidebar_on')) {
3271        $('body').removeClass('sidebar_on');
3272    } else {
3273        $('body').addClass('sidebar_on');
3274    }
3275});
3276
3277
3278$('.sm_main_menu > a').click(function(){
3279    if($(this).parent().hasClass('on')) {
3280        $(this).siblings('.sm_sub_menu').slideUp();
3281        $(this).parent().removeClass('on');
3282    } else {
3283        $(this).siblings('.sm_sub_menu').slideDown();
3284        $(this).parent().addClass('on');
3285    }
3286
3287});
3288
3289$('.prdList > li').each(function(){
3290    // 상품목록 품절 아이콘을 텍스트로 변경
3291    if($(this).find('.soldout img').length === 1){
3292        $(this).find('.soldout').append('<div><p>OUT OF STOCK</p></div>');
3293    };
3294    // 상품목록 장바구니 아이콘을 텍스트로 변경
3295    if($(this).find('.addbasket img').length === 1){
3296        $(this).find('.addbasket').append('<p>ADD TO CART</p>');
3297    }
3298    
3299    if($(this).find('.spec li[rel="최적할인가"]').length > 0 || $(this).find('.spec li[rel="할인판매가"]').length > 0) {
3300    	$(this).addClass('sale');
3301    }
3302});
3303
3304//faq게시판 url변경
3305$('.cs_menu_board li').each(function(){
3306    if($(this).find('a').attr('href').split('/')[3] === '4') {
3307        $(this).find('a').attr('href', '/board/review/list.html');
3308    } else if ($(this).find('a').attr('href').split('/')[3] === '3') {
3309        $(this).find('a').attr('href', '/board/faq/list.html');
3310        $('.faqs').show();
3311    }
3312})
3313
3314/**
3315 * 모바일쇼핑몰 슬라이딩메뉴 */
3316var aCategory = [];
3317$(function(){
3318    var methods = {
3319        aCategory    : [],
3320        aSubCategory : {},
3321        get: function()
3322        {
3323            $.ajax({
3324                url : '/exec/front/Product/SubCategory',
3325                dataType: 'json',
3326                success: function(aData) {
3327                    if (aData == null || aData == 'undefined') {
3328                        methods.checkSub();
3329                        return;
3330                    }
3331                    for (var i=0; i<aData.length; i++)
3332                    {
3333                        var sParentCateNo = aData[i].parent_cate_no;
3334                        var sCateNo = aData[i].cate_no;
3335                        if (!methods.aSubCategory[sParentCateNo]) {
3336                            methods.aSubCategory[sParentCateNo] = [];
3337                        }
3338                        if (!aCategory[sCateNo]) {
3339                            aCategory[sCateNo] = [];
3340                        }
3341                        methods.aSubCategory[sParentCateNo].push( aData[i] );
3342                        aCategory[sCateNo] = aData[i];
3343                    }
3344                    methods.checkSub();
3345                    methods.getMyCateList();
3346                }
3347            });
3348        },
3349        getParam: function(sUrl, sKey) {
3350            if (typeof sUrl !== 'string') return;
3351            var aUrl         = sUrl.split('?');
3352            var sQueryString = aUrl[1];
3353            var aParam       = {};
3354            if (sQueryString) {
3355                var aFields = sQueryString.split("&");
3356                var aField  = [];
3357                for (var i=0; i<aFields.length; i++) {
3358                    aField = aFields[i].split('=');
3359                    aParam[aField[0]] = aField[1];
3360                }
3361            }
3362            return sKey ? aParam[sKey] : aParam;
3363        },
3364
3365        show: function(overNode, iCateNo) {
3366            var oParentNode = overNode;
3367            var aHtml = [];
3368            var sMyCateList = localStorage.getItem("myCateList");
3369            if (methods.aSubCategory[iCateNo] != undefined) {
3370                aHtml.push('<ul class="slideSubMenu">');
3371                $(methods.aSubCategory[iCateNo]).each(function() {
3372                    var sNextParentNo = this.cate_no;
3373                    var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : '';
3374                    if (methods.aSubCategory[sNextParentNo] == undefined) {
3375                        aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">');
3376                        var sHref = '/product/list.html'+this.param;
3377                    } else {
3378                        aHtml.push('<li id="cate'+this.cate_no+'">');
3379                        var sHref = '#none';
3380                    }
3381                    aHtml.push('<a href="'+sHref+'" class="cate" cate="'+this.param+'" onclick="subMenuEvent(this);">'+this.name+'</a>');
3382                    if (methods.aSubCategory[sNextParentNo] != undefined)  aHtml.push('<a href="/product/list.html'+this.param+'" class="view"></a>');
3383                    // aHtml.push('<button type="button" class="icoBookmark'+sCateSelected+'" id="icoBookmark">즐겨찾기 추가</button>');
3384
3385                    if (methods.aSubCategory[sNextParentNo] != undefined) {
3386                        aHtml.push('<ul>');
3387                        $(methods.aSubCategory[sNextParentNo]).each(function() {
3388                            var sNextParentNo2 = this.cate_no;
3389                            var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : '';
3390                            if (methods.aSubCategory[sNextParentNo2] == undefined) {
3391                                aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">');
3392                                var sHref = '/product/list.html'+this.param;
3393                            } else {
3394                                aHtml.push('<li id="cate'+this.cate_no+'">');
3395                                var sHref = '#none';
3396                            }
3397                            aHtml.push('<a href="'+sHref+'" class="cate" cate="'+this.param+'" onclick="subMenuEvent(this);">'+this.name+'</a>');
3398                            if (methods.aSubCategory[sNextParentNo] != undefined)  aHtml.push('<a href="/product/list.html'+this.param+'" class="view"></a>');
3399                            // aHtml.push('<button type="button" class="icoBookmark'+sCateSelected+'" id="icoBookmark">즐겨찾기 추가</button>');
3400
3401                            if (methods.aSubCategory[sNextParentNo2] != undefined) {
3402                                aHtml.push('<ul>');
3403
3404                                $(methods.aSubCategory[sNextParentNo2]).each(function() {
3405                                    aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">');
3406                                    var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : '';
3407                                    aHtml.push('<a href="/product/list.html'+this.param+'" class="cate" cate="'+this.param+'" onclick="subMenuEvent(this);">'+this.name+'</a>');
3408                                    //aHtml.push('<button type="button" class="icoBookmark'+sCateSelected+'" id="icoBookmark">즐겨찾기 추가</button>');
3409                                    aHtml.push('</li>');
3410                                });
3411                                aHtml.push('</ul>');
3412                            }
3413                            aHtml.push('</li>');
3414                        });
3415                        aHtml.push('</ul>');
3416                    }
3417                    aHtml.push('</li>');
3418                });
3419                aHtml.push('</ul>');
3420            }
3421            $(oParentNode).append(aHtml.join(''));
3422        },
3423        close: function() {
3424            $('.slideSubMenu').remove();
3425        },
3426        checkSub: function() {
3427            $('.cate').each(function(){
3428                var sParam = $(this).attr('cate');
3429                if (!sParam) return;
3430                var iCateNo = Number(methods.getParam(sParam, 'cate_no'));
3431                var result = methods.aSubCategory[iCateNo];
3432                if (result == undefined) {
3433                    if ($(this).closest('#slideProjectList').length) {
3434                        var sHref = '/product/project.html'+sParam;
3435                    } else {
3436                        var sHref = '/product/list.html'+sParam;
3437                    }
3438
3439                    $(this).attr('href', sHref);
3440                    $(this).parent().attr('class', 'noChild');
3441                }
3442            });
3443        },
3444        getMyCateList :function() {
3445            var sMyCateList = localStorage.getItem("myCateList");
3446            if (sMyCateList != null && sMyCateList != "") {
3447                var aTempList = sMyCateList.split("|");
3448                var aHtml = [];
3449                for (var i = 0; i < aTempList.length; i++) {
3450                    if (aTempList[i] != "") {
3451                        var iCateNo = aTempList[i];
3452                        var sCateName = aCategory[iCateNo].name;
3453                        var sCateParam = aCategory[iCateNo].param;
3454                        aHtml.push('<li id="bookmark'+iCateNo+'"><a href="/product/list.html'+sCateParam+'" book_mark="'+iCateNo+'">'+sCateName+'</a><button type="button" class="icoBookmark selected" onclick="setMyCateList('+iCateNo+');">즐겨찾기 삭제</button></li>');
3455                        $("#cate"+iCateNo+" #icoBookmark").addClass("selected");
3456                    }
3457                }
3458                $('#bookmartCateArea').append('<ul>'+aHtml.join('')+'</ul>');
3459            }
3460            chkMyCateList();
3461        }
3462    };
3463    methods.get();
3464
3465
3466
3467
3468    $('#slideCateList li > a.cate').on('click', function(e) {
3469        var sParam = $(this).attr('cate');
3470        if (!sParam) return;
3471        var iCateNo = Number(methods.getParam(sParam, 'cate_no'));
3472        if ($(this).parent().attr('class') == 'xans-record- selected') {
3473            methods.close();
3474        } else {
3475            if (!iCateNo) return;
3476            $(' #slideCateList li').removeClass('selected');
3477            methods.close();
3478            methods.show(this.parentNode, iCateNo);
3479        }
3480    });
3481
3482    $(' ul a.cate').on('click', function(e){
3483        $(this).parent().find('li').removeClass('selected');
3484        $(this).parent().toggleClass('selected');
3485        if (!$(this).parent('li').hasClass('noChild')){
3486            e.preventDefault();
3487        }
3488    });
3489
3490});
3491function subMenuEvent(obj) {
3492    $(obj).parent().find('li').removeClass('selected');
3493    $(obj).parent().toggleClass('selected');
3494}
3495function setMyCateList(iCateNo, oObj) {
3496    $(oObj).toggleClass('selected');
3497    var sMyCateList = localStorage.getItem("myCateList");
3498    var aCateList = [];
3499    if (checkInArray(sMyCateList, iCateNo) == true) {
3500        var aTemp = sMyCateList.split("|");
3501        for (var i = 0 ; i < aTemp.length ; i++) {
3502            if (aTemp[i] != iCateNo) {
3503                aCateList.push(aTemp[i]);
3504            }
3505        }
3506        var sCateList = aCateList.join('|');
3507        localStorage.setItem("myCateList" , sCateList);
3508        $('#bookmartCateArea #bookmark'+iCateNo).remove();
3509        if (aCateList.length == 0) {
3510            $('#bookmarkCategory #bookmartCateArea').find('ul').remove();
3511        }
3512        $("#cate"+iCateNo+" > #icoBookmark").removeClass("selected");
3513    } else {
3514        var sCateName = aCategory[iCateNo].name;
3515        var sCateParam = aCategory[iCateNo].param;
3516        var sHtml = '';
3517        if (sMyCateList == null || sMyCateList == '') {
3518            sHtml = '<ul><li id="bookmark'+iCateNo+'"><a href="/product/list.html'+sCateParam+'" book_mark="'+iCateNo+'">'+sCateName+'</a><button type="button" class="icoBookmark selected" onclick="setMyCateList('+iCateNo+');">즐겨찾기 삭제</button></li></ul>'
3519            $('#bookmarkCategory #bookmartCateArea').append(sHtml);
3520        } else {
3521            sHtml = '<li id="bookmark'+iCateNo+'"><a href="/product/list.html'+sCateParam+'" book_mark="'+iCateNo+'">'+sCateName+'</a><button type="button" class="icoBookmark selected" onclick="setMyCateList('+iCateNo+');">즐겨찾기 삭제</button></li>'
3522            $('#bookmarkCategory #bookmartCateArea ul').append(sHtml);
3523        }
3524        $(this).addClass('selected');
3525        if (sMyCateList == null || sMyCateList == '') {
3526            localStorage.setItem('myCateList' , iCateNo);
3527        } else {
3528            localStorage.setItem('myCateList' , sMyCateList + '|' + iCateNo);
3529        }
3530    }
3531    chkMyCateList();
3532}
3533function checkInArray(sBookmarkList, iCateNo) {
3534    if (sBookmarkList == null) return false;
3535    var aBookmarkList = sBookmarkList.split("|");
3536    for (var i = 0; i < aBookmarkList.length; i++) {
3537        if (aBookmarkList[i] == iCateNo) {
3538            return true;
3539        }
3540    }
3541    return false;
3542}
3543function chkMyCateList() {
3544    var sMyCateList = localStorage.getItem("myCateList");
3545    if (sMyCateList == null || sMyCateList == '') {
3546        $('#bookmarkEmpty').show();
3547    } else {
3548        $('#bookmarkEmpty').hide();
3549    }
3550}
3551
3552
3553/*
3554  변경할 항목의 값만 수정해주시면 반영됩니다. 
3555  값(= 기호 옆의 " " 안에 작성)만 변경해주세요! 
3556  항목명을 수정시 올바르게 동작하지 않습니다.
3557*/
3558
3559// ------------ 메인 헤더 흰색으로 변경 ------------
3560// on으로 입력시 메인페이지 상단헤더 이미지와 텍스트가 흰색으로 변경됩니다.
3561var headerOnWhite = 'off';
3562
3563
3564// ------------ 최상단 띠 배너 ------------
3565// 사용여부 off로 입력시 미노출됩니다.
3566var topBannerOn = 'off'; 
3567var topBanner = {
3568    // 첫번째 최상단 띠배너
3569	"one" : { 
3570        // 연결할 링크
3571    	"link" : "여기에 링크를 넣어주세요", 
3572        
3573        // 노출할 문구
3574        "text": "FREE SHIPPING FOR ALL PRODUCT ~ 7/30",
3575        
3576        // 배경색 - 컬러코드로 입력해주세요.
3577        "background": "#5E8DCE",
3578        
3579        // 글자색 - 컬러코드로 입력해주세요.
3580        "color": "#fff"
3581    },
3582    
3583    // 두번째 최상단 띠배너
3584    "two" : {
3585        // 연결할 링크
3586    	"link" : "여기에 링크를 넣어주세요",
3587        
3588        // 노출할 문구
3589        "text": "NEW SEASON HAS ARRIVED | SHOP NOW",
3590        
3591        // 배경색 - 컬러코드로 입력해주세요.
3592        "background": "#5E8DCE",
3593        
3594         // 글자색 - 컬러코드로 입력해주세요.
3595        "color": "#fff"
3596    }
3597};
3598
3599// ------------ COLLECTION 주소 ------------
3600// 링크 미입력시 표시가 되지않습니다. 표시안함을 원하시면 따옴표만 남기고 삭제해주세요.
3601var lookbook_link = "86";
3602
3603
3604
3605
3606// ------------ 상단 카카오톡/인스타그램 링크 ------------
3607// 링크 미입력시 표시가 되지않습니다. 표시안함을 원하시면 따옴표만 남기고 삭제해주세요.
3608// 인스타그램 링크
3609var instagram_link = "https://www.instagram.com/sunnicorn_official/";
3610
3611// 카카오톡 채널 링크
3612var kakaotalk_link = "https://pf.kakao.com/_ZJFxbb/chat";
3613
3614
3615
3616
3617// ------------ about 페이지 사용여부 체크 ------------
3618// off로 입력하시면 노출되지 않습니다.
3619var aboutAbout = 'on';
3620
3621
3622// ------------ Stockist 페이지 사용여부 체크 ------------
3623// off로 입력하시면 노출되지 않습니다.
3624var aboutStockist = 'off';
3625
3626
3627
3628// ------------ Membership 페이지 사용여부 체크 ------------
3629// off로 입력하시면 노출되지 않습니다.
3630var aboutMembership = 'on';
3631
3632
3633
3634
3635/* 
3636   아래 코드는 절대 임의로 수정하지 마세요!
3637   임의로 수정하여 발생한 문제에 대해서는 책임지지 않으며 복구비용이 발생할 수 있습니다.
3638   문의사항은 쇼디자인으로 전달해주세요.
3639*/
3640
3641if(topBannerOn !== 'on') {
3642    $('body').addClass('offtopbn');
3643};
3644
3645$('body#main').addClass('ontop');
3646if(headerOnWhite === 'on') {
3647    $('body#main').addClass('onwhite');
3648};
3649$('#top_banner1').attr('href', topBanner.one.link);
3650$('#top_banner1').text(topBanner.one.text);
3651$('#top_banner1').css('background', topBanner.one.background);
3652$('#top_banner1').css('color', topBanner.one.color);
3653
3654$('#top_banner2').attr('href', topBanner.two.link);
3655$('#top_banner2').text(topBanner.two.text);
3656$('#top_banner2').css('background', topBanner.two.background);
3657$('#top_banner2').css('color', topBanner.two.color);
3658
3659
3660$('.aboutAbout').hide();
3661if(aboutAbout === 'on') {
3662    $('.aboutAbout').show();
3663};
3664
3665$('.aboutStockist').hide();
3666if(aboutStockist === 'on') {
3667    $('.aboutStockist').show();
3668};
3669
3670$('.aboutMembership').hide();
3671if(aboutMembership === 'on') {
3672    $('.aboutMembership').show();
3673};
3674
3675$('.lookbook_link').hide();
3676if(lookbook_link) {
3677    $('.lookbook_link a').attr('href', '/collection/list.html?cate_no=' + lookbook_link);
3678    $('.lookbook_link').show();
3679};
3680
3681
3682$('.instagram_link').hide();
3683if(instagram_link) {
3684    $('.instagram_link a').attr('href', instagram_link);
3685    $('.instagram_link').show();
3686};
3687
3688$('.kakaotalk_link').hide();
3689if(kakaotalk_link) {
3690    $('.kakaotalk_link a').attr('href', kakaotalk_link);
3691    $('.kakaotalk_link').show();
3692};
3693
3694if ( !instagram_link && !kakaotalk_link ) {
3695	$('.f_top_sns').hide();
3696}
3697
3698$(function(){
3699    if (typeof(EC_SHOP_MULTISHOP_SHIPPING) != "undefined") {
3700        var sShippingCountryCode4Cookie = 'shippingCountryCode';
3701        var bShippingCountryProc = false;
3702
3703        // 배송국가 선택 설정이 사용안함이면 숨김
3704        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) {
3705            $('.xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist').hide();
3706            $('.xans-layout-multishoplist .countryTitle').hide();
3707            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioptioncountry').hide();
3708        } else { // 배송국가 선택 설정이 사용이면 쿠키값이나 query string으로 넘어온 배송국가 값을 사용
3709            $('.xans-multishop-listitem').hide();
3710            $('.xans-layout-multishoplist > h1').hide();
3711            $('.xans-layout-multishoplist .languageTitle').show();
3712            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioptionlanguage').show();
3713            $('.xans-layout-multishoplist .countryTitle').show();
3714            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioptioncountry').show();
3715
3716            var aShippingCountryCode = document.cookie.match('(^|;) ?'+sShippingCountryCode4Cookie+'=([^;]*)(;|$)');
3717
3718            if (typeof(aShippingCountryCode) != 'undefined' && aS
3718hippingCountryCode != null && aShippingCountryCode.length > 2) {
3719                var sShippingCountryValue = aShippingCountryCode[2];
3720            }
3721
3722            // query string으로 넘어 온 배송국가 값이 있다면, 그 값을 적용함
3723            var aHrefCountryValue = decodeURIComponent(location.href).split("/?country=");
3724
3725            if (aHrefCountryValue.length == 2) {
3726                var sShippingCountryValue = aHrefCountryValue[1];
3727            }
3728
3729            // 메인 페이지에서 국가선택을 안한 경우, 그 외의 페이지에서 셋팅된 값이 안 나오는 현상 처리
3730            if (location.href.split("/").length != 4 && $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()) {
3731                $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join(""));
3732                if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) {
3733                    $("#f_country").val($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val());
3734                }
3735            }
3736            if (typeof(sShippingCountryValue) != "undefined" && sShippingCountryValue != "" && sShippingCountryValue != null) {
3737                sShippingCountryValue = sShippingCountryValue.split("#")[0];
3738                var bShippingCountryProc = true;
3739
3740                $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue);
3741                $(".xans-layout-multishoplist .xans-multishop-listitem .countryLink").text($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text());
3742
3743                var expires = new Date();
3744                expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30일간 쿠키 유지
3745                document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString();
3746
3747                if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) {
3748                    $("#f_country").val(sShippingCountryValue).change();
3749                }
3750            }
3751        }
3752
3753        // 언어선택 설정이 사용안함이면 숨김
3754        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingLanguageSelection === false) {
3755            $('.xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist').hide();
3756            $('.xans-layout-multishoplist .languageTitle').hide();
3757            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioptionlanguage').hide();
3758        } else {
3759            $('.xans-multishop-listitem').hide();
3760            $('.xans-layout-multishoplist > h1').hide();
3761            $('.xans-layout-multishoplist .languageTitle').show();
3762            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioptionlanguage').show();
3763            $('.xans-layout-multishoplist .countryTitle').show();
3764            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioptioncountry').show();
3765        }
3766
3767        // 배송국가 및 언어 설정이 둘 다 사용안함이면 숨김
3768        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShipping === false) {
3769            $(".xans-layout-multishopshipping").hide();
3770            $('.xans-layout-multishoplist .countryTitle').hide();
3771            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioptioncountry').hide();
3772            $('.xans-layout-multishoplist .languageTitle').hide();
3773            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioptionlanguage').hide();
3774        } else if (bShippingCountryProc === false && location.href.split("/").length == 4) { // 배송국가 값을 처리한 적이 없고, 메인화면일 때만 선택 레이어를 띄움
3775            var sShippingCountryValue = $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val();
3776            $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue);
3777            $(".xans-layout-multishoplist .xans-multishop-listitem .countryLink").text($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text());
3778            // 배송국가 선택을 사용해야 레이어를 보이게 함
3779            if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === true) {
3780                $(".xans-layout-multishopshipping").show();
3781            }
3782        }
3783
3784        $(".xans-layout-multishopshipping .btnClose").on("click", function() {
3785            $(".xans-layout-multishopshipping").hide();
3786        });
3787
3788        $(".xans-layout-multishopshipping .ec-base-button a").on("click", function() {
3789            var expires = new Date();
3790            expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30일간 쿠키 유지
3791            document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString();
3792
3793            // 도메인 문제로 쿠키로 배송국가 설정이 안 되는 경우를 위해 query string으로 배송국가 값
3793을 넘김
3794            var sQuerySting = (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) ? "" : "/?country="+encodeURIComponent($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val());
3795
3796            location.href = '//'+$(".xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist").val()+sQuerySting;
3797        });
3798        $(".xans-layout-multishoplist .xans-multishop-listitem .countryLink").on("click", function(e) {
3799            $('#dimmedSlider').toggle();
3800            $('html').toggleClass('expand');
3801            $(".xans-layout-multishopshipping").show();
3802            e.preventDefault();
3803        });
3804        $(".xans-layout-multishoplist .xans-multishop-listitem .languageLink").on("click", function(e) {
3805            $('#dimmedSlider').toggle();
3806            $('html').toggleClass('expand');
3807            $(".xans-layout-multishopshipping").show();
3808            e.preventDefault();
3809        });
3810    }
3811});

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.