1 /** 2 * 모ë°ì¼ì¼í몰 ì¬ë¼ì´ë©ë©ë´ */ 3var aCategory = []; 4$(document).ready(function(){ 5 /* $('#header').append('<div id="dimmedSlider"></div>'); */ 6 var methods = { 7 aCategory : [], 8 aSubCategory : {}, 9 get: function() 10 { 11 $.ajax({ 12 url : '/exec/front/Product/SubCategory', 13 dataType: 'json', 14 success: function(aData) { 15 if (aData == null || aData == 'undefined') { 16 methods.checkSub(); 17 return; 18 } 19 for (var i=0; i<aData.length; i++) 20 { 21 var sParentCateNo = aData[i].parent_cate_no; 22 var sCateNo = aData[i].cate_no; 23 if (!methods.aSubCategory[sParentCateNo]) { 24 methods.aSubCategory[sParentCateNo] = []; 25 } 26 if (!aCategory[sCateNo]) { 27 aCategory[sCateNo] = []; 28 } 29 methods.aSubCategory[sParentCateNo].push( aData[i] ); 30 aCategory[sCateNo] = aData[i]; 31 } 32 methods.checkSub(); 33 methods.getMyCateList(); 34 } 35 }); 36 }, 37 getParam: function(sUrl, sKey) { 38 if (typeof sUrl !== 'string') return; 39 var aUrl = sUrl.split('?'); 40 var sQueryString = aUrl[1]; 41 var aParam = {}; 42 if (sQueryString) { 43 var aFields = sQueryString.split("&"); 44 var aField = []; 45 for (var i=0; i<aFields.length; i++) { 46 aField = aFields[i].split('='); 47 aParam[aField[0]] = aField[1]; 48 } 49 } 50 return sKey ? aParam[sKey] : aParam; 51 }, 52 53 show: function(overNode, iCateNo) { 54 var oParentNode = overNode; 55 var aHtml = []; 56 var sMyCateList = localStorage.getItem("myCateList"); 57 if (methods.aSubCategory[iCateNo] != undefined) { 58 aHtml.push('<ul class="slideSubMenu">'); 59 $(methods.aSubCategory[iCateNo]).each(function() { 60 var sNextParentNo = this.cate_no; 61 var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 62 if (methods.aSubCategory[sNextParentNo] == undefined) { 63 aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 64 var sHref = '/product/list.html'+this.param; 65 } else { 66 aHtml.push('<li id="cate'+this.cate_no+'">'); 67 var sHref = '#none'; 68 } 69 aHtml.push('<a href="'+sHref+'" class="cate" cate="'+this.param+'" onclick="subMenuEvent(this);">'+this.name+'</a>'); 70 if (methods.aSubCategory[sNextParentNo] != undefined) aHtml.push('<a href="/product/list.html'+this.param+'" class="view">all</a>'); 71 72 if (methods.aSubCategory[sNextParentNo] != undefined) { 73 aHtml.push('<ul>'); 74 $(methods.aSubCategory[sNextParentNo]).each(function() { 75 var sNextParentNo2 = this.cate_no; 76 var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 77 if (methods.aSubCategory[sNextParentNo2] == undefined) { 78 aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 79 var sHref = '/product/list.html'+this.param; 80 } else { 81 aHtml.push('<li id="cate'+this.cate_no+'">'); 82 var sHref = '#none'; 83 } 84 aHtml.push('<a href="'+sHref+'" class="cate" cate="'+this.param+'" onclick="subMenuEvent(this);">'+this.name+'</a>'); 85 if (methods.aSubCategory[sNextParentNo] != undefined) aHtml.push('<a href="/product/list.html'+this.param+'" class="view">all</a>'); 86 if (methods.aSubCategory[sNextParentNo2] != undefined) { 87 aHtml.push('<ul>'); 88 89 $(methods.aSubCategory[sNextParentNo2]).each(function() { 90 aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 91 var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 92 aHtml.push('<a href="/product/list.html'+this.param+'" class="cate" cate="'+this.param+'" onclick="subMenuEvent(this);">'+this.name+'</a>'); 93 aHtml.push('</li>'); 94 }); 95 aHtml.push('</ul>'); 96 } 97 aHtml.push('</li>'); 98 }); 99 aHtml.push('</ul>'); 100 } 101 aHtml.push('</li>'); 102 }); 103 aHtml.push('</ul>'); 104 } 105 $(oParentNode).append(aHtml.join('')); 106 }, 107 close: function() { 108 $('.slideSubMenu').remove(); 109 }, 110 checkSub: function() { 111 $('.cate').each(function(){ 112 var sParam = $(this).attr('cate'); 113 if (!sParam) return; 114 var iCateNo = Number(methods.getParam(sParam, 'cate_no')); 115 var result = methods.aSubCategory[iCateNo]; 116 if (result == undefined) { 117 if ($(this).closest('#slideProjectList').length) { 118 var sHref = '/product/project.html'+sParam; 119 } else { 120 var sHref = '/product/list.html'+sParam; 121 } 122 123 $(this).attr('href', sHref); 124 $(this).parent().attr('class', 'noChild'); 125 } 126 }); 127 }, 128 getMyCateList :function() { 129 var sMyCateList = localStorage.getItem("myCateList"); 130 if (sMyCateList != null && sMyCateList != "") { 131 var aTempList = sMyCateList.split("|"); 132 var aHtml = []; 133 for (var i = 0; i < aTempList.length; i++) { 134 if (aTempList[i] != "") { 135 var iCateNo = aTempList[i]; 136 var sCateName = aCategory[iCateNo].name; 137 var sCateParam = aCategory[iCateNo].param; 138 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>'); 139 $("#cate"+iCateNo+" #icoBookmark").addClass("selected"); 140 } 141 } 142 $('#bookmartCateArea').append('<ul>'+aHtml.join('')+'</ul>'); 143 } 144 chkMyCateList(); 145 } 146 }; 147 148 var offCover = { 149 init : function() { 150 $(function() {
151 $('').append('<a href="#container" id="btnFoldLayout">ë©ë´ í ê¸</a>'); 152 offCover.resize(); 153 $(window).resize(function(){ 154 offCover.resize(); 155 }); 156 }); 157 }, 158 layout : function(){ 159 if ($('html').hasClass('expand')) { 160 $('#btnFoldLayout').show(); 161 $('#aside').css({'visibility':'visible', 'display':'block'}); 162 $('html, body').css({"overflow-x":""}) 163 164 setTimeout(function(){ 165 $('#btnFoldLayout').css({'background':'rgba(0,0,0,0.7)'}); 166 }, 350); 167 } else { 168 $('#btnFoldLayout').hide(); 169 $('#aside').css({'z-index':0}); 170 setTimeout(function(){ 171 $('#aside').css({'visibility':'', 'display':'none'}); 172 }, 300); 173 } 174 $('#aside').css({'visibility':'visible'}); 175 }, 176 resize : function(){ 177 var height = $('body').height(); 178 } 179 }; 180 methods.get(); 181 182 offCover.init(); 183 184 185 $('#header .fold, #aside .btnClose').click(function(e){ 186 $('#dimmedSlider').toggle(); 187 $('html').toggleClass('expand'); 188 offCover.layout(); 189 e.preventDefault(); 190 }); 191 192 $('#btnFoldLayout').click(function(e){ 193 $('#header .fold').trigger('click'); 194 e.preventDefault(); 195 }); 196 197 $('#slideCateList li > a.cate').click(function(e) { 198 var sParam = $(this).attr('cate'); 199 if (!sParam) return; 200 var iCateNo = Number(methods.getParam(sParam, 'cate_no')); 201 if ($(this).parent().attr('class') == 'xans-record- selected') { 202 methods.close(); 203 } else { 204 if (!iCateNo) return; 205 $('#aside #slideCateList li').removeClass('selected'); 206 methods.close(); 207 methods.show(this.parentNode, iCateNo); 208 } 209 }); 210 211 $('#aside ul a.cate').click(function(e){ 212 $(this).parent().find('li').removeClass('selected'); 213 $(this).parent().toggleClass('selected'); 214 if (!$(this).parent('li').hasClass('noChild')){ 215 e.preventDefault(); 216 } 217 }); 218 219 $("#icoBookmark").live('click', function() { 220 var sParam = $(this).parent().find('a').attr('cate'); 221 if (!sParam) return; 222 var iCateNo = Number(methods.getParam(sParam, 'cate_no')); 223 setMyCateList(iCateNo, $(this)); 224 }); 225 226 $('#slideCateList h2').click(function() { 227 var oParentId = $(this).parent().attr('id'); 228 if (oParentId == 'slideCateList' || oParentId == 'slideMultishopList' || oParentId == 'slideProjectList') { 229 ($(this).attr('class') == 'selected') ? $(this).next().hide() : $(this).next().show(); 230 } else if (oParentId == 'bookmarkCategory') { 231 if ($(this).attr('class') == 'selected') { 232 $(this).parent().find('#bookmarkEmpty').hide(); 233 $(this).parent().find('#bookmartCateArea').hide(); 234 } else { 235 chkMyCateList(); 236 $(this).parent().find('#bookmartCateArea').show(); 237 } 238 } 239 $(this).toggleClass('selected'); 240 }); 241}); 242function subMenuEvent(obj) { 243 $(obj).parent().find('li').removeClass('selected'); 244 $(obj).parent().toggleClass('selected'); 245} 246function setMyCateList(iCateNo, oObj) { 247 $(oObj).toggleClass('selected'); 248 var sMyCateList = localStorage.getItem("myCateList"); 249 var aCateList = []; 250 if (checkInArray(sMyCateList, iCateNo) == true) { 251 var aTemp = sMyCateList.split("|"); 252 for (var i = 0 ; i < aTemp.length ; i++) { 253 if (aTemp[i] != iCateNo) { 254 aCateList.push(aTemp[i]); 255 } 256 } 257 var sCateList = aCateList.join('|'); 258 localStorage.setItem("myCateList" , sCateList); 259 $('#bookmartCateArea #bookmark'+iCateNo).remove(); 260 if (aCateList.length == 0) { 261 $('#bookmarkCategory #bookmartCateArea').find('ul').remove(); 262 } 263 $("#cate"+iCateNo+" > #icoBookmark").removeClass("selected"); 264 } else { 265 var sCateName = aCategory[iCateNo].name; 266 var sCateParam = aCategory[iCateNo].param; 267 var sHtml = ''; 268 if (sMyCateList == null || sMyCateList == '') { 269 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>' 270 $('#bookmarkCategory #bookmartCateArea').append(sHtml); 271 } else { 272 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>' 273 $('#bookmarkCategory #bookmartCateArea ul').append(sHtml); 274 } 275 $(this).addClass('selected'); 276 if (sMyCateList == null || sMyCateList == '') { 277 localStorage.setItem('myCateList' , iCateNo); 278 } else { 279 localStorage.setItem('myCateList' , sMyCateList + '|' + iCateNo); 280 } 281 } 282 chkMyCateList(); 283}
284function checkInArray(sBookmarkList, iCateNo) { 285 if (sBookmarkList == null) return false; 286 var aBookmarkList = sBookmarkList.split("|"); 287 for (var i = 0; i < aBookmarkList.length; i++) { 288 if (aBookmarkList[i] == iCateNo) { 289 return true; 290 } 291 } 292 return false; 293} 294function chkMyCateList() { 295 var sMyCateList = localStorage.getItem("myCateList"); 296 if (sMyCateList == null || sMyCateList == '') { 297 $('#bookmarkEmpty').show(); 298 } else { 299 $('#bookmarkEmpty').hide(); 300 } 301} 302$( document ).ready( function() { 303 304 console.log("menuBox Ready"); 305 306 $('button.toggle').click( function() { 307 $( '.menuBox .searchArea' ).animate( { 308 opacity: '1' 309 }, 100, function() { 310 $( '.menuBox ul li.m0:nth-child(1)' ).animate( { 311 opacity: '1' 312 }, 100, function() { 313 $( '.menuBox ul li.m0:nth-child(2)' ).animate( { 314 opacity: '1' 315 }, 100, function() { 316 $( '.menuBox ul li.m0:nth-child(3)' ).animate( { 317 opacity: '1' 318 }, 100, function() { 319 $( '.menuBox ul li.m0:nth-child(4)' ).animate( { 320 opacity: '1' 321 }, 100, function() { 322 $( '.bottomBox .smenu' ).animate( { 323 opacity: '1' 324 }, 100, function() { 325 $( '.bottomBox ul.ssmenu' ).animate( { 326 opacity: '1' 327 }, 100 ); 328 } ); 329 } ); 330 } ); 331 } ); 332 } ); 333 } ); 334 } ); 335 336 $('.jPushMenuBtn').click( function() { 337 $( '.menuBox .searchArea').css('opacity','0'); 338 $( '.menuBox ul li.m0:nth-child(1)').css('opacity','0'); 339 $( '.menuBox ul li.m0:nth-child(2)').css('opacity','0'); 340 $( '.menuBox ul li.m0:nth-child(3)').css('opacity','0'); 341 $( '.menuBox ul li.m0:nth-child(4)').css('opacity','0'); 342 $( '.bottomBox .smenu' ).css('opacity','0'); 343 $( '.bottomBox ul.ssmenu' ).css('opacity','0'); 344 } ); 345 346 347 $('.menuShop').click( function() { 348 $(this).toggleClass('shopOn'); 349 $( '.shopCategotyList li:nth-child(1)' ).animate( { 350 opacity: '1' 351 }, 100, function() { 352 $( '.shopCategotyList li:nth-child(2)' ).animate( { 353 opacity: '1' 354 }, 100, function() { 355 $( '.shopCategotyList li:nth-child(3)' ).animate( { 356 opacity: '1' 357 }, 100, function() { 358 $( '.shopCategotyList li:nth-child(4)' ).animate( { 359 opacity: '1' 360 }, 100, function() { 361 $( '.shopCategotyList li:nth-child(5)' ).animate( { 362 opacity: '1' 363 }, 100, function() { 364 $( '.shopCategotyList li:nth-child(6)' ).animate( { 365 opacity: '1' 366 }, 100, function() { 367 $( '.shopCategotyList li:nth-child(7)' ).animate( { 368 opacity: '1' 369 }, 100, function() { 370 $( '.shopCategotyList li:nth-child(8)' ).animate( { 371 opacity: '1' 372 }, 100, function() { 373 $( '.shopCategotyList li:nth-child(9)' ).animate( { 374 opacity: '1' 375 }, 100, function() { 376 $( '.shopCategotyList li:nth-child(10)' ).animate( { 377 opacity: '1' 378 }, 100, function() { 379 $( '.shopCategotyList li:nth-child(11)' ).animate( { 380 opacity: '1' 381 }, 100, function() { 382 $( '.shopCategotyList li:nth-child(12)' ).animate( { 383 opacity: '1' 384 }, 100, function() { 385 $( '.shopCategotyList li:nth-child(13)' ).animate( { 386 opacity: '1' 387 }, 100, function() { 388 $( '.shopCategotyList li:nth-child(14)' ).animate( { 389 opacity: '1' 390 }, 100, function() { 391 $( '.shopCategotyList li:nth-child(15)' ).animate( { 392 opacity: '1' 393 }, 100, function() { 394 $( '.shopCategotyList li:nth-child(16)' ).animate( { 395 opacity: '1' 396 }, 100, function() { 397 $( '.shopCategotyList li:nth-child(17)' ).animate( { 398 opacity: '1' 399 }, 100, function() { 400 $( '.shopCategotyList li:nth-child(18)' ).animate( { 401 opacity: '1' 402 }, 100, function() { 403 $( '.shopCategotyList li:nth-child(19)' ).animate( { 404 opacity: '1' 405 }, 100, function() { 406 $( '.shopCategotyList li:nth-child(20)' ).animate( { 407 opacity: '1' 408 }, 100 ); 409 } ); 410 } ); 411 } ); 412 } ); 413 } ); 414 } ); 415 } ); 416 } ); 417 } ); 418 } ); 419 } ); 420 } ); 421 } ); 422 } ); 423 } ); 424 } ); 425 } ); 426 } ); 427 } ); 428 } ); 429 430 431 432 $('.menuShop').click( function() { 433 $( '.shopCategotyList li:nth-child(1)').css('opacity','0'); 434 $( '.shopCategotyList li:nth-child(2)').css('opacity','0'); 435 $( '.shopCategotyList li:nth-child(3)').css('opacity','0'); 436 $( '.shopCategotyList li:nth-child(4)').css('opacity','0'); 437 $( '.shopCategotyList li:nth-child(5)').css('opacity','0'); 438 $( '.shopCategotyList li:nth-child(6)').css('opacity','0'); 439 $( '.shopCategotyList li:nth-child(7)').css('opacity','0'); 440 $( '.shopCategotyList li:nth-child(8)').css('opacity','0'); 441 $( '.shopCategotyList li:nth-child(9)').css('opacity','0'); 442 $( '.shopCategotyList li:nth-child(10)').css('opacity','0'); 443 $( '.shopCategotyList li:nth-child(11)').css('opacity','0'); 444 $( '.shopCategotyList li:nth-child(12)').css('opacity','0'); 445 $( '.shopCategotyList li:nth-child(13)').css('opacity','0'); 446 $( '.shopCategotyList li:nth-child(14)').css('opacity','0'); 447 $( '.shopCategotyList li:nth-child(15)').css('opacity','0'); 448 $( '.shopCategotyList li:nth-child(16)').css('opacity','0'); 449 $( '.shopCategotyList li:nth-child(17)').css('opacity','0'); 450 $( '.shopCategotyList li:nth-child(18)').css('opacity','0'); 451 $( '.shopCategotyList li:nth-child(19)').css('opacity','0'); 452 $( '.shopCategotyList li:nth-child(20)').css('opacity','0'); 453 } ); 454 455 456 457 458} ); 459$( document ).ready(function() { 460 461 cookiedata0 = document.cookie; 462 463 if ( cookiedata0.indexOf("ncookie0=done") < 0 ){ 464 document.getElementById('text_bn-cookie').style.display = "block"; 465 $('.body').removeClass('notBanner'); 466 $("#wrap").prepend('<div id="dimm-cookie-0" onclick="dimm_close();" class="black" />'); 467 } else { 468 document.getElementById('text_bn-cookie').style.display = "none"; 469 $('.body').addClass('notBanner'); 470 } 471 472}); 473 474function setCookie( name, value, expiredays ) { 475 var todayDate = new Date(); 476 todayDate.setDate( todayDate.getDate() + expiredays ); 477 document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 478} 479 480function closeWin() { 481 document.getElementById('text_bn-cookie').style.display = "none"; 482 $('.body').addClass('notBanner'); 483 $("#dimm-cookie-0").remove(); 484} 485 486function todaycloseWin0() {
487 setCookie("ncookie0", "done", 1); 488 document.getElementById('text_bn-cookie').style.display = "none"; 489 $('.body').addClass('notBanner'); 490 $("#dimm-cookie-0").remove(); 491} 492 493function dimm_close() { 494 document.getElementById('text_bn-cookie').style.display = "none"; 495 $('.body').addClass('notBanner'); 496 $("#dimm-cookie-0").remove(); 497} 498$( document ).ready(function() { 499 cookiedata = document.cookie; 500 if ( cookiedata.indexOf("ncookie=done") < 0 ){ 501 document.getElementById('popup_cookie').style.display = "block"; 502 $("#wrap").prepend('<div id="dimm-cookie" onclick="dimm_close();" />'); 503 } else { 504 document.getElementById('popup_cookie').style.display = "none"; 505 } 506}); 507 508function setCookie( name, value, expiredays ) { 509 var todayDate = new Date(); 510 todayDate.setDate( todayDate.getDate() + expiredays ); 511 document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 512} 513 514function closeWin() { 515 document.getElementById('popup_cookie').style.display = "none"; 516 $("#dimm-cookie").remove(); 517} 518 519function todaycloseWin() { 520 setCookie("ncookie", "done", 1); 521 document.getElementById('popup_cookie').style.display = "none"; 522 $("#dimm-cookie").remove(); 523} 524 525function dimm_close() { 526 $("#dimm-cookie").remove(); 527 document.getElementById('popup_cookie').style.display = "none"; 528} 529$(document).ready(function(){ 530 531 $(".navbar [href]").each(function() { 532 if (this.href == window.location.href) { 533 $(this).parent().addClass("on"); 534 } 535 }); 536 537 $(".csInfo [href]").each(function() { 538 if (this.href == window.location.href) { 539 $(this).addClass("on"); 540 } 541 }); 542 543 /*lang*/ 544 $(".langPopBtn__").click(function() { 545 $('.langPopup__').addClass('show'); 546 }); 547 $(".langPopCloseBtn__").click(function() { 548 $('.langPopup__').removeClass('show'); 549 }); 550 551 /*prd_slider_popup*/ 552 $(".prd_slider_scroll").click(function() { 553 $(".prd_slider_popup").addClass('popup_on'); 554 }); 555 $(".prd_slider .sliderbox").click(function() { 556 $(".prd_slider_popup").addClass('popup_on'); 557 }); 558 $(".prd_slider_popup .close").click(function() { 559 $(".prd_slider_popup").removeClass('popup_on'); 560 }); 561 562 563 if ($('.text_bn').height() < 1) { 564 $('.body').addClass('notBanner'); 565 } 566 if ($('.slider_top_banner').height() < 1) { 567 $('.body').addClass('notBanner'); 568 } 569 570 if ( window.location.pathname == '/board/qa/6/' ) { 571 var root = document.documentElement; 572 root.className += 'board6' 573 } 574 if ( window.location.pathname == '/board/qa/1002/' ) { 575 var root = document.documentElement; 576 root.className += 'board1002' 577 } 578 579 580 $("body#layoutPrd .navBox ul li:nth-child(2)").addClass("on"); 581 $("body#layoutCollection .navBox ul li:nth-last-child(2)").addClass("on"); 582 583 $(".menuShop").click(function() { 584 $(this).parent().parent().parent().parent().parent().toggleClass('shopcate'); 585 }); 586 $(".csBtn").click(function() { 587 $(this).parent().toggleClass('show'); 588 }); 589 590 591 $('ul.tabs li').click(function(){ 592 var tab_id = $(this).attr('data-tab'); 593 594 $('ul.tabs li').removeClass('current'); 595 $('.tab-content').removeClass('current'); 596 597 $(this).addClass('current'); 598 $("#"+tab_id).addClass('current'); 599 }) 600 601 602 603/* 604 var fullHeight = $(window).height(); 605 var fullWidth = $(window).width(); 606 var popupHeight = $('.popup_img img').height(); 607 var popupWidth = $('.popup_img img').width(); 608 $('.popup_banner').css('margin-top',- popupHeight/2 + 'px'); 609 $('.popup_banner').css('margin-left',- popupWidth/2 + 'px'); 610 611 $(window).resize(function(){ 612 var fullHeight = $(window).height(); 613 var fullWidth = $(window).width(); 614 var popupHeight = $('.popup_img img').height(); 615 var popupWidth = $('.popup_img img').width(); 616 $('.popup_banner').css('margin-top',- popupHeight/2 + 'px'); 617 $('.popup_banner').css('margin-left',- popupWidth/2 + 'px'); 618 }); 619*/ 620 621 var cartHeight = $('cartArea').height(); 622 $(window).scroll(function() { 623 if ($(this).scrollTop() > 0) { 624 $('.navbar').addClass('sticky'); 625 } else { 626 $('.navbar').removeClass('sticky'); 627 } 628 629 if ($(this).scrollTop() > 0) { 630 $('#text_bn-cookie').addClass('sticky'); 631 } else { 632 $('#text_bn-cookie').removeClass('sticky'); 633 } 634 635 if ($(this).scrollTop() > cartHeight) { 636 $('#orderFixItem').addClass('sticky'); 637 } else { 638 $('#orderFixItem').removeClass('sticky'); 639 } 640 if ($(this).scrollTop() > cartHeight) { 641 $('.flex_wrap_cart .row_section2:last-child').addClass('sticky'); 642 } else { 643 $('.flex_wrap_cart .row_section2:last-child').removeClass('sticky'); 644 } 645 }); 646 647 $('.scrollup').click(function () { 648 $("html, body").animate({ 649 scrollTop: 0 650 }, 600); 651 return false;
652 }); 653 654 655 /*Grade*/ 656 $(".grade_info").fadeOut(0); 657 $(".grade_title").click(function() { 658 $(".grade_info").not($(this).next()).slideUp('fast'); 659 $(this).next().slideToggle(400); 660 }); 661 /*Lang*/ 662 $(".langCont").fadeOut(0); 663 $(".langTitle").click(function() { 664 $(".langCont").not($(this).next()).slideUp('fast'); 665 $(this).next().slideToggle(400); 666 }); 667 /*FAQ*/ 668 $(".faqCont").fadeOut(0); 669 $(".faqTitle").click(function() { 670 $(".faqCont").not($(this).next()).slideUp('fast'); 671 $(this).next().slideToggle(400); 672 $(this).children(".accordionArrow").toggleClass( "minus" ); 673 $(".accordionArrow").not($(this).children()).removeClass('minus'); 674 }); 675 /*ìíì¤ëª ì´ì©ìë´*/ 676 $(".accordion_desc").fadeOut(0); 677 $(".accordion").click(function() { 678 $(".accordion_desc").not($(this).next()).slideUp('fast'); 679 $(this).next().slideToggle(400); 680 }); 681 /*íìê°ì ëì*/ 682 $(".agree_desc").fadeOut(0); 683 $(".allagree input").click(function() { 684 $('.agree_desc').slideToggle(400); 685 }); 686 $(".accd_cont").fadeOut(0); 687 $(".accd").click(function() { 688 $(".accd_cont").not($(this).next()).slideUp('fast'); 689 $(this).next().slideToggle(400); 690 $(this).children().toggleClass('arrow-up'); 691 $(".accd span").not($(this).children()).removeClass('arrow-up'); 692 }); 693 694 695 $( '.fr-view img.fr-dib' ).addClass( 'wpF delay_03s' ); 696 697 $( '.page_wrap_760 h2 font' ).removeAttr( 'color' ); 698 $( 'font' ).removeAttr( 'style' ); 699 $( '.detail a' ).removeAttr( 'style' ); 700 $( '.detail p' ).removeAttr( 'style' ); 701 $( '.detail span' ).removeAttr( 'style' ); 702 $( 'h3 font' ).removeAttr( 'color' ); 703 $( '.ec-common-rwd-image' ).removeAttr( 'onmouseover' ); 704 $( '.ec-common-rwd-image' ).removeAttr( 'onmouseout' ); 705 706 $( '.idTag a').attr( "class",'underline_effect widget-id-tag' ); 707 708 $('input[name=keyword]').attr('placeholder','Search'); 709 710 $('input[name=comment_name]').attr('placeholder','ì´ë¦'); 711 $('input[name=comment_password]').attr('placeholder','ë¹ë°ë²í¸ë¥¼ ì ë ¥íì¸ì.'); 712 $('input[name=secure_password]').attr('placeholder','ë¹ë°ë²í¸ë¥¼ ì ë ¥íì¸ì.'); 713 $('textarea[name=comment]').attr('placeholder','ëê¸ì ì ë ¥íì¸ì.'); 714 715 $('input[name=order_name]').attr('placeholder','NAME'); 716 $('input[name=order_id]').attr('placeholder','주문ë²í¸ íì´í(-)í¬í¨'); 717 $('input[name=order_password]').attr('placeholder','PASSWORD'); 718 719 $('.fbox input[name=title]').attr('placeholder','Subject'); 720 $('.fbox input[name=email]').attr('placeholder','Email'); 721 $('.fbox input[name=mobile]').attr('placeholder','Mobile ex.010-1234-5678'); 722 $('.fbox input[name=writer]').attr('placeholder','Name'); 723 $('.fbox textarea[name=content]').attr('placeholder','Message'); 724 725 726 $('input[name=addr1]').attr('placeholder','기본주ì'); 727 $('input[name=addr2]').attr('placeholder','ë머ì§ì£¼ì'); 728 729 730 $('input[name=ma_rcv_title]').attr('placeholder','ë°°ì¡ì§ëª '); 731 $('input[name=ma_rcv_name]').attr('placeholder','ì´ë¦'); 732 733 $('.xans-member-join input#mobile2').attr('placeholder','0000'); 734 $('.xans-member-join input#mobile3').attr('placeholder','0000'); 735 736 737 // í ê¸ 738 $('div.eToggle .title').click(function(){ 739 var toggle = $(this).parent('.eToggle'); 740 if(toggle.hasClass('disable') == false){ 741 $(this).parent('.eToggle').toggleClass('selected') 742 } 743 }); 744 745 $('dl.eToggle dt').click(function(){ 746 $(this).toggleClass('selected'); 747 $(this).next('dd').toggleClass('selected'); 748 }); 749 750 751 $('.prdName .icon_img').each(function () { 752 $(this).text('<img src="//img.echosting.cafe24.com/design/skin/admin/ko_KR/ico_product_soldout.gif" class="icon_img" alt="Out-of-stock"></img>'); 753 $(this).parent().html('soldout'); 754 }); 755 756 $('.xans-board .prd_thumb .ec-common-rwd-image').each(function () { 757 $(this).text('<img src="/web/upload/icon_202202081710427300.png">'); 758 $(this).parent().html('<img src="https://enzoblues1.cafe24.com/web/upload/icon_202205111346451800.png"> Reply'); 759 }); 760 761 762 763 $('.wpF').each( function(i){ 764 var bottom_of_object = $(this).offset().top + $(this).height()*0.1; 765 var bottom_of_window = $(window).scrollTop() + $(window).height(); 766 if( bottom_of_window > bottom_of_object ){ 767 $(this).addClass('animated fadeIn'); 768 } 769 }); 770 $('.wpFN').each( function(i){ 771 var bottom_of_object = $(this).offset().top; 772 var bottom_of_window = $(window).scrollTop() + $(window).height(); 773 if( bottom_of_window > bottom_of_object ){ 774 $(this).addClass('animated fadeIn'); 775 } 776 }); 777 $('.wpFU').each( function(i){ 778 var bottom_of_object = $(this).offset().top + $(this).height()*0.1; 779 var bottom_of_window = $(window).scrollTop() + $(window).height(); 780 if( bottom_of_window > bottom_of_object ){ 781 $(this).addClass('animated fadeInUp'); 782 } 783 }); 784 $('.wpFD').each( function(i){ 785 var bottom_of_object = $(this).offset().top + $(this).height()*0.1; 786 var bottom_of_window = $(window).scrollTop() + $(window).height(); 787 if( bottom_of_window > bottom_of_object ){ 788 $(this).addClass('animated fadeInDown'); 789 } 790 }); 791 792 $(window).scroll(function() { 793 794 $('.wpF').each( function(i){ 795 var bottom_of_object = $(this).offset().top + $(this).height()*0.1; 796 var bottom_of_window = $(window).scrollTop() + $(window).height(); 797 if( bottom_of_window > bottom_of_object ){ 798 $(this).addClass('animated fadeIn'); 799 } 800 }); 801 $('.wpFN').each( function(i){ 802 var bottom_of_object = $(this).offset().top; 803 var bottom_of_window = $(window).scrollTop() + $(window).height(); 804 if( bottom_of_window > bottom_of_object ){ 805 $(this).addClass('animated fadeIn'); 806 } 807 }); 808 $('.wpFU').each( function(i){ 809 var bottom_of_object = $(this).offset().top + $(this).height()*0.1; 810 var bottom_of_window = $(window).scrollTop() + $(window).height(); 811 if( bottom_of_window > bottom_of_object ){ 812 $(this).addClass('animated fadeInUp'); 813 } 814 }); 815 $('.wpFD').each( function(i){ 816 var bottom_of_object = $(this).offset().top + $(this).height()*0.1; 817 var bottom_of_window = $(window).scrollTop() + $(window).height(); 818 if( bottom_of_window > bottom_of_object ){ 819 $(this).addClass('animated fadeInDown'); 820 } 821 }); 822 }); 823 824}); 825 826 827/** 828 * ìì§ì´ë ë°°ë Jquery Plug-in 829 * @author cafe24 830 */ 831 832(function($){ 833 834 $.fn.floatBanner = function(options) { 835 options = $.extend({}, $.fn.floatBanner.defaults , options); 836 837 return this.each(function() { 838 var aPosition = $(this).position(); 839 var jbOffset = $(this).offset(); 840 var node = this; 841 842 $(window).scroll(function() { 843 var _top = $(document).scrollTop(); 844 _top = (aPosition.top < _top) ? _top : aPosition.top; 845 846 setTimeout(function () { 847 var newinit = $(document).scrollTop(); 848 849 if ( newinit >
849 jbOffset.top ) { 850 _top -= jbOffset.top; 851 var container_height = $("#wrap").height(); 852 var quick_height = $(node).height(); 853 var cul = container_height - quick_height; 854 if(_top > cul){ 855 _top = cul; 856 } 857 }else { 858 _top = 0; 859 } 860 861 $(node).stop().animate({top: _top}, options.animate); 862 }, options.delay); 863 }); 864 }); 865 }; 866 867 $.fn.floatBanner.defaults = { 868 'animate' : 500, 869 'delay' : 500 870 }; 871 872})(jQuery); 873 874/** 875 * 문ì 구ëí ìì 876 */ 877$(document).ready(function(){ 878 $('#banner:visible, #quick:visible').floatBanner(); 879 880 //placeholder 881 $(".ePlaceholder input, .ePlaceholder textarea").each(function(i){ 882 var placeholderName = $(this).parents().attr('title'); 883 $(this).attr("placeholder", placeholderName); 884 }); 885 /* placeholder ie8, ie9 */ 886 $.fn.extend({ 887 placeholder : function() { 888 //IE 8 ë²ì ìë hasPlaceholderSupport() ê°ì´ false를 ë¦¬í´ 889 if (hasPlaceholderSupport() === true) { 890 return this; 891 } 892 //hasPlaceholderSupport() ê°ì´ false ì¼ ê²½ì° ìë ì½ë를 ì¤í 893 return this.each(function(){ 894 var findThis = $(this); 895 var sPlaceholder = findThis.attr('placeholder'); 896 if ( ! sPlaceholder) { 897 return; 898 } 899 findThis.wrap('<label class="ePlaceholder" />'); 900 var sDisplayPlaceHolder = $(this).val() ? ' style="display:none;"' : ''; 901 findThis.before('<span' + sDisplayPlaceHolder + '>' + sPlaceholder + '</span>'); 902 this.onpropertychange = function(e){ 903 e = event || e; 904 if (e.propertyName == 'value') { 905 $(this).trigger('focusout'); 906 } 907 }; 908 //ê³µíµ class 909 var agent = navigator.userAgent.toLowerCase(); 910 if (agent.indexOf("msie") != -1) { 911 $(".ePlaceholder").css({"position":"relative"}); 912 $(".ePlaceholder span").css({"position":"absolute", "padding":"0 4px", "color":"#878787"}); 913 $(".ePlaceholder label").css({"padding":"0"}); 914 } 915 }); 916 } 917 }); 918 919 $(':input[placeholder]').placeholder(); //placeholder() í¨ì를 í¸ì¶ 920 921 //í´ë¦íë©´ placeholder ì¨ê¹ 922 $('body').delegate('.ePlaceholder span', 'click', function(){ 923 $(this).hide(); 924 }); 925 926 //inputì°½ í¬ì»¤ì¤ ì¸ ì¼ë placeholder ì¨ê¹ 927 $('body').delegate('.ePlaceholder :input', 'focusin', function(){ 928 $(this).prev('span').hide(); 929 }); 930 931 //inputì°½ í¬ì»¤ì¤ ìì ì¼ë value ê° true ì´ë©´ ì¨ê¹, false ì´ë©´ ë³´ì¬ì§ 932 $('body').delegate('.ePlaceholder :input', 'focusout', function(){ 933 if (this.value) { 934 $(this).prev('span').hide(); 935 } else { 936 $(this).prev('span').show(); 937 } 938 }); 939 940 //inputì placeholderê° ì§ìì´ ëë©´ true를 ìëë©´ false를 리í´ê°ì¼ë¡ ëì ¸ì¤ 941 function hasPlaceholderSupport() { 942 if ('placeholder' in document.createElement('input')) { 943 return true; 944 } else { 945 return false; 946 } 947 } 948}); 949 950/** 951 * ì¸ë¤ì¼ ì´ë¯¸ì§ ìë°ì¼ê²½ì° ê¸°ë³¸ê° ì¤ì 952 */ 953$(window).load(function() { 954 $("img.thumb,img.ThumbImage,img.BigImage").each(function($i,$item){ 955 var $img = new Image(); 956 $img.onerror = function () { 957 $item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif"; 958 } 959 $img.src = this.src; 960 }); 961}); 962 963/** 964 * tooltip 965 */ 966$('.eTooltip').each(function(i){ 967 $(this).find('.btnClose').attr('tabIndex','-1'); 968}); 969//tooltip input focus 970$('.eTooltip').find('input').focus(function() { 971 var targetName = returnTagetName(this); 972 targetName.siblings('.ec-base-tooltip').show(); 973}); 974$('.eTooltip').find('input').focusout(function() { 975 var targetName = returnTagetName(this); 976 targetName.siblings('.ec-base-tooltip').hide(); 977}); 978function returnTagetName(_this){ 979 var ePlacename = $(_this).parent().attr("class"); 980 var targetName; 981 if(ePlacename == "ePlaceholder"){ //ePlaceholder ëì 982 targetName = $(_this).parents(); 983 }else{ 984 targetName = $(_this); 985 } 986 return targetName; 987} 988
989/** 990 * eTab 991 */ 992 $("body").delegate(".eTab a", "click", function(e){ 993 // í´ë¦í li ì selected í´ëì¤ ì¶ê°, 기존 liì ìë selected í´ëì¤ë ìì . 994 var _li = $(this).parent("li").addClass("selected").siblings().removeClass("selected"), 995 _target = $(this).attr("href"), 996 _siblings = $(_target).attr("class"), 997 _arr = _siblings.split(" "), 998 _classSiblings = "."+_arr[0]; 999 1000 //í´ë¦í íì í´ë¹íë ììë íì±í, 기존 ììë ë¹íì±í í¨. 1001 $(_target).show().siblings(_classSiblings).hide(); 1002 1003 1004 //preventDefault ë a íê·¸ ì²ë¼ í´ë¦ ì´ë²¤í¸ ì¸ì ë³ëì ë¸ë¼ì°ì íëì ë§ê¸° ìí´ ì¬ì©ë¨. 1005 e.preventDefault(); 1006}); 1007 1008 1009 1010 1011//window popup script 1012function winPop(url) { 1013 window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no"); 1014} 1015/** 1016 * document.location.href split 1017 * return array Param 1018 */ 1019function getQueryString(sKey) 1020{ 1021 var sQueryString = document.location.search.substring(1); 1022 var aParam = {}; 1023 1024 if (sQueryString) { 1025 var aFields = sQueryString.split("&"); 1026 var aField = []; 1027 for (var i=0; i<aFields.length; i++) { 1028 aField = aFields[i].split('='); 1029 aParam[aField[0]] = aField[1]; 1030 } 1031 } 1032 1033 aParam.page = aParam.page ? aParam.page : 1; 1034 return sKey ? aParam[sKey] : aParam; 1035}; 1036 1037$(document).ready(function(){ 1038 // tab 1039 $.eTab = function(ul){ 1040 $(ul).find('a').click(function(){ 1041 var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'), 1042 _target = $(this).attr('href'), 1043 _siblings = '.' + $(_target).attr('class'); 1044 $(_target).show().siblings(_siblings).hide(); 1045 return false 1046 }); 1047 } 1048 if ( window.call_eTab ) { 1049 call_eTab(); 1050 }; 1051}); 1052(function($){ 1053$.fn.extend({ 1054 center: function() { 1055 this.each(function() { 1056 var 1057 $this = $(this), 1058 $w = $(window); 1059 $this.css({ 1060 position: "absolute", 1061 top: ~~(($w.height() - $this.outerHeight()) / 2) + $w.scrollTop() + "px", 1062 left: ~~(($w.width() - $this.outerWidth()) / 2) + $w.scrollLeft() + "px" 1063 }); 1064 }); 1065 return this; 1066 } 1067}); 1068$(function() { 1069 var $container = function(){/* 1070<div id="modalContainer"> 1071 <iframe id="modalContent" scroll="0" scrolling="no" frameBorder="0"></iframe> 1072</div>'); 1073*/}.toString().slice(14,-3); 1074 $('body') 1075 .append($('<div id="modalBackpanel"></div>')) 1076 .append($($container)); 1077 function closeModal () { 1078 $('#modalContainer').hide(); 1079 $('#modalBackpanel').hide(); 1080 } 1081 $('#modalBackpanel').click(closeModal); 1082 zoom = function ($piProductNo, $piCategoryNo, $piDisplayGroup) { 1083 var $url = '/product/image_zoom.html?product_no=' + $piProductNo + '&cate_no=' + $piCategoryNo + '&display_group=' + $piDisplayGroup; 1084 $('#modalContent').attr('src', $url); 1085 $('#modalContent').bind("load",function(){ 1086 $(".header .close",this.contentWindow.document.body).bind("click", closeModal); 1087 }); 1088 $('#modalBackpanel').css({width:$("body").width(),height:$("body").height(),opacity:.4}).show(); 1089 $('#modalContainer').center().show(); 1090 } 1091}); 1092})(jQuery);
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.