PageSourceSearch

https://ahro.co.kr/ind-script/optimizer_user.php?filename=jc_BDcIw…928ca8f961047bd14080fbe&t=1781758928&user=T

js ahro.co.kr collected 2026-10-05 06:59:07 UTC 146,133 bytes, 4,256 lines download raw bytes

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

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.