1EC$(function($) { 2 //í ì¸ì¨í기 3 discount(); 4 function discount(){ 5 //ìíëª©ë¡ 6 $('.prdList').each(function(){ 7 $(this).find('> li').each(function(){ 8 var price1 = String($(this).find('.description').attr('ec-data-custom')).replace(/\,/g, '').replace('ì', ''); //ìë¹ìê° 9 var price2 = String($(this).find('.description').attr('ec-data-price')).replace(/\,/g, '').replace('ì', ''); //íë§¤ê° 10 var price2 = price2.split(' '); //í매ê°ì°¸ì¡°íí êµ¬ë¶ 11 if (!isNaN(price1) && !isNaN(price2[0])) { 12 discountRate = Math.round((price1 - price2[0]) / price1 * 100); 13 if(discountRate > 0 && discountRate != 100 && ($(this).find('.ec-sale-rate').length < 1)){ 14 $(this).find('.thumbnail').append('<div class="ec-sale-rate">'+discountRate+'%</div>'); 15 } 16 } 17 }); 18 }); 19 } 20 21 if($('.xans-product-detaildesign').length){ 22 discount2(); 23 function discount2(){ 24 //ìíìì¸,íë보기(íì ) 25 var price1 = String($('.xans-product-detail #span_product_price_custom').text()).replace(/\,/g, '').replace('ì', ''); //ìë¹ìê° 26 var price2 = String($('.xans-product-detail #span_product_price_text').text()).replace(/\,/g, '').replace('ì', ''); //íë§¤ê° 27 var price2 = price2.split(' '); //í매ê°ì°¸ì¡°íí êµ¬ë¶ 28 if (!isNaN(price1) && !isNaN(price2[0])) { 29 discountRate = Math.round((price1 - price2[0]) / price1 * 100); 30 if(discountRate > 0 && discountRate != 100 && ($(this).find('.ec-sale-rate').length < 1)){ 31 $('.xans-product-detail #span_product_price_text').append('<span class="ec-sale-rate">'+discountRate+'%</span>'); 32 } 33 } 34 } 35 } 36}); 37$(document).ready(function(){ 38 var topBannerNum = $('.topBanner .swiper-slide').length ; 39 $(".topBanner").each(function () { 40 var topBannerId = $(this).attr("id"); 41 if (topBannerNum > 0){ 42 if (getCookie(topBannerId) != "topDone") { 43 $("#" + topBannerId).show(); 44 } 45 } else { 46 $(".topBanner").hide(); 47 } 48 }); 49 50 if (topBannerNum > 1){ 51 var topBanner = new Swiper(".topBannerSwiper", { 52 speed: 600, 53 direction: 'vertical', 54 slidesPerView: 1, 55 spaceBetween: 0, 56 centeredSlides: false, 57 loop: true, 58 autoplay: { 59 delay: 2500, 60 disableOnInteraction: false, 61 }, 62 }); 63 } 64 65 $(".top_closeBtn").click(function(e) { 66 e.preventDefault(); 67 var $topBanner = $(this).closest(".topBanner"); 68 $topBanner.animate({ height: 0, opacity: 0 }, 500, function() { 69 $topBanner.hide(); 70 $('#container').css('padding-top','0'); // ì¬ë°±ë ìëëë¡ 71 }); 72 }); 73 74 75 $(".header_search").click(function(e) { 76 $(".header_searchWrap").fadeIn(); 77 }); 78 79 $(".header_searchWrap .search_close").click(function(e) { 80 $(".header_searchWrap").fadeOut(); 81 }); 82 83 84 // í´ë ë©ë´ 85 let hoverTimer; 86 // ë©ë´ í¸ë² ì ì²ë¦¬ 87 $('#header .navi_list li.has_sub').mouseenter(function(){ 88 clearTimeout(hoverTimer); 89 90 let targetCate = $(this).find('a').attr('data-cate'); 91 $('#header_cover .sub_navi').stop().slideUp(300); 92 $('#' + targetCate).stop().slideDown(300); 93 $('#header_cover').addClass('on'); 94 $('#header').addClass('show'); 95 $(this).addClass('active').siblings().removeClass('active'); 96 }); 97 98 $('#header .navi, #header .my_navi, #header_cover').mouseleave(function(){ 99 hoverTimer = setTimeout(function(){ 100 if (!$('#header_cover:hover, #header .navi:hover, #header .my_navi:hover').length) { 101 $('#header_cover').removeClass('on'); 102 $('#header').removeClass('show'); 103 $('#header .navi_list li').removeClass('active'); 104 $('#header_cover .sub_navi').stop().slideUp(300); 105 } 106 }, 100); 107 }); 108 109 // ë©ë´ ìì ì¬ì§ì ì ì²ë¦¬ 110 $('#header_cover').mouseenter(function(){ 111 clearTimeout(hoverTimer); 112 }); 113 114 //ìííì´ì§ 115 checkDiscount() 116 117 118 $('.main_popup_box .btn_close').click(function(e) { 119 $(this).parents('.main_popup_box').fadeOut(); 120 }); 121 122 123 $(".main_popup_box").each(function () { 124 var popup_id = $(this).attr("id"); 125 var popBannerNum = $("#" + popup_id).find('.swiper-slide').length ; 126 var checkShow = $("#" + popup_id).attr('data-check'); 127 128 if (getCookie(popup_id) != "popDone") { 129 //$("#" + popup_id).show(); 130 if (checkShow == 'Y'){ 131 var popupStartDt = moment($("#" + popup_id).attr('data-start')); // ììì¼ 132 var popupEndDt = moment($("#" + popup_id).attr('data-end')); ///ì¢ ë£ì¼ 133 var nowTime = moment(); 134 135 if(checkShow == 'Y'){ 136 if(nowTime > popupStartDt && nowTime < popupEndDt){ 137 $("#" + popup_id).show(); 138 }else{ 139 $("#" + popup_id).hide(); 140 } 141 } 142 } else { 143 $("#" + popup_id).show(); 144 } 145 146 } 147 148 if (popBannerNum > 1){ 149 var popupSwiper = new Swiper("#"+popup_id+" .main_popup_swiper ", { 150 slidesPerView: 1, 151 loop: true, 152 speed:1000, 153 autoplay: { 154 delay: 5000, 155 disableOnInteraction: false, 156 }, 157 pagination: { 158 el: "#"+popup_id+" .main_popup_swiper .swiper-pagination", 159 clickable: true, 160 }, 161 observer: true, 162 observeParents: true, 163 }); 164 } 165 }); 166 167 $('.btn_today_close').click(function(e) { 168 var popup_id = $(this).parents(".main_popup_box").attr("id"); 169 setCookie(popup_id, "popDone", 1 ); 170 $(this).parents(".main_popup_box").fadeOut(); 171 }); 172 173 174}); 175 176 177 178function checkDiscount(){ 179 $('.RNW_rate').each(function(){ 180 var $this=$(this); 181 var data_arr=($this.attr('data-price') || '^^').split('^'); 182 var custom_price=(data_arr[0] || '').replace(/,/gi,''); 183 var selling_price=(data_arr[1] || '').replace(/,/gi,''); 184 var coupon_price=(data_arr[2] || '').replace(/,/gi,''); 185 var discounted_price = $this.find('.priceSale').text().trim().split(' ')[0].replace(/,/gi,''); 186 187 setRate($this,custom_price,selling_price,discounted_price, coupon_price); 188 189 var salePrice = $this.find('.priceSale').text(); 190 $this.removeClass('noneSale hasSale'); 191 192 if(salePrice == ''){ 193 $this.addClass('noneSale') 194 } else { 195 $this.addClass('hasSale'); 196 } 197 198 var couPrice = $this.find('.priceOri .cou'); 199 if(!couPrice.hasClass('displaynone')){ 200 $this.addClass('couSale') 201 } 202 }); 203} 204 205 206function setRate(_this, _custom_price, _selling_price, _discounted_price, _coupon_price) { 207 var $this = _this; 208 209 var basePrice = parseFloat(_custom_price); 210 if (isNaN(basePrice) || basePrice === 0) { 211 basePrice = parseFloat(_selling_price); 212 } 213 214 var finalPrice = parseFloat(_coupon_price); 215 216 if (isNaN(finalPrice) || finalPrice === 0) { 217 finalPrice = parseFloat(_discounted_price); 218 } 219 if (isNaN(finalPrice) || finalPrice === 0) { 220 finalPrice = parseFloat(_selling_price); 221 } 222 223 var rate = 0; 224 225 if (!isNaN(basePrice) && basePrice > 0 && !isNaN(finalPrice)) { 226 rate = 100 - Math.round(finalPrice / basePrice * 100); 227 } 228 229 if (rate > 0) { 230 $this.find('.RNW_per').addClass('on').find('.per').html(rate + '<i>%</i>'); 231 } else { 232 $this.find('.RNW_per').removeClass('on').find('.per').empty(); 233 } 234} 235 236 237 238 239function setCookie(name, value, expiredays) { 240 var today = new Date(); 241 today.setDate(today.getDate() + expiredays); 242 243 document.cookie = name + '=' + escape(value) + '; path=/; expires=' + today.toGMTString() + ';' 244} 245 246function getCookie(name) { 247 var cName = name + "="; 248 var x = 0; 249 while (x <= document.cookie.length) 250 { 251 var y = (x + cName.length); 252 if (document.cookie.substring(x, y) == cName) 253 { 254 if ((endOfCookie = document.cookie.indexOf(";", y)) == -1) 255 endOfCookie = document.cookie.length; 256 return unescape(document.cookie.substring(y, endOfCookie)); 257 } 258 x = document.cookie.indexOf(" ", x) + 1; 259 if (x == 0) 260 break; 261 } 262 return ""; 263} 264 265 266 267//ì¹´í ê³ ë¦¬ ë©ë´ ê´ë¦¬ 268$(function(){ 269 var methods = { 270 aCategory : [], 271 aSubCategory : {}, 272 273 get: function() 274 { 275 $.ajax({ 276 url : '/exec/front/Product/SubCategory', 277 dataType: 'json', 278 success: function(aData) { 279 if (aData == null || aData == 'undefined') return; 280 for (var i=0; i<aData.length; i++) 281 { 282 var sParentCateNo = aData[i].parent_cate_no; 283 284 if (!methods.aSubCategory[sParentCateNo]) { 285 methods.aSubCategory[sParentCateNo] = []; 286 } 287 288 methods.aSubCategory[sParentCateNo].push( aData[i] ); 289 } 290 // AJAX ì±ê³µ í ë°ë¡ ìë¸ ë©ë´ íì 291 methods.showAll(); 292 } 293 }); 294 }, 295 296 getParam: function(sUrl, sKey) { 297 var aUrl = sUrl.split('?'); 298 var sQueryString = aUrl[1]; 299 var aParam = {}; 300
301 if (sQueryString) { 302 var aFields = sQueryString.split("&"); 303 var aField = []; 304 for (var i=0; i<aFields.length; i++) { 305 aField = aFields[i].split('='); 306 aParam[aField[0]] = aField[1]; 307 } 308 } 309 return sKey ? aParam[sKey] : aParam; 310 }, 311 312 getParamSeo: function(sUrl) { 313 var aUrl = sUrl.split('/'); 314 return aUrl[3] ? aUrl[3] : null; 315 }, 316 317 show: function(overNode, iCateNo) { 318 if (methods.aSubCategory.hasOwnProperty(iCateNo) === false) { 319 return; 320 } 321 322 var aHtml = []; 323 aHtml.push('<ul>'); 324 $(methods.aSubCategory[iCateNo]).each(function() { 325 aHtml.push('<li><a href="'+this.link_product_list+'">'+this.name+'</a></li>'); 326 }); 327 aHtml.push('</ul>'); 328 329 $('<div class="sub_category"></div>').appendTo(overNode).html(aHtml.join('')) 330 }, 331 332 // 모ë ì¹´í ê³ ë¦¬ì ëí´ ìë¸ ë©ë´ë¥¼ íìíê³ has_sub í´ëì¤ ì¶ê° 333 showAll: function() { 334 $('.xans-layout-category li').each(function() { 335 var $this = $(this), // 'on' ì ê±° 336 iCateNo = Number(methods.getParam($this.find('a').attr('href'), 'cate_no')); 337 338 if (!iCateNo) { 339 iCateNo = Number(methods.getParamSeo($this.find('a').attr('href'))); 340 } 341 342 if (iCateNo) { 343 if (methods.aSubCategory.hasOwnProperty(iCateNo) && methods.aSubCategory[iCateNo].length > 0) { 344 $this.addClass('has_sub'); 345 if ($this.find('.sub_category').length == 0) { 346 methods.show($this, iCateNo); 347 } 348 } 349 } 350 }); 351 } 352 }; 353 354 // íì´ì§ ë¡ë ì ë°ì´í° ê°ì ¸ì¤ê¸° 355 methods.get(); 356}); 357 358 359 360/* í¤ë ì¤í¬ë¡¤ ê³ ì */ 361$(document).ready(function(){ 362 var top_btn = $("#header").offset().top; 363 $(window).scroll(function(){ 364 if($(window).scrollTop() > top_btn+40) { 365 $('#header').addClass('header_fixed'); 366 $('#header_cover').addClass('header_fixed'); 367 } 368 else { 369 $('#header').removeClass('header_fixed'); 370 $('#header_cover').removeClass('header_fixed'); 371 } 372 }); 373}); 374 375/* íìê°ì íµíµë°°ë */ 376$(window).ready(function() { 377 function loop() { 378 $('#tong').animate ({ top: '+=5' }, 250) 379 .animate({ top: '-=5' }, 250) 380 .animate({ top: '+=5' }, 250) 381 .animate({ top: '-=5' }, 250) 382 .animate({top:30}, 500, function() { 383 loop(); 384 }); 385 } 386 loop(); 387}); 388 389$('#videoPlayer').click(function() { 390 $(this).toggleClass("on"); 391 if($(this).hasClass("on")){ 392 $("#video")[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}','*'); 393 //$(this).css("z-index","1"); 394 }else{ 395 $("#video")[0].contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}','*'); 396 //$(this).css("z-index","-1"); 397 } 398}); 399 400/* ê²ìì°½ ë ¸ì¶ */ 401$(document).ready(function(){ 402 $("#header .search").click(function(){ 403 $(".searchWrap").fadeToggle(); 404 $('#header .search').toggleClass('search_close'); 405 }); 406}); 407 408/* ì¹´í ê³ ë¦¬ */ 409$(document).ready(function(){ 410 411 //category 412 var aCategory = {}; 413 function get() { 414 $.ajax({ 415 url : '/exec/front/Product/SubCategory', 416 dataType: 'json', 417 success: function(_aCategory) { 418 $(_aCategory).each(function() { 419 if (!aCategory[this.parent_cate_no]) { 420 aCategory[this.parent_cate_no] = []; 421 } 422 aCategory[this.parent_cate_no].push(this); 423 }); 424 draw(); 425 } 426 }); 427 } 428 function draw() { 429 var _iCateNo = 0; 430 var _aTmp = []; 431 $('#categoryMenu .menu-dp1 > li:not(".bbs") > a').each(function() { 432 _aTmp = $(this).attr('href').split('?cate_no='); 433 _iCateNo = _aTmp[1]; 434 if(!aCategory[_iCateNo]) { 435 return; 436 } 437 var aHtml = []; 438 aHtml.push('<ul class="menu-dp2">'); 439 for(var i=0; i<aCategory[_iCateNo].length; i++) { 440 aHtml.push('<li><a href="/product/list.html'+aCategory[_iCateNo][i].param+'">'+aCategory[_iCateNo][i].name+'</a></li>'); 441 } 442 aHtml.push('</ul>'); 443 $(this).parent('.menu-dp1 > li').append(aHtml.join('')); 444 445 $(this).siblings('.menu-dp2').find(' > li > a').each(function() { 446 _aTmp = $(this).attr('href').split('?cate_no='); 447 _iCateNo = _aTmp[1]; 448 if(!aCategory[_iCateNo]) { 449 return; 450 } 451 var aHtml = []; 452 aHtml.push('<ul class="menu-dp3">'); 453 for(var i=0; i<aCategory[_iCateNo].length; i++) { 454 aHtml.push('<li><a href="/product/list.html'+aCategory[_iCateNo][i].param+'">'+aCategory[_iCateNo][i].name+'</a></li>'); 455 } 456 aHtml.push('</ul>'); 457 $(this).parent('li').append(aHtml.join('')); 458 459 $(this).siblings('.menu-dp3').find(' > li > a').each(function() { 460 _aTmp = $(this).attr('href').split('?cate_no='); 461 _iCateNo = _aTmp[1]; 462 if(!aCategory[_iCateNo]) { 463 return; 464 } 465 var aHtml = []; 466 aHtml.push('<ul class="menu-dp4">'); 467 for(var i=0; i<aCategory[_iCateNo].length; i++) { 468 aHtml.push('<li><a href="/product/list.html'+aCategory[_iCateNo][i].param+'">'+aCategory[_iCateNo][i].name+'</a></li>'); 469 } 470 aHtml.push('</ul>'); 471 $(this).parent('li').append(aHtml.join('')); 472 }); 473 }); 474 }); 475 } 476 get(); 477}); 478 479/* ë©ì¸ì¬ë¼ì´ë ì¬ì,ì ì§ */ 480$('.start').on('click', function() { 481 main_swiper.autoplay.start(); 482 return false;
483}); 484 485$('.stop').on('click', function() { 486 main_swiper.autoplay.stop(); 487 return false; 488}); 489 490 491/* íì ë«ê¸° */ 492$(document).ready(function(){ 493 $('.popupWrap .popup_closeBtn').click(function(){ 494 $('.popupWrap').css({ 495 'bottom': '-100%' 496 }); 497 }); 498}); 499 500 501/* ìì¸íì´ì§ ìì½ëì¸ */ 502$(document).ready(function(){ 503 $(".infoBox > .cont > h3").click(function(){ 504 $(".infoBox > .cont > h3").removeClass('on'); 505 $(".infoBox > .cont > .info").slideUp(); 506 if(!$(this).next().is(":visible")) 507 { 508 $(this).addClass('on').next().slideDown(); 509 } 510 }) 511}); 512 513 514/* ì¤í¬ë¡¤ì ëíëë ì°ì¸¡ íë¨ë²í¼ */ 515$(document).ready(function(){ 516 $(window).scroll(function () { 517 if ($(this).scrollTop() > 10) { 518 $('.fixed_btn').fadeIn(); 519 } else { 520 $('.fixed_btn').fadeOut(); 521 } 522 }); 523 524 $(".btn.up").click(function(){ 525 return $("html, body").animate({scrollTop:0},1200,"easeInOutExpo"),!1}); 526 527 $(".btn.down").click(function(){ 528 return $("html, body").animate({scrollTop:$(document).height()},1200,"easeInOutExpo"),!1}); 529}); 530 531 532jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}}); 533/*! Respond.js v1.4.2: min/max-width media query polyfill 534 * Copyright 2014 Scott Jehl 535 * Licensed under MIT 536 * http://j.mp/respondjs */ 537/** 538 * ìì§ì´ë ë°°ë Jquery Plug-in 539 * @author cafe24 540 */ 541 542(function($){ 543 544 $.fn.floatBanner = function(options) { 545 options = $.extend({}, $.fn.floatBanner.defaults , options); 546 547 return this.each(function() { 548 var aPosition = $(this).position(); 549 var jbOffset = $(this).offset(); 550 var node = this; 551 552 $(window).on('scroll', function() { 553 var _top = $(document).scrollTop() + 120; 554 _top = (aPosition.top < _top) ? _top : aPosition.top; 555 556 setTimeout(function () { 557 var newinit = $(document).scrollTop(); 558 559 if ( newinit >
559 jbOffset.top ) { 560 _top -= jbOffset.top; 561 var container_height = $("#wrap").height(); 562 var quick_height = $(node).height(); 563 var cul = container_height - quick_height; 564 if(_top > cul){ 565 _top = cul; 566 } 567 } else { 568 _top = 0; 569 } 570 571 $(node).stop().animate({top: _top}, options.animate); 572 }, options.delay); 573 }); 574 }); 575 }; 576 577 $.fn.floatBanner.defaults = { 578 'animate' : 500, 579 'delay' : 500 580 }; 581 582})(jQuery); 583 584/** 585 * 문ì 구ëí ìì 586 */ 587$(function(){ 588 $('#banner:visible, #quick:visible').floatBanner(); 589 590 //placeholder 591 $(".ePlaceholder input, .ePlaceholder textarea").each(function(i){ 592 var placeholderName = $(this).parents().attr('title'); 593 $(this).attr("placeholder", placeholderName); 594 }); 595 /* placeholder ie8, ie9 */ 596 $.fn.extend({ 597 placeholder : function() { 598 //IE 8 ë²ì ìë hasPlaceholderSupport() ê°ì´ false를 ë¦¬í´ 599 if (hasPlaceholderSupport() === true) { 600 return this; 601 } 602 //hasPlaceholderSupport() ê°ì´ false ì¼ ê²½ì° ìë ì½ë를 ì¤í 603 return this.each(function(){ 604 var findThis = $(this); 605 var sPlaceholder = findThis.attr('placeholder'); 606 if ( ! sPlaceholder) { 607 return; 608 } 609 findThis.wrap('<label class="ePlaceholder" />'); 610 var sDisplayPlaceHolder = $(this).val() ? ' style="display:none;"' : ''; 611 findThis.before('<span' + sDisplayPlaceHolder + '>' + sPlaceholder + '</span>'); 612 this.onpropertychange = function(e){ 613 e = event || e; 614 if (e.propertyName == 'value') { 615 $(this).trigger('focusout'); 616 } 617 }; 618 //ê³µíµ class 619 var agent = navigator.userAgent.toLowerCase(); 620 if (agent.indexOf("msie") != -1) { 621 $(".ePlaceholder").css({"position":"relative"}); 622 $(".ePlaceholder span").css({"position":"absolute", "padding":"0 4px", "color":"#878787"}); 623 $(".ePlaceholder label").css({"padding":"0"}); 624 } 625 }); 626 } 627 }); 628 629 $(':input[placeholder]').placeholder(); //placeholder() í¨ì를 í¸ì¶ 630 631 //í´ë¦íë©´ placeholder ì¨ê¹ 632 $('body').on('click', '.ePlaceholder span', function(){ 633 $(this).hide(); 634 }); 635 636 //inputì°½ í¬ì»¤ì¤ ì¸ ì¼ë placeholder ì¨ê¹ 637 $('body').on('focusin', '.ePlaceholder :input', function(){ 638 $(this).prev('span').hide(); 639 }); 640 641 //inputì°½ í¬ì»¤ì¤ ìì ì¼ë value ê° true ì´ë©´ ì¨ê¹, false ì´ë©´ ë³´ì¬ì§ 642 $('body').on('focusout', '.ePlaceholder :input', function(){ 643 if (this.value) { 644 $(this).prev('span').hide(); 645 } else { 646 $(this).prev('span').show(); 647 } 648 }); 649 650 //inputì placeholderê° ì§ìì´ ëë©´ true를 ìëë©´ false를 리í´ê°ì¼ë¡ ëì ¸ì¤ 651 function hasPlaceholderSupport() { 652 if ('placeholder' in document.createElement('input')) { 653 return true; 654 } else { 655 return false; 656 } 657 } 658}); 659 660/** 661 * ì¸ë¤ì¼ ì´ë¯¸ì§ ìë°ì¼ê²½ì° ê¸°ë³¸ê° ì¤ì 662 */ 663$(window).on('load', function() { 664 $("img.thumb,img.ThumbImage,img.BigImage").each(function($i,$item){ 665 var $img = new Image(); 666 $img.onerror = function () { 667 $item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif"; 668 } 669 $img.src = this.src; 670 }); 671}); 672 673/** 674 * tooltip 675 */ 676$('.eTooltip').each(function(i){ 677 $(this).find('.btnClose').attr('tabIndex','-1'); 678}); 679//tooltip input focus 680$('.eTooltip').find('input').on('focus', function() { 681 var targetName = returnTagetName(this); 682 targetName.siblings('.ec-base-tooltip').show(); 683}); 684$('.eTooltip').find('input').on('focusout', function() { 685 var targetName = returnTagetName(this); 686 targetName.siblings('.ec-base-tooltip').hide(); 687}); 688function returnTagetName(_this){ 689 var ePlacename = $(_this).parent().attr("class"); 690 var targetName; 691 if(ePlacename == "ePlaceholder"){ //ePlaceholder ëì 692 targetName = $(_this).parents(); 693 }else{ 694 targetName = $(_this); 695 } 696 return targetName; 697} 698
699/** 700 * eTab 701 */ 702$("body").on("click", ".eTab a", function(e){ 703 // í´ë¦í li ì selected í´ëì¤ ì¶ê°, 기존 liì ìë selected í´ëì¤ë ìì . 704 var _li = $(this).parent("li").addClass("selected").siblings().removeClass("selected"), 705 _target = $(this).attr("href"), 706 _siblings = $(_target).attr("class"), 707 _arr = _siblings.split(" "), 708 _classSiblings = "."+_arr[0]; 709 710 //í´ë¦í íì í´ë¹íë ììë íì±í, 기존 ììë ë¹íì±í í¨. 711 $(_target).show().siblings(_classSiblings).hide(); 712 713 714 //preventDefault ë a íê·¸ ì²ë¼ í´ë¦ ì´ë²¤í¸ ì¸ì ë³ëì ë¸ë¼ì°ì íëì ë§ê¸° ìí´ ì¬ì©ë¨. 715 e.preventDefault(); 716}); 717 718 719 720//window popup script 721function winPop(url) { 722 window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no"); 723} 724/** 725 * document.location.href split 726 * return array Param 727 */ 728function getQueryString(sKey) 729{ 730 var sQueryString = document.location.search.substring(1); 731 var aParam = {}; 732 733 if (sQueryString) { 734 var aFields = sQueryString.split("&"); 735 var aField = []; 736 for (var i=0; i<aFields.length; i++) { 737 aField = aFields[i].split('='); 738 aParam[aField[0]] = aField[1]; 739 } 740 } 741 742 aParam.page = aParam.page ? aParam.page : 1; 743 return sKey ? aParam[sKey] : aParam; 744}; 745 746$(function(){ 747 // tab 748 $.eTab = function(ul){ 749 $(ul).find('a').on('click', function(){ 750 var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'), 751 _target = $(this).attr('href'), 752 _siblings = '.' + $(_target).attr('class'); 753 $(_target).show().siblings(_siblings).hide(); 754 return false 755 }); 756 } 757 if ( window.call_eTab ) { 758 call_eTab(); 759 }; 760}); 761(function($){ 762 $.fn.extend({ 763 center: function() { 764 this.each(function() { 765 var 766 $this = $(this), 767 $w = $(window); 768 $this.css({ 769 position: "absolute", 770 top: ~~(($w.height() - $this.outerHeight()) / 2) + $w.scrollTop() + "px", 771 left: ~~(($w.width() - $this.outerWidth()) / 2) + $w.scrollLeft() + "px" 772 }); 773 }); 774 return this; 775 } 776 }); 777 $(function() { 778 var $container = function(){/* 779 <div id="modalContainer"> 780 <iframe id="modalContent" scroll="0" scrolling="no" frameBorder="0"></iframe> 781 </div>'); 782 */}.toString().slice(14,-3); 783 $('body') 784 .append($('<div id="modalBackpanel"></div>')) 785 .append($($container)); 786 function closeModal () { 787 $('#modalContainer').hide(); 788 $('#modalBackpanel').hide(); 789 } 790 $('#modalBackpanel').on('click',closeModal); 791 zoom = function ($piProductNo, $piCategoryNo, $piDisplayGroup) { 792 var $url = '/product/image_zoom.html?product_no=' + $piProductNo + '&cate_no=' + $piCategoryNo + '&display_group=' + $piDisplayGroup; 793 $('#modalContent').attr('src', $url); 794 $('#modalContent').on("load",function(){ 795 $(".header .close",this.contentWindow.document.body).on("click", closeModal); 796 }); 797 $('#modalBackpanel').css({width:$("body").width(),height:$("body").height(),opacity:.4}).show(); 798 $('#modalContainer').center().show(); 799 } 800 }); 801})(jQuery); 802$(function(){ 803 if (typeof(EC_SHOP_MULTISHOP_SHIPPING) != "undefined") { 804 var sShippingCountryCode4Cookie = 'shippingCountryCode'; 805 var bShippingCountryProc = false; 806 807 // ë°°ì¡êµê° ì í ì¤ì ì´ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 808 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) { 809 $('.xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist').hide(); 810 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptioncountry').hide(); 811 } else { 812 $('.thumb .xans-layout-multishoplistitem').hide(); 813 var aShippingCountryCode = document.cookie.match('(^|;) ?'+sShippingCountryCode4Cookie+'=([^;]*)(;|$)'); 814 if (typeof(aShippingCountryCode) != 'undefined' && aS
814hippingCountryCode != null && aShippingCountryCode.length > 2) { 815 var sShippingCountryValue = aShippingCountryCode[2]; 816 } 817 818 // query stringì¼ë¡ ëì´ ì¨ ë°°ì¡êµê° ê°ì´ ìë¤ë©´, ê·¸ ê°ì ì ì©í¨ 819 var aHrefCountryValue = decodeURIComponent(location.href).split("/?country="); 820 821 if (aHrefCountryValue.length == 2) { 822 var sShippingCountryValue = aHrefCountryValue[1]; 823 } 824 825 // ë©ì¸ íì´ì§ìì êµê°ì íì ìí ê²½ì°, ê·¸ ì¸ì íì´ì§ìì ì í ë ê°ì´ ì ëì¤ë íì ì²ë¦¬ 826 if (location.href.split("/").length != 4 && $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()) { 827 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 828 829 if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { 830 $("#f_country").val($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); 831 } 832 } 833 if (typeof(sShippingCountryValue) != "undefined" && sShippingCountryValue != "" && sShippingCountryValue != null) { 834 sShippingCountryValue = sShippingCountryValue.split("#")[0]; 835 var bShippingCountryProc = true; 836 837 $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); 838 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 839 var expires = new Date(); 840 expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30ì¼ê° ì¿ í¤ ì ì§ 841 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); 842 if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { 843 $("#f_country").val(sShippingCountryValue).change(); 844 } 845 } 846 } 847 // ì¸ì´ì í ì¤ì ì´ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 848 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingLanguageSelection === false) { 849 $('.xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist').hide(); 850 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptionlanguage').hide(); 851 } else { 852 $('.thumb .xans-layout-multishoplistitem').hide(); 853 } 854 855 // ë°°ì¡êµê° ë° ì¸ì´ ì¤ì ì´ ë ë¤ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 856 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShipping === false) { 857 $(".xans-layout-multishopshipping").hide(); 858 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption').hide(); 859 } else if (bShippingCountryProc === false && location.href.split("/").length == 4) { // ë°°ì¡êµê° ê°ì ì²ë¦¬í ì ì´ ìê³ , ë©ì¸íë©´ì¼ ëë§ ì í ë ì´ì´ë¥¼ ëì 860 var sShippingCountryValue = $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(); 861 $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); 862 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 863 // ë°°ì¡êµê° ì íì ì¬ì©í´ì¼ ë ì´ì´ë¥¼ ë³´ì´ê² í¨ 864 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === true) { 865 $(".xans-layout-multishopshipping").show(); 866 } 867 } 868 869 $(".xans-layout-multishopshipping .close").on("click", function() { 870 $(".xans-layout-multishopshipping").hide(); 871 }); 872 873 $(".xans-layout-multishopshipping .ec-base-button a").on("click", function() { 874 var expires = new Date(); 875 expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30ì¼ê° ì¿ í¤ ì ì§ 876 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); 877 878 // ëë©ì¸ 문ì ë¡ ì¿ í¤ë¡ ë°°ì¡êµê° ì¤ì ì´ ì ëë ê²½ì°ë¥¼ ìí´ query stringì¼ë¡ ë°°ì¡êµê° ê°
878ì ëê¹ 879 var sQuerySting = (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) ? "" : "/?country="+encodeURIComponent($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); 880 881 location.href = '//'+$(".xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist").val()+sQuerySting; 882 }); 883 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a").on("click", function() { 884 $(".xans-layout-multishopshipping").show(); 885 }); 886 } 887});
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.