1/** 2 * ìì§ì´ë ë°°ë Jquery Plug-in 3 * @author cafe24 4 */ 5 6(function($){ 7 8 $.fn.floatBanner = function(options) { 9 options = $.extend({}, $.fn.floatBanner.defaults , options); 10 11 return this.each(function() { 12 var aPosition = $(this).position(); 13 var jbOffset = $(this).offset(); 14 var node = this; 15 16 $(window).scroll(function() { 17 var _top = $(document).scrollTop(); 18 _top = (aPosition.top < _top) ? _top : aPosition.top; 19 20 setTimeout(function () { 21 var newinit = $(document).scrollTop(); 22 23 if ( newinit > jbOffset.top ) { 24 _top -= jbOffset.top; 25 var container_height = $("#wrap").height(); 26 var quick_height = $(node).height(); 27 var cul = container_height - quick_height; 28 if(_top > cul){ 29 _top = cul; 30 } 31 }else { 32 _top = 0; 33 } 34 35 $(node).stop().animate({top: _top}, options.animate); 36 }, options.delay); 37 }); 38 }); 39 }; 40 41 $.fn.floatBanner.defaults = { 42 'animate' : 500, 43 'delay' : 500 44 }; 45 46})(jQuery); 47 48/** 49 * 문ì 구ëí ìì 50 */ 51$(document).ready(function(){ 52 $('#banner:visible, #quick:visible').floatBanner(); 53 54 //placeholder 55 $(".ePlaceholder input, .ePlaceholder textarea").each(function(i){ 56 var placeholderName = $(this).parents().attr('title'); 57 $(this).attr("placeholder", placeholderName); 58 }); 59 /* placeholder ie8, ie9 */ 60 $.fn.extend({ 61 placeholder : function() { 62 //IE 8 ë²ì ìë hasPlaceholderSupport() ê°ì´ false를 ë¦¬í´ 63 if (hasPlaceholderSupport() === true) { 64 return this; 65 } 66 //hasPlaceholderSupport() ê°ì´ false ì¼ ê²½ì° ìë ì½ë를 ì¤í 67 return this.each(function(){ 68 var findThis = $(this); 69 var sPlaceholder = findThis.attr('placeholder'); 70 if ( ! sPlaceholder) { 71 return; 72 } 73 findThis.wrap('<label class="ePlaceholder" />'); 74 var sDisplayPlaceHolder = $(this).val() ? ' style="display:none;"' : ''; 75 findThis.before('<span' + sDisplayPlaceHolder + '>' + sPlaceholder + '</span>'); 76 this.onpropertychange = function(e){ 77 e = event || e; 78 if (e.propertyName == 'value') { 79 $(this).trigger('focusout'); 80 } 81 }; 82 //ê³µíµ class 83 var agent = navigator.userAgent.toLowerCase(); 84 if (agent.indexOf("msie") != -1) { 85 $(".ePlaceholder").css({"position":"relative"}); 86 $(".ePlaceholder span").css({"position":"absolute", "padding":"0 4px", "color":"#878787"}); 87 $(".ePlaceholder label").css({"padding":"0"}); 88 } 89 }); 90 } 91 }); 92 93 $(':input[placeholder]').placeholder(); //placeholder() í¨ì를 í¸ì¶ 94 95 //í´ë¦íë©´ placeholder ì¨ê¹ 96 $('body').delegate('.ePlaceholder span', 'click', function(){ 97 $(this).hide(); 98 }); 99 100 //inputì°½ í¬ì»¤ì¤ ì¸ ì¼ë placeholder ì¨ê¹ 101 $('body').delegate('.ePlaceholder :input', 'focusin', function(){ 102 $(this).prev('span').hide(); 103 }); 104 105 //inputì°½ í¬ì»¤ì¤ ìì ì¼ë value ê° true ì´ë©´ ì¨ê¹, false ì´ë©´ ë³´ì¬ì§ 106 $('body').delegate('.ePlaceholder :input', 'focusout', function(){ 107 if (this.value) { 108 $(this).prev('span').hide(); 109 } else { 110 $(this).prev('span').show(); 111 } 112 }); 113 114 //inputì placeholderê° ì§ìì´ ëë©´ true를 ìëë©´ false를 리í´ê°ì¼ë¡ ëì ¸ì¤ 115 function hasPlaceholderSupport() { 116 if ('placeholder' in document.createElement('input')) { 117 return true; 118 } else { 119 return false;
120 } 121 } 122}); 123 124/** 125 * ì¸ë¤ì¼ ì´ë¯¸ì§ ìë°ì¼ê²½ì° ê¸°ë³¸ê° ì¤ì 126 */ 127$(window).load(function() { 128 $("img.thumb,img.ThumbImage,img.BigImage").each(function($i,$item){ 129 var $img = new Image(); 130 $img.onerror = function () { 131 $item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif"; 132 } 133 $img.src = this.src; 134 }); 135}); 136 137/** 138 * tooltip 139 */ 140$('.eTooltip').each(function(i){ 141 $(this).find('.btnClose').attr('tabIndex','-1'); 142}); 143//tooltip input focus 144$('.eTooltip').find('input').focus(function() { 145 var targetName = returnTagetName(this); 146 targetName.siblings('.ec-base-tooltip').show(); 147}); 148$('.eTooltip').find('input').focusout(function() { 149 var targetName = returnTagetName(this); 150 targetName.siblings('.ec-base-tooltip').hide(); 151}); 152function returnTagetName(_this){ 153 var ePlacename = $(_this).parent().attr("class"); 154 var targetName; 155 if(ePlacename == "ePlaceholder"){ //ePlaceholder ëì 156 targetName = $(_this).parents(); 157 }else{ 158 targetName = $(_this); 159 } 160 return targetName; 161} 162 163/** 164 * eTab 165 */ 166 $("body").delegate(".eTab a", "click", function(e){ 167 // í´ë¦í li ì selected í´ëì¤ ì¶ê°, 기존 liì ìë selected í´ëì¤ë ìì . 168 var _li = $(this).parent("li").addClass("selected").siblings().removeClass("selected"), 169 _target = $(this).attr("href"), 170 _siblings = $(_target).attr("class"), 171 _arr = _siblings.split(" "), 172 _classSiblings = "."+_arr[0]; 173 174 //í´ë¦í íì í´ë¹íë ììë íì±í, 기존 ììë ë¹íì±í í¨. 175 $(_target).show().siblings(_classSiblings).hide(); 176 177 178 //preventDefault ë a íê·¸ ì²ë¼ í´ë¦ ì´ë²¤í¸ ì¸ì ë³ëì ë¸ë¼ì°ì íëì ë§ê¸° ìí´ ì¬ì©ë¨. 179 e.preventDefault(); 180}); 181 182 183 184//window popup script 185function winPop(url) { 186 window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no"); 187} 188/** 189 * document.location.href split 190 * return array Param 191 */ 192function getQueryString(sKey) 193{ 194 var sQueryString = document.location.search.substring(1); 195 var aParam = {}; 196 197 if (sQueryString) { 198 var aFields = sQueryString.split("&"); 199 var aField = []; 200 for (var i=0; i<aFields.length; i++) { 201 aField = aFields[i].split('='); 202 aParam[aField[0]] = aField[1]; 203 } 204 } 205 206 aParam.page = aParam.page ? aParam.page : 1; 207 return sKey ? aParam[sKey] : aParam; 208}; 209 210$(document).ready(function(){ 211 // tab 212 $.eTab = function(ul){ 213 $(ul).find('a').click(function(){ 214 var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'), 215 _target = $(this).attr('href'), 216 _siblings = '.' + $(_target).attr('class'); 217 $(_target).show().siblings(_siblings).hide(); 218 return false 219 }); 220 } 221 if ( window.call_eTab ) { 222 call_eTab(); 223 }; 224}); 225(function($){ 226$.fn.extend({ 227 center: function() { 228 this.each(function() { 229 var 230 $this = $(this), 231 $w = $(window); 232 $this.css({ 233 position: "absolute", 234 top: ~~(($w.height() - $this.outerHeight()) / 2) + $w.scrollTop() + "px", 235 left: ~~(($w.width() - $this.outerWidth()) / 2) + $w.scrollLeft() + "px" 236 }); 237 }); 238 return this; 239 } 240}); 241$(function() { 242 var $container = function(){/* 243<div id="modalContainer"> 244 <iframe id="modalContent" scroll="0" scrolling="no" frameBorder="0"></iframe> 245</div>'); 246*/}.toString().slice(14,-3); 247 $('body') 248 .append($('<div id="modalBackpanel"></div>')) 249 .append($($container)); 250 function closeModal () { 251 $('#modalContainer').hide(); 252 $('#modalBackpanel').hide(); 253 } 254 $('#modalBackpanel').click(closeModal); 255 zoom = function ($piProductNo, $piCategoryNo, $piDisplayGroup) { 256 var $url = '/product/image_zoom.html?product_no=' + $piProductNo + '&cate_no=' + $piCategoryNo + '&display_group=' + $piDisplayGroup; 257 $('#modalContent').attr('src', $url); 258 $('#modalContent').bind("load",function(){ 259 $(".header .close",this.contentWindow.document.body).bind("click", closeModal); 260 }); 261 $('#modalBackpanel').css({width:$("body").width(),height:$("body").height(),opacity:.4}).show(); 262 $('#modalContainer').center().show(); 263 } 264}); 265})(jQuery); 266$(document).ready(function() { 267 // ì¿ í¤ ìì± 268 function setCookie(cName, cValue, cDay){ 269 var expire = new Date(); 270 expire.setDate(expire.getDate() + cDay); 271 cookies = cName + '=' + escape(cValue) + '; path=/ '; // íê¸ ê¹¨ì§ì ë§ê¸°ìí´ escape(cValue)를 í©ëë¤. 272 if(typeof cDay != 'undefined') cookies += ';expires=' + expire.toGMTString() + ';'; 273 document.cookie = cookies; 274 } 275
276 // ì¿ í¤ ê°ì ¸ì¤ê¸° 277 function getCookie(cName) { 278 cName = cName + '='; 279 var cookieData = document.cookie; 280 var start = cookieData.indexOf(cName); 281 var cValue = ''; 282 if(start != -1){ 283 start += cName.length; 284 var end = cookieData.indexOf(';', start); 285 if(end == -1)end = cookieData.length; 286 cValue = cookieData.substring(start, end); 287 } 288 return unescape(cValue); 289 } 290 291 292 if(getCookie("sldban") == "sldclose"){ 293 $('#topSlide').css('display','none'); 294 $('#sldOpen').css('display','block'); //****ìµìë¨ ì¬ë¼ì´ë ì¬ì©ì: block , 미ì¬ì©ì: none ##### ì´ ë¼ì¸ë§ ìì í´ì£¼ì¸ì#### ****** 295 $('#sldClose').css('display','none'); 296 }else{ 297 $('#topSlide').css('display','block'); //****ìµìë¨ ì¬ë¼ì´ë ì¬ì©ì: block , 미ì¬ì©ì: none ##### ì´ ë¼ì¸ë§ ìì í´ì£¼ì¸ì#### ****** 298 $('#sldOpen').css('display','none'); 299 } 300 301 $('#topSlideOn').css('display','block'); //****ìµìë¨ ì¬ë¼ì´ë ì¬ì©: block , 미ì¬ì©: none ##### ì´ ë¼ì¸ë§ ìì í´ì£¼ì¸ì#### ****** 302 $('#top_leftAd').css('visibility','visible'); //****ìë¨ì¢ì¸¡ë°°ë ì¬ì©: visible , 미ì¬ì©: hidden ##### ì´ ë¼ì¸ë§ ìì í´ì£¼ì¸ì#### ****** 303 304 $('#sldClose').click(function() { 305 setCookie("sldban","sldclose",1) ; 306 $('#topSlide').slideUp('slow'); 307 $('#sldClose').css('display','none'); 308 $('#sldOpen').delay(350).slideDown(300); 309 }); 310 311 $('#sldOpen').click(function() { 312 setCookie("sldban","",-1) ; 313 $('#sldOpen').css('display','none'); 314 $('#sldClose').delay(350).slideDown(300); 315 $('#topSlide').slideDown('slow'); 316 }); 317 318}); 319/** 320 * ì¹´í ê³ ë¦¬ ë§ì°ì¤ ì¤ë² ì´ë¯¸ì§ 321 * ì¹´í ê³ ë¦¬ ìë¸ ë©ë´ ì¶ë ¥ 322 */ 323 324$(document).ready(function(){ 325 326 var methods = { 327 aCategory : [], 328 aSubCategory : {}, 329 330 get: function() 331 { 332 $.ajax({ 333 url : '/exec/front/Product/SubCategory', 334 dataType: 'json', 335 success: function(aData) { 336 337 if (aData == null || aData == 'undefined') return; 338 for (var i=0; i<aData.length; i++) 339 { 340 var sParentCateNo = aData[i].parent_cate_no; 341 342 if (!methods.aSubCategory[sParentCateNo]) { 343 methods.aSubCategory[sParentCateNo] = []; 344 } 345 346 methods.aSubCategory[sParentCateNo].push( aData[i] ); 347 } 348 } 349 }); 350 }, 351 352 getParam: function(sUrl, sKey) { 353 354 var aUrl = sUrl.split('?'); 355 var sQueryString = aUrl[1]; 356 var aParam = {}; 357 358 if (sQueryString) { 359 var aFields = sQueryString.split("&"); 360 var aField = []; 361 for (var i=0; i<aFields.length; i++) { 362 aField = aFields[i].split('='); 363 aParam[aField[0]] = aField[1]; 364 } 365 } 366 return sKey ? aParam[sKey] : aParam; 367 }, 368 369 getParamSeo: function(sUrl) { 370 var aUrl = sUrl.split('/'); 371 return aUrl[3] ? aUrl[3] : null; 372 }, 373 374 show: function(overNode, iCateNo) { 375 376 if (methods.aSubCategory[iCateNo].length == 0) { 377 return; 378 } 379 380 var aHtml = []; 381 aHtml.push('<ul>'); 382 $(methods.aSubCategory[iCateNo]).each(function() { 383 aHtml.push('<li><a href="'+this.link_product_list+'">'+this.name+'</a></li>'); 384 }); 385 aHtml.push('</ul>'); 386 387 388 var offset = $(overNode).offset(); 389 $('<div class="sub-category"></div>') 390 .appendTo(overNode) 391 .html(aHtml.join('')) 392 .find('li').mouseover(function(e) { 393 $(this).addClass('over'); 394 }).mouseout(function(e) { 395 $(this).removeClass('over'); 396 }); 397 }, 398 399 close: function() { 400 $('.sub-category').remove(); 401 } 402 }; 403 404 methods.get(); 405 406 407 $('.xans-layout-category li').mouseenter(function(e) { 408 var $this = $(this).addClass('on'), 409 iCateNo = Number(methods.getParam($this.find('a').attr('href'), 'cate_no')); 410 411 if (!iCateNo) { 412 iCateNo = Number(methods.getParamSeo($this.find('a').attr('href'))); 413 } 414 415 if (!iCateNo) { 416 return; 417 } 418 419 methods.show($this, iCateNo); 420 }).mouseleave(function(e) { 421 $(this).removeClass('on'); 422 423 methods.close(); 424 }); 425}); 426$(document).ready(function(){ 427 if (typeof(EC_SHOP_MULTISHOP_SHIPPING) != "undefined") { 428 var sShippingCountryCode4Cookie = 'shippingCountryCode'; 429 var bShippingCountryProc = false;
430 431 // ë°°ì¡êµê° ì í ì¤ì ì´ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 432 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) { 433 $('.xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist').hide(); 434 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptioncountry').hide(); 435 } else { 436 $('.thumb .xans-layout-multishoplistitem').hide(); 437 var aShippingCountryCode = document.cookie.match('(^|;) ?'+sShippingCountryCode4Cookie+'=([^;]*)(;|$)'); 438 if (typeof(aShippingCountryCode) != 'undefined' && aShippingCountryCode != null && aShippingCountryCode.length > 2) { 439 var sShippingCountryValue = aShippingCountryCode[2]; 440 } 441 442 // query stringì¼ë¡ ëì´ ì¨ ë°°ì¡êµê° ê°ì´ ìë¤ë©´, ê·¸ ê°ì ì ì©í¨ 443 var aHrefCountryValue = decodeURIComponent(location.href).split("/?country="); 444 445 if (aHrefCountryValue.length == 2) { 446 var sShippingCountryValue = aHrefCountryValue[1]; 447 } 448 449 // ë©ì¸ íì´ì§ìì êµê°ì íì ìí ê²½ì°, ê·¸ ì¸ì íì´ì§ìì ì í ë ê°ì´ ì ëì¤ë íì ì²ë¦¬ 450 if (location.href.split("/").length != 4 && $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()) { 451 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 452 453 if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { 454 $("#f_country").val($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); 455 } 456 } 457 if (typeof(sShippingCountryValue) != "undefined" && sShippingCountryValue != "" && sShippingCountryValue != null) { 458 sShippingCountryValue = sShippingCountryValue.split("#")[0]; 459 var bShippingCountryProc = true; 460 461 $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); 462 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 463 var expires = new Date(); 464 expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30ì¼ê° ì¿ í¤ ì ì§ 465 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); 466 if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { 467 $("#f_country").val(sShippingCountryValue).change();; 468 } 469 } 470 } 471 // ì¸ì´ì í ì¤ì ì´ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 472 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingLanguageSelection === false) { 473 $('.xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist').hide(); 474 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptionlanguage').hide(); 475 } else { 476 $('.thumb .xans-layout-multishoplistitem').hide(); 477 } 478 479 // ë°°ì¡êµê° ë° ì¸ì´ ì¤ì ì´ ë ë¤ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 480 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShipping === false) { 481 $(".xans-layout-multishopshipping").hide(); 482 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption').hide(); 483 } else if (bShippingCountryProc === false && location.href.split("/").length == 4) { // ë°°ì¡êµê° ê°ì ì²ë¦¬í ì ì´ ìê³ , ë©ì¸íë©´ì¼ ëë§ ì í ë ì´ì´ë¥¼ ëì 484 var sShippingCountryValue = $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(); 485 $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); 486 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 487 // ë°°ì¡êµê° ì íì ì¬ì©í´ì¼ ë ì´ì´ë¥¼ ë³´ì´ê² í¨ 488 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === true) { 489 $(".xans-layout-multishopshipping").show(); 490 } 491 } 492 493 $(".xans-layout-multishopshipping .close").bind("click", function() { 494 $(".xans-layout-multishopshipping").hide(); 495 }); 496 497 $(".xans-layout-multishopshipping .ec-base-button a").bind("click", function() { 498 var expires = new Date(); 499 expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30ì¼ê° ì¿ í¤ ì ì§ 500 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); 501 502 // ëë©ì¸ 문ì ë¡ ì¿ í¤ë¡ ë°°ì¡êµê° ì¤ì ì´ ì ëë ê²½ì°ë¥¼ ìí´ query stringì¼ë¡ ë°°ì¡êµê° ê°
502ì ëê¹ 503 var sQuerySting = (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) ? "" : "/?country="+encodeURIComponent($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); 504 505 location.href = '//'+$(".xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist").val()+sQuerySting; 506 }); 507 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a").bind("click", function() { 508 $(".xans-layout-multishopshipping").show(); 509 }); 510 } 511});
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.