1/** 2 * ì¹´í ê³ ë¦¬ ë§ì°ì¤ ì¤ë² ì´ë¯¸ì§ 3 * ì¹´í ê³ ë¦¬ ìë¸ ë©ë´ ì¶ë ¥ 4 */ 5 6$(document).ready(function(){ 7 8 var methods = { 9 aCategory : [], 10 aSubCategory : {}, 11 12 get: function() 13 { 14 $.ajax({ 15 url : '/exec/front/Product/SubCategory', 16 dataType: 'json', 17 success: function(aData) { 18 19 if (aData == null || aData == 'undefined') return; 20 for (var i=0; i<aData.length; i++) 21 { 22 var sParentCateNo = aData[i].parent_cate_no; 23 24 if (!methods.aSubCategory[sParentCateNo]) { 25 methods.aSubCategory[sParentCateNo] = []; 26 } 27 28 methods.aSubCategory[sParentCateNo].push( aData[i] ); 29 } 30 } 31 }); 32 }, 33 34 getParam: function(sUrl, sKey) { 35 36 var aUrl = sUrl.split('?'); 37 var sQueryString = aUrl[1]; 38 var aParam = {}; 39 40 if (sQueryString) { 41 var aFields = sQueryString.split("&"); 42 var aField = []; 43 for (var i=0; i<aFields.length; i++) { 44 aField = aFields[i].split('='); 45 aParam[aField[0]] = aField[1]; 46 } 47 } 48 return sKey ? aParam[sKey] : aParam; 49 }, 50 51 getParamSeo: function(sUrl) { 52 var aUrl = sUrl.split('/'); 53 return aUrl[3] ? aUrl[3] : null; 54 }, 55 56 show: function(overNode, iCateNo) { 57 58 if (methods.aSubCategory[iCateNo].length == 0) { 59 return; 60 } 61 62 var aHtml = []; 63 aHtml.push('<ul>'); 64 $(methods.aSubCategory[iCateNo]).each(function() { 65 aHtml.push('<li><a href="'+this.link_product_list+'">'+this.name+'</a></li>'); 66 }); 67 aHtml.push('</ul>'); 68 69 70 var offset = $(overNode).offset(); 71 $('<div class="sub-category"></div>') 72 .appendTo(overNode) 73 .html(aHtml.join('')) 74 .find('li').mouseover(function(e) { 75 $(this).addClass('over'); 76 }).mouseout(function(e) { 77 $(this).removeClass('over'); 78 }); 79 }, 80 81 close: function() { 82 $('.sub-category').remove(); 83 } 84 }; 85 86 methods.get(); 87 88 89 $('.xans-layout-category li').mouseenter(function(e) { 90 var $this = $(this).addClass('on'), 91 iCateNo = Number(methods.getParam($this.find('a').attr('href'), 'cate_no')); 92 93 if (!iCateNo) { 94 iCateNo = Number(methods.getParamSeo($this.find('a').attr('href'))); 95 } 96 97 if (!iCateNo) { 98 return; 99 } 100 101 methods.show($this, iCateNo); 102 }).mouseleave(function(e) { 103 $(this).removeClass('on'); 104 105 methods.close(); 106 }); 107}); 108$( document ).ready(function() { 109 $('.xans-record-').hover(function(){ 110 setTimeout(function(){ 111 var subMenu = $('.subMenu ul').length; 112 for(k=1;k<=subMenu;k++) { 113 var addMenu = $('.addMenu'+k+' .title').text(); 114 var subdivisionQty = $('.addMenu'+k+' li').length; 115 if ($('.subdivision-category'+k).length<1) { 116 $('.sub-category a:contains("'+addMenu+'")').each(function(){ 117 var text2 = $(this).text(); 118 if ( text2 == addMenu ){ 119 $('.sub-category a:contains("'+addMenu+'")').closest('li').append('<div class="subdivision-category subdivision-category'+k+'"></div>'); 120 }; 121 }); 122 } 123 124 for(i=1;i<=subdivisionQty;i++) { 125 if($('.subdivision-category'+k+' .subdivision'+i).length<1) { 126 $('.sub-category a:contains("'+addMenu+'")').each(function(){ 127 var text2 = $(this).text(); 128 if ( text2 == addMenu ){ 129 $('.sub-category a:contains("'+addMenu+'")').closest('li').find('.subdivision-category').append($('.addMenu'+k+' .subdivision'+i).clone()); 130 }; 131 }); 132 }; 133 } 134 } 135 },20); 136 }); 137}); 138(function($){ 139 $(function(){ 140 /* ì°ì¸¡ ì */ 141 var qbtn = $('#rightQuick .right-quick-close'); 142 $(qbtn).on('click',function(){ 143 var qright = $('#rightQuick').css('right'); 144 if(qright == '0px'){ 145 $('#rightQuick').stop(true,true).animate({'right':'-200px'}); 146 147 var qbsrc = $(this).find('img').attr('src'); 148 qbsrc = qbsrc.replace('_close','_open'); 149 $(this).find('img').attr('src',qbsrc); 150 151 Cookies.set('checks', 'ucks',{ expires: 1, path: '/' }); 152 153 }else if(qright == '-200px'){ 154 $('#rightQuick').stop(true,true).animate({'right':'0px'}); 155 156 var qbsrc = $(this).find('img').attr('src'); 157 qbsrc = qbsrc.replace('_open','_close'); 158 $(this).find('img').attr('src',qbsrc); 159 160 Cookies.remove('checks',{ path: '/' }); 161 } 162 }); 163 if(Cookies.get('checks') == 'ucks'){ 164 $('#rightQuick').css({'right':'-200px'}); 165 166 var qbsrc = $(qbtn).find('img').attr('src'); 167 qbsrc = qbsrc.replace('_close','_open'); 168 $(qbtn).find('img').attr('src',qbsrc) 169 }else{ 170 $('#rightQuick').css({'right':'0'}); 171 172 var qbsrc = $(qbtn).find('img').attr('src'); 173 qbsrc = qbsrc.replace('_open','_close'); 174 $(qbtn).find('img').attr('src',qbsrc); 175 }; 176 }); 177})(jQuery); 178/** 179 * ìì§ì´ë ë°°ë Jquery Plug-in 180 * @author cafe24 181 */ 182 183(function($){ 184 185 $.fn.floatBanner = function(options) { 186 options = $.extend({}, $.fn.floatBanner.defaults , options); 187 188 return this.each(function() { 189 var aPosition = $(this).position(); 190 var jbOffset = $(this).offset(); 191 var node = this; 192 193 $(window).on('scroll', function() { 194 var _top = $(document).scrollTop(); 195 _top = (aPosition.top < _top) ? _top : aPosition.top; 196 197 setTimeout(function () { 198 var newinit = $(document).scrollTop(); 199 200 if ( newinit >
200 jbOffset.top ) { 201 _top -= jbOffset.top; 202 var container_height = $("#wrap").height(); 203 var quick_height = $(node).height(); 204 var cul = container_height - quick_height; 205 if(_top > cul){ 206 _top = cul; 207 } 208 } else { 209 _top = 0; 210 } 211 212 $(node).stop().animate({top: _top}, options.animate); 213 }, options.delay); 214 }); 215 }); 216 }; 217 218 $.fn.floatBanner.defaults = { 219 'animate' : 500, 220 'delay' : 500 221 }; 222 223})(jQuery); 224 225/** 226 * 문ì 구ëí ìì 227 */ 228$(function(){ 229 $('#banner:visible, #quick:visible').floatBanner(); 230 231 //placeholder 232 $(".ePlaceholder input, .ePlaceholder textarea").each(function(i){ 233 var placeholderName = $(this).parents().attr('title'); 234 $(this).attr("placeholder", placeholderName); 235 }); 236 /* placeholder ie8, ie9 */ 237 $.fn.extend({ 238 placeholder : function() { 239 //IE 8 ë²ì ìë hasPlaceholderSupport() ê°ì´ false를 ë¦¬í´ 240 if (hasPlaceholderSupport() === true) { 241 return this; 242 } 243 //hasPlaceholderSupport() ê°ì´ false ì¼ ê²½ì° ìë ì½ë를 ì¤í 244 return this.each(function(){ 245 var findThis = $(this); 246 var sPlaceholder = findThis.attr('placeholder'); 247 if ( ! sPlaceholder) { 248 return; 249 } 250 findThis.wrap('<label class="ePlaceholder" />'); 251 var sDisplayPlaceHolder = $(this).val() ? ' style="display:none;"' : ''; 252 findThis.before('<span' + sDisplayPlaceHolder + '>' + sPlaceholder + '</span>'); 253 this.onpropertychange = function(e){ 254 e = event || e; 255 if (e.propertyName == 'value') { 256 $(this).trigger('focusout'); 257 } 258 }; 259 //ê³µíµ class 260 var agent = navigator.userAgent.toLowerCase(); 261 if (agent.indexOf("msie") != -1) { 262 $(".ePlaceholder").css({"position":"relative"}); 263 $(".ePlaceholder span").css({"position":"absolute", "padding":"0 4px", "color":"#878787"}); 264 $(".ePlaceholder label").css({"padding":"0"}); 265 } 266 }); 267 } 268 }); 269 270 $(':input[placeholder]').placeholder(); //placeholder() í¨ì를 í¸ì¶ 271 272 //í´ë¦íë©´ placeholder ì¨ê¹ 273 $('body').on('click', '.ePlaceholder span', function(){ 274 $(this).hide(); 275 }); 276 277 //inputì°½ í¬ì»¤ì¤ ì¸ ì¼ë placeholder ì¨ê¹ 278 $('body').on('focusin', '.ePlaceholder :input', function(){ 279 $(this).prev('span').hide(); 280 }); 281 282 //inputì°½ í¬ì»¤ì¤ ìì ì¼ë value ê° true ì´ë©´ ì¨ê¹, false ì´ë©´ ë³´ì¬ì§ 283 $('body').on('focusout', '.ePlaceholder :input', function(){ 284 if (this.value) { 285 $(this).prev('span').hide(); 286 } else { 287 $(this).prev('span').show(); 288 } 289 }); 290 291 //inputì placeholderê° ì§ìì´ ëë©´ true를 ìëë©´ false를 리í´ê°ì¼ë¡ ëì ¸ì¤ 292 function hasPlaceholderSupport() { 293 if ('placeholder' in document.createElement('input')) { 294 return true; 295 } else { 296 return false; 297 } 298 } 299}); 300 301/** 302 * ì¸ë¤ì¼ ì´ë¯¸ì§ ìë°ì¼ê²½ì° ê¸°ë³¸ê° ì¤ì 303 */ 304$(window).on('load', function() { 305 $("img.thumb,img.ThumbImage,img.BigImage").each(function($i,$item){ 306 var $img = new Image(); 307 $img.onerror = function () { 308 $item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif"; 309 } 310 $img.src = this.src; 311 }); 312}); 313 314/** 315 * tooltip 316 */ 317$('.eTooltip').each(function(i){ 318 $(this).find('.btnClose').attr('tabIndex','-1'); 319}); 320//tooltip input focus 321$('.eTooltip').find('input').on('focus', function() { 322 var targetName = returnTagetName(this); 323 targetName.siblings('.ec-base-tooltip').show(); 324}); 325$('.eTooltip').find('input').on('focusout', function() { 326 var targetName = returnTagetName(this); 327 targetName.siblings('.ec-base-tooltip').hide(); 328}); 329function returnTagetName(_this){ 330 var ePlacename = $(_this).parent().attr("class"); 331 var targetName; 332 if(ePlacename == "ePlaceholder"){ //ePlaceholder ëì 333 targetName = $(_this).parents(); 334 }else{ 335 targetName = $(_this); 336 } 337 return targetName; 338} 339 340/** 341 * eTab 342 */ 343$("body").on("click", ".eTab a", function(e){
344 // í´ë¦í li ì selected í´ëì¤ ì¶ê°, 기존 liì ìë selected í´ëì¤ë ìì . 345 var _li = $(this).parent("li").addClass("selected").siblings().removeClass("selected"), 346 _target = $(this).attr("href"), 347 _siblings = $(_target).attr("class"), 348 _arr = _siblings.split(" "), 349 _classSiblings = "."+_arr[0]; 350 351 //í´ë¦í íì í´ë¹íë ììë íì±í, 기존 ììë ë¹íì±í í¨. 352 $(_target).show().siblings(_classSiblings).hide(); 353 354 355 //preventDefault ë a íê·¸ ì²ë¼ í´ë¦ ì´ë²¤í¸ ì¸ì ë³ëì ë¸ë¼ì°ì íëì ë§ê¸° ìí´ ì¬ì©ë¨. 356 e.preventDefault(); 357}); 358 359 360 361//window popup script 362function winPop(url, popup_name) { 363 if(typeof popup_name != "undefined"){ 364 if(popup_name == "bookmark"){ 365 window.open(url, popup_name, "width=450,height=370,left=10,top=10,resizable=no,scrollbars=no"); 366 }else{ 367 window.open(url, popup_name, "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no"); 368 } 369 }else{ 370 window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no"); 371 } 372} 373 374/** 375 * document.location.href split 376 * return array Param 377 */ 378function getQueryString(sKey) 379{ 380 var sQueryString = document.location.search.substring(1); 381 var aParam = {}; 382 383 if (sQueryString) { 384 var aFields = sQueryString.split("&"); 385 var aField = []; 386 for (var i=0; i<aFields.length; i++) { 387 aField = aFields[i].split('='); 388 aParam[aField[0]] = aField[1]; 389 } 390 } 391 392 aParam.page = aParam.page ? aParam.page : 1; 393 return sKey ? aParam[sKey] : aParam; 394}; 395 396$(function(){ 397 // tab 398 $.eTab = function(ul){ 399 $(ul).find('a').on('click', function(){ 400 var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'), 401 _target = $(this).attr('href'), 402 _siblings = '.' + $(_target).attr('class'); 403 $(_target).show().siblings(_siblings).hide(); 404 return false 405 }); 406 } 407 if ( window.call_eTab ) { 408 call_eTab(); 409 }; 410}); 411 412 413$(function(){ 414 $("#header .top-right").click(function(){ 415 //alert("ì§ê¸ íì ê°ì ì ì¦ì í ì¸ ì¿ í°ì´ ì§ê¸ëì´ ê²°ì íì´ì§ìì ë°ë¡ ì¬ì©íì¤ ì ììµëë¤."); 416 $("#alertJoinCoupon").show(); 417 }); 418}); 419(function($){ 420 $.fn.extend({ 421 center: function() { 422 this.each(function() { 423 var 424 $this = $(this), 425 $w = $(window); 426 $this.css({ 427 position: "absolute", 428 top: ~~(($w.height() - $this.outerHeight()) / 2) + $w.scrollTop() + "px", 429 left: ~~(($w.width() - $this.outerWidth()) / 2) + $w.scrollLeft() + "px" 430 }); 431 }); 432 return this; 433 } 434 }); 435 $(function() { 436 var $container = function(){/* 437 <div id="modalContainer"> 438 <iframe id="modalContent" scroll="0" scrolling="no" frameBorder="0"></iframe> 439 </div>'); 440 */}.toString().slice(14,-3); 441 $('body') 442 .append($('<div id="modalBackpanel"></div>')) 443 .append($($container)); 444 function closeModal () { 445 $('#modalContainer').hide(); 446 $('#modalBackpanel').hide(); 447 } 448 $('#modalBackpanel').on('click',closeModal); 449 zoom = function ($piProductNo, $piCategoryNo, $piDisplayGroup) { 450 var $url = '/product/image_zoom.html?product_no=' + $piProductNo + '&cate_no=' + $piCategoryNo + '&display_group=' + $piDisplayGroup; 451 $('#modalContent').attr('src', $url); 452 $('#modalContent').on("load",function(){ 453 $(".header .close",this.contentWindow.document.body).on("click", closeModal); 454 }); 455 $('#modalBackpanel').css({width:$("body").width(),height:$("body").height(),opacity:.4}).show(); 456 $('#modalContainer').center().show(); 457 } 458 }); 459})(jQuery); 460$(document).ready(function() { 461 /* ì ì²´ ì¹´í ê³ ë¦¬ */ 462 $(".cate-all-btn-open, .cate-all-btn-close").click(function(){ 463 if($(".cate-all-wrap").css('display')=='none'){ 464 $(".cate-all-wrap").show(); 465 }else{ 466 $(".cate-all-wrap").hide(); 467 } 468 }); 469 /* ì¹´í ê³ ë¦¬ ë보기 470 var $leftCate = $(".xans-layout-category .position"); 471 $(".more-btn").mouseenter(function(){ 472 var leftCateHeight = $(".xans-layout-category .position .left-list").height(); 473 if ( leftCateHeight > 459) { 474 $leftCate.stop(true,true).animate({height:leftCateHeight},400); 475 $(".more-btn").css({background:"url(/_dbook/img/ico_cate_close.png) center no-repeat"}); 476 } else { 477 $(".more-btn").css({background:"url(/_dbook/img/ico_cate_close.png) center no-repeat"}); 478 } 479 }); 480 $("#sidebar .xans-layout-category").mouseleave(function(){ 481 $leftCate.stop(true,true).animate({height:"458px"},400); 482 $(".more-btn").css({background:"url(/_dbook/img/ico_cate_open.png) center no-repeat"}); 483 });*/ 484 485 /* ìë¨ ë°ë¡ê°ê¸° */ 486 $(".top_btn").click(function(e){ 487 $("html, body").animate({ scrollTop : 0 }, 500) 488 e.preventDefault(); 489 }) 490}); 491 492(function($){ 493 $(function(){ 494 /* ìë¨ ë°°ë */ 495 $(".top-line-btn").on("click",function(){ 496 $(".top-line").slideUp(); 497 }); 498 if ($(".top-line").css("height")=="0px"){ 499 $(".top-line").stop(true,true).animate({ height: 70}).show(); 500 }else { 501 $(".top-line").show(); 502 } 503 }); 504})(jQuery); 505 506$(document).ready(function() { 507 $("#resume").hide(); 508 $(".pause-btn").click(function() { 509 if( $('#resume').css('display')=='none' ){ 510 $("#pauser").css('display','none'); 511 $("#resume").css('display','block'); 512 $('.cycle-slideshow').cycle('pause'); 513 }else{ 514 $("#pauser").css('display','block'); 515 $("#resume").css('display','none'); 516 $('.cycle-slideshow').cycle('resume'); 517 } 518 }); 519 520}); 521 522$(function(){ 523 524 525 $(".all-brand , .allbrand-wrap").mouseover(function(){ 526 $(".allbrand-wrap").addClass("on"); 527 }).mouseleave(function(){ 528 $(".allbrand-wrap").removeClass("on"); 529 }) 530 531 /* ìë¨ë§í¬ */ 532 $(".top-link > ul > li").mouseenter(function(){ 533 $(this).children("div").css('display','block'); 534 }); 535 $(".top-link > ul > li").mouseleave(function(){ 536 $(this).children("div").css('display','none'); 537 }); 538 539 $(".down_btn").click(function(e){ 540 var footerPosi = $("#footer").position(); 541 $('html, body').delay(300).animate({ scrollTop: footerPosi.top }, 800); 542 e.preventDefault(); 543 }) 544 545 /* ì¢ì¸¡ ë°°ë */ 546 function leftBanner(){ 547 if ($('.left_big').css('opacity')=='0'){ 548 $('.left_big').delay(500).animate({ width:379 , height:391, opacity:1 , zIndex:100}).delay(2000).animate({width:100 ,height:100, opacity:0 , zIndex:98 }); 549 $(".left_bannerF").delay(500).animate({ opacity:0 }).delay(2000).animate({ opacity:1 }); 550 } 551 } 552 leftBanner() 553 $(".left_bannerF > img").click(function(e){ 554 $(this).closest("div").hide(); 555 $(".left_big").animate({ width:379 , height:391, opacity:1 , zIndex:100} ); 556 }) 557 $(".left_big > em").click(function(e){ 558 $(".left_bannerF").show(); 559 $(".left_big").animate({ width:100 ,height:100, opacity:0 , zIndex:98 } ); 560 }) 561}); 562 563 564$(document).ready(function(){ 565 $("#resume1").hide(); 566 $(".top-pause-btn").click(function() { 567 if( $('#resume1').css('display')=='none' ){ 568 $("#pauser1").css('display','none'); 569 $("#resume1").css('display','block'); 570 571 }else{ 572 $("#pauser1").css('display','block'); 573 $("#resume1").css('display','none'); 574 } 575 }); 576 577 $(".top-slide-btn > a").each(function(){ 578 $(this).mouseenter(function(){ 579 580 var Imgsrc = $(this).find('img').attr('src'); 581 Imgsrc = Imgsrc.replace('_off','_on'); 582 $(this).find('img').attr('src',Imgsrc); 583 }); 584 585 $(this).mouseleave(function(){ 586 587 var Imgsrc = $(this).find('img').attr('src'); 588 Imgsrc = Imgsrc.replace('_on','_off'); 589 $(this).find('img').attr('src',Imgsrc); 590 }); 591 }); 592}); 593 594/* í ì¸ì¨ íì */ 595function calculate_sale_rate() { 596 $('.sale_rate').each(function() { 597 598 var custom = $(this).attr('data-custom'); 599 var price = $(this).attr('data-price'); 600 601 custom = parseInt(custom.replace(/,/g, '')); 602 price = parseInt(price.replace(/,/g, '')); 603 604 var rate = 0; 605 if (!isNaN(custom) && !isNaN(price) && 0 < custom) { 606 rate = Math.round((custom - price) / custom * 100); 607 } 608 if(rate>0) { 609 $(this).html(rate+'<span>%</span>').css({'background':'url(/_dbook/img/sale_bg.png) no-repeat'}); 610 } 611 612 $(this).removeAttr('data-custom'); 613 $(this).removeAttr('data-price'); 614 }); 615} 616 617$(document).ready(function() { 618 calculate_sale_rate(); 619}); 620 621function calculate_sale_rate02() { 622 $('.sale_rate02').each(function() { 623 624 var custom = $(this).attr('data-custom'); 625 var price = $(this).attr('data-price'); 626 627 custom = parseInt(custom.replace(/,/g, '')); 628 price = parseInt(price.replace(/,/g, '')); 629 630 var rate = 0; 631 if (!isNaN(custom) && !isNaN(price) && 0 < custom) { 632 rate = Math.round((custom - price) / custom * 100); 633 } 634 635 var $this = $(this); 636 var $liOver = $this.parent("li"); 637 if(rate>0) { 638 $this.html(rate + '<span>%</span>').addClass("sale_rate_bg"); 639 $liOver.mouseenter(function(){ 640 $this.addClass("sale_rate_bg_over"); 641 $this.removeClass("sale_rate_bg"); 642 }); 643 $liOver.mouseleave(function(){ 644 $this.addClass("sale_rate_bg"); 645 $this.removeClass("sale_rate_bg_over"); 646 }); 647 } 648 649 $(this).removeAttr('data-custom'); 650 $(this).removeAttr('data-price'); 651 }); 652} 653$(document).ready(function() { 654 calculate_sale_rate02(); 655}); 656/** 657 * ì¹´í ê³ ë¦¬ ë§ì°ì¤ ì¤ë² ì´ë¯¸ì§ 658 * ì¹´í ê³ ë¦¬ ìë¸ ë©ë´ ì¶ë ¥ 659 */ 660 661$(document).ready(function(){ 662 663 var methods = { 664 aCategory : [], 665 aSubCategory : {}, 666 667 get: function() 668 { 669 var sPntNo = new Array(); //ëë©ë´ ì¹´í ê³ ë¦¬ ë²í¸ ë°°ì´ 670 var ssPntNo = new Array(); 671 672 673 $.ajax({ 674 url : '/exec/front/Product/SubCategory', 675 dataType: 'json', 676 success: function(aData) { 677 678 if (aData == null || aData == 'undefined') return; 679 for (var i=0; i<aData.length; i++) 680 { 681 var sParentCateNo = aData[i].parent_cate_no; 682 if(sParentCateNo == 1) { 683 ssPntNo.push(aData[i].cate_no); 684 } 685 686 if (!methods.aSubCategory[sParentCateNo]) { 687 methods.aSubCategory[sParentCateNo] = []; 688 if(sParentCateNo != 1) { 689 sPntNo.push(sParentCateNo); 690 } 691 } 692 693 methods.aSubCategory[sParentCateNo].push( aData[i] ); 694 695 } 696 697 //ëë©ë´ ì¹´í ê³ ë¦¬ ë²í¸ ë°°ì´ì ë§í¼ í¬ë¬¸ì ëë ¤ íìë©ë´ ìì± 698 699 for(var j=0; j <sPntNo.length; j++) { 700 methods.show('', sPntNo[j], j); 701 } 702 703 } 704 }); 705 }, 706 707 getParam: function(sUrl, sKey) { 708 709 var aUrl = sUrl.split('?'); 710 var sQueryString = aUrl[1]; 711 var aParam = {}; 712
713 if (sQueryString) { 714 var aFields = sQueryString.split("&"); 715 var aField = []; 716 for (var i=0; i<aFields.length; i++) { 717 aField = aFields[i]. split('='); 718 aParam[aField[0]] = aField[1]; 719 } 720 } 721 return sKey ? aParam[sKey] : aParam; 722 }, 723 724 725 show: function(overNode, iCateNo, cnt) { 726 727 if (methods.aSubCategory[iCateNo].length == 0) { 728 return; 729 } 730 731 var aHtml = []; 732 733 aHtml.push('<ul>'); 734 735 $(methods.aSubCategory[iCateNo]).each(function() { 736 aHtml.push('<li><a href="/'+this.design_page_url+this.param+'">'+this.name+'</a></li>'); 737 }); 738 739 aHtml.push('</ul>'); 740 741 //íì ë©ë´ ìì± ì li ìì´ëë³ë¡ ë£ì´ì£¼ê¸° 742 overNode = $('#cateList_'+iCateNo); 743 744 $('<div ></div>') 745 .appendTo(overNode) 746 .html(aHtml.join('')); 747 748/* 749 //ë§ì°ì¤ ì¤ë²ì ëí ì¤í¬ë¦½í¸ì´ë¯ë¡ 주ì 750 var offset = $(overNode).offset(); 751 $('<div class="sub-category"></div>') 752 .appendTo(overNode) 753 .html(aHtml.join('')) 754 .find('li').mouseover(function(e) { 755 $(this).addClass('over'); 756 }).mouseout(function(e) { 757 $(this).removeClass('over'); 758 }); 759 */ 760 761 }, 762 763 close: function() { 764 $('.sub-category').remove(); 765 } 766 }; 767 768 methods.get(); 769 770/* 771 //ë§ì°ì¤ ì¤ë²ì ëí ì¤í¬ë¦½í¸ì´ë¯ë¡ 주ì 772 $('.xans-layout-category li').mouseenter(function(e) { 773 var $this = $(this).addClass('on'), 774 iCateNo = Number(methods.getParam($this.find('a').attr('href'), 'cate_no')); 775 776 if (!iCateNo) { 777 return; 778 } 779 methods.show($this, iCateNo); 780 }).mouseleave(function(e) { 781 $(this).removeClass('on'); 782 783 methods.close(); 784 }); 785 786 */ 787}); 788 789/** 790 * ì¹´í ê³ ë¦¬ ìë¸ ë©ë´ ì¶ë ¥ 791 */ 792 793$(document).ready(function(){ 794 795 var methods = { 796 aCategory : [], 797 aSubCategory2 : {}, 798 799 get: function() 800 { 801 $.ajax({ 802 url : '/exec/front/Product/SubCategory', 803 dataType: 'json', 804 success: function(aData) { 805 806 if (aData == null || aData == 'undefined') return; 807 for (var i=0; i<aData.length; i++) 808 { 809 var sParentCateNo = aData[i].parent_cate_no; 810 811 if (!methods.aSubCategory2[sParentCateNo]) { 812 methods.aSubCategory2[sParentCateNo] = []; 813 } 814 815 methods.aSubCategory2[sParentCateNo].push( aData[i] ); 816 } 817 methods.allshow(); 818 } 819 }); 820 }, 821 822 getParam: function(sUrl, sKey) { 823 824 var aUrl = sUrl.split('?'); 825 var sQueryString = aUrl[1]; 826 var aParam = {}; 827 828 if (sQueryString) { 829 var aFields = sQueryString.split("&"); 830 var aField = []; 831 for (var i=0; i<aFields.length; i++) { 832 aField = aFields[i].split('='); 833 aParam[aField[0]] = aField[1]; 834 } 835 } 836 return sKey ? aParam[sKey] : aParam; 837 }, 838 839 show: function(overNode, iCateNo) { 840 841 var aHtml = []; 842 aHtml.push('<ul>'); 843 $(methods.aSubCategory2[iCateNo]).each(function() { 844 aHtml.push('<li><a href="'+this.link_product_list+'">'+this.name+'</a></li>'); 845 }); 846 aHtml.push('</ul>'); 847 848 849 var offset = $(overNode).offset(); 850 $('<div class="cate-all-sub-wrap"></div>') 851 .appendTo(overNode) 852 .html(aHtml.join('')) 853 .find('li').mouseover(function(e) { 854 $(this).addClass('over'); 855 }).mouseout(function(e) { 856 $(this).removeClass('over'); 857 }); 858 }, 859 860 allshow: function() { 861 $('.cate-all-wrap .xans-layout-category-2 li').each(function (idx, objthis) { 862 var $this = $(objthis).addClass('on'), 863 iCateNo = Number(methods.getParam($this.find('a').attr('data-param'), 'cate_no')); 864 if (!iCateNo) { 865 return; 866 } 867 methods.show($this, iCateNo); 868 }); 869 } 870 }; 871 methods.get(); 872 873}); 874 875$(document).ready(function() { 876 /* ìíìì¸ - ìë¹ìê° í ì¸íì */ 877 var oPriceInfoEl = $('#ec-product-price-info'); 878 if (oPriceInfoEl.length > 0) { 879 var salePriceEl = $('.xans-product-detail .infoArea .prd-tb th span[data-i18n="PRODUCT.PRD_INFO_PRODUCT_PRICE"]').parent("th").next("td"), // í ì¸ì¨ íìí ìì¹ ì§ì 880 saleNonPriceEl = $('.xans-product-detail .infoArea .prd-tb th span[data-i18n="PRODUCT.PRD_INFO_PRODUCT_CUSTOM"]').parents("tr"); // ìë¹ìê° ìì¹ 881 percentageCul(oPriceInfoEl, salePriceEl); 882 oPriceInfoEl.remove(); 883 } 884 885 /* ìí목ë¡/ë©ì¸ì§ì´ - ìë¹ìê° í ì¸íì */ 886 var mainEl = $('.description[ec-data-price]'); 887 if (mainEl.length > 0) { 888 var productListEl = $('.xans-search-result, .xans-product-listmain, .xans-product-listrecommend, .xans-product-listnormal'); 889 for (var i = 0; i < productListEl.length; i++) { 890 var prdListEl = productListEl.eq(i).find('.prdList > li'); 891 for (var j = 0; j < prdListEl.length; j++) { 892 var priceEl = prdListEl.eq(j).find('.description[ec-data-price]'), 893 salePriceEl = priceEl.find('.spec > li > strong').find('span[data-i18n="PRODUCT.PRD_INFO_PRODUCT_PRICE"]').parent("strong").next("span"); // í ì¸ì¨ íìí ìì¹ ì§ì 894 saleNonPriceEl = priceEl.find('.spec > li > strong').find('span[data-i18n="PRODUCT.PRD_INFO_PRODUCT_CUSTOM"]').parent("strong").parent("li"); // ìë¹ìê° ìì¹ 895 896 percentageCul(priceEl, salePriceEl);
897 priceEl.removeAttr('ec-data-custom').removeAttr('ec-data-price'); 898 } 899 } 900 } 901 902 function percentageCul(target, salePriceEl) { 903 var iCustomPrice = target.attr('ec-data-custom'), 904 iPrice = target.attr('ec-data-price'), 905 sDisplayAmount = 'p', // p:í ì¸ì¨, w:í ì¸ê¸ì¡ 906 iOfftoFixed = 0, // í ì¸ì¨ ììì ì릿ì 907 sSaleText = '', 908 regexp = /\B(?=(\d{3})+(?!\d))/g; 909 910 if ( iCustomPrice.match(/,/g) ) { 911 iCustomPrice = parseInt(iCustomPrice.replace(/,/g, '')); 912 } else { 913 iCustomPrice = iCustomPrice; 914 } 915 if ( iPrice.match(/,/g) ) { 916 iPrice = parseInt(iPrice.replace(/,/g, '')); 917 } else { 918 iPrice = iPrice; 919 } 920 if ( !isNaN(iCustomPrice) && !isNaN(iPrice) ) { 921 var iCustomPrice = parseInt(iCustomPrice), 922 iPrice = parseInt(iPrice); 923 if (iCustomPrice > 0 && iPrice > 0 && iPrice != iCustomPrice && iPrice < iCustomPrice) { 924 if (sDisplayAmount == 'p') { 925 sSaleText = (((iCustomPrice - iPrice) / iCustomPrice) * 100).toFixed(iOfftoFixed) + '<em>%</em>'; 926 } else if (sDisplayAmount == 'w') { 927 sSaleText = parseInt(iCustomPrice - iPrice).toString().replace(regexp, ',') + 'ì'; 928 } 929 salePriceEl.append('<em class="ec-sale-rate">' + sSaleText + '</em>'); // í ì¸ì¨ íì 930 } else if ( iCustomPrice == 0 || iPrice >= iCustomPrice ) { 931 saleNonPriceEl.remove(); 932 } 933 } else { 934 saleNonPriceEl.remove(); 935 } 936 } 937}); 938$(function(){ 939 if (typeof(EC_SHOP_MULTISHOP_SHIPPING) != "undefined") { 940 var sShippingCountryCode4Cookie = 'shippingCountryCode'; 941 var bShippingCountryProc = false; 942 943 // ë°°ì¡êµê° ì í ì¤ì ì´ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 944 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) { 945 $('.xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist').hide(); 946 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptioncountry').hide(); 947 } else { 948 $('.thumb .xans-layout-multishoplistitem').hide(); 949 var aShippingCountryCode = document.cookie.match('(^|;) ?'+sShippingCountryCode4Cookie+'=([^;]*)(;|$)'); 950 if (typeof(aShippingCountryCode) != 'undefined' && aS
950hippingCountryCode != null && aShippingCountryCode.length > 2) { 951 var sShippingCountryValue = aShippingCountryCode[2]; 952 } 953 954 // query stringì¼ë¡ ëì´ ì¨ ë°°ì¡êµê° ê°ì´ ìë¤ë©´, ê·¸ ê°ì ì ì©í¨ 955 var aHrefCountryValue = decodeURIComponent(location.href).split("/?country="); 956 957 if (aHrefCountryValue.length == 2) { 958 var sShippingCountryValue = aHrefCountryValue[1]; 959 } 960 961 // ë©ì¸ íì´ì§ìì êµê°ì íì ìí ê²½ì°, ê·¸ ì¸ì íì´ì§ìì ì í ë ê°ì´ ì ëì¤ë íì ì²ë¦¬ 962 if (location.href.split("/").length != 4 && $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()) { 963 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 964 965 if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { 966 $("#f_country").val($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); 967 } 968 } 969 if (typeof(sShippingCountryValue) != "undefined" && sShippingCountryValue != "" && sShippingCountryValue != null) { 970 sShippingCountryValue = sShippingCountryValue.split("#")[0]; 971 var bShippingCountryProc = true; 972 973 $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); 974 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 975 var expires = new Date(); 976 expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30ì¼ê° ì¿ í¤ ì ì§ 977 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); 978 if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { 979 $("#f_country").val(sShippingCountryValue).change(); 980 } 981 } 982 } 983 // ì¸ì´ì í ì¤ì ì´ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 984 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingLanguageSelection === false) { 985 $('.xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist').hide(); 986 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptionlanguage').hide(); 987 } else { 988 $('.thumb .xans-layout-multishoplistitem').hide(); 989 } 990 991 // ë°°ì¡êµê° ë° ì¸ì´ ì¤ì ì´ ë ë¤ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 992 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShipping === false) { 993 $(".xans-layout-multishopshipping").hide(); 994 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption').hide(); 995 } else if (bShippingCountryProc === false && location.href.split("/").length == 4) { // ë°°ì¡êµê° ê°ì ì²ë¦¬í ì ì´ ìê³ , ë©ì¸íë©´ì¼ ëë§ ì í ë ì´ì´ë¥¼ ëì 996 var sShippingCountryValue = $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(); 997 $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); 998 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 999 // ë°°ì¡êµê° ì íì ì¬ì©í´ì¼ ë ì´ì´ë¥¼ ë³´ì´ê² í¨ 1000 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === true) { 1001 $(".xans-layout-multishopshipping").show(); 1002 } 1003 } 1004 1005 $(".xans-layout-multishopshipping .close").on("click", function() { 1006 $(".xans-layout-multishopshipping").hide(); 1007 }); 1008 1009 $(".xans-layout-multishopshipping .ec-base-button a").on("click", function() { 1010 var expires = new Date(); 1011 expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30ì¼ê° ì¿ í¤ ì ì§ 1012 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); 1013 1014 // ëë©ì¸ 문ì ë¡ ì¿ í¤ë¡ ë°°ì¡êµê° ì¤ì ì´ ì ëë ê²½ì°ë¥¼ ìí´ query stringì¼ë¡ ë°°ì¡êµê° ê°
1014ì ëê¹ 1015 var sQuerySting = (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) ? "" : "/?country="+encodeURIComponent($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); 1016 1017 location.href = '//'+$(".xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist").val()+sQuerySting; 1018 }); 1019 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a").on("click", function() { 1020 $(".xans-layout-multishopshipping").show(); 1021 }); 1022 } 1023});
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.