1$(function() { 2 // ë¬ë ¥ 3 try { 4 $('.datepicker').datepicker({ // ë¬ë ¥ ì¤ì 5 dateFormat: global.dateFormat ? global.dateFormat : 'yy.mm.dd', 6 showOtherMonths: true, 7 showMonthAfterYear:true, 8 yearSuffix: 'ë ', 9 monthNamesShort: ['1ì','2ì','3ì','4ì','5ì','6ì','7ì','8ì','9ì','10ì','11ì','12ì'], 10 monthNames: ['1ì','2ì','3ì','4ì','5ì','6ì','7ì','8ì','9ì','10ì','11ì','12ì'], 11 dayNamesMin: ['ì¼','ì','í','ì','목','ê¸','í '], 12 dayNames: ['ì¼ìì¼','ììì¼','íìì¼','ììì¼','목ìì¼','ê¸ìì¼','í ìì¼'], 13 minDate: '-1Y' 14 }); 15 } catch (e) { 16 console.error(e); 17 } 18 19 // ì¥ë°êµ¬ë ê°¯ì 20 if ($('.header').find('.icon-cart').length > 0 && $('.header').find('.icon-cart').is(':visible')) { 21 $.ajax({ 22 type: 'POST', 23 url: global.contextPath + '/cart/count', 24 data: {cartTp : 'N'}, 25 dataType: 'json', 26 success: function (data) { 27 if (data.cnt <= 0) { 28 return; 29 } 30 31 $('.header').find('.icon-cart').append('<em>' + data.cnt + '</em>'); 32 33 if ($('body').hasClass('transparency')) { 34 $('.header').find('.navigation').append('<em>' + data.cnt + '</em>'); 35 } 36 }, 37 error : function(xhr, status, error) { 38 console.error(error); 39 } 40 }); 41 } 42 43 // ìë¨ ê²ì 44 $('form[name="header-search-form"]').submit(function () { 45 var o = $(this); 46 var e = Common.checkForm(o); 47 48 if (e.message != '') { 49 Navi.alert(e.message, e.callback); 50 return false; 51 } 52 53 return true; 54 }); 55 56 // ì¢ì¸¡ ê²ì 57 $('form[name="aside-search-form"]').submit(function () { 58 var o = $(this); 59 var e = Common.checkForm(o); 60 61 if (e.message != '') { 62 return false; 63 } 64 65 return true; 66 }); 67 $('aside').find('a.keyword').bind('click', function () { 68 $('form[name="aside-search-form"]').find('input[name="searchWrd"]').val($(this).attr('kwrd')); 69 $('form[name="aside-search-form"]').submit(); 70 return false; 71 }); 72 73 // íë²ê±° ë©ë´ 74 $('a[href="#hambuger"]').bind('click', function () { // ë©ë´ ì´ê¸° 75 if (global.loginYn == 'Y') { 76 $.ajax({ 77 type: 'POST', 78 url: global.contextPath + '/mypage/wish/count', 79 dataType: 'json', 80 success: function (data) { 81 $('.header > .hambuger > .welcome > dd > a > em').html(data.cnt); 82 $(".header > .hambuger").addClass('on'); 83 }, 84 error : function(xhr, status, error) { 85 console.error('STATUS : ' + status + '\nERROR : ' + error); 86 } 87 }); 88 } else { 89 $('.header > .hambuger').addClass('on'); 90 } 91 92 return false; 93 }); 94 $('.header > .hambuger-screen').bind('click', function () { // ë©ë´ ë«ê¸° 95 $('.header > .hambuger').removeClass('on'); 96 }); 97 $('.header > .hambuger').bind('touchstart', function (e) { // í°ì¹ ìì 98 global.startX = e.originalEvent.changedTouches[0].screenX; 99 }); 100 $('.header > .hambuger').bind('touchend', function (e) { // í°ì¹ ì¢ ë£ 101 if (global.startX - e.originalEvent.changedTouches[0].screenX > 50) { 102 $('.header > .hambuger-screen').click(); 103 } 104 }); 105 $('.header > .hambuger > a.close').off('click').bind('click', function () { // ë©ë´ ë«ê¸° 106 $('.header > .hambuger-screen').click(); 107 return false; 108 }); 109 110 // ìë¨ ì¹´í ê³ ë¦¬ 111 $('.header').find('a[href="#category"]').bind('click', function () { // ì´ê¸° 112 if ($(this).hasClass('on')) { 113 $(this).removeClass('on').parent().parent().next().removeClass('on'); 114 } else { 115 $(this).addClass('on').parent().parent().next().addClass('on'); 116 } 117 118 return false; 119 }); 120 $('.header > .category-screen').bind('click', function () { // ë©ë´ ë«ê¸° 121 $('.header').find('a[href="#category"]').click(); 122 }); 123 124 // ë§í¬ 125 $('a[href="#back"]').bind('click', function () { // ë¤ë¡ê°ê¸° 126 history.go(-1); 127 return false; 128 }); 129 $('a[href="#search"]').bind('click', function () { // ê²ì 130 location.href = global.contextPath + '/search'; 131 return false; 132 }); 133 $('a[href="#cart"]').bind('click', function () { // ì¥ë°êµ¬ë 134 location.href = global.contextPath + '/cart'; 135 return false; 136 }); 137 $('a[href="#shop"], button.go-shop').bind('click', function () { // SHOP 138 if (typeof $(this).attr('cateCd') == 'undefined' || $(this).attr('cateCd') == '') { 139 location.href = global.contextPath + '/shop'; 140 } else { 141 location.href = global.contextPath + '/shop/category/' + $(this).attr('cateCd'); 142 } 143 144 return false; 145 }); 146 $('a[href="#close"]').bind('click', function () { // ë«ê¸° 147 if (opener) { 148 window.close(); 149 } else { 150 parent.$('.common-layer').addClass('hide'); 151 } 152 153 return false; 154 }); 155 $('a[href="#main"], .go-home').bind('click', function () { // ë©ì¸ 156 location.href = global.contextPath + '/'; 157 return false; 158 }); 159 $('a[href="#wish"]').bind('click', function () { // ì° 160 if (typeof $(this).attr('prdtNo') == 'undefined' || $(this).attr('prdtNo') == '') { 161 if (typeof $(this).attr('brndCd') == 'undefined' || $(this).attr('brndCd') == '') { 162 location.href = global.contextPath + '/mypage/wish'; 163 } else { 164 global.insertBrndWishInfo(this); 165 } 166 } else { 167 global.insertPrdtWishInfo(this); 168 } 169 170 return false; 171 }); 172 $('a[href="#wish-brand"]').bind('click', function () { // ì° > ë¸ëë 173 location.href = global.contextPath + '/mypage/wish/brand'; 174 return false; 175 }); 176 $('a[href="#recent"]').bind('click', function () { // ìµê·¼ 본 ìí 177 location.href = global.contextPath + '/mypage/recent'; 178 return false; 179 }); 180 $('a[href="#mypage"]').bind('click', function () { // ë§ì´íì´ì§ 181 location.href = global.contextPath + '/mypage'; 182 return false; 183 }); 184 $('a[href="#user"]').bind('click', function () { // íìì ë³´ 185 if (global.loginYn != 'Y') { 186 global.goLogin(); 187 } else { 188 location.href = global.contextPath + '/mypage/user'; 189 } 190 191 return false; 192 }); 193 $('a[href="#brand"]').bind('click', function () { // ë¸ëë 194 if (typeof $(this).attr('brndCd') == 'undefined' || $(this).attr('brndCd') == '') { 195 location.href = global.contextPath + '/shop/brand'; 196 } else { 197 location.href = global.contextPath + '/shop/brand/' + $(this).attr('brndCd'); 198 } 199 200 return false; 201 }); 202 $('a[href="#exhibition"]').bind('click', function () { // 기íì 203 if (typeof $(this).attr('endYn') == 'undefined' || $(this).attr('endYn') == '') { 204 location.href = global.contextPath + '/exhibition'; 205 } else {
206 location.href = global.contextPath + '/exhibition?endYn=' + $(this).attr('endYn'); 207 } 208 209 return false; 210 }); 211 $('a[href="#event"]').bind('click', function () { // ì´ë²¤í¸ 212 if (typeof $(this).attr('endYn') == 'undefined' || $(this).attr('endYn') == '') { 213 location.href = global.contextPath + '/event'; 214 } else { 215 location.href = global.contextPath + '/event?endYn=' + $(this).attr('endYn'); 216 } 217 218 return false; 219 }); 220 $('a[href="#login"]').bind('click', function () { // ë¡ê·¸ì¸ 221 global.goLogin(); 222 return false; 223 }); 224 $('a[href="#logout"]').bind('click', function () { // ë¡ê·¸ìì 225 global.goLogout(); 226 return false; 227 }); 228 $('a[href="#company"]').bind('click', function () { // íì¬ìê° 229 window.open('https://gabipartners.co.kr/'); 230 return false; 231 }); 232 $('a[href="#provision"]').bind('click', function () { // ì´ì©ì½ê´ 233 if (typeof $(this).attr('htmlNo') == 'undefined' || $(this).attr('htmlNo') == '') { 234 location.href = global.contextPath + '/html/0101'; 235 } else { 236 location.href = global.contextPath + '/html/history/0101?htmlNo=' + $(this).attr('htmlNo'); 237 } 238 239 return false; 240 }); 241 $('a[href="#privacy"]').bind('click', function () { // ê°ì¸ì ë³´ì²ë¦¬ë°©ì¹¨ 242 if (typeof $(this).attr('htmlNo') == 'undefined' || $(this).attr('htmlNo') == '') { 243 location.href = global.contextPath + '/html/0102'; 244 } else { 245 location.href = global.contextPath + '/html/history/0102?htmlNo=' + $(this).attr('htmlNo'); 246 } 247 248 return false; 249 }); 250 $('a[href="#cs"]').bind('click', function () { // ê³ ê°ì¼í° 251 location.href = global.contextPath + '/cs'; 252 return false; 253 }); 254 $('a[href="#banner"]').bind('click', function () { // ë°°ë 255 global.goBanner(this); 256 return false; 257 }); 258 $('a[href="#top"]').bind('click', function () { // ìë¨ 259 $('html,body').animate({scrollTop : 0}, 300); 260 return false; 261 }); 262 $('a[href="#biz-no"]').bind('click', function () { // ì¬ì ìì ë³´ 263 window.open('http://www.ftc.go.kr/bizCommPop.do?wrkr_no=' + $(this).attr('biz-no').replace(/\-/gi, '')); 264 return false; 265 }); 266 $('a[href="#goods"]').bind('click', function () { // ìíìì¸ 267 if ($(this).attr('saleTpCd') == '01' && global.adultYn != 'Y') { 268 switch (global.adultYn) { 269 case 'R' : 270 Navi.confirm('<strong>ì²ìë í매 ë¶ê°ìí</strong>본 ìíì ì²ìë í매 ë¶ê°ìíì¼ë¡ 본ì¸ì¸ì¦ í ì¡°íê° ê°ë¥í©ëë¤.', function () { 271 global.goCert('ORDR'); 272 }, null, {cancel : 'ë«ê¸°', approve : '본ì¸ì¸ì¦'}); 273 break; 274 case 'N' : 275 Navi.alert('<strong>ì²ìë í매 ë¶ê°ìí</strong>본 ìíì ì²ìë í매 ë¶ê°ìíì¼ë¡ ë§ 19ì¸ ì´ìë¶í° ì¡°íê° ê°ë¥í©ëë¤.'); 276 break; 277 default : 278 Navi.confirm('<strong>ì²ìë í매 ë¶ê°ìí</strong>본 ìíì ì²ìë í매 ë¶ê°ìíì¼ë¡ ë¡ê·¸ì¸ í ì¡°íê° ê°ë¥í©ëë¤.', function () { 279 global.goLogin(); 280 }, null, {cancel : 'ë«ê¸°', approve : 'ë¡ê·¸ì¸'}); 281 } 282 283 return false; 284 } 285 286 location.href = global.contextPath + '/shop/goods/' + $(this).attr('prdtNo'); 287 return false; 288 }); 289 $('a[href="#order"]').bind('click', function () { // 주문 290 if (typeof $(this).attr('ordrNo') == 'undefined' || $(this).attr('ordrNo') == '') { 291 if (typeof $(this).attr('statCd') == 'undefined' || $(this).attr('statCd') == '') { 292 location.href = global.contextPath + '/mypage/order'; 293 } else { 294 location.href = global.contextPath + '/mypage/order?statCd=' + $(this).attr('statCd') + '&dateType=0'; 295 } 296 } else { 297 location.href = global.contextPath + '/mypage/order/view?ordrNo=' + $(this).attr('ordrNo'); 298 } 299 300 return false; 301 }); 302 $('a[href="#claim"]').bind('click', function () { // í´ë ì 303 if (typeof $(this).attr('clmsNo') == 'undefined' || $(this).attr('clmsNo') == '') { 304 location.href = global.contextPath + '/mypage/order/claim'; 305 } else { 306 location.href = global.contextPath + '/mypage/order/claim/view?clmsNo=' + $(this).attr('clmsNo'); 307 } 308 309 return false; 310 }); 311 $('a[href="#inbound-alarm"]').bind('click', function () { // ì¬ì ê³ ì림 ì ì²ë´ì 312 location.href = global.contextPath + '/mypage/inbound-alarm'; 313 return false; 314 }); 315 $('a[href="#delivery-address"]').bind('click', function () { // ë°°ì¡ì§ 316 location.href = global.contextPath + '/mypage/delivery-address'; 317 return false; 318 }); 319 $('a[href="#point"]').bind('click', function () { // í¬ì¸í¸ 320 if (typeof $(this).attr('usedTp') == 'undefined' || $(this).attr('usedTp') == '') { 321 location.href = global.contextPath + '/mypage/point'; 322 } else { 323 location.href = global.contextPath + '/mypage/point?usedTp=' + $(this).attr('usedTp'); 324 } 325 326 return false; 327 }); 328 $('a[href="#coupon"]').bind('click', function () { // ì¿ í° 329 location.href = global.contextPath + '/mypage/coupon'; 330 return false; 331 }); 332 $('a[href="#inquiry"]').bind('click', function () { // 1:1 문ì 333 location.href = global.contextPath + '/mypage/inquiry'; 334 return false; 335 }); 336 $('a[href="#qna"]').bind('click', function () { // ìí Q&A 337 location.href = global.contextPath + '/mypage/inquiry/goods'; 338 return false; 339 }); 340 $('a[href="#faq"]').bind('click', function () { // FAQ 341 if (typeof $(this).attr('faqTpCd') == 'undefined' || $(this).attr('faqTpCd') == '') { 342 location.href = global.contextPath + '/cs/faq'; 343 } else { 344 location.href = global.contextPath + '/cs/faq?faqTpCd=' + $(this).attr('faqTpCd'); 345 } 346 347 return false; 348 }); 349 $('a[href="#notice"]').bind('click', function () { // ê³µì§ì¬í 350 if (typeof $(this).attr('notcTpCd') == 'undefined' || $(this).attr('notcTpCd') == '') { 351 location.href = global.contextPath + '/cs/notice'; 352 } else { 353 location.href = global.contextPath + '/cs/notice?notcTpCd=' + $(this).attr('notcTpCd'); 354 } 355 356 return false; 357 }); 358 $('a[href="#review"]').bind('click', function () { // 리뷰 359 location.href = global.contextPath + '/mypage/review'; 360 return false; 361 }); 362 $('a[href="#review-able"]').bind('click', function () { // 리뷰 > ìì±ê°ë¥ 363 location.href = global.contextPath + '/mypage/review/able'; 364 return false; 365 }); 366 $('a[href="#present"]').bind('click', function () { // ì ë¬¼í¨ 367 location.href = global.contextPath + '/mypage/gift/send'; 368 return false; 369 }); 370 $('a[href="#apply"]').bind('click', function () { // ì모ë´ì 371 location.href = global.contextPath + '/mypage/apply'; 372 return false; 373 }); 374 $('a[href="#attendance"]').bind('click', function () { // ì¶ìì²´í¬ 375 location.href = global.contextPath + '/mypage/attendance'; 376 return false; 377 }); 378 $('a[href="#partner"]').bind('click', function () { // ì ì ì ì² 379 location.href = global.contextPath + '/partner'; 380 return false; 381 }); 382 $('a[href="#barcode"]').bind('click', function () { // ë°ì½ë 383 if (typeof $(this).attr('pinUrl') != 'undefined' && $(this).attr('pinUrl') != '') { 384 window.open('https://' + $(this).attr('pinUrl')); 385 return false; 386 } 387 388 if ($('div.common-layer').length > 0) { 389 $('div.common-layer').remove(); 390 } 391 392 $('body').append('<div class="common-layer addr"><iframe src="' + global.contextPath + '/barcode?code=' + $(this).html() + '" title="ë°ì½ë íë ì"></iframe></div>'); 393 return false; 394 }); 395 $('a[href^="#shoplive"]').bind('click', function () { // ìµë¼ì´ë¸ 396 global.showLivePlayer($(this).attr('href')); 397 return false; 398 }); 399 400 // ìë¨ ë ë°°ë 401 $('.header-banner').find('a[href="#hidden"]').bind('click', function () { 402 var that = this; 403 404 $.ajax({
405 type: 'POST', 406 url: global.contextPath + '/banner/close', 407 data: {banrNo : $(that).attr('searchWrd')}, 408 dataType: 'json', 409 success: function (data) { 410 $('.header-banner').find('li[searchWrd="' + $(that).attr('searchWrd') + '"]').remove(); 411 412 if ($('.header-banner').find('li').length <= 0) { 413 $('.header-banner').remove(); 414 $('.header').removeClass('banner'); 415 } 416 417 if (typeof global.headerBanner != 'undefined') { 418 global.headerBanner.update(); 419 } 420 }, 421 error : function(xhr, status, error) { 422 Navi.alert(error); 423 } 424 }); 425 426 return false; 427 }); 428 429 if ($('.header-banner').find('.swiper-slide').length > 1) { 430 global.headerBanner = new Swiper('.header-banner', { 431 loop: true, 432 autoplay: { 433 delay: 5000, 434 }, 435 autoplayDisableOnInteraction: true, 436 slidersPerView: 1, 437 direction: 'vertical', 438 on: { 439 slideChange : function () { 440 $('.header-banner').find('a[href="#banner"]').off('click').bind('click', function () { 441 global.goBanner(this); 442 return false; 443 }); 444 } 445 } 446 }); 447 } 448 449 // ì¤í¬ë¡¤ 450 var height = $('.header').height(); 451 var lasted = 0; 452 453 $(window).scroll(function () { 454 // ìë¨ì¼ë¡ ê°ê¸° 455 if ($('#wrap > a.go-top').length > 0) { 456 var o = $('#wrap > a.go-top'); 457 458 if ($(this).scrollTop() >= screen.height) { 459 if (!o.is(':visible')) { 460 o.fadeIn(300); 461 } 462 } else { 463 if (o.is(':visible')) { 464 o.fadeOut(300); 465 } 466 } 467 } 468 469 // ìë¨ ë©ë´ 470 if ($('.header > .navigation').length > 0 && !$('body').hasClass('preview')) { 471 if ($(this).scrollTop() > height) { 472 if (!$('#wrap').hasClass('fixed')) { 473 $('#wrap').addClass('fixed'); 474 } 475 } else if ($('#wrap').hasClass('fixed')) { 476 $('#wrap').removeClass('fixed'); 477 } 478 } 479 480 // ë¤ì´ ì¬ë¶ 481 var scroll = $(this).scrollTop(); 482 483 if (scroll > lasted) { 484 if (!$('#wrap').hasClass('down')) { 485 $('#wrap').addClass('down'); 486 } 487 } else { 488 if ($('#wrap').hasClass('down')) { 489 $('#wrap').removeClass('down'); 490 } 491 } 492 493 lasted = scroll; 494 }); 495 496 if ($(window).scrollTop() > height) { 497 if (!$('#wrap').hasClass('fixed')) { 498 $('#wrap').addClass('fixed'); 499 } 500 } else if ($('#wrap').hasClass('fixed')) { 501 $('#wrap').removeClass('fixed'); 502 } 503 504 // ê³µì í기 505 $('a[href="#share"]').bind('click', function () { 506 $('.share-layer').removeClass('complete').addClass('on'); 507 return false; 508 }); 509 $('.share-layer').find('.close').bind('click', function () { 510 $('.share-layer').show().removeClass('on'); 511 return false; 512 }); 513 $('.share-layer').find('.copy-url').bind('click', function () { 514 Navi.copyUrl(function () { 515 $('.share-layer').addClass('complete').fadeOut(1000, function () { 516 $('.share-layer').find('.close').click(); 517 }); 518 }); 519 return false; 520 }); 521 522 // íì ë«ê¸° 523 $('.popup').find('.close').bind('click', function () { 524 if (opener || parent.$('.common-layer').length <= 0) { 525 window.close(); 526 return false; 527 } 528 529 parent.$('.common-layer').remove(); 530 return false; 531 }); 532 533 // 방문 ê¸°ë¡ 534 var referrer = document.referrer; 535 536 if (location.search != '') { 537 var referrers = location.search.substr(1, location.search.length).split('&'); 538 539 for (var i = 0; i < referrers.length; i++) { 540 if (referrers[i].indexOf('referrer=') == 0) { 541 referrer = decodeURIComponent(referrers[i].substr(9, referrers[i].length)); 542 break; 543 } 544 } 545 } 546 547 $('body').append('<img src="' + global.contextPath + '/counter?src=' + encodeURIComponent(location.pathname) + '¶m=' + encodeURIComponent(location.search) + '&referer=' + encodeURIComponent(referrer) + '" alt="COUNTER" style="display:block; width:0; height:0;" />') 548 549 // ì ì ì¬ 550 $('a[href="#vndr"]').bind('click', function () { 551 if ($('div.common-layer').length > 0) { 552 $('div.common-layer').remove(); 553 } 554 555 $('body').append('<div class="common-layer"><iframe src="' + global.contextPath + '/vendors" title="ì ì ì¬ íì¸ íë ì"></iframe></div>'); 556 return false; 557 }); 558 559 // í¸ì 560 $('a[href="#push"]').bind('click', function () { 561 if (typeof global.app == 'undefined') { 562 Navi.alert('APP íê²½ììë§ ê°ë¥í©ëë¤.'); 563 return false; 564 } 565 566 global.app.goPushList(); 567 return false; 568 }); 569}); 570 571$(window).bind('pageshow', function(event) { // ìì´í° ë¤ë¡ê°ê¸° ì íë©´ ì ì´ 572 if (event.originalEvent && event.originalEvent.persisted) { 573 var o = ['loading', 'layer', 'message']; 574 575 $(o).each(function (i, item) { 576 if ($('.common-' + item).length > 0) { 577 $('.common-' + item).remove(); 578 } 579 }); 580 } 581}); 582 583// ë¡ê·¸ì¸ 584global.goLogin = function () { 585 var src = location.pathname + location.search; 586 587 if (location.pathname.indexOf(global.contextPath + '/user') == 0) { 588 src = global.contextPath + '/'; 589 } 590 591 $.ajax({
592 type: 'POST', 593 url: global.contextPath + '/user/save-url', 594 data: {goUrl : src}, 595 dataType: 'json', 596 success: function (data) { 597 location.href = global.loginUrl; 598 }, 599 error : function(xhr, status, error) { 600 Navi.alert(error); 601 } 602 }); 603}; 604 605// ë¡ê·¸ìì 606global.goLogout = function () { 607 location.href = global.logoutUrl; 608}; 609 610// 본ì¸ì¸ì¦ 611global.goCert = function (mode, skip) { 612 if (mode == 'ORDR' && typeof skip == 'undefined') { 613 $.ajax({ 614 type: 'POST', 615 url: global.contextPath + '/user/save-url', 616 data: {goUrl : location.pathname + location.search}, 617 dataType: 'json', 618 async: false, 619 error : function(xhr, status, error) { 620 Navi.alert(error); 621 } 622 }); 623 } 624 625 if ($.browser.mobile) { 626 location.href = global.contextPath + '/user/cert?mode=' + mode; 627 return; 628 } 629 630 var win = Common.openWin(global.contextPath + '/user/cert?mode=' + mode, 'cert', 420, 600, 'yes'); 631 632 if (win == null) { 633 Navi.alert('íì ì¤ì ì íì©íì í ë¤ì ì´ì©í´ 주ì기 ë°ëëë¤.'); 634 } 635}; 636 637// ë°°ë 638global.goBanner = function (o) { 639 if (typeof $(o).attr('banrNo') == 'undefined' || $(o).attr('banrNo') == '0') { 640 return; 641 } 642 643 $.ajax({ 644 type: 'POST', 645 url: global.contextPath + '/banner', 646 data: {banrNo : $(o).attr('banrNo')}, 647 dataType: 'json', 648 async: false, 649 success: function (data) { 650 if (data.error) { 651 //Navi.alert(data.error); 652 return; 653 } else if (data.url.indexOf('#shoplive') == 0) { 654 global.showLivePlayer(data.url); 655 return; 656 } else if (data.openYn == 'Y') { 657 window.open(data.url); 658 return; 659 } 660 661 location.href = data.url; 662 }, 663 error : function(xhr, status, error) { 664 Navi.alert(error); 665 } 666 }); 667} 668 669// íì´ë¨¸ 670global.setTimer = function (o) { 671 if (global.timer == null) { 672 global.timer = {}; 673 } 674 675 var obj = $(o); 676 var cfg = obj.attr('endDt'); 677 var key = obj.attr('timer'); 678 var end = obj.attr('endYn'); 679 680 if (typeof cfg == 'undefined' || cfg == '' || end == 'Y') { 681 obj.addClass('e').html('ì¢ ë£ëììµëë¤.'); 682 return; 683 } else if (typeof end != 'undefined' && end == 'R') { 684 obj.addClass('e').html(obj.attr('staDt') + ' ì§íìì '); 685 return; 686 } else if (global.timer[key] != null) { 687 return; 688 } 689 690 global.timer[key] = setInterval(function () { 691 var res = Common.remaindTime(cfg.substr(0, 4), cfg.substr(4, 2), cfg.substr(6, 2), cfg.substr(8, 2), cfg.substr(10, 2), cfg.substr(12, 2)); 692 693 if (res.gap <= 0) { 694 clearInterval(global.timer[key]); 695 global.timer[key] = null; 696 obj.addClass('e').html('ì¢ ë£ëììµëë¤.'); 697 return; 698 } 699 700 obj.find('.dd').html((res.day < 10 ? '0' : '') + res.day); 701 obj.find('.hh').html((res.hour < 10 ? '0' : '') + res.hour); 702 obj.find('.ii').html((res.min < 10 ? '0' : '') + res.min); 703 obj.find('.ss').html((res.sec < 10 ? '0' : '') + res.sec); 704 }, 1000); 705}; 706 707// ìí ì° 708global.insertPrdtWishInfo = function (o) { 709 if (global.loginYn != 'Y') { 710 Navi.confirm('ë¡ê·¸ì¸ í ì´ì©ì´ ê°ë¥í©ëë¤.\në¡ê·¸ì¸ íìê² ìµëê¹?', function () { 711 global.goLogin(); 712 }); 713 return false; 714 } 715 716 $.ajax({ 717 type: 'POST', 718 url: global.contextPath + '/shop/wish/create', 719 data: {prdtNo : $(o).attr('prdtNo')}, 720 dataType: 'json', 721 success: function (data) { 722 if (data.error) { 723 Navi.alert(data.error); 724 return; 725 } else if (global.depth1 == 'MINE') { 726 location.reload(); 727 return; 728 } 729 730 if ($(o).hasClass('on')) { 731 $(o).html(Common.formatNumber(parseInt($(o).html().replace(/,/gi, '')) - 1)); 732 $(o).removeClass('on'); 733 } else { 734 $(o).html(Common.formatNumber(parseInt($(o).html().replace(/,/gi, '')) + 1)); 735 $(o).addClass('on'); 736 } 737 }, 738 error : function(xhr, status, error) { 739 Navi.alert(error); 740 } 741 }); 742}; 743 744// ë¸ëë ì° 745global.insertBrndWishInfo = function (o) { 746 if (global.loginYn != 'Y') { 747 Navi.confirm('ë¡ê·¸ì¸ í ì´ì©ì´ ê°ë¥í©ëë¤.\në¡ê·¸ì¸ íìê² ìµëê¹?', function () { 748 global.goLogin(); 749 }); 750 return false; 751 } 752 753 $.ajax({
754 type: 'POST', 755 url: global.contextPath + '/shop/brand/wish/create', 756 data: {brndCd : $(o).attr('brndCd')}, 757 dataType: 'json', 758 success: function (data) { 759 if (data.error) { 760 Navi.alert(data.error); 761 return; 762 } else if (global.depth1 == 'MINE') { 763 location.reload(); 764 return; 765 } 766 767 if ($(o).hasClass('on')) { 768 $(o).html(Common.formatNumber(parseInt($(o).html().replace(/,/gi, '')) - 1)); 769 $(o).removeClass('on'); 770 } else { 771 $(o).html(Common.formatNumber(parseInt($(o).html().replace(/,/gi, '')) + 1)); 772 $(o).addClass('on'); 773 } 774 }, 775 error : function(xhr, status, error) { 776 Navi.alert(error); 777 } 778 }); 779}; 780 781// ë보기 ì´ë²¤í¸ 782global.createMoreEvent = function (element) { 783 $(element).find('a.more').bind('click', function () { // ë보기 784 if (global.param.pageIndex >= global.pages) { 785 return false; 786 } 787 788 global.param.pageIndex++; 789 790 $.ajax({ 791 type: 'POST', 792 url: location.pathname, 793 data: global.param, 794 dataType: 'html', 795 async: false, 796 success: function (html) { 797 $(element).find('.page-list').append(html); 798 $(element).find('a.more > strong').html(Common.formatNumber(global.count - global.param.pageIndex * global.param.recordCountPerPage)); 799 800 if (global.param.pageIndex >= global.pages) { 801 $(element).find('a.more').remove(); 802 $(element).find('.page-list').addClass('b'); 803 } 804 805 global.createEvent('.page-' + global.param.pageIndex); 806 }, 807 error : function(xhr, status, error) { 808 Navi.alert(error); 809 } 810 }); 811 812 return false; 813 }); 814}; 815 816// ìµë¼ì´ë¸ 817global.showLivePlayer = function (data) { 818 var source = data.split('-'); 819 820 if (typeof window.cloud == 'undefined' || source.length != 2) { 821 Navi.alert('ì í¨íì§ ìì ë°©ì¡ì ë³´ì ëë¤.'); 822 return; 823 } 824 825 cloud.shoplive.showFeaturedPlayerModal({ 826 campaignKey: source[1] 827 }); 828};
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.