1$(function(){ 2 if($(".menuCategory > li").length==0){ 3 $(".menuCategory").hide(); 4 }else { 5 $(".menuCategory li").each(function(i){ 6 var ulElChk = $(this).find('ul').length; 7 if(ulElChk == 0){ 8 $(this).find('.iconWrap').remove(); 9 } 10 }); 11 12 var domWidth = $(document).width(); 13 if(domWidth < 1024){ 14 $(".menuCategory .iconWrap").on('click', function(e){ 15 var target = $(this).closest('li'); 16 var ulEl = returnTarget(target); 17 var ulElchk = ulEl.hasClass('active'); 18 19 if(ulElchk){ 20 var classChk = $(this).closest('ul').hasClass('active'); 21 if(!classChk){ heightCheck(ulEl, "out"); } 22 mouseEvent(target, "out"); 23 24 target.find('ul').removeClass('active'); 25 }else{ 26 heightCheck(ulEl, "hover"); 27 mouseEvent(target, "hover"); 28 } 29 target.siblings('li').find('ul').removeClass('active'); 30 31 }); 32 }else{ 33 $(".menuCategory li").hover(function() { 34 mouseEvent($(this), "hover"); 35 }, function(){ 36 mouseEvent($(this), "out"); /***/ 37 }) 38 } 39 }; 40 41 function mouseEvent(_this, str){ 42 var target = returnTarget(_this); 43 str == "hover" ? target.addClass('active') : target.removeClass('active'); 44 } 45 46 function returnTarget(_this){ 47 var target = _this.children('ul'); 48 var ulElChk = target.length; 49 if(ulElChk == 0){ target = _this.children('.button').children('ul') } 50 51 return target; 52 } 53 54 function heightCheck(ulEl, str){ 55 if(str == "out"){ 56 $('.menuCategory.menu').css({"height":""}); 57 }else{ 58 var height = ulEl.outerHeight(true); 59 var menuHeight = $('.menuCategory .menu li').outerHeight(true); 60 var cul = (menuHeight+height)+10; 61 62 $('.menuCategory.menu').css({"height":cul}); 63 } 64 }; 65 66}); 67 68/** 69 * ì¹´í ê³ ë¦¬ 리ì¤í¸ ìí ì ë ¬ 70 */ 71var aUrl = location.href.split('?'); 72var sQueryString = aUrl[1]; 73var orgHeaderHeight = 0; 74var selAdd = 0; 75var maxTime = 5; 76 77/** 78 * íë¼ë¯¸í°ê° ììê²½ì°ìë§ ì²ë¦¬ 79 */ 80$(function(){ 81 if (sQueryString && sQueryString.indexOf('sort_method') > -1) { 82 for (var i=0; i<$('#selArray option').length; i++) { 83 if ($('#selArray option').eq(i).val().indexOf(sQueryString) > -1) { 84 $('#selArray option').eq(i).prop("selected", true); 85 86 orgHeaderHeight = $('#header').outerHeight(true); 87 fixedClassCheck(); 88 } 89 } 90 } 91}); 92 93$('#selArray').on('change', function() { 94 if ($('#selArray').val()) { 95 location.href=$('#selArray').val(); 96 } 97}); 98 99function goThumg(url) { 100 location.href = url+'?'+sQueryString; 101} 102 103function fixedClassCheck(){ 104 var fixedBol = $('#header').hasClass('fixed'); 105 if(!fixedBol){ 106 if(selAdd < maxTime){ setTimeout(fixedClassCheck,100); } 107 selAdd++; 108 }else{ 109 var fixedHeader = $('#header').find('.navigation').outerHeight(true), 110 scrollValue = $(document).scrollTop(), 111 scrollTop = scrollValue - (orgHeaderHeight+fixedHeader); 112 113 if(scrollTop > 0){ $(document).scrollTop(scrollTop); } 114 } 115} 116/** 117 * hasClass 118 */ 119function hasClass(element, className){ 120 return (' ' + element.className + ' ').indexOf(' ' + className+ ' ') > -1; 121}; 122 123/** 124 * toggle 125 */ 126function toggleClassAll(element, handler, className){ 127 var _handler = document.querySelector(handler); 128 document.querySelectorAll(handler).forEach(function(item){ 129 item.addEventListener('click', function(){ 130 var _element = item.parentNode; 131 if ( hasClass( _element, className ) ) { 132 _element.classList.remove( className ); 133 } else { 134 _element.classList.add( className ); 135 } 136 }) 137 }) 138}; 139 140/** 141 * findElements 142 */ 143function findElements(element, findElement){ 144 var resultElements = []; 145 document.querySelectorAll(element).forEach(function(item){ 146 var findElementList = item.querySelectorAll(findElement); 147 findElementList = Array.prototype.slice.call(findElementList); 148 resultElements = resultElements.concat(findElementList); 149 }) 150 return resultElements; 151}; 152 153/** 154 * setAttributeAl 155 */ 156function setAttributeAll(elements, name, value){
157 elements.forEach(function(item){ 158 item.setAttribute(name, value); 159 }) 160}; 161 162/** 163 * ìí ì¬ë¤ì¼ ë¡ëëì§ ìì ê²½ì°, ê¸°ë³¸ê° ì¤ì 164 */ 165function setDefaultImage(element) { 166 document.querySelectorAll(element).forEach(function(item){ 167 var $img = new Image(); 168 $img.onerror = function () { 169 item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif"; 170 } 171 $img.src = item.src; 172 }); 173}; 174 175/** 176 * tooltip 177 */ 178function setTooltipEvent(){ 179 var input = findElements('.eTooltip', 'input'); 180 input.forEach(function(item){ 181 item.addEventListener('focusin', function(event){ 182 var targetName = returnTargetName(event.target); 183 targetName.nextElementSibling.style.display = 'block' 184 }); 185 item.addEventListener('focusout', function(event){ 186 var targetName = returnTargetName(event.target); 187 targetName.nextElementSibling.style.display = 'none' 188 }); 189 }); 190} 191 192/** 193 * tooltip input focus 194 */ 195function returnTargetName(_this){ 196 var ePlacename = _this.parentElement.getAttribute("class"); 197 var targetName; 198 if(ePlacename == "ePlaceholder"){ //ePlaceholder supported 199 targetName = _this.parentElement; 200 }else{ 201 targetName = _this; 202 } 203 return targetName; 204} 205 206/** 207 * window load 208 */ 209window.addEventListener('load', function(){ 210 if (document.querySelector('.thumbnail')){ 211 setDefaultImage('.thumbnail img'); 212 } 213 if (document.querySelector('.eTooltip')){ 214 setAttributeAll(findElements('.eTooltip', '.btnClose'),'tabIndex','-1'); 215 setTooltipEvent(); 216 } 217 if (document.querySelector('div.eToggle')){ 218 toggleClassAll(false, 'div.eToggle .title', 'selected'); 219 } 220}); 221//window popup script 222function winPop(url) { 223 window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no"); 224} 225/** 226 * document.location.href split 227 * return array Param 228 */ 229function getQueryString(sKey) 230{ 231 var sQueryString = document.location.search.substring(1); 232 var aParam = {}; 233 234 if (sQueryString) { 235 var aFields = sQueryString.split("&"); 236 var aField = []; 237 for(var i=0; i<aFields.length; i++){ 238 aField = aFields[i].split('='); 239 aParam[aField[0]] = aField[1]; 240 } 241 } 242 243 aParam.page = aParam.page ? aParam.page : 1; 244 return sKey ? aParam[sKey] : aParam; 245}; 246 247/** 248 * 구매ë²í¼ 249*/ 250var globalBuyBtnScrollFunc = function() { 251 // 구매ë²í¼ ê´ë ¨ë³ì 252 var sFixId = $('#orderFixItem').length > 0 ? 'orderFixItem' : 'fixedActionButton', 253 $area = $('#orderFixArea'), 254 $item = $('#' + sFixId + '').not($area); 255 256 $(window).scroll(function(){ 257 try { 258 // 구매ë²í¼ ê´ë ¨ë³ì 259 var iCurrentHeightPos = $(this).scrollTop() + $(this).height(), 260 iButtonHeightPos = $item.offset().top; 261 262 if (iCurrentHeightPos > iButtonHeightPos || iButtonHeightPos < $(this).scrollTop() + $item.height()) { 263 if (iButtonHeightPos < $(this).scrollTop() - $item.height()) { 264 $area.fadeIn('fast'); 265 } else { 266 $area.hide(); 267 } 268 } else { 269 $area.fadeIn('fast'); 270 } 271 } catch(e) { } 272 }); 273}; 274 275$(function(){ 276 // tab 277 $.eTab = function(ul) { 278 $(ul).find('a').on('click', function() { 279 var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'), 280 _target = $(this).attr('href'), 281 _siblings = '.' + $(_target).attr('class'); 282 $(_target).show().siblings(_siblings).hide(); 283 return false 284 }); 285 } 286 if ( window.call_eTab ) { 287 call_eTab(); 288 }; 289 globalBuyBtnScrollFunc(); 290}); 291(function($){ 292 $.fn.extend({ 293 center: function() { 294 this.each(function() { 295 var 296 $this = $(this), 297 $w = $(window); 298 $this.css({ 299 position: "absolute", 300 top: ~~(($w.height() - $this.outerHeight()) / 2) + $w.scrollTop() + "px", 301 left: ~~(($w.width() - $this.outerWidth()) / 2) + $w.scrollLeft() + "px" 302 }); 303 }); 304 return this; 305 } 306 }); 307 $(function() { 308 var $container = function(){/* 309 <div id="modalContainer"> 310 <iframe id="modalContent" scroll="0" scrolling="no" frameBorder="0"></iframe> 311 </div>'); 312 */}.toString().slice(14,-3); 313 $('body') 314 .append($('<div id="modalBackpanel"></div>')) 315 .append($($container)); 316 function closeModal () { 317 $('#modalContainer').hide(); 318 $('#modalBackpanel').hide(); 319 } 320 $('#modalBackpanel').on('click', closeModal); 321 zoom = function ($piProductNo, $piCategoryNo, $piDisplayGroup) { 322 var $url = '/product/image_zoom.html?product_no=' + $piProductNo + '&cate_no=' + $piCategoryNo + '&display_group=' + $piDisplayGroup; 323 $('#modalContent').attr('src', $url); 324 $('#modalContent').on("load",function(){ 325 $(".header .close",this.contentWindow.document.body).on("click", closeModal); 326 }); 327 $('#modalBackpanel').css({width:$("body").width(),height:$("body").height(),opacity:.4}).show(); 328 $('#modalContainer').center().show(); 329 } 330 }); 331})(jQuery); 332/** 333 * ì¹´í ê³ ë¦¬ ë§ì°ì¤ ì¤ë² ì´ë¯¸ì§ 334 * ì¹´í ê³ ë¦¬ ìë¸ ë©ë´ ì¶ë ¥ 335 */ 336 337$(function() { 338 339 var methods = { 340 aCategory : [], 341 aSubCategory : {}, 342 343 get: function() 344 { 345 $.ajax({ 346 url : '/exec/front/Product/SubCategory', 347 dataType: 'json', 348 success: function(aData) { 349 350 if (aData == null || aData == 'undefined') return; 351 for (var i=0; i<aData.length; i++) 352 { 353 var sParentCateNo = aData[i].parent_cate_no; 354 355 if (!methods.aSubCategory[sParentCateNo]) { 356 methods.aSubCategory[sParentCateNo] = []; 357 } 358 359 methods.aSubCategory[sParentCateNo].push( aData[i] ); 360 } 361 } 362 }); 363 }, 364 365 getParam: function(sUrl, sKey) { 366 367 var aUrl = sUrl.split('?'); 368 var sQueryString = aUrl[1]; 369 var aParam = {}; 370
371 if (sQueryString) { 372 var aFields = sQueryString.split("&"); 373 var aField = []; 374 for (var i=0; i<aFields.length; i++) { 375 aField = aFields[i].split('='); 376 aParam[aField[0]] = aField[1]; 377 } 378 } 379 return sKey ? aParam[sKey] : aParam; 380 }, 381 382 getParamSeo: function(sUrl) { 383 var aUrl = sUrl.split('/'); 384 return aUrl[3] ? aUrl[3] : null; 385 }, 386 387 show: function(overNode, iCateNo) { 388 389 if (methods.aSubCategory[iCateNo] === undefined) { 390 return; 391 } 392 393 var aHtml = []; 394 aHtml.push('<ul>'); 395 $(methods.aSubCategory[iCateNo]).each(function() { 396 aHtml.push('<li><a href="'+this.link_product_list+'">'+this.name+'</a></li>'); 397 }); 398 aHtml.push('</ul>'); 399 400 401 var offset = $(overNode).offset(); 402 $('<div class="sub-category"></div>') 403 .appendTo(overNode) 404 .html(aHtml.join('')) 405 .find('li').on({ 406 mouseover: function(e) { 407 $(this).addClass('over'); 408 }, 409 mouseout: function(e) { 410 $(this).removeClass('over'); 411 } 412 }); 413 }, 414 415 close: function() { 416 $('.sub-category').remove(); 417 } 418 }; 419 420 methods.get(); 421 422 423 $('.xans-layout-category li').on({ 424 mouseenter: function () { 425 var $this = $(this).addClass('on'), 426 iCateNo = Number(methods.getParam($this.find('a').attr('href'), 'cate_no')); 427 428 if (!iCateNo) { 429 iCateNo = Number(methods.getParamSeo($this.find('a').attr('href'))); 430 } 431 432 if (!iCateNo) { 433 return; 434 } 435 methods.show($this, iCateNo); 436 }, 437 mouseleave: function () { 438 $(this).removeClass('on'); 439 methods.close(); 440 } 441 }); 442});
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.