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