1 2 3 4/** 5 * ìì§ì´ë ë°°ë Jquery Plug-in 6 * @author cafe24 7 */ 8 9(function($){ 10 11 $.fn.floatBanner = function(options) { 12 options = $.extend({}, $.fn.floatBanner.defaults , options); 13 14 return this.each(function() { 15 var aPosition = $(this).position(); 16 var jbOffset = $(this).offset(); 17 var node = this; 18 19 $(window).scroll(function() { 20 var _top = $(document).scrollTop(); 21 _top = (aPosition.top < _top) ? _top : aPosition.top; 22 23 setTimeout(function () { 24 var newinit = $(document).scrollTop(); 25 26 if ( newinit > jbOffset.top ) { 27 _top -= jbOffset.top; 28 var container_height = $("#wrapper").height(); 29 var quick_height = $(node).height(); 30 var cul = container_height - quick_height; 31 if(_top > cul){ 32 _top = cul; 33 } 34 }else { 35 _top = 0; 36 } 37 38 $(node).stop().animate({top: _top}, options.animate); 39 }, options.delay); 40 }); 41 }); 42 }; 43 44 $.fn.floatBanner.defaults = { 45 'animate' : 200, 46 'delay' : 100 47 }; 48 49})(jQuery); 50 51/** 52 * 문ì 구ëí ìì 53 */ 54$(document).ready(function(){ 55 $('#banner:visible, #quick:visible').floatBanner(); 56 57 //placeholder 58 $(".ePlaceholder input, .ePlaceholder textarea").each(function(i){ 59 var placeholderName = $(this).parents().attr('title'); 60 $(this).attr("placeholder", placeholderName); 61 }); 62 /* placeholder ie8, ie9 */ 63 $.fn.extend({ 64 placeholder : function() { 65 //IE 8 ë²ì ìë hasPlaceholderSupport() ê°ì´ false를 ë¦¬í´ 66 if (hasPlaceholderSupport() === true) { 67 return this; 68 } 69 //hasPlaceholderSupport() ê°ì´ false ì¼ ê²½ì° ìë ì½ë를 ì¤í 70 return this.each(function(){ 71 var findThis = $(this); 72 var sPlaceholder = findThis.attr('placeholder'); 73 if ( ! sPlaceholder) { 74 return; 75 } 76 findThis.wrap('<label class="ePlaceholder" />'); 77 var sDisplayPlaceHolder = $(this).val() ? ' style="display:none;"' : ''; 78 findThis.before('<span' + sDisplayPlaceHolder + '>' + sPlaceholder + '</span>'); 79 this.onpropertychange = function(e){ 80 e = event || e; 81 if (e.propertyName == 'value') { 82 $(this).trigger('focusout'); 83 } 84 }; 85 //ê³µíµ class 86 var agent = navigator.userAgent.toLowerCase(); 87 if (agent.indexOf("msie") != -1) { 88 $(".ePlaceholder").css({"position":"relative"}); 89 $(".ePlaceholder span").css({"position":"absolute", "padding":"0 4px", "color":"#878787"}); 90 $(".ePlaceholder label").css({"padding":"0"}); 91 } 92 }); 93 } 94 }); 95 96 $(':input[placeholder]').placeholder(); //placeholder() í¨ì를 í¸ì¶ 97 98 //í´ë¦íë©´ placeholder ì¨ê¹ 99 $('body').delegate('.ePlaceholder span', 'click', function(){ 100 $(this).hide(); 101 }); 102 103 //inputì°½ í¬ì»¤ì¤ ì¸ ì¼ë placeholder ì¨ê¹ 104 $('body').delegate('.ePlaceholder :input', 'focusin', function(){ 105 $(this).prev('span').hide(); 106 }); 107 108 //inputì°½ í¬ì»¤ì¤ ìì ì¼ë value ê° true ì´ë©´ ì¨ê¹, false ì´ë©´ ë³´ì¬ì§ 109 $('body').delegate('.ePlaceholder :input', 'focusout', function(){ 110 if (this.value) { 111 $(this).prev('span').hide(); 112 } else { 113 $(this).prev('span').show(); 114 } 115 }); 116 117 //inputì placeholderê° ì§ìì´ ëë©´ true를 ìëë©´ false를 리í´ê°ì¼ë¡ ëì ¸ì¤ 118 function hasPlaceholderSupport() { 119 if ('placeholder' in document.createElement('input')) { 120 return true; 121 } else { 122 return false;
123 } 124 } 125}); 126 127/** 128 * ì¸ë¤ì¼ ì´ë¯¸ì§ ìë°ì¼ê²½ì° ê¸°ë³¸ê° ì¤ì 129 */ 130$(window).load(function() { 131 $("img.thumb,img.ThumbImage,img.BigImage").each(function($i,$item){ 132 var $img = new Image(); 133 $img.onerror = function () { 134 $item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif"; 135 } 136 $img.src = this.src; 137 }); 138}); 139 140 141/********* m_module ***********/ 142 143/** 144 * tooltip 145 */ 146$('.eTooltip').each(function(i){ 147 $(this).find('.btnClose').attr('tabIndex','-1'); 148}); 149//tooltip input focus 150$('.eTooltip').find('input').focus(function() { 151 var targetName = returnTagetName(this); 152 targetName.siblings('.ec-base-tooltip').show(); 153}); 154$('.eTooltip').find('input').focusout(function() { 155 var targetName = returnTagetName(this); 156 targetName.siblings('.ec-base-tooltip').hide(); 157}); 158function returnTagetName(_this){ 159 var ePlacename = $(_this).parent().attr("class"); 160 var targetName; 161 if(ePlacename == "ePlaceholder"){ //ePlaceholder ëì 162 targetName = $(_this).parents(); 163 }else{ 164 targetName = $(_this); 165 } 166 return targetName; 167} 168 169/** 170 * eTab 171 */ 172 $("body").delegate(".eTab a", "click", function(e){ 173 // í´ë¦í li ì selected í´ëì¤ ì¶ê°, 기존 liì ìë selected í´ëì¤ë ìì . 174 var _li = $(this).parent("li").addClass("selected").siblings().removeClass("selected"), 175 _target = $(this).attr("href"), 176 _siblings = $(_target).attr("class"), 177 _arr = _siblings.split(" "), 178 _classSiblings = "."+_arr[0]; 179 180 //í´ë¦í íì í´ë¹íë ììë íì±í, 기존 ììë ë¹íì±í í¨. 181 $(_target).show().siblings(_classSiblings).hide(); 182 183 184 //preventDefault ë a íê·¸ ì²ë¼ í´ë¦ ì´ë²¤í¸ ì¸ì ë³ëì ë¸ë¼ì°ì íëì ë§ê¸° ìí´ ì¬ì©ë¨. 185 e.preventDefault(); 186}); 187 188 189 190 191 192 193$(document).ready(function(){ 194 // í ê¸ 195 $('div.eToggle .title').click(function(){ 196 var toggle = $(this).parent('.eToggle'); 197 if(toggle.hasClass('disable') == false){ 198 $(this).parent('.eToggle').toggleClass('selected') 199 } 200 }); 201 202 $('dl.eToggle dt').click(function(){ 203 $(this).toggleClass('selected'); 204 $(this).next('dd').toggleClass('selected'); 205 }); 206 207 //ì¥ë°êµ¬ë íì´ì§ ìëí¼ Type ë³ê²½ 208 $('[id^="quantity"]').each(function() { 209 $(this).get(0).type = 'tel'; 210 }); 211 212 // 모ë°ì¼ìì ê³µê¸ì¬ í ì´ë¸ th ê°ì ì¡°ì 213 $('.xans-mall-supplyinfo, .supplyInfo').find('table > colgroup').find('col').eq(0).width(98); 214 $('.xans-mall-supplyinfo, .supplyInfo').find('th, td').css({padding:'13px 10px 12px'}); 215 216 /** 217 * ë©ì¸ì¹´í ê³ ë¦¬ toggle 218 */ 219 $('.xans-product-listmain h2').toggle(function(){ 220 $(this).css('background-image', 'url("//img.echosting.cafe24.com/skin/mobile_ko_KR/layout/bg_title_open.gif")'); 221 $(this).siblings().hide(); 222 $(this).parent().find('div.ec-base-paginate').hide(); 223 $(this).parent().next('div.xans-product-listmore').hide(); 224 }, function() { 225 $(this).css('background-image', 'url("//img.echosting.cafe24.com/skin/mobile_ko_KR/layout/bg_title_close.gif")'); 226 $(this).siblings().show(); 227 $(this).parent().find('div.ec-base-paginate').show(); 228 $(this).parent().next('div.xans-product-listmore').show(); 229 }); 230 231 /** 232 * ìë¨íë²í¼ 233 */ 234 var globalTopBtnScrollFunc = function() { 235 // íë²í¼ ê´ë ¨ë³ì 236 var $btnTop = $('#btnTop'); 237 238 $(window).scroll(function() { 239 try { 240 var iCurScrollPos = $(this).scrollTop(); 241 242 if (iCurScrollPos > ($(this).height() / 2)) { 243 $btnTop.fadeIn('fast'); 244 } else { 245 $btnTop.fadeOut('fast'); 246 } 247 } catch(e) { } 248 }); 249 }; 250 251 /** 252 * 구매ë²í¼ 253 */ 254 var globalBuyBtnScrollFunc = function() { 255 // 구매ë²í¼ ê´ë ¨ë³ì 256 var sFixId = $('#orderFixItem').size() > 0 ? 'orderFixItem' : 'fixedActionButton', 257 $area = $('#orderFixArea'), 258 $item = $('#' + sFixId + '').not($area); 259 260 $(window).scroll(function(){ 261 try { 262 // 구매ë²í¼ ê´ë ¨ë³ì
263 var iCurrentHeightPos = $(this).scrollTop() + $(this).height(), 264 iButtonHeightPos = $item.offset().top; 265 266 if (iCurrentHeightPos > iButtonHeightPos || iButtonHeightPos < $(this).scrollTop() + $item.height()) { 267 if (iButtonHeightPos < $(this).scrollTop() - $item.height()) { 268 $area.fadeIn('fast'); 269 } else { 270 $area.hide(); 271 } 272 } else { 273 $area.fadeIn('fast'); 274 } 275 } catch(e) { } 276 }); 277 }; 278 279 globalTopBtnScrollFunc(); 280 globalBuyBtnScrollFunc(); 281}); 282 283// ê³µíµë ì´ì´íì ì¤í 284var globalLayerOpenFunc = function(_this) { 285 this.id = $(_this).data('id'); 286 this.param = $(_this).data('param'); 287 this.basketType = $('#basket_type').val(); 288 this.url = $(_this).data('url'); 289 this.layerId = 'ec_temp_mobile_layer'; 290 this.layerIframeId = 'ec_temp_mobile_iframe_layer'; 291 292 var _this = this; 293 294 function paramSetUrl() { 295 if (this.param) { 296 // if isset param 297 } else { 298 this.url = this.basketType ? this.url + '?basket_type=' + this.basketType : this.url; 299 } 300 }; 301 302 if (this.url) { 303 window.ecScrollTop = $(window).scrollTop(); 304 $.ajax({ 305 url : this.url, 306 success : function (data) { 307 if (data.indexOf('404 íì´ì§ ìì') == -1) { 308 // ìë¤ë©´ ìì 309 try { $(_this).remove(); } catch ( e ) { } 310
311 var $layer = $('<div>', { 312 html: $("<iframe>", { src: _this.url, id: _this.layerIframeId, scrolling: 'auto', css: { width: '100%', height: '100%', overflowY: 'auto', border: 0 } } ), 313 id: _this.layerId, 314 css : { position: 'absolute', top: 0, left:0, width: '100%', height: $(window).height(), 'z-index': 9999 } 315 }); 316 317 $('body').append($layer); 318 $('html, body').css({'overflowY': 'hidden', height: '100%', width: '100%'}); 319 $('#' + this.layerId).show(); 320 } 321 } 322 }); 323 } 324}; 325 326// ê³µíµë ì´ì´íì ë«ê¸° 327var globalLayerCloseFunc = function() { 328 this.layerId = 'ec_temp_mobile_layer'; 329 330 if (window.parent === window) 331 self.clse(); 332 else { 333 parent.$('html, body').css({'overflowY': 'auto', height: 'auto', width: '100%'}); 334 parent.$('html, body').scrollTop(parent.window.ecScrollTop); 335 parent.$('#' + this.layerId).remove(); 336 } 337}; 338 339/** 340 * document.location.href split 341 * return array Param 342 */ 343var getQueryString = function(sKey) 344{ 345 var sQueryString = document.location.search.substring(1); 346 var aParam = {}; 347 348 if (sQueryString) { 349 var aFields = sQueryString.split("&"); 350 var aField = []; 351 for (var i=0; i<aFields.length; i++) { 352 aField = aFields[i].split('='); 353 aParam[aField[0]] = aField[1]; 354 } 355 } 356 357 aParam.page = aParam.page ? aParam.page : 1; 358 return sKey ? aParam[sKey] : aParam; 359}; 360 361// PCë²ì ë°ë¡ ê°ê¸° 362var isPCver = function() { 363 var sUrl = window.location.hostname; 364 var aTemp = sUrl.split("."); 365 366 var pattern = /^(mobile[\-]{2}shop[0-9]+)$/; 367 368 if (aTemp[0] == 'm' || aTemp[0] == 'skin-mobile' || aTemp[0] == 'mobile') { 369 sUrl = sUrl.replace(aTemp[0]+'.', ''); 370 } else if (pattern.test(aTemp[0]) === true) { 371 var aExplode = aTemp[0].split('--'); 372 aTemp[0] = aExplode[1]; 373 sUrl = aTemp.join('.'); 374 } 375 window.location.href = '//'+sUrl+'/?is_pcver=T'; 376}; 377 378/* ëìë§ */ 379$('body').delegate('.ec-base-tooltip-area .eTip', 'click', function(e){ 380 var findArea = $($(this).parents('.ec-base-tooltip-area')); 381 var findTarget = $($(this).siblings('.ec-base-tooltip')); 382 var findTooltip = $('.ec-base-tooltip'); 383 $('.ec-base-tooltip-area').removeClass('show'); 384 $(this).parents('.ec-base-tooltip-area:first').addClass('show'); 385 findTooltip.hide(); 386 findTarget.show(); 387 e.preventDefault(); 388}); 389 390$('body').delegate('.ec-base-tooltip-area .eClose', 'click', function(e){ 391 var findTarget = $(this).parents('.ec-base-tooltip:first'); 392 $('.ec-base-tooltip-area').removeClass('show'); 393 findTarget.hide(); 394 e.preventDefault(); 395}); 396 397$('.ec-base-tooltip-area').find('input').focusout(function() { 398 var findTarget = $(this).parents('.ec-base-tooltip-area').find('.ec-base-tooltip'); 399 $('.ec-base-tooltip-area').removeClass('show'); 400 findTarget.hide(); 401}); 402 403//window popup script 404function winPop(url) { 405 window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no"); 406} 407/** 408 * document.location.href split 409 * return array Param 410 */ 411function getQueryString(sKey) 412{ 413 var sQueryString = document.location.search.substring(1); 414 var aParam = {}; 415 416 if (sQueryString) { 417 var aFields = sQueryString.split("&"); 418 var aField = []; 419 for (var i=0; i<aFields.length; i++) { 420 aField = aFields[i].split('='); 421 aParam[aField[0]] = aField[1]; 422 } 423 } 424 425 aParam.page = aParam.page ? aParam.page : 1; 426 return sKey ? aParam[sKey] : aParam; 427}; 428 429$(document).ready(function(){ 430 // tab 431 $.eTab = function(ul){ 432 $(ul).find('a').click(function(){ 433 var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'), 434 _target = $(this).attr('href'), 435 _siblings = '.' + $(_target).attr('class'); 436 $(_target).show().siblings(_siblings).hide(); 437 return false 438 }); 439 } 440 if ( window.call_eTab ) { 441 call_eTab(); 442 }; 443}); 444 445 446 447// **************************************************************************************************** 448// 2020-04-20 449// ìë 모ë°ì¼ common.js ì¶ê° 450 451 452 453
454// ì¸ë¤ì¼ ì´ë¯¸ì§ ìë°ì¼ê²½ì° ê¸°ë³¸ê° ì¤ì 455$(window).load(function() { 456 $(".thumbnail img, img.thumbImage, img.bigImage").each(function($i,$item){ 457 var $img = new Image(); 458 $img.onerror = function () { 459 $item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif"; 460 } 461 $img.src = this.src; 462 }); 463}); 464 465$(document).ready(function(){ 466 // í ê¸ 467 $('div.eToggle .title').click(function(){ 468 var toggle = $(this).parent('.eToggle'); 469 if(toggle.hasClass('disable') == false){ 470 $(this).parent('.eToggle').toggleClass('selected') 471 } 472 }); 473 474 $('dl.eToggle dt').click(function(){ 475 $(this).toggleClass('selected'); 476 $(this).next('dd').toggleClass('selected'); 477 }); 478 479 //ì¥ë°êµ¬ë íì´ì§ ìëí¼ Type ë³ê²½ 480 $('[id^="quantity"]').each(function() { 481 $(this).get(0).type = 'tel'; 482 }); 483 484 // 모ë°ì¼ìì ê³µê¸ì¬ í ì´ë¸ th ê°ì ì¡°ì 485 $('.xans-mall-supplyinfo, .supplyInfo').find('table > colgroup').find('col').eq(0).width(98); 486 $('.xans-mall-supplyinfo, .supplyInfo').find('th, td').css({padding:'13px 10px 12px'}); 487 488 /** 489 * ë©ì¸ì¹´í ê³ ë¦¬ toggle 490 */ 491 $('.xans-product-listmain h2').toggle(function(){ 492 $(this).css('background-image', 'url("//img.echosting.cafe24.com/skin/mobile_ko_KR/layout/bg_title_open.gif")'); 493 $(this).siblings().hide(); 494 $(this).parent().find('div.ec-base-paginate').hide(); 495 $(this).parent().next('div.xans-product-listmore').hide(); 496 }, function() { 497 $(this).css('background-image', 'url("//img.echosting.cafe24.com/skin/mobile_ko_KR/layout/bg_title_close.gif")'); 498 $(this).siblings().show(); 499 $(this).parent().find('div.ec-base-paginate').show(); 500 $(this).parent().next('div.xans-product-listmore').show(); 501 }); 502 503 /** 504 * ìë¨íë²í¼ 505 */ 506 var globalTopBtnScrollFunc = function() { 507 // íë²í¼ ê´ë ¨ë³ì 508 var $btnTop = $('#btnTop'); 509 510 $(window).scroll(function() { 511 try { 512 var iCurScrollPos = $(this).scrollTop(); 513 514 if (iCurScrollPos > ($(this).height() / 2)) { 515 $btnTop.fadeIn('fast'); 516 } else { 517 $btnTop.fadeOut('fast'); 518 } 519 } catch(e) { } 520 }); 521 }; 522 523 /** 524 * 구매ë²í¼ 525 */ 526 var globalBuyBtnScrollFunc = function() { 527 // 구매ë²í¼ ê´ë ¨ë³ì 528 var sFixId = $('#orderFixItem').size() > 0 ? 'orderFixItem' : 'fixedActionButton', 529 $area = $('#orderFixArea'), 530 $item = $('#' + sFixId + '').not($area); 531 532 $(window).scroll(function(){ 533 try { 534 // 구매ë²í¼ ê´ë ¨ë³ì 535 var iCurrentHeightPos = $(this).scrollTop() + $(this).height(), 536 iButtonHeightPos = $item.offset().top; 537 538 if (iCurrentHeightPos > iButtonHeightPos || iButtonHeightPos < $(this).scrollTop() + $item.height()) { 539 if (iButtonHeightPos < $(this).scrollTop() - $item.height()) { 540 $area.fadeIn('fast'); 541 } else { 542 $area.hide(); 543 } 544 } else { 545 $area.fadeIn('fast'); 546 } 547 } catch(e) { } 548 }); 549 }; 550 551 globalTopBtnScrollFunc(); 552 globalBuyBtnScrollFunc(); 553}); 554 555// ê³µíµë ì´ì´íì ì¤í 556var globalLayerOpenFunc = function(_this) { 557 this.id = $(_this).data('id'); 558 this.param = $(_this).data('param'); 559 this.basketType = $('#basket_type').val(); 560 this.url = $(_this).data('url'); 561 this.layerId = 'ec_temp_mobile_layer'; 562 this.layerIframeId = 'ec_temp_mobile_iframe_layer'; 563 564 var _this = this; 565 566 function paramSetUrl() { 567 if (this.param) { 568 // if isset param 569 } else { 570 this.url = this.basketType ? this.url + '?basket_type=' + this.basketType : this.url; 571 } 572 }; 573 574 if (this.url) { 575 window.ecScrollTop = $(window).scrollTop(); 576 $.ajax({ 577 url : this.url, 578 success : function (data) { 579 if (data.indexOf('404 íì´ì§ ìì') == -1) { 580 // ìë¤ë©´ ìì 581 try { $(_this).remove(); } catch ( e ) { } 582
583 var $layer = $('<div>', { 584 html: $("<iframe>", { src: _this.url, id: _this.layerIframeId, scrolling: 'auto', css: { width: '100%', height: '100%', overflowY: 'auto', border: 0 } } ), 585 id: _this.layerId, 586 css : { position: 'absolute', top: 0, left:0, width: '100%', height: $(window).height(), 'z-index': 9999 } 587 }); 588 589 $('body').append($layer); 590 $('html, body').css({'overflowY': 'hidden', height: '100%', width: '100%'}); 591 $('#' + this.layerId).show(); 592 } 593 } 594 }); 595 } 596}; 597 598// ê³µíµë ì´ì´íì ë«ê¸° 599var globalLayerCloseFunc = function() { 600 this.layerId = 'ec_temp_mobile_layer'; 601 602 if (window.parent === window) 603 self.clse(); 604 else { 605 parent.$('html, body').css({'overflowY': 'auto', height: 'auto', width: '100%'}); 606 parent.$('html, body').scrollTop(parent.window.ecScrollTop); 607 parent.$('#' + this.layerId).remove(); 608 } 609}; 610 611/** 612 * document.location.href split 613 * return array Param 614 */ 615var getQueryString = function(sKey) 616{ 617 var sQueryString = document.location.search.substring(1); 618 var aParam = {}; 619 620 if (sQueryString) { 621 var aFields = sQueryString.split("&"); 622 var aField = []; 623 for (var i=0; i<aFields.length; i++) { 624 aField = aFields[i].split('='); 625 aParam[aField[0]] = aField[1]; 626 } 627 } 628 629 aParam.page = aParam.page ? aParam.page : 1; 630 return sKey ? aParam[sKey] : aParam; 631}; 632 633// PCë²ì ë°ë¡ ê°ê¸° 634var isPCver = function() { 635 var sUrl = window.location.hostname; 636 var aTemp = sUrl.split("."); 637 638 var pattern = /^(mobile[\-]{2}shop[0-9]+)$/; 639 640 if (aTemp[0] == 'm' || aTemp[0] == 'skin-mobile' || aTemp[0] == 'mobile') { 641 sUrl = sUrl.replace(aTemp[0]+'.', ''); 642 } else if (pattern.test(aTemp[0]) === true) { 643 var aExplode = aTemp[0].split('--'); 644 aTemp[0] = aExplode[1]; 645 sUrl = aTemp.join('.'); 646 } 647 window.location.href = '//'+sUrl+'/?is_pcver=T'; 648}; 649 650/* ëìë§ */ 651$('body').delegate('.ec-base-tooltip-area .eTip', 'click', function(e){ 652 var findArea = $($(this).parents('.ec-base-tooltip-area')); 653 var findTarget = $($(this).siblings('.ec-base-tooltip')); 654 var findTooltip = $('.ec-base-tooltip'); 655 $('.ec-base-tooltip-area').removeClass('show'); 656 $(this).parents('.ec-base-tooltip-area:first').addClass('show'); 657 findTooltip.hide(); 658 findTarget.show(); 659 e.preventDefault(); 660}); 661 662$('body').delegate('.ec-base-tooltip-area .eClose', 'click', function(e){ 663 var findTarget = $(this).parents('.ec-base-tooltip:first'); 664 $('.ec-base-tooltip-area').removeClass('show'); 665 findTarget.hide(); 666 e.preventDefault(); 667}); 668 669$('.ec-base-tooltip-area').find('input').focusout(function() { 670 var findTarget = $(this).parents('.ec-base-tooltip-area').find('.ec-base-tooltip'); 671 $('.ec-base-tooltip-area').removeClass('show'); 672 findTarget.hide(); 673}); 674 675 676(function($){ 677$.fn.extend({ 678 center: function() { 679 this.each(function() { 680 var 681 $this = $(this), 682 $w = $(window); 683 $this.css({ 684 position: "absolute", 685 top: ~~(($w.height() - $this.outerHeight()) / 2) + $w.scrollTop() + "px", 686 left: ~~(($w.width() - $this.outerWidth()) / 2) + $w.scrollLeft() + "px" 687 }); 688 }); 689 return this; 690 } 691}); 692$(function() { 693 var $container = function(){/* 694<div id="modalContainer"> 695 <iframe id="modalContent" scroll="0" scrolling="no" frameBorder="0"></iframe> 696</div>'); 697*/}.toString().slice(14,-3); 698 $('body') 699 .append($('<div id="modalBackpanel"></div>')) 700 .append($($container)); 701 function closeModal () { 702 $('#modalContainer').hide(); 703 $('#modalBackpanel').hide(); 704 } 705 $('#modalBackpanel').click(closeModal); 706 zoom = function ($piProductNo, $piCategoryNo, $piDisplayGroup) { 707 var $url = '/product/image_zoom.html?product_no=' + $piProductNo + '&cate_no=' + $piCategoryNo + '&display_group=' + $piDisplayGroup; 708 $('#modalContent').attr('src', $url); 709 $('#modalContent').bind("load",function(){ 710 $(".header .close",this.contentWindow.document.body).bind("click", closeModal); 711 }); 712 $('#modalBackpanel').css({width:$("body").width(),height:$("body").height(),opacity:.4}).show(); 713 $('#modalContainer').center().show(); 714 } 715}); 716})(jQuery); 717 718/** 719 * 모ë°ì¼ì¼í몰 ì¬ë¼ì´ë©ë©ë´ */ 720var aCategory = []; 721$(document).ready(function(){ 722 $('#header').append('<div id="dimmedSlider"></div>'); 723 724 var methods = { 725 aCategory : [], 726 aSubCategory : {}, 727 get: function() 728 { 729 $.ajax({ 730 url : '/exec/front/Product/SubCategory', 731 dataType: 'json', 732 success: function(aData) { 733 if (aData == null || aData == 'undefined') { 734 methods.checkSub(); 735 return; 736 } 737 for (var i=0; i<aData.length; i++) 738 { 739 var sParentCateNo = aData[i].parent_cate_no; 740 var sCateNo = aData[i].cate_no; 741 if (!methods.aSubCategory[sParentCateNo]) { 742 methods.aSubCategory[sParentCateNo] = []; 743 } 744 if (!aCategory[sCateNo]) { 745 aCategory[sCateNo] = []; 746 } 747 methods.aSubCategory[sParentCateNo].push( aData[i] ); 748 aCategory[sCateNo] = aData[i]; 749 } 750 methods.checkSub(); 751 methods.getMyCateList(); 752 } 753 }); 754 }, 755 getParam: function(sUrl, sKey) { 756 var aUrl = sUrl.split('?'); 757 var sQueryString = aUrl[1]; 758 var aParam = {};
759 if (sQueryString) { 760 var aFields = sQueryString.split("&"); 761 var aField = []; 762 for (var i=0; i<aFields.length; i++) { 763 aField = aFields[i].split('='); 764 aParam[aField[0]] = aField[1]; 765 } 766 } 767 return sKey ? aParam[sKey] : aParam; 768 }, 769 770 show: function(overNode, iCateNo) { 771 var oParentNode = overNode; 772 var aHtml = []; 773 var sMyCateList = localStorage.getItem("myCateList"); 774 if (methods.aSubCategory[iCateNo] != undefined) { 775 aHtml.push('<ul class="slideSubMenu">'); 776 $(methods.aSubCategory[iCateNo]).each(function() { 777 var sNextParentNo = this.cate_no; 778 var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 779 if (methods.aSubCategory[sNextParentNo] == undefined) { 780 aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 781 var sHref = '/product/list.html'+this.param; 782 } else { 783 aHtml.push('<li id="cate'+this.cate_no+'">'); 784 var sHref = '#none'; 785 } 786 aHtml.push('<a href="'+sHref+'" class="cate" cate="'+this.param+'" onclick="subMenuEvent(this);">'+this.name+'</a>'); 787 if (methods.aSubCategory[sNextParentNo] != undefined) aHtml.push('<a href="/product/list.html'+this.param+'" class="view">ìí보기</a>'); 788 aHtml.push('<button type="button" class="icoBookmark'+sCateSelected+'" id="icoBookmark">ì¦ê²¨ì°¾ê¸° ì¶ê°</button>'); 789 790 if (methods.aSubCategory[sNextParentNo] != undefined) { 791 aHtml.push('<ul>'); 792 $(methods.aSubCategory[sNextParentNo]).each(function() { 793 var sNextParentNo2 = this.cate_no; 794 var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 795 if (methods.aSubCategory[sNextParentNo2] == undefined) { 796 aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 797 var sHref = '/product/list.html'+this.param; 798 } else { 799 aHtml.push('<li id="cate'+this.cate_no+'">'); 800 var sHref = '#none'; 801 } 802 aHtml.push('<a href="'+sHref+'" class="cate" cate="'+this.param+'" onclick="subMenuEvent(this);">'+this.name+'</a>'); 803 if (methods.aSubCategory[sNextParentNo] != undefined) aHtml.push('<a href="/product/list.html'+this.param+'" class="view">ìí보기</a>'); 804 aHtml.push('<button type="button" class="icoBookmark'+sCateSelected+'" id="icoBookmark">ì¦ê²¨ì°¾ê¸° ì¶ê°</button>'); 805 806 if (methods.aSubCategory[sNextParentNo2] != undefined) { 807 aHtml.push('<ul>'); 808 809 $(methods.aSubCategory[sNextParentNo2]).each(function() { 810 aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 811 var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 812 aHtml.push('<a href="/product/list.html'+this.param+'" class="cate" cate="'+this.param+'" onclick="subMenuEvent(this);">'+this.name+'</a>'); 813 aHtml.push('<button type="button" class="icoBookmark'+sCateSelected+'" id="icoBookmark">ì¦ê²¨ì°¾ê¸° ì¶ê°</button>'); 814 aHtml.push('</li>'); 815 }); 816 aHtml.push('</ul>'); 817 } 818 aHtml.push('</li>'); 819 }); 820 aHtml.push('</ul>'); 821 } 822 aHtml.push('</li>'); 823 }); 824 aHtml.push('</ul>'); 825 } 826 $(oParentNode).append(aHtml.join('')); 827 }, 828 close: function() { 829 $('.slideSubMenu').remove(); 830 }, 831 checkSub: function() { 832 $('.cate').each(function(){ 833 var iCateNo = Number(methods.getParam($(this).attr('cate'), 'cate_no')); 834 var result = methods.aSubCategory[iCateNo]; 835 if (result == undefined) { 836 if ($(this).closest('#slideProjectList').length) { 837 var sHref = '/product/project.html'+$(this).attr('cate'); 838 } else { 839 var sHref = '/product/list.html'+$(this).attr('cate'); 840 } 841 842 $(this).attr('href', sHref); 843 $(this).parent().attr('class', 'noChild'); 844 } 845 }); 846 }, 847 getMyCateList :function() { 848 var sMyCateList = localStorage.getItem("myCateList"); 849 if (sMyCateList != null && sMyCateList != "") { 850 var aTempList = sMyCateList.split("|"); 851 var aHtml = []; 852 for (var i = 0; i < aTempList.length; i++) { 853 if (aTempList[i] != "") { 854 var iCateNo = aTempList[i]; 855 var sCateName = aCategory[iCateNo].name; 856 var sCateParam = aCategory[iCateNo].param; 857 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>'); 858 $("#cate"+iCateNo+" #icoBookmark").addClass("selected"); 859 } 860 } 861 $('#bookmartCateArea').append('<ul>'+aHtml.join('')+'</ul>'); 862 } 863 chkMyCateList(); 864 } 865 }; 866 867 868 869 870 871 var offCover = { 872 init : function() { 873 $(function() {
874 $('#wrap').append('<a href="#container" id="btnFoldLayout">ë©ë´ í ê¸</a>'); 875 offCover.resize(); 876 $(window).resize(function(){ 877 offCover.resize(); 878 }); 879 }); 880 }, 881 layout : function(){ 882 if ($('html').hasClass('expand')) { 883 $('#btnFoldLayout').show(); 884 $('#aside').css({'visibility':'visible'}); 885 886 setTimeout(function(){ 887 $('#btnFoldLayout').css({'background':'rgba(0,0,0,0.7)'}); 888 }, 350); 889 } else { 890 $('#btnFoldLayout').hide(); 891 setTimeout(function(){ 892 $('#aside').css({'visibility':'hidden'}); 893 }, 100); 894 } 895 $('#aside').css({'visibility':'visible'}); 896 }, 897 resize : function(){ 898 var height = $('body').height(); 899 $('#container').css({'min-height':height}); 900 } 901 }; 902 methods.get(); 903 904 offCover.init(); 905 906 907 $('#header .fold, #aside .btnClose').click(function(e){ 908 $('#dimmedSlider').toggle(); 909 $('html').toggleClass('expand'); 910 offCover.layout(); console.log("AAA"); 911 e.preventDefault(); 912 }); 913 914 $('#btnFoldLayout').click(function(e){ 915 $('#header .fold').trigger('click'); 916 e.preventDefault(); 917 }); 918 919 920 921 922 $('#slideCateList li > a.cate').click(function(e) { 923 var iCateNo = Number(methods.getParam($(this).attr('cate'), 'cate_no')); 924 if ($(this).parent().attr('class') == 'xans-record- selected') { 925 methods.close(); 926 } else { 927 if (!iCateNo) return; 928 $('#aside #slideCateList li').removeClass('selected'); 929 methods.close(); 930 methods.show(this.parentNode, iCateNo); 931 } 932 }); 933 934 $('#side-panel ul a.cate').click(function(e){ 935 $(this).parent().find('li').removeClass('selected'); 936 $(this).parent().toggleClass('selected'); 937 if (!$(this).parent('li').hasClass('noChild')){ 938 e.preventDefault(); 939 } 940 }); 941 942 $("#icoBookmark").live('click', function() { 943 var iCateNo = Number(methods.getParam($(this).parent().find('a').attr('cate'), 'cate_no')); 944 setMyCateList(iCateNo, $(this)); 945 }); 946 947 $('#slideCateList h2').click(function() { 948 var oParentId = $(this).parent().attr('id'); 949 if (oParentId == 'slideCateList' || oParentId == 'slideMultishopList' || oParentId == 'slideProjectList') { 950 ($(this).attr('class') == 'selected') ? $(this).next().hide() : $(this).next().show(); 951 } else if (oParentId == 'bookmarkCategory') { 952 if ($(this).attr('class') == 'selected') { 953 $(this).parent().find('#bookmarkEmpty').hide(); 954 $(this).parent().find('#bookmartCateArea').hide(); 955 } else { 956 chkMyCateList(); 957 $(this).parent().find('#bookmartCateArea').show(); 958 } 959 } 960 $(this).toggleClass('selected'); 961 }); 962}); 963 964 965 966 967 968function subMenuEvent(obj) { 969 $(obj).parent().find('li').removeClass('selected'); 970 $(obj).parent().toggleClass('selected'); 971} 972function setMyCateList(iCateNo, oObj) { 973 $(oObj).toggleClass('selected'); 974 var sMyCateList = localStorage.getItem("myCateList"); 975 var aCateList = []; 976 if (checkInArray(sMyCateList, iCateNo) == true) { 977 var aTemp = sMyCateList.split("|"); 978 for (var i = 0 ; i < aTemp.length ; i++) { 979 if (aTemp[i] != iCateNo) { 980 aCateList.push(aTemp[i]); 981 } 982 } 983 var sCateList = aCateList.join('|'); 984 localStorage.setItem("myCateList" , sCateList); 985 $('#bookmartCateArea #bookmark'+iCateNo).remove(); 986 if (aCateList.length == 0) { 987 $('#bookmarkCategory #bookmartCateArea').find('ul').remove(); 988 } 989 $("#cate"+iCateNo+" > #icoBookmark").removeClass("selected"); 990 } else { 991 var sCateName = aCategory[iCateNo].name; 992 var sCateParam = aCategory[iCateNo].param; 993 var sHtml = ''; 994 if (sMyCateList == null || sMyCateList == '') { 995 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>' 996 $('#bookmarkCategory #bookmartCateArea').append(sHtml); 997 } else { 998 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>' 999 $('#bookmarkCategory #bookmartCateArea ul').append(sHtml); 1000 } 1001 $(this).addClass('selected'); 1002 if (sMyCateList == null || sMyCateList == '') { 1003 localStorage.setItem('myCateList' , iCateNo); 1004 } else { 1005 localStorage.setItem('myCateList' , sMyCateList + '|' + iCateNo); 1006 } 1007 } 1008 chkMyCateList(); 1009}
1010function checkInArray(sBookmarkList, iCateNo) { 1011 if (sBookmarkList == null) return false; 1012 var aBookmarkList = sBookmarkList.split("|"); 1013 for (var i = 0; i < aBookmarkList.length; i++) { 1014 if (aBookmarkList[i] == iCateNo) { 1015 return true; 1016 } 1017 } 1018 return false; 1019} 1020function chkMyCateList() { 1021 var sMyCateList = localStorage.getItem("myCateList"); 1022 if (sMyCateList == null || sMyCateList == '') { 1023 $('#bookmarkEmpty').show(); 1024 } else { 1025 $('#bookmarkEmpty').hide(); 1026 } 1027} 1028 1029 1030 1031 1032 1033 1034 1035 1036/* 1037 ê²ìí ë¡¤ë§ 1038*/ 1039$.fn.boardVerSlide = function (settings) { 1040 settings = $.extend({ 1041 view : 5, 1042 direction : 'up', 1043 delay : 4000 1044 }, settings); 1045 var option = []; 1046 option = $.extend({}, $.fn.boardVerSlide.defaults, settings); 1047 return this.each(function () { 1048 $.fn.extend(this, boardVerSlide); 1049 this.wrap = $(this); 1050 this.option = option; 1051 this.direction = this.option.direction; 1052 this.delay = this.option.delay; 1053 this.view = this.option.view; 1054 this.init(); 1055 }); 1056}; 1057var boardVerSlide = { 1058 init : function(){ 1059 var direction = this.direction; 1060 var delay = this.delay; 1061 var table = this.wrap.find('table'); 1062 var tbody = table.find('> tbody'); 1063 var view = this.view; 1064 var tableHeight = table.outerHeight(); 1065 var trLength = tbody.find('> tr').length; 1066 var trHeight = tbody.find('> tr').outerHeight(); 1067 var boardVerSlideAreaHeight = trHeight * view; 1068 table.wrap('<div class="boardVerSlideArea" style="height:'+ boardVerSlideAreaHeight +'px;" />'); 1069 table.wrap('<div class="list" />'); 1070 var boardVerSlideArea = this.wrap.find('.boardVerSlideArea'); 1071 var list = this.wrap.find('.list'); table.find('caption').remove(); 1072 table.find('thead').remove(); 1073 if ($.browser.webkit) { 1074 var tdBorderBottom = parseInt(tbody.find('tr > td').css('border-bottom-width')); 1075 var padddingBottom = (view * tdBorderBottom) + 1; 1076 boardVerSlideArea.css({'paddingBottom': padddingBottom + 'px'}); 1077 } 1078 function action() { 1079 switch(direction){ 1080 case "up": 1081 var item = tbody.find('> tr:first-child'); 1082 var itemClone = item.clone(); 1083 tbody.append(itemClone); 1084 if ($.browser.opera || $.browser.webkit) { 1085 list.css({'marginTop':'-1px'}); 1086 } 1087 list.css({'top':0}).animate({'top': '-' + trHeight +'px'}, function(){ 1088 list.css({'top': 0}); 1089 item.remove(); 1090 }); 1091 break; 1092 case "down": 1093 var item = tbody.find('> tr:last-child'); 1094 var itemClone = item.clone(); 1095 tbody.prepend(itemClone); 1096 list.css({'bottom':0}).animate({'bottom': '-' + trHeight +'px'}, function(){ 1097 list.css({'bottom': 0}); 1098item.remove(); 1099 }); 1100 break; 1101 } 1102 } 1103 var timer; 1104 var timerStart = function(){ 1105 timer = setInterval(function(){ 1106 action(); 1107 },delay ); 1108 } 1109 timerStart(); 1110 this.wrap.mouseenter(function(){ 1111 clearTimeout(timer); 1112 }); 1113 this.wrap.mouseleave(function(){ 1114 timerStart(); 1115 }); 1116 } 1117} 1118$(function(){ 1119 /* 1120 ë©ì¸ > ê²ìí ë¡¤ë§ ìµì ì¤ì 1121 - direction : up(ìë¡), down(ìëë¡) 1122 - delay : íì´ë¨¸(기본 5 ì´ == 5000) 1123 - view : ë³´ì¬ì§ ê°ì 1124 */ 1125 $("#boardVerticalSlide_1").boardVerSlide({ 1126 direction : 'up', 1127 delay : 3000, 1128 view : 3 }); 1129}); 1130 1131 1132 1133 1134 1135 1136$(document).ready(function(){ 1137 var $full_wrap = $('.full_cate_wrap'); 1138 var $full_cate_list = $full_wrap.find('.full_cate01'); 1139 var len = $full_cate_list.length; 1140 1141 $.ajax({ 1142 url : '/exec/front/Product/SubCategory', 1143 dataType: 'json', 1144 success: function(aData) { 1145 if (aData == null || aData == 'undefined') { 1146 return; 1147 } 1148 $.each(aData, function(index, key) { 1149 var $cate_01 = $full_wrap.find('.full_cate01[data-url$="=' + key.parent_cate_no + '"]'); 1150 if ($cate_01.length > 0) { 1151 var _index = $full_cate_list.index($cate_01); 1152 1153 if ($cate_01.hasClass('is2') === false) { 1154 $cate_01.addClass('is2'); 1155 $cate_01.append('<div class="cate02_wrap"><dl></dl></div>'); 1156 } 1157 $cate_01.find('.cate02_wrap dl').append('<dd data-url="'+key.param+'" class="cate_02"><a href="/product/list.html'+key.param+'">'+key.name+'</a></dd>'); 1158 return; 1159 } 1160 1161 var $cate_02 = $full_wrap.find('.cate_02[data-url$="=' + key.parent_cate_no + '"]'); 1162 if ($cate_02.length > 0) { 1163 if ($cate_02.hasClass('is2') === false) { 1164 $cate_02.addClass('is2'); 1165 $cate_02.append('<dl class="cate03_wrap"></dl>'); 1166 } 1167 $cate_02.find('.cate03_wrap').append('<dd data-url="'+key.param+'" class="cate_03"><a href="/product/list.html'+key.param+'">'+key.name+'</a></dd>'); 1168 return; 1169 } 1170 1171 var $cate_03 = $full_wrap.find('.cate_03[data-url$="=' + key.parent_cate_no + '"]'); 1172 if ($cate_03.hasClass('is2') === false) { 1173 $cate_03.addClass('is2'); 1174 $cate_03.append('<dl class="cate04_wrap"></dl>'); 1175 } 1176 $cate_03.find('.cate04_wrap').append('<dd data-url="'+key.param+'" class="cate_04"><a href="/product/list.html'+key.param+'">'+key.name+'</a></dd>'); 1177 }); 1178 1179 setCategory(); 1180 } 1181 }); 1182}); 1183 1184 1185 1186function setCategory(){ 1187 1188 (function(){ 1189 var $this=$('#full_menu'); 1190 var $cate_01=$this.find('.full_cate01'); 1191 var $cate_02=$this.find('.cate_02'); 1192 var $cate_03=$this.find('.cate_03'); 1193
1194 var speed=200; 1195 1196 1197 1198 })(); 1199 1200 1201 (function(){ 1202 var $this=$('#full_category'); 1203 var $cate_01=$this.find('.full_cate01'); 1204 var $cate_02=$this.find('.cate_02'); 1205 var $cate_03=$this.find('.cate_03'); 1206 var $full_close=$this.find('.full_close'); 1207 var $full_btn=$('#hb_full_btn'); 1208 var speed=200; 1209 1210 1211 $full_btn.bind('click',function(e){ 1212 e.stopPropagation(); 1213 if($(this).hasClass('on')){ 1214 $(this).removeClass('on') 1215 $this.fadeOut(speed); 1216 }else{ 1217 $(this).addClass('on') 1218 $this.fadeIn(speed); 1219 } 1220 }); 1221 $full_close.bind('click',function(){ 1222 $full_btn.removeClass('on'); 1223 $this.fadeOut(speed); 1224 }); 1225 $('body').bind('click',function(event){ 1226 if($full_btn.hasClass('on')){ 1227 $full_btn.removeClass('on'); 1228 $this.fadeOut(speed); 1229 } 1230 }); 1231 1232 })(); 1233 1234}; 1235 1236 1237 1238 1239 1240$(document).ready(function(){ 1241 var $gnb_wrap = $('.gnb_cate_wrap'); 1242 var $gnb_cate_img = $('.gnb_category_img li'); 1243 var $gnb_cate_list = $gnb_wrap.find('.gnb_cate01'); 1244 1245 $.ajax({ 1246 url : '/exec/front/Product/SubCategory', 1247 dataType: 'json', 1248 success: function(aData) { 1249 if (aData == null || aData == 'undefined') { 1250 return; 1251 } 1252 $.each(aData, function(index, key) { 1253 1254 var $gnb_01 = $gnb_wrap.find('.gnb_cate01[data-url$="=' + key.parent_cate_no + '"]'); 1255 if ($gnb_01.length > 0) { 1256 var _index = $gnb_cate_list.index($gnb_01); 1257 1258 if ($gnb_01.hasClass('is') === false) { 1259 $gnb_01.addClass('is'); 1260 $gnb_01.append('<ul class="gnb_cate02_ul"><li><ul class="gnb_cate02_wrap"></ul></li><li class="menuBanner"></li></ul>'); 1261 } 1262 $gnb_01.find('.gnb_cate02_wrap').append('<li><a href="'+this.link_product_list+'">'+this.name+'</a></li>'); 1263 return; 1264 } 1265 1266 1267 1268 1269 1270 1271 var $gnb_02 = $gnb_wrap.find('.gnb_cate_02[data-url$="=' + key.parent_cate_no + '"]'); 1272 if ($gnb_02.length > 0) { 1273 if ($gnb_02.hasClass('is') === false) { 1274 $gnb_02.addClass('is'); 1275 $gnb_02.append('<ul class="gnb_cate03_wrap"></ul>'); 1276 } 1277 $gnb_02.find('.gnb_cate03_wrap').append('<li><a href="'+this.link_product_list+'">'+this.name+'</a></li>'); 1278 return; 1279 } 1280 1281 var $gnb_03 = $gnb_wrap.find('.gnb_cate_03[data-url$="=' + key.parent_cate_no + '"]'); 1282 if ($gnb_03.hasClass('is') === false) { 1283 $gnb_03.addClass('is'); 1284 $gnb_03.append('<ul class="gnb_cate04_wrap"></ul>'); 1285 } 1286 $gnb_03.find('.gnb_cate04_wrap').append('<li><a href="'+this.link_product_list+'">'+this.name+'</a></li>'); 1287 }); 1288 1289 setCategory2(); 1290 1291 1292 //ëë¡ë¤ì´ ë©ë´ìì± 1293 $('#primary-menu .gnb_cate_wrap li:nth-child(1) .menuBanner').html(menuBanner01) ; 1294 $('#primary-menu .gnb_cate_wrap li:nth-child(2) .menuBanner').html(menuBanner02) ; 1295 $('#primary-menu .gnb_cate_wrap li:nth-child(3) .menuBanner').html(menuBanner03) ; 1296 $('#primary-menu .gnb_cate_wrap li:nth-child(4) .menuBanner').html(menuBanner04) ; 1297 $('#primary-menu .gnb_cate_wrap li:nth-child(5) .menuBanner').html(menuBanner05) ; 1298 $('#primary-menu .gnb_cate_wrap li:nth-child(6) .menuBanner').html(menuBanner06) ; 1299 $('#primary-menu .gnb_cate_wrap li:nth-child(7) .menuBanner').html(menuBanner07) ; 1300 $('#primary-menu .gnb_cate_wrap li:nth-child(8) .menuBanner').html(menuBanner08) ; 1301 $('#primary-menu .gnb_cate_wrap li:nth-child(9) .menuBanner').html(menuBanner09) ; 1302 $('#primary-menu .gnb_cate_wrap li:nth-child(10) .menuBanner').html(menuBanner10) ; 1303 1304 $('#primary-menu .gnb_cate_wrap li:nth-child(11) .menuBanner').html(menuBanner11) ; 1305 $('#primary-menu .gnb_cate_wrap li:nth-child(12) .menuBanner').html(menuBanner12) ; 1306 $('#primary-menu .gnb_cate_wrap li:nth-child(13) .menuBanner').html(menuBanner13) ; 1307 $('#primary-menu .gnb_cate_wrap li:nth-child(14) .menuBanner').html(menuBanner14) ; 1308 $('#primary-menu .gnb_cate_wrap li:nth-child(15) .menuBanner').html(menuBanner15) ; 1309 $('#primary-menu .gnb_cate_wrap li:nth-child(16) .menuBanner').html(menuBanner16) ; 1310 $('#primary-menu .gnb_cate_wrap li:nth-child(17) .menuBanner').html(menuBanner17) ; 1311 $('#primary-menu .gnb_cate_wrap li:nth-child(18) .menuBanner').html(menuBanner18) ; 1312 $('#primary-menu .gnb_cate_wrap li:nth-child(19) .menuBanner').html(menuBanner19) ; 1313 $('#primary-menu .gnb_cate_wrap li:nth-child(20) .menuBanner').html(menuBanner20) ; 1314 $("img[src$='none-img.png']").closest('ul').addClass('none_banner'); 1315 } 1316 }); 1317}); 1318 1319 1320 1321function setCategory2(){ 1322 1323 1324 1325 (function(){ 1326 var $this=$('.gnb_category'); 1327 var $gnb_01=$this.find('.gnb_cate02_ul'); 1328 var $gnb_02=$this.find('.gnb_cate_02'); 1329 var $gnb_03=$this.find('.gnb_cate_03'); 1330 var speed=200; 1331 $gnb_01.bind('mouseenter',function(){ 1332 $gnb_01.css('z-index',0); 1333 $(this).css('z-index',1); 1334 $(this).find('.gnb_cate02_ul').stop(true,true).fadeIn(speed); 1335 $(this).addClass('on'); 1336 1337 }).bind('mouseleave',function(){ 1338 $(this).find('.gnb_cate02_ul').stop(true,true).fadeOut(speed); 1339 $(this).removeClass('on'); 1340 1341 }); 1342 $gnb_02.bind('mouseenter',function(){ 1343 $gnb_02.css('z-index',0); 1344 $(this).css('z-index',1); 1345 $(this).find('.gnb_cate03_wrap').stop(true,true).fadeIn(speed); 1346 $(this).addClass('on'); 1347 }).bind('mouseleave',function(){ 1348 $(this).find('.gnb_cate03_wrap').stop(true,true).fadeOut(speed); 1349 $(this).removeClass('on'); 1350 }); 1351 $gnb_03.bind('mouseenter',function(){ 1352 $gnb_03.css('z-index',0); 1353 $(this).css('z-index',1); 1354 $(this).find('.gnb_cate04_wrap').stop(true,true).fadeIn(speed); 1355 $(this).addClass('on'); 1356 }).bind('mouseleave',function(){ 1357 $(this).find('.gnb_cate04_wrap').stop(true,true).fadeOut(speed); 1358 $(this).removeClass('on'); 1359 }); 1360 1361 1362 1363 })(); 1364 1365 1366}; 1367 1368 1369 1370$(document).ready(function(){ 1371 var max_h=0; 1372 $(".gnb_cate02_ul li").each(function(){ 1373 var h = parseInt($(this).css("height")); 1374 if(max_h<h){ max_h = h; } 1375 }); 1376 $(".gnb_cate02_ul li").each(function(){ 1377 $(this).css({height:max_h}); 1378 }); 1379}); 1380 1381 1382 1383 1384// â â â ë©ë´ë³ ëë¡ë¤ì´ ì´ë¯¸ì§ë°°ëê´ê³ ê´ë¦¬ : ëë¶ë¥ë©ë´ì ë§ì°ì¤ ì¤ë²ì ë ¸ì¶ëë ì´ë¯¸ì§ë°°ë를 êµì²´/ìì±í ì ììµëë¤. â â â
1385// ê°ê°ì ììì ë§ê² ë°°ë ì´ë¯¸ì§ë¥¼ êµì²´íì¸ì. 1386// ê´ë¦¬ìíë©´ > ìíë¶ë¥ > ëë¶ë¥ë§ ìì±í ê²½ì°ìë ë ¸ì¶ëì§ ììµëë¤. 1387// ê´ë¦¬ìíë©´ìì ì¤ë¶ë¥ ëë ì¤ë¶ë¥ì´íì ë¶ë¥ë¥¼ ìì±íì ì¼ ëë¡ë¤ì´ë©ë´ê° ë ¸ì¶ëë©´ì ë°°ëì´ë¯¸ì§ë í¨ê» ë ¸ì¶ë©ëë¤. 1388// ì´ë¯¸ì§ë°°ëê´ê³ ê° íììë ë©ë´ì ê²½ì°ìë "<img src='/web/upload/hb/banner/none-img.png'>"ì¼ë¡ ìì±í´ì£¼ì¸ì. 1389// ë°°ëì¬ì´ì¦ë ê°ë¡ì¬ì´ì¦ê° 250pxë¡ ê³ ì ëì´ììµëë¤. ì¸ë¡ë ìíë ì¬ì´ì¦ë¡ ì ìíì¬ ì ë¡ëíì¸ì. 1390// ìµë20ê°ê¹ì§ë§ ì¤ì ê°ë¥íëë¡ ì¸í ëì´ììµëë¤. 1391 1392 1393 1394//1ë²ì§¸ ë©ë´ì ë°°ëì´ë¯¸ì§ : ì´ë¯¸ì§ê²½ë¡ì í´ë¦ì ì´ëë íì´ì§URLì ìëì ê°ì´ ë³ê²½íì¸ì. 1395var menuBanner01 = "<img src='/web/upload/hb/banner/none-img.png'>" 1396 1397//2ë²ì¬ ë©ë´ì ë°°ëì´ë¯¸ì§ê° íììì¼ë©´ ë°ëì ìëì ê°ì´ ì´ë¯¸ì§ê²½ë¡ë¥¼ ë³ê²½í´ì£¼ì¸ì 1398var menuBanner02 = "<img src='/web/upload/hb/banner/none-img.png'>" 1399 1400//3ë²ì§¸ ë©ë´ì ë°°ëì´ë¯¸ì§ 1401var menuBanner03 = "<img src='/web/upload/hb/banner/none-img.png'>" 1402 1403//4ë²ì§¸ ë©ë´ì ë°°ëì´ë¯¸ì§ 1404var menuBanner04 = "<img src='/web/upload/hb/banner/none-img.png'>" 1405 1406//5ë²ì§¸ ë©ë´ì ë°°ëì´ë¯¸ì§ 1407var menuBanner05 = "<img src='/web/upload/hb/banner/none-img.png'>" 1408 1409//6ë²ì§¸ ë©ë´ì ë°°ëì´ë¯¸ì§ 1410var menuBanner06 = "<img src='/web/upload/hb/banner/none-img.png'>" 1411 1412//7ë²ì§¸ ë©ë´ì ë°°ëì´ë¯¸ì§ 1413var menuBanner07 = "<img src='/web/upload/hb/banner/none-img.png'>" 1414 1415//8ë²ì§¸ ë©ë´ì ë°°ëì´ë¯¸ì§ 1416var menuBanner08 = "<img src='/web/upload/hb/banner/none-img.png'>" 1417 1418//9ë²ì§¸ ë©ë´ì ë°°ëì´ë¯¸ì§ 1419var menuBanner09 = "<img src='/web/upload/hb/banner/none-img.png'>" 1420 1421//10ë²ì§¸ ë©ë´ì ë°°ëì´ë¯¸ì§ 1422var menuBanner10 = "<img src='/web/upload/hb/banner/none-img.png'>" 1423 1424 1425 1426 1427//11ë²ì§¸ ë©ë´ì ë°°ëì´ë¯¸ì§ 1428var menuBanner11 = "<img src='/web/upload/hb/banner/none-img.png'>" 1429 1430//12ë²ì§¸ ë©ë´ì ë°°ëì´ë¯¸ì§ 1431var menuBanner12 = "<img src='/web/upload/hb/banner/none-img.png'>" 1432 1433//13ë²ì§¸ ë©ë´ì ë°°ëì´ë¯¸ì§ 1434var menuBanner13 = "<img src='/web/upload/hb/banner/none-img.png'>" 1435 1436//14ë²ì§¸ ë©ë´ì ë°°ëì´ë¯¸ì§ 1437var menuBanner14 = "<img src='/web/upload/hb/banner/none-img.png'>" 1438 1439//15ë²ì§¸ ë©ë´ì ë°°ëì´ë¯¸ì§ 1440var menuBanner15 = "<img src='/web/upload/hb/banner/none-img.png'>" 1441 1442//16ë²ì§¸ ë©ë´ì ë°°ëì´ë¯¸ì§ 1443var menuBanner16 = "<img src='/web/upload/hb/banner/none-img.png'>" 1444 1445//17ë²ì§¸ ë©ë´ì ë°°ëì´ë¯¸ì§ 1446var menuBanner17 = "<img src='/web/upload/hb/banner/none-img.png'>" 1447 1448//18ë²ì§¸ ë©ë´ì ë°°ëì´ë¯¸ì§ 1449var menuBanner18 = "<img src='/web/upload/hb/banner/none-img.png'>" 1450 1451//19ë²ì§¸ ë©ë´ì ë°°ëì´ë¯¸ì§ 1452var menuBanner19 = "<img src='/web/upload/hb/banner/none-img.png'>" 1453 1454//20ë²ì§¸ ë©ë´ì ë°°ëì´ë¯¸ì§ 1455var menuBanner20 = "<img src='/web/upload/hb/banner/none-img.png'>" 1456 1457 1458 1459 1460 1461 1462$(document).ready(function(){ 1463 if (typeof(EC_SHOP_MULTISHOP_SHIPPING) != "undefined") { 1464 var sShippingCountryCode4Cookie = 'shippingCountryCode'; 1465 var bShippingCountryProc = false; 1466 1467 // ë°°ì¡êµê° ì í ì¤ì ì´ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 1468 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) { 1469 $('.xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist').hide(); 1470 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptioncountry').hide(); 1471 } else { 1472 $('.thumb .xans-layout-multishoplistitem').hide(); 1473 var aShippingCountryCode = document.cookie.match('(^|;) ?'+sShippingCountryCode4Cookie+'=([^;]*)(;|$)'); 1474 if (typeof(aShippingCountryCode) != 'undefined' && aS
1474hippingCountryCode != null && aShippingCountryCode.length > 2) { 1475 var sShippingCountryValue = aShippingCountryCode[2]; 1476 } 1477 1478 // query stringì¼ë¡ ëì´ ì¨ ë°°ì¡êµê° ê°ì´ ìë¤ë©´, ê·¸ ê°ì ì ì©í¨ 1479 var aHrefCountryValue = decodeURIComponent(location.href).split("/?country="); 1480 1481 if (aHrefCountryValue.length == 2) { 1482 var sShippingCountryValue = aHrefCountryValue[1]; 1483 } 1484 1485 // ë©ì¸ íì´ì§ìì êµê°ì íì ìí ê²½ì°, ê·¸ ì¸ì íì´ì§ìì ì í ë ê°ì´ ì ëì¤ë íì ì²ë¦¬ 1486 if (location.href.split("/").length != 4 && $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()) { 1487 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 1488 1489 if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { 1490 $("#f_country").val($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); 1491 } 1492 } 1493 if (typeof(sShippingCountryValue) != "undefined" && sShippingCountryValue != "" && sShippingCountryValue != null) { 1494 sShippingCountryValue = sShippingCountryValue.split("#")[0]; 1495 var bShippingCountryProc = true; 1496 1497 $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); 1498 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 1499 var expires = new Date(); 1500 expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30ì¼ê° ì¿ í¤ ì ì§ 1501 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); 1502 if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { 1503 $("#f_country").val(sShippingCountryValue).change();; 1504 } 1505 } 1506 } 1507 // ì¸ì´ì í ì¤ì ì´ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 1508 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingLanguageSelection === false) { 1509 $('.xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist').hide(); 1510 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptionlanguage').hide(); 1511 } else { 1512 $('.thumb .xans-layout-multishoplistitem').hide(); 1513 } 1514 1515 // ë°°ì¡êµê° ë° ì¸ì´ ì¤ì ì´ ë ë¤ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 1516 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShipping === false) { 1517 $(".xans-layout-multishopshipping").hide(); 1518 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption').hide(); 1519 } else if (bShippingCountryProc === false && location.href.split("/").length == 4) { // ë°°ì¡êµê° ê°ì ì²ë¦¬í ì ì´ ìê³ , ë©ì¸íë©´ì¼ ëë§ ì í ë ì´ì´ë¥¼ ëì 1520 var sShippingCountryValue = $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(); 1521 $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); 1522 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 1523 // ë°°ì¡êµê° ì íì ì¬ì©í´ì¼ ë ì´ì´ë¥¼ ë³´ì´ê² í¨ 1524 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === true) { 1525 $(".xans-layout-multishopshipping").show(); 1526 } 1527 } 1528 1529 $(".xans-layout-multishopshipping .close").bind("click", function() { 1530 $(".xans-layout-multishopshipping").hide(); 1531 }); 1532 1533 $(".xans-layout-multishopshipping .ec-base-button a").bind("click", function() { 1534 var expires = new Date(); 1535 expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30ì¼ê° ì¿ í¤ ì ì§ 1536 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); 1537 1538 // ëë©ì¸ 문ì ë¡ ì¿ í¤ë¡ ë°°ì¡êµê° ì¤ì ì´ ì ëë ê²½ì°ë¥¼ ìí´ query stringì¼ë¡ ë°°ì¡êµê° ê°
1538ì ëê¹ 1539 var sQuerySting = (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) ? "" : "/?country="+encodeURIComponent($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); 1540 1541 location.href = '//'+$(".xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist").val()+sQuerySting; 1542 }); 1543 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a").bind("click", function() { 1544 $(".xans-layout-multishopshipping").show(); 1545 }); 1546 } 1547});
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.