1/* 기본ì í */ 2$(document).ready(function(){ 3 function setLoad(){ 4 var keySlit; 5 var keyElementSlit; 6 var elementSelector; 7 var classSlit; 8 var listNum = new Object(); 9 $.each(IDIO, function(key, value){ 10 keySlit = null; 11 keyElementSlit = null; 12 elementSelector = null; 13 classSlit = null; 14 keySplit = key.split('-'); 15 keyElementSlit = key.split('-'); 16 keyElementSlit.splice(0, 1); 17 elementKey = keyElementSlit.join("-"); 18 if(keySplit[0]=='text'){ 19 if($('#'+elementKey).length > 0){ 20 elementSelector = '#'; 21 }else{ 22 if($('.'+elementKey).length > 0){ 23 elementSelector = '.'; 24 } 25 } 26 $(elementSelector+elementKey).text(value); 27 } 28 if(keySplit[0]=='class'){ 29 if($('#'+elementKey).length > 0){ 30 elementSelector = '#'; 31 }else{ 32 if($('.'+elementKey).length > 0){ 33 elementSelector = '.'; 34 } 35 } 36 classSlit = value.split(','); 37 $.each(classSlit, function(idx, classItem){ 38 classItem = classItem.trim(); 39 if(!$(elementSelector+elementKey).hasClass(classItem)){ 40 $(elementSelector+elementKey).addClass(classItem); 41 } 42 }); 43 } 44 if(keySplit[0]=='href'){ 45 if($('#'+elementKey).length > 0){ 46 elementSelector = '#'; 47 }else{ 48 if($('.'+elementKey).length > 0){ 49 elementSelector = '.'; 50 } 51 } 52 $(elementSelector+elementKey).attr('href', value); 53 } 54 }); 55 } 56 setLoad(); 57}); 58var IDIO = {}; 59 60 61/* on, off */ 62$(document).ready(function(){ 63 $(".off").remove(); 64}); 65 66 67/*ìíì ë³´íìì¤ì */ 68$(document).ready(function(){ 69 setTimeout(infoAC,700); 70 setTimeout(saleprc,700); 71 $('.xans-product-listmore').click(function(){ 72 setTimeout(infoAC,700); 73 setTimeout(saleprc,700); 74 }); 75}); 76 77function infoAC() { 78 $('.title i').remove(); 79 $('.spec > li').each(function(){ 80 var specTit = $(this).children('.title').children('span').text(); 81 if (specTit == 'ìíìì½ì ë³´' || specTit == 'ìí ìì½ì¤ëª ') { 82 $(this).addClass('desc'); 83 } else if (specTit == 'í ì¸í매ê°' || specTit.includes('í ì¸ê°')) { 84 $(this).parent('.spec').addClass('promotion'); 85 } else if (specTit == 'ìíìì') { 86 $(this).addClass('col'); 87 $(this).children('.title').remove(); 88 } else if (specTit == 'ì문ìíëª ') { 89 $(this).children('.title').remove(); 90 var engPrdName = $(this).html(); 91 $(this).parent('ul').siblings('.name').prepend("<div class='eng_name'>" + engPrdName + "</div>"); 92 $(this).remove(); 93 } else if (specTit == 'í ì¸ê¸°ê°' || specTit == 'í ì¸ ê¸°ê°') { 94 var promoPeriod = $(this).find('.layerDiscountPeriod .content p strong').text().replace(' (', '<!--').replace(')', '--> <span class="nam">ë¨ì</span>').replace('ë¨ììê°', '<i class="fa-regular fa-clock"></i>').replace('ì¼', '<span>ì¼</span>'); 95 var countdownElement = $("<div class='timesale countdown'>" + promoPeriod + "</div>"); 96 $(this).parents('.prd-item').find('.thumbnail').prepend(countdownElement); 97 $(this).remove(); 98 startCountdown(countdownElement); 99 } else if (specTit == 'ìíí기' || specTit == 'ì¬ì©í기' || specTit == 'REVIEW' || specTit == 'REVIEWS' || specTit == 'Reviews' || specTit == 'Review' || specTit == 'reviews' || specTit == 'review' || specTit == '리뷰' || specTit == 'í기' || specTit == 'ìí리뷰' || specTit == 'ì¬ì©ë¦¬ë·°') { 100 $(this).addClass('rvw'); 101 $(this).children('.title').prepend('<i class="fa-solid fa-star"></i>'); 102 } 103 }); 104 function startCountdown(element) { 105 var countdownElement = element[0]; 106 var timeString = countdownElement.innerText; 107 function parseTimeString(timeString) { 108 var timeParts = timeString.match(/(\d+)/g); 109 return { 110 days: parseInt(timeParts[0]), 111 hours: parseInt(timeParts[1]), 112 minutes: parseInt(timeParts[2]), 113 seconds: parseInt(timeParts[3]) 114 }; 115 } 116 function formatTimeString(time) { 117 return `<i class="fa-regular fa-clock"></i> ${String(time.days).padStart(2, '0')}<span>ì¼</span> ${String(time.hours).padStart(2, '0')}
117:${String(time.minutes).padStart(2, '0')}:${String(time.seconds).padStart(2, '0')} <span class="nam">ë¨ì</span>`; 118 } 119 function updateCountdown() { 120 var time = parseTimeString(countdownElement.innerText); 121 if (time.seconds > 0) { 122 time.seconds--; 123 } else if (time.minutes > 0) { 124 time.seconds = 59; 125 time.minutes--; 126 } else if (time.hours > 0) { 127 time.seconds = 59; 128 time.minutes = 59; 129 time.hours--; 130 } else if (time.days > 0) { 131 time.seconds = 59; 132 time.minutes = 59; 133 time.hours = 23; 134 time.days--; 135 } else { 136 clearInterval(countdownInterval); 137 return; 138 } 139 countdownElement.innerHTML = formatTimeString(time); 140 } 141 var countdownInterval = setInterval(updateCountdown, 1000); 142 } 143 $('.spec > li').each(function(){ 144 var specTit = $(this).children('.title').children('span').text(); 145 //ê°ê²©í기 146 if ($(this).parent('.spec').hasClass('promotion')) { 147 //í ì¸í매ê°O 148 if (specTit == 'ìë¹ìê°') { 149 $(this).remove(); 150 } else if (specTit == 'í매ê°') { 151 $(this).addClass('price pPrice'); 152 var pPrice = $(this).children('.title').next('span').text(); 153 var pPriceNum = pPrice.replace(/[^0-9]/g, ""); 154 $(this).parents('.description').attr('prc-pPrice',pPriceNum); 155 } else if (specTit == 'í ì¸í매ê°' || specTit.includes('í ì¸ê°')) { 156 $(this).addClass('price pSale'); 157 $(this).children('.title').next('span').find('span').remove(); 158 var pSale = $(this).children('.title').next('span').clone().children('span').remove().end().text(); 159 var pSaleNum = pSale.replace(/[^0-9]/g, ""); 160 $(this).parents('.description').attr('prc-pSale',pSaleNum); 161 } 162 } else { 163 //í ì¸í매ê°X 164 if (specTit == 'ìë¹ìê°') { 165 $(this).addClass('price pPrice'); 166 var pPrice = $(this).children('.title').next('span').text(); 167 var pPriceNum = pPrice.replace(/[^0-9]/g, ""); 168 $(this).parents('.description').attr('prc-pPrice',pPriceNum); 169 } else if (specTit == 'í매ê°') { 170 $(this).addClass('price pSale'); 171 var pSale = $(this).children('.title').next('span').clone().children('span').remove().end().text(); 172 var pSaleNum = pSale.replace(/[^0-9]/g, ""); 173 $(this).parents('.description').attr('prc-pSale',pSaleNum); 174 } 175 } 176 }); 177} 178 179function saleprc() { 180 $('.ic_sale').remove(); 181 var productListEl = $('.prdList'); 182 for (var i = 0; i < productListEl.length; i++) { 183 var prdListEl = productListEl.eq(i).find('.prd-item'); 184 for (var j = 0; j < prdListEl.length; j++) { 185 var priceEl = prdListEl.eq(j).find('.description'), 186 salePriceEl = priceEl.find('.spec > li').eq(1).find('span:eq(1)'); 187 percentageCul(priceEl, salePriceEl); 188 } 189 } 190 function percentageCul(target, salePriceEl) { 191 var iCustomPrice = parseInt(target.attr('prc-pPrice')), 192 iPrice = parseInt(target.attr('prc-pSale')), 193 pSale = prdListEl.eq(j).find('.pSale'), 194 pSaleSize = pSale.find('span:eq(1)').css('font-size'), 195 pPrice = prdListEl.eq(j).find('.pPrice').find('span:eq(1)'), 196 iOfftoFixed = 0, // í ì¸ì¨ ììì ì릿ì 197 sSaleText = '', 198 regexp = /\B(?=(\d{3})+(?!\d))/g; 199 if (iCustomPrice > 0 && iPrice > 0 && iPrice != iCustomPrice) { 200 sSaleText = (((iCustomPrice - iPrice) / iCustomPrice) * 100).toFixed(iOfftoFixed) + '<span>%</span>'; 201 pSale.append('<span class="ic_sale" style="font-size:' + pSaleSize + ';"> ' + sSaleText + '</span>'); 202 } 203 pPrice.removeAttr(); 204 pPrice.attr('style', 'font-size:' + pSaleSize + ';' ); 205 } 206} 207 208 209$(function() { 210 //ê²ìí ì¹´í ê³ ë¦¬ ìì± 211 $('.xans-board-category').css('display','none'); 212 if($('.boardSort').find('#board_category').length == 1) { 213 $('.boardSort').prepend("<div class='btnSort'></div>"); 214 $('#board_category').find('option').each(function(i, e){ 215 var cvalue = $(this).attr('value'); 216 var ctxt = $(this).text(); 217 $('.btnSort').append("<a href='" + window.location.href + "&category_no=" + cvalue + "' target='_top'>" + ctxt + "</a>"); 218 }); 219 $('.btnSort > a:first-child').text('ALL'); 220 } 221 $('.btnSort > a').each(function(){ 222 var nowCate = $('#board_category').find('option:selected').text(); 223 $(this).removeClass('selected'); 224 if($(this).text() == nowCate) { 225 $(this).addClass('selected'); 226 } else if (nowCate == 'ì ì²´') { 227 $('.btnSort > a:first-child').addClass('selected'); 228 } 229 }); 230 231 //ë ¸ì°¨ì¼ë 232 $('.noChild').each(function(){ 233 if($(this).children().length == 0) { 234 $(this).remove(); 235 } 236 }); 237 238 //ìë¸íì´ì§ ë§ë¤ê¸° 239 $('.listnormal').each(function(){ 240 if($(this).height() == 0) { 241 $('#container').removeClass('inner'); 242 $('#contents > div').each(function(){ 243 if($(this).is('[class*=product_top_image]') == true) { 244 } else { 245 $(this).remove(); 246 } 247 }); 248 } 249 }); 250 251 //ìíë² ì¤í¸ëë²ë§ 252 $('.prdList.best li.prd-item').each(function(){ 253 $(this).find('.num').text($(this).index() + 1); 254 }); 255 256 //aos 257 AOS.init({ 258 duration : 600, 259 easing : 'ease-in-out-quad', 260 once : true, 261 }); 262 263 //ì¼ë°ê²ìí í¨ë©
264 $('.ec-base-table tr').each(function() { 265 var reico = $(this).find('.subject').children('img'); 266 if(reico.is("[src*='http://img.echosting.cafe24.com/design/skin/admin/ko_KR/ico_re.gif']") == true) { 267 $(this).addClass('re'); 268 } 269 }); 270 271 /*íë©´í 구ë¶*/ 272 layoutRsp(); 273 $(window).resize(function() { 274 layoutRsp(); 275 }); 276 function layoutRsp() { 277 if($(window).height() > $(window).width()) { 278 $('body').addClass('mo'); 279 $('body').removeClass('pc'); 280 } else { 281 $('body').addClass('pc'); 282 $('body').removeClass('mo'); 283 } 284 } 285 286 /*sns ë¡ê·¸ì¸ ìë ê°ì¶¤*/ 287 var $snsArea = $('.xans-member-login .snsArea'); 288 var $listItems = $snsArea.find('li'); 289 function checkDisplayNone() { 290 var allDisplayNone = true; 291 $listItems.each(function() { 292 if (!$(this).hasClass('displaynone')) { 293 allDisplayNone = false; 294 return false; // loop를 ì¤ì§ 295 } 296 }); 297 return allDisplayNone; 298 } 299 if (checkDisplayNone()) { 300 $snsArea.hide(); 301 } 302});
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.