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