1$(function(){ 2 if($(".menuCategory > li").length==0){ 3 $(".menuCategory").hide(); 4 }; 5}); 6/** 7 * ìì§ì´ë ë°°ë Jquery Plug-in 8 * @author cafe24 9 */ 10 11(function($){ 12 13 $.fn.floatBanner = function(options) { 14 options = $.extend({}, $.fn.floatBanner.defaults , options); 15 16 return this.each(function() { 17 var aPosition = $(this).position(); 18 var jbOffset = $(this).offset(); 19 var node = this; 20 21 $(window).on('scroll', function() { 22 var _top = $(document).scrollTop(); 23 _top = (aPosition.top < _top) ? _top : aPosition.top; 24 25 setTimeout(function () { 26 var newinit = $(document).scrollTop(); 27 28 if ( newinit > jbOffset.top ) { 29 _top -= jbOffset.top; 30 var container_height = $("#wrap").height(); 31 var quick_height = $(node).height(); 32 var cul = container_height - quick_height; 33 if(_top > cul){ 34 _top = cul; 35 } 36 } else { 37 _top = 0; 38 } 39 40 $(node).stop().animate({top: _top}, options.animate); 41 }, options.delay); 42 }); 43 }); 44 }; 45 46 $.fn.floatBanner.defaults = { 47 'animate' : 500, 48 'delay' : 500 49 }; 50 51})(jQuery); 52 53/** 54 * 문ì 구ëí ìì 55 */ 56$(function(){ 57 $('#banner:visible, #quick:visible').floatBanner(); 58 59 //placeholder 60 $(".ePlaceholder input, .ePlaceholder textarea").each(function(i){ 61 var placeholderName = $(this).parents().attr('title'); 62 $(this).attr("placeholder", placeholderName); 63 }); 64 /* placeholder ie8, ie9 */ 65 $.fn.extend({ 66 placeholder : function() { 67 //IE 8 ë²ì ìë hasPlaceholderSupport() ê°ì´ false를 ë¦¬í´ 68 if (hasPlaceholderSupport() === true) { 69 return this; 70 } 71 //hasPlaceholderSupport() ê°ì´ false ì¼ ê²½ì° ìë ì½ë를 ì¤í 72 return this.each(function(){ 73 var findThis = $(this); 74 var sPlaceholder = findThis.attr('placeholder'); 75 if ( ! sPlaceholder) { 76 return; 77 } 78 findThis.wrap('<label class="ePlaceholder" />'); 79 var sDisplayPlaceHolder = $(this).val() ? ' style="display:none;"' : ''; 80 findThis.before('<span' + sDisplayPlaceHolder + '>' + sPlaceholder + '</span>'); 81 this.onpropertychange = function(e){ 82 e = event || e; 83 if (e.propertyName == 'value') { 84 $(this).trigger('focusout'); 85 } 86 }; 87 //ê³µíµ class 88 var agent = navigator.userAgent.toLowerCase(); 89 if (agent.indexOf("msie") != -1) { 90 $(".ePlaceholder").css({"position":"relative"}); 91 $(".ePlaceholder span").css({"position":"absolute", "padding":"0 4px", "color":"#878787"}); 92 $(".ePlaceholder label").css({"padding":"0"}); 93 } 94 }); 95 } 96 }); 97 98 $(':input[placeholder]').placeholder(); //placeholder() í¨ì를 í¸ì¶ 99 100 //í´ë¦íë©´ placeholder ì¨ê¹ 101 $('body').on('click', '.ePlaceholder span', function(){ 102 $(this).hide(); 103 }); 104 105 //inputì°½ í¬ì»¤ì¤ ì¸ ì¼ë placeholder ì¨ê¹ 106 $('body').on('focusin', '.ePlaceholder :input', function(){ 107 $(this).prev('span').hide(); 108 }); 109 110 //inputì°½ í¬ì»¤ì¤ ìì ì¼ë value ê° true ì´ë©´ ì¨ê¹, false ì´ë©´ ë³´ì¬ì§ 111 $('body').on('focusout', '.ePlaceholder :input', function(){ 112 if (this.value) { 113 $(this).prev('span').hide(); 114 } else { 115 $(this).prev('span').show(); 116 } 117 }); 118 119 //inputì placeholderê° ì§ìì´ ëë©´ true를 ìëë©´ false를 리í´ê°ì¼ë¡ ëì ¸ì¤ 120 function hasPlaceholderSupport() { 121 if ('placeholder' in document.createElement('input')) { 122 return true; 123 } else { 124 return false;
125 } 126 } 127}); 128 129/** 130 * ì¸ë¤ì¼ ì´ë¯¸ì§ ìë°ì¼ê²½ì° ê¸°ë³¸ê° ì¤ì 131 */ 132$(window).on('load', function() { 133 $("img.thumb,img.ThumbImage,img.BigImage").each(function($i,$item){ 134 var $img = new Image(); 135 $img.onerror = function () { 136 $item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif"; 137 } 138 $img.src = this.src; 139 }); 140}); 141 142/** 143 * tooltip 144 */ 145$('.eTooltip').each(function(i){ 146 $(this).find('.btnClose').attr('tabIndex','-1'); 147}); 148//tooltip input focus 149$('.eTooltip').find('input').on('focus', function() { 150 var targetName = returnTagetName(this); 151 targetName.siblings('.ec-base-tooltip').show(); 152}); 153$('.eTooltip').find('input').on('focusout', function() { 154 var targetName = returnTagetName(this); 155 targetName.siblings('.ec-base-tooltip').hide(); 156}); 157function returnTagetName(_this){ 158 var ePlacename = $(_this).parent().attr("class"); 159 var targetName; 160 if(ePlacename == "ePlaceholder"){ //ePlaceholder ëì 161 targetName = $(_this).parents(); 162 }else{ 163 targetName = $(_this); 164 } 165 return targetName; 166} 167 168/** 169 * eTab 170 */ 171$("body").on("click", ".eTab a", function(e){ 172 // í´ë¦í li ì selected í´ëì¤ ì¶ê°, 기존 liì ìë selected í´ëì¤ë ìì . 173 var _li = $(this).parent("li").addClass("selected").siblings().removeClass("selected"), 174 _target = $(this).attr("href"), 175 _siblings = $(_target).attr("class"), 176 _arr = _siblings.split(" "), 177 _classSiblings = "."+_arr[0]; 178 179 //í´ë¦í íì í´ë¹íë ììë íì±í, 기존 ììë ë¹íì±í í¨. 180 $(_target).show().siblings(_classSiblings).hide(); 181 182 183 //preventDefault ë a íê·¸ ì²ë¼ í´ë¦ ì´ë²¤í¸ ì¸ì ë³ëì ë¸ë¼ì°ì íëì ë§ê¸° ìí´ ì¬ì©ë¨. 184 e.preventDefault(); 185}); 186 187 188/* Hpix add 2023.11.04 : ê²ìì´ clear */ 189$('.xans-layout-searchheader').find('.btnDelete').on('click ', function(){ 190 $('#keyword').val('').focus(); 191}); 192 193 194//window popup script 195function winPop(url) { 196 window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no"); 197} 198/** 199 * document.location.href split 200 * return array Param 201 */ 202function getQueryString(sKey) 203{ 204 var sQueryString = document.location.search.substring(1); 205 var aParam = {}; 206 207 if (sQueryString) { 208 var aFields = sQueryString.split("&"); 209 var aField = []; 210 for (var i=0; i<aFields.length; i++) { 211 aField = aFields[i].split('='); 212 aParam[aField[0]] = aField[1]; 213 } 214 } 215 216 aParam.page = aParam.page ? aParam.page : 1; 217 return sKey ? aParam[sKey] : aParam; 218}; 219 220$(function(){ 221 // tab 222 $.eTab = function(ul){ 223 $(ul).find('a').on('click', function(){ 224 var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'), 225 _target = $(this).attr('href'), 226 _siblings = '.' + $(_target).attr('class'); 227 $(_target).show().siblings(_siblings).hide(); 228 return false 229 }); 230 } 231 if ( window.call_eTab ) { 232 call_eTab(); 233 }; 234}); 235 236$(function(){ 237 $('.border-box .content-title').on('click', function(){ 238 var box = $(this).parents('.border-box'); 239 box.toggleClass('none'); 240 }); 241 242 $('.table-box thead').on('click', function(){ 243 var box = $(this).parents('.table-box'); 244 box.toggleClass('active'); 245 }) 246}); 247 248 249$(function() { 250 $('.accordion-list li').on('click', function(e){ 251 $(this).toggleClass('active'); 252 $(this).find('.content').slideToggle(); 253 $('.accordion-list li').not(this).removeClass('active'); 254 $('.accordion-list li').not(this).find('.content').slideUp(); 255 }); 256}); 257 258$(function() { 259 $('.toggle-trigger').on('click', function(){ 260 var target = $(this).parents('tr'); 261 if(target.hasClass('active')){ 262 target.removeClass('active'); 263 }else{ 264 $('table.toggle tr').removeClass('active'); 265 target.addClass('active'); 266 } 267 }); 268}); 269 270$(function(){ 271 $('.btn-back').on('click', function(){ 272 if($('.sidebar.board').length){ 273 $(location).attr("href",'/cs/') 274 }else{ 275 window.history.back(); 276 } 277 }) 278}); 279 280$(function(){ 281 // ì¤ì ì¥ë°êµ¬ëì ë´ê¸´ ê°¯ì ì°ë 282 var product_quantity = 0; 283 284 $('.basket-count').text(product_quantity); 285 286 $.get('/api/basket-data.html', function(res){ 287 if($('#default-basket').text() !== 0) { 288 $(res).find('#contents .product-item .product-quantity input').each(function(){ 289 product_quantity += Number($(this).val()); 290 $('.basket-count').text(product_quantity); 291 }) 292 } 293 }) 294}); 295 296 297 298// ì±ëí¡ ì¬ì©ì ì±ëí¡ ì¤íì¼ ì¡°ì JS @CHUJIHYE 299// $(document).ready(function(){ 300// $(window).on('scroll', function(){ 301// var is_orderFixArea = $('#orderFixArea').css('display'); 302// var ch_plugin_btn = document.getElementById('ch-plugin').querySelector('div:not(#ch-plugin-script)').shadowRoot.getElementById('ch-shadow-root-wrapper').querySelector('div'); 303 304// if(is_orderFixArea == 'block' && ch_plugin_btn){ 305// ch_plugin_btn.style.bottom = '80px'; 306// ch_plugin_btn.style.transition = 'all 0.3s'; 307// }else{ 308// ch_plugin_btn.style.bottom = '20px'; 309// ch_plugin_btn.style.transition = 'all 0.3s'; 310// } 311// }) 312// }); 313(function($){ 314 $.fn.extend({ 315 center: function() { 316 this.each(function() { 317 var 318 $this = $(this), 319 $w = $(window); 320 $this.css({ 321 position: "absolute", 322 top: ~~(($w.height() - $this.outerHeight()) / 2) + $w.scrollTop() + "px", 323 left: ~~(($w.width() - $this.outerWidth()) / 2) + $w.scrollLeft() + "px" 324 }); 325 }); 326 return this; 327 } 328 }); 329 $(function() { 330 var $container = function(){/* 331 <div id="modalContainer"> 332 <iframe id="modalContent" scroll="0" scrolling="no" frameBorder="0"></iframe> 333 </div>'); 334 */}.toString().slice(14,-3); 335 $('body') 336 .append($('<div id="modalBackpanel"></div>')) 337 .append($($container)); 338 function closeModal () { 339 $('#modalContainer').hide(); 340 $('#modalBackpanel').hide(); 341 } 342 $('#modalBackpanel').on('click',closeModal); 343 zoom = function ($piProductNo, $piCategoryNo, $piDisplayGroup) { 344 var $url = '/product/image_zoom.html?product_no=' + $piProductNo + '&cate_no=' + $piCategoryNo + '&display_group=' + $piDisplayGroup; 345 $('#modalContent').attr('src', $url); 346 $('#modalContent').on("load",function(){ 347 $(".header .close",this.contentWindow.document.body).on("click", closeModal); 348 }); 349 $('#modalBackpanel').css({width:$("body").width(),height:$("body").height(),opacity:.4}).show(); 350 $('#modalContainer').center().show(); 351 } 352 }); 353})(jQuery);
354// ì¸ë¤ì¼ ì´ë¯¸ì§ ìë°ì¼ê²½ì° ê¸°ë³¸ê° ì¤ì 355$(window).on('load', function() { 356 357 $(".thumbnail img, img.thumbImage, img.bigImage").each(function($i,$item){ 358 var $img = new Image(); 359 $img.onerror = function () { 360 $item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif"; 361 } 362 $img.src = this.src; 363 }); 364 365}); 366 367$(function(){ 368 // í ê¸ 369 $('div.eToggle .title').off('click').on('click', function(){ 370 var toggle = $(this).parent('.eToggle'); 371 if(toggle.hasClass('disable') === false){ 372 $(this).parent('.eToggle').toggleClass('selected') 373 } 374 }); 375 376 $('dl.eToggle dt').on('click', function(){ 377 $(this).toggleClass('selected'); 378 $(this).next('dd').toggleClass('selected'); 379 }); 380 381 //ì¥ë°êµ¬ë íì´ì§ ìëí¼ Type ë³ê²½ 382 $('[id^="quantity"]').each(function() { 383 $(this).get(0).type = 'tel'; 384 }); 385 386 // 모ë°ì¼ìì ê³µê¸ì¬ í ì´ë¸ th ê°ì ì¡°ì 387 $('.xans-mall-supplyinfo, .supplyInfo').find('table > colgroup').find('col').eq(0).width(98); 388 $('.xans-mall-supplyinfo, .supplyInfo').find('th, td').css({padding:'13px 10px 12px'}); 389 390 /** 391 * ë©ì¸ì¹´í ê³ ë¦¬ toggle 392 */ 393 $('.xans-product-listmain h2').on('click', function() { 394 var bClosed = !!$(this).data('is_closed'); 395 var sUrl; 396 if (bClosed) { 397 sUrl = "//img.echosting.cafe24.com/skin/mobile_ko_KR/layout/bg_title_close.gif"; 398 } else { 399 sUrl = "//img.echosting.cafe24.com/skin/mobile_ko_KR/layout/bg_title_open.gif"; 400 } 401 $(this).css('background-image', 'url("'+ sUrl +'")'); 402 $(this).siblings().toggle(); 403 $(this).parent().find('div.ec-base-paginate').toggle(); 404 $(this).parent().next('div.xans-product-listmore').toggle(); 405 $(this).data('is_closed', !bClosed); 406 }); 407 408 /* base header ê²ì ë ì´ì´ */ 409 $('#layout .header').find('.search .btnSearch').on('click', function(){ 410 var $baseHeader = $('#layout .header'); 411 $baseHeader.addClass('open'); 412 $('#dimmedSlider').one('click', function(){ 413 $baseHeader.removeClass('open'); 414 }); 415 }); 416 417 /** 418 * ìë¨íë²í¼ 419 */ 420 var globalTopBtnScrollFunc = function() { 421 // íë²í¼ ê´ë ¨ë³ì 422 var $btnTop = $('#btnTop'); 423 var $floating_wrap = $('.floating-wrap'); 424 425 $(window).on('scroll', function() { 426 try { 427 var iCurScrollPos = $(this).scrollTop(); 428 429 if (iCurScrollPos > ($(this).height() / 2)) { 430 $floating_wrap.addClass('show'); 431 $btnTop.fadeIn('fast'); 432 } else { 433 $floating_wrap.removeClass('show'); 434 $btnTop.fadeOut('fast'); 435 } 436 } catch(e) { } 437 }); 438 439 $('#btnTop').on('click', function() { 440 $('html, body').animate({scrollTop: 0}, 200); 441 }); 442 }; 443 444 /** 445 * 구매ë²í¼ 446 */ 447 var globalBuyBtnScrollFunc = function() { 448 449 var sFixId = $('#orderFixItem').length > 0 ? 'orderFixItem' : 'fixedActionButton', 450 $area = $('#orderFixArea'), 451 $item = $('#' + sFixId + '').not($area); 452 453 $(window).on('scroll', function(){ 454 try { 455 456 var iCurrentHeightPos = $(this).scrollTop() + $(this).height(), 457 iButtonHeightPos = $item.offset().top; 458 459 if($(window).innerWidth() < 641){ 460 if (iCurrentHeightPos > iButtonHeightPos || iButtonHeightPos < $(this).scrollTop() + $item.height()) { 461 if (iButtonHeightPos < $(this).scrollTop() - $item.height()) { 462 $area.fadeIn('fast'); 463 } else { 464 $area.hide(); 465 } 466 } else { 467 $area.fadeIn('fast'); 468 } 469 }else{ 470 $area.hide(); 471 } 472 473 } catch(e) { } 474 }); 475 }; 476 477 globalTopBtnScrollFunc(); 478 globalBuyBtnScrollFunc(); 479}); 480 481// ê³µíµë ì´ì´íì ì¤í 482var globalLayerOpenFunc = function(_this) { 483 this.id = $(_this).data('id'); 484 this.param = $(_this).data('param'); 485 this.basketType = $('#basket_type').val(); 486 this.url = $(_this).data('url'); 487 this.layerId = 'ec_temp_mobile_layer'; 488 this.layerIframeId = 'ec_temp_mobile_iframe_layer'; 489 490 var _this = this; 491 492 function paramSetUrl() { 493 if (this.param) { 494 // if isset param 495 } else { 496 this.url = this.basketType ? this.url + '?basket_type=' + this.basketType : this.url; 497 } 498 }; 499 500 if (this.url) { 501 window.ecScrollTop = $(window).scrollTop(); 502 $.ajax({ 503 url : this.url, 504 success : function (data) { 505 if (data.indexOf('404 íì´ì§ ìì') == -1) { 506 // ìë¤ë©´ ìì 507 try { $(_this).remove(); } catch ( e ) { } 508
509 var $layer = $('<div>', { 510 html: $("<iframe>", { src: _this.url, id: _this.layerIframeId, scrolling: 'auto', css: { width: '100%', height: '100%', overflowY: 'auto', border: 0 } } ), 511 id: _this.layerId, 512 css : { position: 'absolute', top: 0, left:0, width: '100%', height: $(window).height(), 'z-index': 9999 } 513 }); 514 515 $('body').append($layer); 516 $('html, body').css({'overflowY': 'hidden', height: '100%', width: '100%'}); 517 $('#' + this.layerId).show(); 518 } 519 } 520 }); 521 } 522}; 523 524// ê³µíµë ì´ì´íì ë«ê¸° 525var globalLayerCloseFunc = function() { 526 this.layerId = 'ec_temp_mobile_layer'; 527 528 if (window.parent === window) 529 self.close(); 530 else { 531 parent.$('html, body').css({'overflowY': 'auto', height: 'auto', width: '100%'}); 532 parent.$('html, body').scrollTop(parent.window.ecScrollTop); 533 parent.$('#' + this.layerId).remove(); 534 } 535}; 536 537/** 538 * document.location.href split 539 * return array Param 540 */ 541var getQueryString = function(sKey) 542{ 543 var sQueryString = document.location.search.substring(1); 544 var aParam = {}; 545 546 if (sQueryString) { 547 var aFields = sQueryString.split("&"); 548 var aField = []; 549 for (var i=0; i<aFields.length; i++) { 550 aField = aFields[i].split('='); 551 aParam[aField[0]] = aField[1]; 552 } 553 } 554 555 aParam.page = aParam.page ? aParam.page : 1; 556 return sKey ? aParam[sKey] : aParam; 557}; 558 559// PCë²ì ë°ë¡ ê°ê¸° 560var isPCver = function() { 561 var sUrl = window.location.hostname; 562 var aTemp = sUrl.split("."); 563 564 var pattern = /^(mobile[\-]{2}shop[0-9]+)$/; 565 566 if (aTemp[0] == 'm' || aTemp[0] == 'skin-mobile' || aTemp[0] == 'mobile') { 567 sUrl = sUrl.replace(aTemp[0]+'.', ''); 568 } else if (pattern.test(aTemp[0]) === true) { 569 var aExplode = aTemp[0].split('--'); 570 aTemp[0] = aExplode[1]; 571 sUrl = aTemp.join('.'); 572 } 573 window.location.href = '//'+sUrl+'/?is_pcver=T'; 574}; 575 576/* ëìë§ */ 577$('body').on('click', '.ec-base-tooltip-area .eTip', function(e){ 578 var findArea = $($(this).parents('.ec-base-tooltip-area')); 579 var findTarget = $($(this).siblings('.ec-base-tooltip')); 580 var findTooltip = $('.ec-base-tooltip'); 581 $('.ec-base-tooltip-area').removeClass('show'); 582 $(this).parents('.ec-base-tooltip-area').first().addClass('show'); 583 findTooltip.hide(); 584 findTarget.show(); 585 e.preventDefault(); 586}); 587 588$('body').on('click', '.ec-base-tooltip-area .eClose', function(e){ 589 var findTarget = $(this).parents('.ec-base-tooltip').first(); 590 $('.ec-base-tooltip-area').removeClass('show'); 591 findTarget.hide(); 592 e.preventDefault(); 593}); 594 595$('.ec-base-tooltip-area').find('input').on('focusout', function() { 596 var findTarget = $(this).parents('.ec-base-tooltip-area').find('.ec-base-tooltip'); 597 $('.ec-base-tooltip-area').removeClass('show'); 598 findTarget.hide(); 599}); 600 601/** 602 * íì ì°½ì 리ì¬ì´ì¦ ê´ë ¨ 603 */ 604 605function setResizePopup() { 606 if(!$('#popup').length) return; 607 608 var iWrapWidth = $('#popup').width(); 609 var iWrapHeight = $('#popup').height(); 610 611 var iWindowWidth = $(window).width(); 612 var iWindowHeight = $(window).height(); 613 614 // window.resizeBy(iWrapWidth - iWindowWidth, iWrapHeight - iWindowHeight); 615} 616 617// setResizePopup(); 618 619// íì íì´ì§ ë¡ëê° ìë£ë íì 리ì¬ì´ì§ í¨ì를 ë¤ì í¸ì¶ 620$( window ).on('load', function() { 621 var iWindowHeight = $(window).height(); 622 window.resizeTo(600, iWindowHeight); 623}); 624$(document).ready(function(){ 625 $('#product_select_all').on('click', function() { 626 var _status = $(this).data('status'); 627 628 $('[id^="basket_chk_id_"]').each(function(){ 629 var bChecked = $(this).is(":checked"); 630 if (_status == 'off') { 631 if (bChecked === false) $(this).prop('checked', true); 632 } else { 633 $(this).prop('checked', false); 634 } 635 }); 636 637 $(this).data('status', _status == 'off' ? 'on' : 'off'); 638 fixedLayerPriceSet(); 639 }); 640 641 // ê³ ì ììì ìíì ë³´ ì¸í 642 var fixedLayerPriceSet = function() { 643 var iSumPrice = 0; 644 var iCheckPrdCnt = 0;
645 $('[id^="basket_chk_id_"]').each(function(){ 646 if ($(this).attr('checked') == true) { 647 var sCheckId = $(this).attr('id'); 648 var aTemp = sCheckId.split('_'); 649 var iCheckId = aTemp[3]; 650 var iProductPrice = aBasketProductData[iCheckId].product_sum_price; 651 iSumPrice = iSumPrice + iProductPrice; 652 iCheckPrdCnt = iCheckPrdCnt + 1; 653 } 654 }); 655 if (iCheckPrdCnt > 0) { 656 var sTotalPrice = SHOP_PRICE_FORMAT.toShopPrice(iSumPrice); 657 $('#checked_order_count').html('<strong>' + sprintf(__('%s'),iCheckPrdCnt) + '</strong>' +'ê° ìíì í').css('padding-bottom','5px'); 658 $('#checked_order_price').html('ê²°ì ìì ê¸ì¡ <strong><em>'+sTotalPrice+'</em></strong>').css('padding-bottom','5px'); 659 var sPriceRef = SHOP_PRICE_FORMAT.shopPriceToSubPrice(iSumPrice); 660 if (sPriceRef != '') $('#checked_order_price').find('strong').append(sPriceRef); 661 } else { 662 fixLayerPriceRest(); 663 } 664 }; 665 // ê³ ì ìì ìíí©ê³ì´ê¸°í 666 var fixLayerPriceRest = function() { 667 $('#checked_order_count, #checked_order_price').html('').css('padding-bottom','0'); 668 }; 669 fixLayerPriceRest(); 670 // ì¥ë°êµ¬ë ì²´í¬ë°ì¤ ì²´í¬ì ìíì´í©ê³, ì²´í¬í ì«ì 구í기 671 $('[id^="basket_chk_id_"]').click(function(e) { 672 fixedLayerPriceSet(); 673 }); 674 675 // ë¹íì ì¥ë°êµ¬ë íì´ì§ì¼ ê²½ì° ë§ì¼ë¦¬ì§ ë¹ë ¸ì¶ 676 if($('#login-status').text().indexOf('login') !== -1) $('.page-order .product-info-item .mileage').addClass('displaynone'); 677 678 if($('#login-status').text() == 'login') $('.mileage').addClass('displaynone'); 679 680 // ì¥ë°êµ¬ë í¼ì¼í¸ ê³ì° @CHU 681 $('.product-cart-item').each(function(){ 682 var product_prices = $(this).find('.discount-persent'); 683 684 if(product_prices.length > 0 && !product_prices.hasClass('displaynone')){ 685 var sale_price = product_prices.find('.sale').text().replace(/,/g, ""); 686 var origin_price = product_prices.find('.origin').text().replace(/,/g, ""); 687 var product_persent = (sale_price / origin_price) * 100; 688 $(this).find('.persent').text(product_persent+'%'); 689 } 690 }) 691}); 692// ì¥ë°êµ¬ë ì íìí ìì 693function selBasketDel(id) { 694 $('[id^="'+BASKET_CHK_ID_PREFIX+'"]').attr('checked', false); 695 $('[id="'+id+'"]').attr('checked', true); 696 Basket.deleteBasket(); 697} 698 699 700$(function(){ 701 if (typeof(EC_SHOP_MULTISHOP_SHIPPING) != "undefined") { 702 var sShippingCountryCode4Cookie = 'shippingCountryCode'; 703 var bShippingCountryProc = false; 704 705 // ë°°ì¡êµê° ì í ì¤ì ì´ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 706 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) { 707 $('.xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist').hide(); 708 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptioncountry').hide(); 709 } else { 710 $('.thumb .xans-layout-multishoplistitem').hide(); 711 var aShippingCountryCode = document.cookie.match('(^|;) ?'+sShippingCountryCode4Cookie+'=([^;]*)(;|$)'); 712 if (typeof(aShippingCountryCode) != 'undefined' && aS
712hippingCountryCode != null && aShippingCountryCode.length > 2) { 713 var sShippingCountryValue = aShippingCountryCode[2]; 714 } 715 716 // query stringì¼ë¡ ëì´ ì¨ ë°°ì¡êµê° ê°ì´ ìë¤ë©´, ê·¸ ê°ì ì ì©í¨ 717 var aHrefCountryValue = decodeURIComponent(location.href).split("/?country="); 718 719 if (aHrefCountryValue.length == 2) { 720 var sShippingCountryValue = aHrefCountryValue[1]; 721 } 722 723 // ë©ì¸ íì´ì§ìì êµê°ì íì ìí ê²½ì°, ê·¸ ì¸ì íì´ì§ìì ì í ë ê°ì´ ì ëì¤ë íì ì²ë¦¬ 724 if (location.href.split("/").length != 4 && $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()) { 725 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 726 727 if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { 728 $("#f_country").val($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); 729 } 730 } 731 if (typeof(sShippingCountryValue) != "undefined" && sShippingCountryValue != "" && sShippingCountryValue != null) { 732 sShippingCountryValue = sShippingCountryValue.split("#")[0]; 733 var bShippingCountryProc = true; 734 735 $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); 736 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 737 var expires = new Date(); 738 expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30ì¼ê° ì¿ í¤ ì ì§ 739 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); 740 if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { 741 $("#f_country").val(sShippingCountryValue).change(); 742 } 743 } 744 } 745 // ì¸ì´ì í ì¤ì ì´ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 746 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingLanguageSelection === false) { 747 $('.xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist').hide(); 748 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptionlanguage').hide(); 749 } else { 750 $('.thumb .xans-layout-multishoplistitem').hide(); 751 } 752 753 // ë°°ì¡êµê° ë° ì¸ì´ ì¤ì ì´ ë ë¤ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 754 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShipping === false) { 755 $(".xans-layout-multishopshipping").hide(); 756 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption').hide(); 757 } else if (bShippingCountryProc === false && location.href.split("/").length == 4) { // ë°°ì¡êµê° ê°ì ì²ë¦¬í ì ì´ ìê³ , ë©ì¸íë©´ì¼ ëë§ ì í ë ì´ì´ë¥¼ ëì 758 var sShippingCountryValue = $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(); 759 $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); 760 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 761 // ë°°ì¡êµê° ì íì ì¬ì©í´ì¼ ë ì´ì´ë¥¼ ë³´ì´ê² í¨ 762 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === true) { 763 $(".xans-layout-multishopshipping").show(); 764 } 765 } 766 767 $(".xans-layout-multishopshipping .close").on("click", function() { 768 $(".xans-layout-multishopshipping").hide(); 769 }); 770 771 $(".xans-layout-multishopshipping .ec-base-button a").on("click", function() { 772 var expires = new Date(); 773 expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30ì¼ê° ì¿ í¤ ì ì§ 774 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); 775 776 // ëë©ì¸ 문ì ë¡ ì¿ í¤ë¡ ë°°ì¡êµê° ì¤ì ì´ ì ëë ê²½ì°ë¥¼ ìí´ query stringì¼ë¡ ë°°ì¡êµê° ê°
776ì ëê¹ 777 var sQuerySting = (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) ? "" : "/?country="+encodeURIComponent($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); 778 779 location.href = '//'+$(".xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist").val()+sQuerySting; 780 }); 781 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a").on("click", function() { 782 $(".xans-layout-multishopshipping").show(); 783 }); 784 } 785}); 786(function() { 787 var aCategory = []; 788 var methods = { 789 aCategory : [], 790 aSubCategory : {}, 791 get: function(callback) 792 { 793 $.ajax({ 794 url : '/exec/front/Product/SubCategory', 795 dataType: 'json', 796 success: function(aData) { 797 // console.log(aData); 798 if (aData == null || aData == 'undefined') { 799 methods.checkSub(); 800 return; 801 } 802 for (var i=0; i<aData.length; i++) 803 { 804 var sParentCateNo = aData[i].parent_cate_no; 805 var sCateNo = aData[i].cate_no; 806 if (!methods.aSubCategory[sParentCateNo]) { 807 methods.aSubCategory[sParentCateNo] = []; 808 } 809 if (!aCategory[sCateNo]) { 810 aCategory[sCateNo] = []; 811 } 812 methods.aSubCategory[sParentCateNo].push( aData[i] ); 813 aCategory[sCateNo] = aData[i]; 814 } 815 // console.log('aCategory',aCategory) 816 // console.log('methods.aSubCategory',methods.aSubCategory) 817 } 818 }).done(function(){ 819 callback(); 820 }); 821 }, 822 checkhasChildren: function(parent){ 823 var this_cate = $(parent).attr('data-cate'); 824 if(methods.aSubCategory[this_cate]!= undefined) { 825 var txt = $(parent).find('a').text(); 826 var childs = methods.aSubCategory[this_cate]; 827 var $child_wrap = $('<ul class="lnb-list depth-3" data-count ="'+(childs.length)+'"></ul>'); 828 829 childs.forEach(function(child){ 830 var $li_wrap = $('<li class="lnb-item"></li>'); 831 var child_txt; 832 var list_el = null; 833 834 if(methods.aSubCategory[child.cate_no]!= undefined) { 835 child_txt = '<button class="lnb-btn depth-4" type="button" data-cate ="'+child.cate_no+'">'+child.name+'</button>' 836 list_el = methods.makeDepth4ListNum(child.cate_no); 837 }else{ 838 child_txt = '<a href="/product/list.html?cate_no='+child.cate_no+'" data-cate ="'+child.cate_no+'">'+child.name+'</a>'; 839 } 840 $li_wrap.append($(child_txt)); 841 if(list_el != null)$li_wrap.append(list_el); 842 843 $child_wrap.append($li_wrap); 844 }); 845 846 $(parent).empty(); 847 $(parent).append('<button class="lnb-btn depth-3" type="button" data-cate="'+this_cate+'">'+txt+'</button>') 848 $(parent).append($child_wrap); 849 }else{ 850 $(parent).find('a').attr('href','/product/list.html?cate_no='+this_cate); 851 } 852 }, 853 // makeDepth4List : function(btnDepth4){ 854 // var depth_4_cate = $(btnDepth4).attr('data-cate'); 855 // var childs = methods.aSubCategory[depth_4_cate]; 856 // var $depth_4_wrap = $('<ul class="lnb-list depth-4" data-count ="'+(childs.length)+'"></ul>'); 857 858 // childs.forEach(function(child){ 859 // var child_txt = '<li class="lnb-item"><a href="/product/list.html?cate_no='+child.cate_no+'" data-cate ="'+child.cate_no+'">'+child.name+'</a></li>'; 860 // $depth_4_wrap.append($(child_txt)); 861 // }); 862 863 // $(btnDepth4).parent().append($depth_4_wrap); 864 // }, 865 makeDepth4ListNum : function(cate_no){ 866 var depth_4_cate = cate_no; 867 var childs = methods.aSubCategory[depth_4_cate]; 868 var $depth_4_wrap = $('<ul class="lnb-list depth-4" data-count ="'+(childs.length)+'"></ul>'); 869 var child_txt='' 870 871 childs.forEach(function(child){ 872 child_txt = '<li class="lnb-item"><a href="/product/list.html?cate_no='+child.cate_no+'" data-cate ="'+child.cate_no+'">'+child.name+'</a></li>'; 873 $depth_4_wrap.append($(child_txt)); 874 }); 875 876 return $depth_4_wrap ; 877 }, 878 // íë¡ëª¨ì ë©ì¸ ì¬ì© 879 // makePromotionList:function(){ 880 // var $promotion_wrap = $('.lnb-btn.promotion').parent(); 881 // var promotion_cate = $('.lnb-btn.promotion').attr('data-cate'); 882 // var promotion_child = methods.aSubCategory[promotion_cate]; 883 884 // var $depth_wrap = $('<ul class="lnb-list depth-2 promotion" data-count ="'+(promotion_child.length)+'"></ul>'); 885 // var child_txt='' 886 887 // promotion_child.forEach(function(child){ 888 // child_txt = '<li class="lnb-item" data-cate ="'+child.cate_no+'"><a href="/promotion/detail.html?cate_no='+child.cate_no+'">'+child.name+'</a></li>'; 889 // $depth_wrap.append($(child_txt)); 890 // }); 891 // $promotion_wrap.append($depth_wrap); 892 // } 893 }; 894 try{ 895 $('.xans-layout-category.lnb-list.depth-2').attr('data-count',$('.lnb-item.xans-record-').length); 896 897 methods.get(function(){ 898 $('.lnb-list.shop .lnb-item').each(function(){ 899 // ë¶ëª¨ì ì¹´í ê³ ë¦¬ ë²í¸ë¥¼ íì¸í´ì ëì¼í ê²½ì° ë£ì´ì¤ë¤ 900 methods.checkhasChildren(this); 901 }); 902 903 // methods.makePromotionList(); íë¡ëª¨ì ë©ì¸ ì¬ì© 904 905 setTimeout(function(){ 906 // ìí íë©´ì ë³´ê³ ìë¤ë©´ í¤ëì ë©ë´ë¥¼ í¼ì³ì¤ë¤. 907 var item_h = $(window).width() > 640 ? 2.2 : 2.3; 908 var extra_margin_top = 1.2; 909 var extra_margin_bottom = 0; 910 var extra_margin = 1.6; 911 912 if( window.location.pathname.indexOf('product') > -1){ 913 var cate_no = getUrlParameter('cate_no'); 914 var this_el = $(".header a[data-cate='"+cate_no+"']"); 915 var this_el_parent_list = this_el.parent().parent(); 916 var this_count = this_el_parent_list.data('count'); 917 918 this_el.parent().addClass('views'); 919 this_el_parent_list.addClass('views'); 920 921 var is_depth_2 = this_el_parent_list.hasClass('depth-2'); 922 var is_depth_3 = this_el_parent_list.hasClass('depth-3'); 923 var is_depth_4 = this_el_parent_list.hasClass('depth-4'); 924 925 var is_open = this_el_parent_list.hasClass('open'); 926 927 this_el_parent_list.addClass('active'); 928 this_el_parent_list.css('height',this_count*item_h + extra_margin_top+'rem'); 929 this_el_parent_list.prev().addClass('active'); 930 931 if(is_depth_4 || is_depth_3){ 932 this_el_parent_list.parents('.lnb-list').each(function(index,element){ 933 var is_list_depth_2 = $(element).hasClass('depth-2'); 934 var is_list_depth_3 = $(element).hasClass('depth-3'); 935 var is_list_depth_4 = $(element).hasClass('depth-4'); 936 var is_list_open = $(element).hasClass('active'); 937 938 var children_count = 0; 939 if($(element).find('.lnb-list.active').length > 0){ 940 941 $(element).find('.lnb-list.active').each(function(index,el_child){ 942 children_count += $(el_child).data('count'); 943 }) 944 $(element).addClass('open'); 945 } 946 $(element).addClass('active'); 947 $(element).siblings('.lnb-btn').addClass('active'); 948 949 // ë§ì§ë§ depthê° ì´ë ¸ì ë extra_margin_topì´ ë ì´ë¦° depthë§í¼ ì¶ê°í´ì¤ 950 if(is_depth_4) { 951 if(!is_open) { 952 if(is_list_depth_2) { 953 $(element).css('height',((children_count+$(element).data('count'))*item_h + extra_margin_top * 3)+'rem'); 954 } else { 955 $(element).css('height',((children_count+$(element).data('count'))*item_h + extra_margin_top * 2)+'rem'); 956 } 957 } else { 958 if(is_list_depth_2) { 959 $(element).css('height',((children_count+$(element).data('count'))*item_h + extra_margin_top * 2)+'rem'); 960 } else { 961 $(element).css('height',((children_count+$(element).data('count'))*item_h + extra_margin_top)+'rem'); 962 } 963 } 964 } else { 965 if(!is_open) { 966 $(element).css('height',((children_count+$(element).data('count'))*item_h + extra_margin_top * 2)+'rem'); 967 } else { 968 $(element).css('height',((children_count+$(element).data('count'))*item_h + extra_margin_top)+'rem'); 969 } 970 } 971 }) 972 } 973 } 974 975 // íë¡ëª¨ì ìì¸ íë©´ì ë³´ê³ ìë¤ë©´ í¤ëì ë©ë´ë¥¼ í¼ì³ì¤ë¤. 976 if( window.location.pathname.indexOf('promotion') > -1 ){ 977 var cate_no = getUrlParameter('cate_no'); 978 console.log(cate_no); 979 $(".lnb-list.promotion .lnb-item[data-cate='"+cate_no+"']").addClass('views'); 980 981 $('.lnb-btn.promotion').addClass('active'); 982 $('.lnb-list.promotion').addClass('active views'); 983 $('.lnb-list.promotion').css('height',($('.lnb-list.promotion').data('count')*item_h + extra_margin_top)+'rem'); 984 } 985 },200); 986 }); 987 // $(document).on('click','.lnb-btn.depth-4',function(){ 988 // methods.makeDepth4List(this); 989 // }); 990 991 }catch(e){ 992 console.log(e) 993 } 994 995})(); 996
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.