PageSourceSearch

https://cynexmall.com/ind-script/optimizer_user.php?filename=jY_RD…d71e9d420b57a588cc3df17&t=1679552166&user=T

js cynexmall.com collected 2026-10-03 19:56:02 UTC 58,109 bytes, 1,547 lines download raw bytes

1
2
3
4/**
5 * 움직이는 배너 Jquery Plug-in
6 * @author  cafe24
7 */
8
9(function($){
10
11    $.fn.floatBanner = function(options) {
12        options = $.extend({}, $.fn.floatBanner.defaults , options);
13
14        return this.each(function() {
15            var aPosition = $(this).position();
16            var jbOffset = $(this).offset();
17            var node = this;
18
19            $(window).scroll(function() {
20                var _top = $(document).scrollTop();
21                _top = (aPosition.top < _top) ? _top : aPosition.top;
22
23                setTimeout(function () {
24                    var newinit = $(document).scrollTop();
25
26                    if ( newinit > jbOffset.top ) {
27                        _top -= jbOffset.top;
28                        var container_height = $("#wrapper").height();
29                        var quick_height = $(node).height();
30                        var cul = container_height - quick_height;
31                        if(_top > cul){
32                            _top = cul;
33                        }
34                    }else {
35                        _top = 0;
36                    }
37
38                    $(node).stop().animate({top: _top}, options.animate);
39                }, options.delay);
40            });
41        });
42    };
43
44    $.fn.floatBanner.defaults = {
45        'animate'  : 200,
46        'delay'    : 100
47    };
48
49})(jQuery);
50
51/**
52 * 문서 구동후 시작
53 */
54$(document).ready(function(){
55    $('#banner:visible, #quick:visible').floatBanner();
56
57    //placeholder
58    $(".ePlaceholder input, .ePlaceholder textarea").each(function(i){
59        var placeholderName = $(this).parents().attr('title');
60        $(this).attr("placeholder", placeholderName);
61    });
62    /* placeholder ie8, ie9 */
63    $.fn.extend({
64        placeholder : function() {
65            //IE 8 버전에는 hasPlaceholderSupport() 값이 false를 리턴
66           if (hasPlaceholderSupport() === true) {
67                return this;
68            }
69            //hasPlaceholderSupport() 값이 false 일 경우 아래 코드를 실행
70            return this.each(function(){
71                var findThis = $(this);
72                var sPlaceholder = findThis.attr('placeholder');
73                if ( ! sPlaceholder) {
74                   return;
75                }
76                findThis.wrap('<label class="ePlaceholder" />');
77                var sDisplayPlaceHolder = $(this).val() ? ' style="display:none;"' : '';
78                findThis.before('<span' + sDisplayPlaceHolder + '>' + sPlaceholder + '</span>');
79                this.onpropertychange = function(e){
80                    e = event || e;
81                    if (e.propertyName == 'value') {
82                        $(this).trigger('focusout');
83                    }
84                };
85                //공통 class
86                var agent = navigator.userAgent.toLowerCase();
87                if (agent.indexOf("msie") != -1) {
88                    $(".ePlaceholder").css({"position":"relative"});
89                    $(".ePlaceholder span").css({"position":"absolute", "padding":"0 4px", "color":"#878787"});
90                    $(".ePlaceholder label").css({"padding":"0"});
91                }
92            });
93        }
94    });
95
96    $(':input[placeholder]').placeholder(); //placeholder() 함수를 호출
97
98    //클릭하면 placeholder 숨김
99    $('body').delegate('.ePlaceholder span', 'click', function(){
100        $(this).hide();
101    });
102
103    //input창 포커스 인 일때 placeholder 숨김
104    $('body').delegate('.ePlaceholder :input', 'focusin', function(){
105        $(this).prev('span').hide();
106    });
107
108    //input창 포커스 아웃 일때 value 가 true 이면 숨김, false 이면 보여짐
109    $('body').delegate('.ePlaceholder :input', 'focusout', function(){
110        if (this.value) {
111            $(this).prev('span').hide();
112        } else {
113            $(this).prev('span').show();
114        }
115    });
116
117    //input에 placeholder가 지원이 되면 true를 안되면 false를 리턴값으로 던져줌
118    function hasPlaceholderSupport() {
119        if ('placeholder' in document.createElement('input')) {
120            return true;
121        } else {
122            return false;
123        }
124    }
125});
126
127/**
128 *  썸네일 이미지 엑박일경우 기본값 설정
129 */
130$(window).load(function() {
131    $("img.thumb,img.ThumbImage,img.BigImage").each(function($i,$item){
132        var $img = new Image();
133        $img.onerror = function () {
134                $item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif";
135        }
136        $img.src = this.src;
137    });  
138});
139
140
141/********* m_module ***********/
142
143/**
144 *  tooltip
145 */
146$('.eTooltip').each(function(i){
147    $(this).find('.btnClose').attr('tabIndex','-1');
148});
149//tooltip input focus
150$('.eTooltip').find('input').focus(function() {
151    var targetName = returnTagetName(this);
152    targetName.siblings('.ec-base-tooltip').show();
153});
154$('.eTooltip').find('input').focusout(function() {
155    var targetName = returnTagetName(this);
156    targetName.siblings('.ec-base-tooltip').hide();
157});
158function returnTagetName(_this){
159    var ePlacename = $(_this).parent().attr("class");
160    var targetName;
161    if(ePlacename == "ePlaceholder"){ //ePlaceholder 대응
162        targetName = $(_this).parents();
163    }else{
164        targetName = $(_this);
165    }
166    return targetName;
167}
168
169/**
170 *  eTab
171 */
172 $("body").delegate(".eTab a", "click", function(e){
173    // 클릭한 li 에 selected 클래스 추가, 기존 li에 있는 selected 클래스는 삭제.
174    var _li = $(this).parent("li").addClass("selected").siblings().removeClass("selected"),
175    _target = $(this).attr("href"),
176    _siblings = $(_target).attr("class"),
177    _arr = _siblings.split(" "),
178    _classSiblings = "."+_arr[0];
179
180    //클릭한 탭에 해당하는 요소는 활성화, 기존 요소는 비활성화 함.
181    $(_target).show().siblings(_classSiblings).hide();
182
183
184    //preventDefault 는 a 태그 처럼 클릭 이벤트 외에 별도의 브라우저 행동을 막기 위해 사용됨.
185    e.preventDefault();
186});
187
188
189
190
191
192
193$(document).ready(function(){
194    // 토글
195    $('div.eToggle .title').click(function(){
196        var toggle = $(this).parent('.eToggle');
197        if(toggle.hasClass('disable') == false){
198            $(this).parent('.eToggle').toggleClass('selected')
199        }
200    });
201
202    $('dl.eToggle dt').click(function(){
203        $(this).toggleClass('selected');
204        $(this).next('dd').toggleClass('selected');
205    });
206
207    //장바구니 페이지 수량폼 Type 변경
208    $('[id^="quantity"]').each(function() {
209        $(this).get(0).type = 'tel';
210    });
211
212    // 모바일에서 공급사 테이블 th 강제조절
213    $('.xans-mall-supplyinfo, .supplyInfo').find('table > colgroup').find('col').eq(0).width(98);
214    $('.xans-mall-supplyinfo, .supplyInfo').find('th, td').css({padding:'13px 10px 12px'});
215
216    /**
217     *  메인카테고리 toggle
218     */
219    $('.xans-product-listmain h2').toggle(function(){
220        $(this).css('background-image', 'url("//img.echosting.cafe24.com/skin/mobile_ko_KR/layout/bg_title_open.gif")');
221        $(this).siblings().hide();
222        $(this).parent().find('div.ec-base-paginate').hide();
223        $(this).parent().next('div.xans-product-listmore').hide();
224    }, function() {
225        $(this).css('background-image', 'url("//img.echosting.cafe24.com/skin/mobile_ko_KR/layout/bg_title_close.gif")');
226        $(this).siblings().show();
227        $(this).parent().find('div.ec-base-paginate').show();
228        $(this).parent().next('div.xans-product-listmore').show();
229    });
230
231    /**
232     *  상단탑버튼
233     */
234    var globalTopBtnScrollFunc = function() {
235        // 탑버튼 관련변수
236        var $btnTop = $('#btnTop');
237
238        $(window).scroll(function() {
239            try {
240                var iCurScrollPos = $(this).scrollTop();
241
242                if (iCurScrollPos > ($(this).height() / 2)) {
243                    $btnTop.fadeIn('fast');
244                } else {
245                    $btnTop.fadeOut('fast');
246                }
247            } catch(e) { }
248        });
249    };
250
251    /**
252     *  구매버튼
253     */
254    var globalBuyBtnScrollFunc = function() {
255        // 구매버튼 관련변수
256        var sFixId = $('#orderFixItem').size() > 0  ? 'orderFixItem' : 'fixedActionButton',
257            $area = $('#orderFixArea'),
258            $item = $('#' + sFixId + '').not($area);
259
260        $(window).scroll(function(){
261            try {
262                 // 구매버튼 관련변수
263                var iCurrentHeightPos = $(this).scrollTop() + $(this).height(),
264                    iButtonHeightPos = $item.offset().top;
265
266                if (iCurrentHeightPos > iButtonHeightPos || iButtonHeightPos < $(this).scrollTop() + $item.height()) {
267                    if (iButtonHeightPos < $(this).scrollTop() - $item.height()) {
268                        $area.fadeIn('fast');
269                    } else {
270                        $area.hide();
271                    }
272                } else {
273                    $area.fadeIn('fast');
274                }
275            } catch(e) { }
276        });
277    };
278
279    globalTopBtnScrollFunc();
280    globalBuyBtnScrollFunc();
281});
282
283// 공통레이어팝업 오픈
284var globalLayerOpenFunc = function(_this) {
285    this.id = $(_this).data('id');
286    this.param = $(_this).data('param');
287    this.basketType = $('#basket_type').val();
288    this.url = $(_this).data('url');
289    this.layerId = 'ec_temp_mobile_layer';
290    this.layerIframeId = 'ec_temp_mobile_iframe_layer';
291
292    var _this = this;
293
294    function paramSetUrl() {
295        if (this.param) {
296            // if isset param
297        } else {
298            this.url = this.basketType ?  this.url + '?basket_type=' + this.basketType : this.url;
299        }
300    };
301
302    if (this.url) {
303        window.ecScrollTop = $(window).scrollTop();
304        $.ajax({
305            url : this.url,
306            success : function (data) {
307                if (data.indexOf('404 페이지 없음') == -1) {
308                    // 있다면 삭제
309                    try { $(_this).remove(); } catch ( e ) { }
310
311                    var $layer = $('<div>', {
312                        html: $("<iframe>", { src: _this.url, id: _this.layerIframeId, scrolling: 'auto', css: { width: '100%', height: '100%', overflowY: 'auto', border: 0 } } ),
313                        id: _this.layerId,
314                        css : { position: 'absolute', top: 0, left:0, width: '100%', height: $(window).height(), 'z-index': 9999 }
315                    });
316
317                    $('body').append($layer);
318                    $('html, body').css({'overflowY': 'hidden', height: '100%', width: '100%'});
319                    $('#' + this.layerId).show();
320                }
321            }
322        });
323    }
324};
325
326// 공통레이어팝업 닫기
327var globalLayerCloseFunc = function() {
328    this.layerId = 'ec_temp_mobile_layer';
329
330    if (window.parent === window)
331        self.clse();
332    else {
333        parent.$('html, body').css({'overflowY': 'auto', height: 'auto', width: '100%'});
334        parent.$('html, body').scrollTop(parent.window.ecScrollTop);
335        parent.$('#' + this.layerId).remove();
336    }
337};
338
339/**
340 * document.location.href split
341 * return array Param
342 */
343var getQueryString = function(sKey)
344{
345    var sQueryString = document.location.search.substring(1);
346    var aParam = {};
347
348    if (sQueryString) {
349        var aFields = sQueryString.split("&");
350        var aField  = [];
351        for (var i=0; i<aFields.length; i++) {
352            aField = aFields[i].split('=');
353            aParam[aField[0]] = aField[1];
354        }
355    }
356
357    aParam.page = aParam.page ? aParam.page : 1;
358    return sKey ? aParam[sKey] : aParam;
359};
360
361// PC버전 바로 가기
362var isPCver = function() {
363    var sUrl = window.location.hostname;
364    var aTemp = sUrl.split(".");
365
366    var pattern = /^(mobile[\-]{2}shop[0-9]+)$/;
367
368    if (aTemp[0] == 'm' || aTemp[0] == 'skin-mobile' || aTemp[0] == 'mobile') {
369        sUrl = sUrl.replace(aTemp[0]+'.', '');
370    } else if (pattern.test(aTemp[0]) === true) {
371        var aExplode = aTemp[0].split('--');
372        aTemp[0] = aExplode[1];
373        sUrl = aTemp.join('.');
374    }
375    window.location.href = '//'+sUrl+'/?is_pcver=T';
376};
377
378/* 도움말 */
379$('body').delegate('.ec-base-tooltip-area .eTip', 'click', function(e){
380    var findArea = $($(this).parents('.ec-base-tooltip-area'));
381    var findTarget = $($(this).siblings('.ec-base-tooltip'));
382    var findTooltip = $('.ec-base-tooltip');
383    $('.ec-base-tooltip-area').removeClass('show');
384    $(this).parents('.ec-base-tooltip-area:first').addClass('show');
385    findTooltip.hide();
386    findTarget.show();
387    e.preventDefault();
388});
389
390$('body').delegate('.ec-base-tooltip-area .eClose', 'click', function(e){
391    var findTarget = $(this).parents('.ec-base-tooltip:first');
392    $('.ec-base-tooltip-area').removeClass('show');
393    findTarget.hide();
394    e.preventDefault();
395});
396
397$('.ec-base-tooltip-area').find('input').focusout(function() {
398    var findTarget = $(this).parents('.ec-base-tooltip-area').find('.ec-base-tooltip');
399    $('.ec-base-tooltip-area').removeClass('show');
400    findTarget.hide();
401});
402
403//window popup script
404function winPop(url) {
405    window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no");
406}
407/**
408 * document.location.href split
409 * return array Param
410 */
411function getQueryString(sKey)
412{
413    var sQueryString = document.location.search.substring(1);
414    var aParam       = {};
415
416    if (sQueryString) {
417        var aFields = sQueryString.split("&");
418        var aField  = [];
419        for (var i=0; i<aFields.length; i++) {
420            aField = aFields[i].split('=');
421            aParam[aField[0]] = aField[1];
422        }
423    }
424
425    aParam.page = aParam.page ? aParam.page : 1;
426    return sKey ? aParam[sKey] : aParam;
427};
428
429$(document).ready(function(){
430    // tab
431    $.eTab = function(ul){
432        $(ul).find('a').click(function(){
433            var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'),
434                _target = $(this).attr('href'),
435                _siblings = '.' + $(_target).attr('class');
436            $(_target).show().siblings(_siblings).hide();
437            return false
438        });
439    }
440    if ( window.call_eTab ) {
441        call_eTab();
442    };
443});
444
445
446
447// ****************************************************************************************************
448// 2020-04-20
449// 아래 모바일 common.js 추가
450
451
452
453
454// 썸네일 이미지 엑박일경우 기본값 설정
455$(window).load(function() {
456    $(".thumbnail img, img.thumbImage, img.bigImage").each(function($i,$item){
457        var $img = new Image();
458        $img.onerror = function () {
459            $item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif";
460        }
461        $img.src = this.src;
462    });
463});
464
465$(document).ready(function(){
466    // 토글
467    $('div.eToggle .title').click(function(){
468        var toggle = $(this).parent('.eToggle');
469        if(toggle.hasClass('disable') == false){
470            $(this).parent('.eToggle').toggleClass('selected')
471        }
472    });
473
474    $('dl.eToggle dt').click(function(){
475        $(this).toggleClass('selected');
476        $(this).next('dd').toggleClass('selected');
477    });
478
479    //장바구니 페이지 수량폼 Type 변경
480    $('[id^="quantity"]').each(function() {
481        $(this).get(0).type = 'tel';
482    });
483
484    // 모바일에서 공급사 테이블 th 강제조절
485    $('.xans-mall-supplyinfo, .supplyInfo').find('table > colgroup').find('col').eq(0).width(98);
486    $('.xans-mall-supplyinfo, .supplyInfo').find('th, td').css({padding:'13px 10px 12px'});
487
488    /**
489     *  메인카테고리 toggle
490     */
491    $('.xans-product-listmain h2').toggle(function(){
492        $(this).css('background-image', 'url("//img.echosting.cafe24.com/skin/mobile_ko_KR/layout/bg_title_open.gif")');
493        $(this).siblings().hide();
494        $(this).parent().find('div.ec-base-paginate').hide();
495        $(this).parent().next('div.xans-product-listmore').hide();
496    }, function() {
497        $(this).css('background-image', 'url("//img.echosting.cafe24.com/skin/mobile_ko_KR/layout/bg_title_close.gif")');
498        $(this).siblings().show();
499        $(this).parent().find('div.ec-base-paginate').show();
500        $(this).parent().next('div.xans-product-listmore').show();
501    });
502
503    /**
504     *  상단탑버튼
505     */
506    var globalTopBtnScrollFunc = function() {
507        // 탑버튼 관련변수
508        var $btnTop = $('#btnTop');
509
510        $(window).scroll(function() {
511            try {
512                var iCurScrollPos = $(this).scrollTop();
513
514                if (iCurScrollPos > ($(this).height() / 2)) {
515                    $btnTop.fadeIn('fast');
516                } else {
517                    $btnTop.fadeOut('fast');
518                }
519            } catch(e) { }
520        });
521    };
522
523    /**
524     *  구매버튼
525     */
526    var globalBuyBtnScrollFunc = function() {
527        // 구매버튼 관련변수
528        var sFixId = $('#orderFixItem').size() > 0  ? 'orderFixItem' : 'fixedActionButton',
529            $area = $('#orderFixArea'),
530            $item = $('#' + sFixId + '').not($area);
531
532        $(window).scroll(function(){
533            try {
534                 // 구매버튼 관련변수
535                var iCurrentHeightPos = $(this).scrollTop() + $(this).height(),
536                    iButtonHeightPos = $item.offset().top;
537
538                if (iCurrentHeightPos > iButtonHeightPos || iButtonHeightPos < $(this).scrollTop() + $item.height()) {
539                    if (iButtonHeightPos < $(this).scrollTop() - $item.height()) {
540                        $area.fadeIn('fast');
541                    } else {
542                        $area.hide();
543                    }
544                } else {
545                    $area.fadeIn('fast');
546                }
547            } catch(e) { }
548        });
549    };
550
551    globalTopBtnScrollFunc();
552    globalBuyBtnScrollFunc();
553});
554
555// 공통레이어팝업 오픈
556var globalLayerOpenFunc = function(_this) {
557    this.id = $(_this).data('id');
558    this.param = $(_this).data('param');
559    this.basketType = $('#basket_type').val();
560    this.url = $(_this).data('url');
561    this.layerId = 'ec_temp_mobile_layer';
562    this.layerIframeId = 'ec_temp_mobile_iframe_layer';
563
564    var _this = this;
565
566    function paramSetUrl() {
567        if (this.param) {
568            // if isset param
569        } else {
570            this.url = this.basketType ?  this.url + '?basket_type=' + this.basketType : this.url;
571        }
572    };
573
574    if (this.url) {
575        window.ecScrollTop = $(window).scrollTop();
576        $.ajax({
577            url : this.url,
578            success : function (data) {
579                if (data.indexOf('404 페이지 없음') == -1) {
580                    // 있다면 삭제
581                    try { $(_this).remove(); } catch ( e ) { }
582
583                    var $layer = $('<div>', {
584                        html: $("<iframe>", { src: _this.url, id: _this.layerIframeId, scrolling: 'auto', css: { width: '100%', height: '100%', overflowY: 'auto', border: 0 } } ),
585                        id: _this.layerId,
586                        css : { position: 'absolute', top: 0, left:0, width: '100%', height: $(window).height(), 'z-index': 9999 }
587                    });
588
589                    $('body').append($layer);
590                    $('html, body').css({'overflowY': 'hidden', height: '100%', width: '100%'});
591                    $('#' + this.layerId).show();
592                }
593            }
594        });
595    }
596};
597
598// 공통레이어팝업 닫기
599var globalLayerCloseFunc = function() {
600    this.layerId = 'ec_temp_mobile_layer';
601
602    if (window.parent === window)
603        self.clse();
604    else {
605        parent.$('html, body').css({'overflowY': 'auto', height: 'auto', width: '100%'});
606        parent.$('html, body').scrollTop(parent.window.ecScrollTop);
607        parent.$('#' + this.layerId).remove();
608    }
609};
610
611/**
612 * document.location.href split
613 * return array Param
614 */
615var getQueryString = function(sKey)
616{
617    var sQueryString = document.location.search.substring(1);
618    var aParam = {};
619
620    if (sQueryString) {
621        var aFields = sQueryString.split("&");
622        var aField  = [];
623        for (var i=0; i<aFields.length; i++) {
624            aField = aFields[i].split('=');
625            aParam[aField[0]] = aField[1];
626        }
627    }
628
629    aParam.page = aParam.page ? aParam.page : 1;
630    return sKey ? aParam[sKey] : aParam;
631};
632
633// PC버전 바로 가기
634var isPCver = function() {
635    var sUrl = window.location.hostname;
636    var aTemp = sUrl.split(".");
637
638    var pattern = /^(mobile[\-]{2}shop[0-9]+)$/;
639
640    if (aTemp[0] == 'm' || aTemp[0] == 'skin-mobile' || aTemp[0] == 'mobile') {
641        sUrl = sUrl.replace(aTemp[0]+'.', '');
642    } else if (pattern.test(aTemp[0]) === true) {
643        var aExplode = aTemp[0].split('--');
644        aTemp[0] = aExplode[1];
645        sUrl = aTemp.join('.');
646    }
647    window.location.href = '//'+sUrl+'/?is_pcver=T';
648};
649
650/* 도움말 */
651$('body').delegate('.ec-base-tooltip-area .eTip', 'click', function(e){
652    var findArea = $($(this).parents('.ec-base-tooltip-area'));
653    var findTarget = $($(this).siblings('.ec-base-tooltip'));
654    var findTooltip = $('.ec-base-tooltip');
655    $('.ec-base-tooltip-area').removeClass('show');
656    $(this).parents('.ec-base-tooltip-area:first').addClass('show');
657    findTooltip.hide();
658    findTarget.show();
659    e.preventDefault();
660});
661
662$('body').delegate('.ec-base-tooltip-area .eClose', 'click', function(e){
663    var findTarget = $(this).parents('.ec-base-tooltip:first');
664    $('.ec-base-tooltip-area').removeClass('show');
665    findTarget.hide();
666    e.preventDefault();
667});
668
669$('.ec-base-tooltip-area').find('input').focusout(function() {
670    var findTarget = $(this).parents('.ec-base-tooltip-area').find('.ec-base-tooltip');
671    $('.ec-base-tooltip-area').removeClass('show');
672    findTarget.hide();
673});
674
675
676(function($){
677$.fn.extend({
678    center: function() {
679        this.each(function() {
680            var
681                $this = $(this),
682                $w = $(window);
683            $this.css({
684                position: "absolute",
685                top: ~~(($w.height() - $this.outerHeight()) / 2) + $w.scrollTop() + "px",
686                left: ~~(($w.width() - $this.outerWidth()) / 2) + $w.scrollLeft() + "px"
687            });
688        });
689        return this;
690    }
691});
692$(function() {
693    var $container = function(){/*
694<div id="modalContainer">
695    <iframe id="modalContent" scroll="0" scrolling="no" frameBorder="0"></iframe>
696</div>');
697*/}.toString().slice(14,-3);
698    $('body')
699    .append($('<div id="modalBackpanel"></div>'))
700    .append($($container));
701    function closeModal () {
702        $('#modalContainer').hide();
703        $('#modalBackpanel').hide();
704    }
705    $('#modalBackpanel').click(closeModal);
706    zoom = function ($piProductNo, $piCategoryNo, $piDisplayGroup) {
707        var $url = '/product/image_zoom.html?product_no=' + $piProductNo + '&cate_no=' + $piCategoryNo + '&display_group=' + $piDisplayGroup;
708        $('#modalContent').attr('src', $url);
709        $('#modalContent').bind("load",function(){
710            $(".header .close",this.contentWindow.document.body).bind("click", closeModal);
711        });
712        $('#modalBackpanel').css({width:$("body").width(),height:$("body").height(),opacity:.4}).show();
713        $('#modalContainer').center().show();
714    }
715});
716})(jQuery);
717
718/**
719 * 모바일쇼핑몰 슬라이딩메뉴 */
720var aCategory = [];
721$(document).ready(function(){
722    $('#header').append('<div id="dimmedSlider"></div>');
723    
724    var methods = {
725        aCategory    : [],
726        aSubCategory : {},
727        get: function()
728        {
729             $.ajax({
730                url : '/exec/front/Product/SubCategory',
731                dataType: 'json',
732                success: function(aData) {
733                    if (aData == null || aData == 'undefined') {
734                        methods.checkSub();
735                        return;
736                    }
737                    for (var i=0; i<aData.length; i++)
738                    {
739                        var sParentCateNo = aData[i].parent_cate_no;
740                        var sCateNo = aData[i].cate_no;
741                        if (!methods.aSubCategory[sParentCateNo]) {
742                            methods.aSubCategory[sParentCateNo] = [];
743                        }
744                        if (!aCategory[sCateNo]) {
745                            aCategory[sCateNo] = [];
746                        }
747                        methods.aSubCategory[sParentCateNo].push( aData[i] );
748                        aCategory[sCateNo] = aData[i];
749                    }
750                    methods.checkSub();
751                    methods.getMyCateList();
752                }
753            });
754        },
755        getParam: function(sUrl, sKey) {
756            var aUrl         = sUrl.split('?');
757            var sQueryString = aUrl[1];
758            var aParam       = {};
759            if (sQueryString) {
760                var aFields = sQueryString.split("&");
761                var aField  = [];
762                for (var i=0; i<aFields.length; i++) {
763                    aField = aFields[i].split('=');
764                    aParam[aField[0]] = aField[1];
765                }
766            }
767            return sKey ? aParam[sKey] : aParam;
768        },
769
770        show: function(overNode, iCateNo) {
771             var oParentNode = overNode;
772            var aHtml = [];
773            var sMyCateList = localStorage.getItem("myCateList");
774            if (methods.aSubCategory[iCateNo] != undefined) {
775                aHtml.push('<ul class="slideSubMenu">');
776                $(methods.aSubCategory[iCateNo]).each(function() {
777                    var sNextParentNo = this.cate_no;
778                    var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : '';
779                    if (methods.aSubCategory[sNextParentNo] == undefined) {
780                        aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">');
781                        var sHref = '/product/list.html'+this.param;
782                    } else {
783                        aHtml.push('<li id="cate'+this.cate_no+'">');
784                        var sHref = '#none';
785                    }
786                    aHtml.push('<a href="'+sHref+'" class="cate" cate="'+this.param+'" onclick="subMenuEvent(this);">'+this.name+'</a>');
787                    if (methods.aSubCategory[sNextParentNo] != undefined)  aHtml.push('<a href="/product/list.html'+this.param+'" class="view">상품보기</a>');
788                    aHtml.push('<button type="button" class="icoBookmark'+sCateSelected+'" id="icoBookmark">즐겨찾기 추가</button>');
789
790                    if (methods.aSubCategory[sNextParentNo] != undefined) {
791                        aHtml.push('<ul>');
792                        $(methods.aSubCategory[sNextParentNo]).each(function() {
793                            var sNextParentNo2 = this.cate_no;
794                            var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : '';
795                            if (methods.aSubCategory[sNextParentNo2] == undefined) {
796                                aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">');
797                                var sHref = '/product/list.html'+this.param;
798                            } else {
799                                aHtml.push('<li id="cate'+this.cate_no+'">');
800                                var sHref = '#none';
801                            }
802                            aHtml.push('<a href="'+sHref+'" class="cate" cate="'+this.param+'" onclick="subMenuEvent(this);">'+this.name+'</a>');
803                            if (methods.aSubCategory[sNextParentNo] != undefined)  aHtml.push('<a href="/product/list.html'+this.param+'" class="view">상품보기</a>');
804                            aHtml.push('<button type="button" class="icoBookmark'+sCateSelected+'" id="icoBookmark">즐겨찾기 추가</button>');
805
806                            if (methods.aSubCategory[sNextParentNo2] != undefined) {
807                                aHtml.push('<ul>');
808
809                                $(methods.aSubCategory[sNextParentNo2]).each(function() {
810                                    aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">');
811                                    var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : '';
812                                    aHtml.push('<a href="/product/list.html'+this.param+'" class="cate" cate="'+this.param+'" onclick="subMenuEvent(this);">'+this.name+'</a>');
813                                    aHtml.push('<button type="button" class="icoBookmark'+sCateSelected+'" id="icoBookmark">즐겨찾기 추가</button>');
814                                    aHtml.push('</li>');
815                                });
816                                aHtml.push('</ul>');
817                            }
818                            aHtml.push('</li>');
819                        });
820                        aHtml.push('</ul>');
821                    }
822                    aHtml.push('</li>');
823                });
824                aHtml.push('</ul>');
825            }
826            $(oParentNode).append(aHtml.join(''));
827        },
828        close: function() {
829            $('.slideSubMenu').remove();
830        },
831        checkSub: function() {
832            $('.cate').each(function(){
833                var iCateNo = Number(methods.getParam($(this).attr('cate'), 'cate_no'));
834                var result = methods.aSubCategory[iCateNo];
835                if (result == undefined) {
836                    if ($(this).closest('#slideProjectList').length) {
837                        var sHref = '/product/project.html'+$(this).attr('cate');
838                    } else {
839                        var sHref = '/product/list.html'+$(this).attr('cate');
840                    }
841
842                    $(this).attr('href', sHref);
843                    $(this).parent().attr('class', 'noChild');
844                }
845            });
846        },
847        getMyCateList :function() {
848            var sMyCateList = localStorage.getItem("myCateList");
849            if (sMyCateList != null && sMyCateList != "") {
850                var aTempList = sMyCateList.split("|");
851                var aHtml = [];
852                for (var i = 0; i < aTempList.length; i++) {
853                    if (aTempList[i] != "") {
854                        var iCateNo = aTempList[i];
855                        var sCateName = aCategory[iCateNo].name;
856                        var sCateParam = aCategory[iCateNo].param;
857                        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>');
858                        $("#cate"+iCateNo+" #icoBookmark").addClass("selected");
859                    }
860                }
861                $('#bookmartCateArea').append('<ul>'+aHtml.join('')+'</ul>');
862            }
863            chkMyCateList();
864        }
865    };
866    
867    
868    
869    
870
871    var offCover = {
872        init : function() {
873            $(function() {
874               $('#wrap').append('<a href="#container" id="btnFoldLayout">메뉴 토글</a>');
875                offCover.resize();
876                $(window).resize(function(){
877                    offCover.resize();
878                });
879            });
880        },
881        layout : function(){
882            if ($('html').hasClass('expand')) {
883                $('#btnFoldLayout').show();
884                $('#aside').css({'visibility':'visible'});
885
886                setTimeout(function(){
887                    $('#btnFoldLayout').css({'background':'rgba(0,0,0,0.7)'});
888                }, 350);
889            } else {
890                $('#btnFoldLayout').hide();
891                setTimeout(function(){
892                     $('#aside').css({'visibility':'hidden'});
893                    }, 100);
894            }
895            $('#aside').css({'visibility':'visible'});
896        },
897        resize : function(){
898            var height = $('body').height();
899            $('#container').css({'min-height':height});
900        }
901    };
902    methods.get();
903
904    offCover.init();
905
906
907    $('#header .fold, #aside .btnClose').click(function(e){
908        $('#dimmedSlider').toggle();
909        $('html').toggleClass('expand');
910        offCover.layout(); console.log("AAA");
911        e.preventDefault();
912    });
913
914    $('#btnFoldLayout').click(function(e){
915        $('#header .fold').trigger('click');
916        e.preventDefault();
917    });
918
919    
920    
921    
922    $('#slideCateList li > a.cate').click(function(e) {
923        var iCateNo = Number(methods.getParam($(this).attr('cate'), 'cate_no'));
924        if ($(this).parent().attr('class') == 'xans-record- selected') {
925            methods.close();
926        } else {
927            if (!iCateNo) return;
928            $('#aside #slideCateList li').removeClass('selected');
929            methods.close();
930            methods.show(this.parentNode, iCateNo);
931        }
932    });
933
934    $('#side-panel ul a.cate').click(function(e){
935            $(this).parent().find('li').removeClass('selected');
936            $(this).parent().toggleClass('selected');
937            if (!$(this).parent('li').hasClass('noChild')){
938                e.preventDefault();
939            }
940    });
941
942    $("#icoBookmark").live('click', function() {
943        var iCateNo = Number(methods.getParam($(this).parent().find('a').attr('cate'), 'cate_no'));
944        setMyCateList(iCateNo, $(this));
945    });
946
947    $('#slideCateList h2').click(function() {
948        var oParentId = $(this).parent().attr('id');
949        if (oParentId == 'slideCateList' || oParentId == 'slideMultishopList' || oParentId == 'slideProjectList') {
950            ($(this).attr('class') == 'selected') ? $(this).next().hide() : $(this).next().show();
951        } else if (oParentId == 'bookmarkCategory') {
952            if ($(this).attr('class') == 'selected') {
953                $(this).parent().find('#bookmarkEmpty').hide();
954                $(this).parent().find('#bookmartCateArea').hide();
955            } else {
956                chkMyCateList();
957                $(this).parent().find('#bookmartCateArea').show();
958            }
959        }
960        $(this).toggleClass('selected');
961    });
962});
963
964
965
966
967
968function subMenuEvent(obj) {
969    $(obj).parent().find('li').removeClass('selected');
970    $(obj).parent().toggleClass('selected');
971}
972function setMyCateList(iCateNo, oObj) {
973    $(oObj).toggleClass('selected');
974    var sMyCateList = localStorage.getItem("myCateList");
975    var aCateList = [];
976    if (checkInArray(sMyCateList, iCateNo) == true) {
977        var aTemp = sMyCateList.split("|");
978        for (var i = 0 ; i < aTemp.length ; i++) {
979            if (aTemp[i] != iCateNo) {
980                aCateList.push(aTemp[i]);
981            }
982        }
983        var sCateList = aCateList.join('|');
984        localStorage.setItem("myCateList" , sCateList);
985        $('#bookmartCateArea #bookmark'+iCateNo).remove();
986        if (aCateList.length == 0) {
987             $('#bookmarkCategory #bookmartCateArea').find('ul').remove();
988        }
989        $("#cate"+iCateNo+" > #icoBookmark").removeClass("selected");
990    } else {
991        var sCateName = aCategory[iCateNo].name;
992        var sCateParam = aCategory[iCateNo].param;
993        var sHtml = '';
994        if (sMyCateList == null || sMyCateList == '') {
995            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>'
996            $('#bookmarkCategory #bookmartCateArea').append(sHtml);
997        } else {
998            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>'
999            $('#bookmarkCategory #bookmartCateArea ul').append(sHtml);
1000        }
1001        $(this).addClass('selected');
1002        if (sMyCateList == null || sMyCateList == '') {
1003            localStorage.setItem('myCateList' , iCateNo);
1004        } else {
1005            localStorage.setItem('myCateList' , sMyCateList + '|' + iCateNo);
1006        }
1007    }
1008    chkMyCateList();
1009}
1010function checkInArray(sBookmarkList, iCateNo) {
1011    if (sBookmarkList == null) return false;
1012    var aBookmarkList = sBookmarkList.split("|");
1013    for (var i = 0; i < aBookmarkList.length; i++) {
1014        if (aBookmarkList[i] == iCateNo) {
1015            return true;
1016        }
1017    }
1018    return false;
1019}
1020function chkMyCateList() {
1021    var sMyCateList = localStorage.getItem("myCateList");
1022    if (sMyCateList == null || sMyCateList == '') {
1023        $('#bookmarkEmpty').show();
1024    } else {
1025        $('#bookmarkEmpty').hide();
1026    }
1027}
1028
1029
1030
1031
1032
1033
1034
1035
1036/* 
1037 게시판 롤링 
1038*/ 
1039$.fn.boardVerSlide = function (settings) { 
1040 settings = $.extend({ 
1041 view : 5, 
1042 direction : 'up', 
1043 delay : 4000 
1044 }, settings); 
1045 var option = []; 
1046 option = $.extend({}, $.fn.boardVerSlide.defaults, settings); 
1047 return this.each(function () { 
1048 $.fn.extend(this, boardVerSlide); 
1049 this.wrap = $(this); 
1050 this.option = option; 
1051 this.direction = this.option.direction; 
1052 this.delay = this.option.delay; 
1053 this.view = this.option.view; 
1054 this.init(); 
1055 }); 
1056}; 
1057var boardVerSlide = { 
1058 init : function(){ 
1059 var direction = this.direction; 
1060 var delay = this.delay; 
1061 var table = this.wrap.find('table'); 
1062 var tbody = table.find('> tbody'); 
1063 var view = this.view; 
1064 var tableHeight = table.outerHeight(); 
1065 var trLength = tbody.find('> tr').length; 
1066 var trHeight = tbody.find('> tr').outerHeight(); 
1067 var boardVerSlideAreaHeight = trHeight * view; 
1068 table.wrap('<div class="boardVerSlideArea" style="height:'+ boardVerSlideAreaHeight +'px;" />'); 
1069 table.wrap('<div class="list" />'); 
1070 var boardVerSlideArea = this.wrap.find('.boardVerSlideArea'); 
1071 var list = this.wrap.find('.list');  table.find('caption').remove(); 
1072 table.find('thead').remove(); 
1073 if ($.browser.webkit) { 
1074 var tdBorderBottom = parseInt(tbody.find('tr > td').css('border-bottom-width')); 
1075 var padddingBottom = (view * tdBorderBottom) + 1; 
1076 boardVerSlideArea.css({'paddingBottom': padddingBottom + 'px'}); 
1077 } 
1078 function action() { 
1079 switch(direction){ 
1080 case "up": 
1081 var item = tbody.find('> tr:first-child'); 
1082 var itemClone = item.clone(); 
1083 tbody.append(itemClone); 
1084 if ($.browser.opera || $.browser.webkit) { 
1085 list.css({'marginTop':'-1px'}); 
1086 } 
1087 list.css({'top':0}).animate({'top': '-' + trHeight +'px'}, function(){ 
1088 list.css({'top': 0}); 
1089 item.remove(); 
1090 }); 
1091 break; 
1092 case "down": 
1093 var item = tbody.find('> tr:last-child'); 
1094 var itemClone = item.clone(); 
1095 tbody.prepend(itemClone); 
1096 list.css({'bottom':0}).animate({'bottom': '-' + trHeight +'px'}, function(){ 
1097 list.css({'bottom': 0}); 
1098item.remove(); 
1099 }); 
1100 break; 
1101 } 
1102 } 
1103 var timer; 
1104 var timerStart = function(){ 
1105 timer = setInterval(function(){ 
1106 action(); 
1107 },delay ); 
1108 } 
1109 timerStart(); 
1110 this.wrap.mouseenter(function(){ 
1111 clearTimeout(timer); 
1112 }); 
1113 this.wrap.mouseleave(function(){ 
1114 timerStart(); 
1115 }); 
1116 } 
1117} 
1118$(function(){ 
1119 /* 
1120 메인 > 게시판 롤링 옵션 설정 
1121 - direction : up(위로), down(아래로) 
1122 - delay : 타이머(기본 5 초 == 5000) 
1123 - view : 보여질 개수 
1124 */ 
1125 $("#boardVerticalSlide_1").boardVerSlide({ 
1126 direction : 'up', 
1127 delay : 3000, 
1128 view : 3  }); 
1129}); 
1130
1131
1132
1133
1134
1135
1136$(document).ready(function(){
1137    var $full_wrap = $('.full_cate_wrap');
1138    var $full_cate_list = $full_wrap.find('.full_cate01');
1139    var len = $full_cate_list.length;
1140
1141    $.ajax({
1142        url : '/exec/front/Product/SubCategory',
1143        dataType: 'json',
1144        success: function(aData) {
1145            if (aData == null || aData == 'undefined') {
1146                return;
1147            }
1148            $.each(aData, function(index, key) {
1149                var $cate_01 = $full_wrap.find('.full_cate01[data-url$="=' + key.parent_cate_no + '"]');
1150                if ($cate_01.length > 0) {
1151                    var _index = $full_cate_list.index($cate_01);
1152
1153                    if ($cate_01.hasClass('is2') === false) {
1154                        $cate_01.addClass('is2');
1155                        $cate_01.append('<div class="cate02_wrap"><dl></dl></div>');
1156                    }
1157                    $cate_01.find('.cate02_wrap dl').append('<dd data-url="'+key.param+'" class="cate_02"><a href="/product/list.html'+key.param+'">'+key.name+'</a></dd>');
1158                    return;
1159                }
1160
1161                var $cate_02 = $full_wrap.find('.cate_02[data-url$="=' + key.parent_cate_no + '"]');
1162                if ($cate_02.length > 0) {
1163                    if ($cate_02.hasClass('is2') === false) {
1164                        $cate_02.addClass('is2');
1165                        $cate_02.append('<dl class="cate03_wrap"></dl>');
1166                    }
1167                    $cate_02.find('.cate03_wrap').append('<dd data-url="'+key.param+'" class="cate_03"><a href="/product/list.html'+key.param+'">'+key.name+'</a></dd>');
1168                    return;
1169                }
1170
1171                var $cate_03 = $full_wrap.find('.cate_03[data-url$="=' + key.parent_cate_no + '"]');
1172                if ($cate_03.hasClass('is2') === false) {
1173                    $cate_03.addClass('is2');
1174                    $cate_03.append('<dl class="cate04_wrap"></dl>');
1175                }
1176                $cate_03.find('.cate04_wrap').append('<dd data-url="'+key.param+'" class="cate_04"><a href="/product/list.html'+key.param+'">'+key.name+'</a></dd>');
1177            });
1178            
1179            setCategory();
1180        }
1181    });
1182});
1183
1184
1185
1186function setCategory(){
1187
1188	(function(){
1189		var $this=$('#full_menu');
1190		var $cate_01=$this.find('.full_cate01');
1191		var $cate_02=$this.find('.cate_02');
1192        var $cate_03=$this.find('.cate_03');
1193		
1194		var speed=200;
1195
1196
1197		
1198	})();
1199
1200
1201	(function(){
1202		var $this=$('#full_category');
1203		var $cate_01=$this.find('.full_cate01');
1204		var $cate_02=$this.find('.cate_02');
1205        var $cate_03=$this.find('.cate_03');
1206		var $full_close=$this.find('.full_close');
1207        var $full_btn=$('#hb_full_btn');
1208		var speed=200;
1209
1210        
1211        $full_btn.bind('click',function(e){
1212            e.stopPropagation();
1213			if($(this).hasClass('on')){
1214				$(this).removeClass('on')
1215				$this.fadeOut(speed);
1216			}else{
1217				$(this).addClass('on')
1218				$this.fadeIn(speed);
1219			}
1220		});        
1221		$full_close.bind('click',function(){
1222			$full_btn.removeClass('on');
1223			$this.fadeOut(speed);
1224		});                
1225        $('body').bind('click',function(event){  
1226            if($full_btn.hasClass('on')){
1227                $full_btn.removeClass('on');
1228                $this.fadeOut(speed);
1229            }
1230        });
1231      
1232	})();
1233    
1234};
1235
1236
1237
1238
1239
1240$(document).ready(function(){
1241    var $gnb_wrap = $('.gnb_cate_wrap');
1242    var $gnb_cate_img = $('.gnb_category_img li');
1243    var $gnb_cate_list = $gnb_wrap.find('.gnb_cate01');
1244
1245    $.ajax({
1246        url : '/exec/front/Product/SubCategory',
1247        dataType: 'json',
1248        success: function(aData) {
1249            if (aData == null || aData == 'undefined') {
1250                return;
1251            }
1252            $.each(aData, function(index, key) {
1253                
1254                var $gnb_01 = $gnb_wrap.find('.gnb_cate01[data-url$="=' + key.parent_cate_no + '"]');
1255                if ($gnb_01.length > 0) {
1256                    var _index = $gnb_cate_list.index($gnb_01);
1257
1258                    if ($gnb_01.hasClass('is') === false) {
1259                        $gnb_01.addClass('is');
1260                        $gnb_01.append('<ul class="gnb_cate02_ul"><li><ul class="gnb_cate02_wrap"></ul></li><li class="menuBanner"></li></ul>');
1261                    }
1262                    $gnb_01.find('.gnb_cate02_wrap').append('<li><a href="'+this.link_product_list+'">'+this.name+'</a></li>');
1263                    return;
1264                }
1265                
1266
1267
1268                    
1269                    
1270
1271                var $gnb_02 = $gnb_wrap.find('.gnb_cate_02[data-url$="=' + key.parent_cate_no + '"]');
1272                if ($gnb_02.length > 0) {
1273                    if ($gnb_02.hasClass('is') === false) {
1274                        $gnb_02.addClass('is');
1275                        $gnb_02.append('<ul class="gnb_cate03_wrap"></ul>');
1276                    }
1277                    $gnb_02.find('.gnb_cate03_wrap').append('<li><a href="'+this.link_product_list+'">'+this.name+'</a></li>');
1278                    return;
1279                }
1280
1281                var $gnb_03 = $gnb_wrap.find('.gnb_cate_03[data-url$="=' + key.parent_cate_no + '"]');
1282                if ($gnb_03.hasClass('is') === false) {
1283                    $gnb_03.addClass('is');
1284                    $gnb_03.append('<ul class="gnb_cate04_wrap"></ul>');
1285                }
1286                $gnb_03.find('.gnb_cate04_wrap').append('<li><a href="'+this.link_product_list+'">'+this.name+'</a></li>');
1287            });
1288            
1289            setCategory2();
1290            
1291                            
1292                //드롭다운 메뉴생성
1293                $('#primary-menu .gnb_cate_wrap li:nth-child(1) .menuBanner').html(menuBanner01) ;
1294                $('#primary-menu .gnb_cate_wrap li:nth-child(2) .menuBanner').html(menuBanner02) ;
1295                $('#primary-menu .gnb_cate_wrap li:nth-child(3) .menuBanner').html(menuBanner03) ;
1296                $('#primary-menu .gnb_cate_wrap li:nth-child(4) .menuBanner').html(menuBanner04) ;
1297                $('#primary-menu .gnb_cate_wrap li:nth-child(5) .menuBanner').html(menuBanner05) ;
1298                $('#primary-menu .gnb_cate_wrap li:nth-child(6) .menuBanner').html(menuBanner06) ;
1299                $('#primary-menu .gnb_cate_wrap li:nth-child(7) .menuBanner').html(menuBanner07) ;
1300                $('#primary-menu .gnb_cate_wrap li:nth-child(8) .menuBanner').html(menuBanner08) ;
1301                $('#primary-menu .gnb_cate_wrap li:nth-child(9) .menuBanner').html(menuBanner09) ;
1302                $('#primary-menu .gnb_cate_wrap li:nth-child(10) .menuBanner').html(menuBanner10) ;
1303            
1304				$('#primary-menu .gnb_cate_wrap li:nth-child(11) .menuBanner').html(menuBanner11) ;
1305                $('#primary-menu .gnb_cate_wrap li:nth-child(12) .menuBanner').html(menuBanner12) ;
1306                $('#primary-menu .gnb_cate_wrap li:nth-child(13) .menuBanner').html(menuBanner13) ;
1307                $('#primary-menu .gnb_cate_wrap li:nth-child(14) .menuBanner').html(menuBanner14) ;
1308                $('#primary-menu .gnb_cate_wrap li:nth-child(15) .menuBanner').html(menuBanner15) ;
1309                $('#primary-menu .gnb_cate_wrap li:nth-child(16) .menuBanner').html(menuBanner16) ;
1310                $('#primary-menu .gnb_cate_wrap li:nth-child(17) .menuBanner').html(menuBanner17) ;
1311                $('#primary-menu .gnb_cate_wrap li:nth-child(18) .menuBanner').html(menuBanner18) ;
1312                $('#primary-menu .gnb_cate_wrap li:nth-child(19) .menuBanner').html(menuBanner19) ;
1313                $('#primary-menu .gnb_cate_wrap li:nth-child(20) .menuBanner').html(menuBanner20) ;
1314                $("img[src$='none-img.png']").closest('ul').addClass('none_banner'); 
1315        }
1316    });
1317});
1318
1319
1320
1321function setCategory2(){
1322
1323
1324
1325	(function(){
1326		var $this=$('.gnb_category');
1327		var $gnb_01=$this.find('.gnb_cate02_ul');
1328		var $gnb_02=$this.find('.gnb_cate_02');
1329        var $gnb_03=$this.find('.gnb_cate_03');
1330		var speed=200;
1331		$gnb_01.bind('mouseenter',function(){
1332			$gnb_01.css('z-index',0);
1333			$(this).css('z-index',1);
1334           $(this).find('.gnb_cate02_ul').stop(true,true).fadeIn(speed);
1335			$(this).addClass('on');
1336 
1337		}).bind('mouseleave',function(){
1338           $(this).find('.gnb_cate02_ul').stop(true,true).fadeOut(speed);
1339			$(this).removeClass('on');
1340        
1341		});
1342		$gnb_02.bind('mouseenter',function(){
1343			$gnb_02.css('z-index',0);
1344			$(this).css('z-index',1);
1345			$(this).find('.gnb_cate03_wrap').stop(true,true).fadeIn(speed);
1346			$(this).addClass('on');
1347		}).bind('mouseleave',function(){
1348			$(this).find('.gnb_cate03_wrap').stop(true,true).fadeOut(speed);
1349			$(this).removeClass('on');
1350		});
1351        $gnb_03.bind('mouseenter',function(){
1352			$gnb_03.css('z-index',0);
1353			$(this).css('z-index',1);
1354			$(this).find('.gnb_cate04_wrap').stop(true,true).fadeIn(speed);
1355			$(this).addClass('on');
1356		}).bind('mouseleave',function(){
1357			$(this).find('.gnb_cate04_wrap').stop(true,true).fadeOut(speed);
1358			$(this).removeClass('on');
1359		});
1360        
1361
1362        
1363	})();
1364    
1365 
1366};
1367
1368
1369
1370$(document).ready(function(){
1371    var max_h=0;
1372    $(".gnb_cate02_ul li").each(function(){
1373        var h = parseInt($(this).css("height"));
1374        if(max_h<h){ max_h = h; }
1375    });
1376    $(".gnb_cate02_ul li").each(function(){
1377        $(this).css({height:max_h});
1378    });
1379});
1380
1381
1382
1383
1384// ■■■ 메뉴별 드롭다운 이미지배너광고 관리 : 대분류메뉴에 마우스 오버시 노출되는 이미지배너를 교체/생성할 수 있습니다. ■■■
1385// 각각의 순서에 맞게 배너 이미지를 교체하세요.
1386// 관리자화면 > 상품분류 > 대분류만 생성한 경우에는 노출되지 않습니다. 
1387// 관리자화면에서 중분류 또는 중분류이하의 분류를 생성하셔야 드롭다운메뉴가 노출되면서 배너이미지도 함께 노출됩니다.
1388// 이미지배너광고가 필요없는 메뉴의 경우에는 "<img src='/web/upload/hb/banner/none-img.png'>"으로 작성해주세요.
1389// 배너사이즈는 가로사이즈가 250px로 고정되어있습니다. 세로는 원하는 사이즈로 제작하여 업로드하세요.
1390// 최대20개까지만 설정가능하도록 세팅되어있습니다.
1391
1392
1393
1394//1번째 메뉴의 배너이미지 : 이미지경로와 클릭시 이동될 페이지URL을 아래와 같이 변경하세요.
1395var menuBanner01 = "<img src='/web/upload/hb/banner/none-img.png'>"
1396
1397//2번재 메뉴의 배너이미지가 필요없으면 반드시 아래와 같이 이미지경로를 변경해주세요
1398var menuBanner02 = "<img src='/web/upload/hb/banner/none-img.png'>"
1399
1400//3번째 메뉴의 배너이미지
1401var menuBanner03 = "<img src='/web/upload/hb/banner/none-img.png'>"
1402
1403//4번째 메뉴의 배너이미지
1404var menuBanner04 = "<img src='/web/upload/hb/banner/none-img.png'>"
1405
1406//5번째 메뉴의 배너이미지
1407var menuBanner05 = "<img src='/web/upload/hb/banner/none-img.png'>"
1408
1409//6번째 메뉴의 배너이미지
1410var menuBanner06 = "<img src='/web/upload/hb/banner/none-img.png'>"
1411
1412//7번째 메뉴의 배너이미지
1413var menuBanner07 = "<img src='/web/upload/hb/banner/none-img.png'>"
1414
1415//8번째 메뉴의 배너이미지
1416var menuBanner08 = "<img src='/web/upload/hb/banner/none-img.png'>"
1417
1418//9번째 메뉴의 배너이미지
1419var menuBanner09 = "<img src='/web/upload/hb/banner/none-img.png'>"
1420
1421//10번째 메뉴의 배너이미지
1422var menuBanner10 = "<img src='/web/upload/hb/banner/none-img.png'>"
1423
1424
1425
1426
1427//11번째 메뉴의 배너이미지
1428var menuBanner11 = "<img src='/web/upload/hb/banner/none-img.png'>"
1429
1430//12번째 메뉴의 배너이미지
1431var menuBanner12 = "<img src='/web/upload/hb/banner/none-img.png'>"
1432
1433//13번째 메뉴의 배너이미지
1434var menuBanner13 = "<img src='/web/upload/hb/banner/none-img.png'>"
1435
1436//14번째 메뉴의 배너이미지
1437var menuBanner14 = "<img src='/web/upload/hb/banner/none-img.png'>"
1438
1439//15번째 메뉴의 배너이미지
1440var menuBanner15 = "<img src='/web/upload/hb/banner/none-img.png'>"
1441
1442//16번째 메뉴의 배너이미지
1443var menuBanner16 = "<img src='/web/upload/hb/banner/none-img.png'>"
1444
1445//17번째 메뉴의 배너이미지
1446var menuBanner17 = "<img src='/web/upload/hb/banner/none-img.png'>"
1447
1448//18번째 메뉴의 배너이미지
1449var menuBanner18 = "<img src='/web/upload/hb/banner/none-img.png'>"
1450
1451//19번째 메뉴의 배너이미지
1452var menuBanner19 = "<img src='/web/upload/hb/banner/none-img.png'>"
1453
1454//20번째 메뉴의 배너이미지
1455var menuBanner20 = "<img src='/web/upload/hb/banner/none-img.png'>"
1456
1457
1458
1459
1460
1461
1462$(document).ready(function(){
1463    if (typeof(EC_SHOP_MULTISHOP_SHIPPING) != "undefined") {
1464        var sShippingCountryCode4Cookie = 'shippingCountryCode';
1465        var bShippingCountryProc = false;
1466
1467        // 배송국가 선택 설정이 사용안함이면 숨김
1468        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) {
1469            $('.xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist').hide();
1470            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptioncountry').hide();
1471        } else {
1472            $('.thumb .xans-layout-multishoplistitem').hide();
1473            var aShippingCountryCode = document.cookie.match('(^|;) ?'+sShippingCountryCode4Cookie+'=([^;]*)(;|$)');
1474            if (typeof(aShippingCountryCode) != 'undefined' && aS
1474hippingCountryCode != null && aShippingCountryCode.length > 2) {
1475                var sShippingCountryValue = aShippingCountryCode[2];
1476            }
1477
1478            // query string으로 넘어 온 배송국가 값이 있다면, 그 값을 적용함
1479            var aHrefCountryValue = decodeURIComponent(location.href).split("/?country=");
1480
1481            if (aHrefCountryValue.length == 2) {
1482                var sShippingCountryValue = aHrefCountryValue[1];
1483            }
1484
1485            // 메인 페이지에서 국가선택을 안한 경우, 그 외의 페이지에서 셋팅된 값이 안 나오는 현상 처리
1486            if (location.href.split("/").length != 4 && $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()) {
1487                $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join(""));
1488
1489                if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) {
1490                    $("#f_country").val($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val());
1491                }
1492            }
1493            if (typeof(sShippingCountryValue) != "undefined" && sShippingCountryValue != "" && sShippingCountryValue != null) {
1494                sShippingCountryValue = sShippingCountryValue.split("#")[0];
1495                var bShippingCountryProc = true;
1496
1497                $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue);
1498                $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join(""));
1499                var expires = new Date();
1500                expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30일간 쿠키 유지
1501                document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString();
1502                if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) {
1503                    $("#f_country").val(sShippingCountryValue).change();;
1504                }
1505            }
1506        }
1507        // 언어선택 설정이 사용안함이면 숨김
1508        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingLanguageSelection === false) {
1509            $('.xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist').hide();
1510            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptionlanguage').hide();
1511        } else {
1512            $('.thumb .xans-layout-multishoplistitem').hide();
1513        }
1514
1515        // 배송국가 및 언어 설정이 둘 다 사용안함이면 숨김
1516        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShipping === false) {
1517            $(".xans-layout-multishopshipping").hide();
1518            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption').hide();
1519        } else if (bShippingCountryProc === false && location.href.split("/").length == 4) { // 배송국가 값을 처리한 적이 없고, 메인화면일 때만 선택 레이어를 띄움
1520            var sShippingCountryValue = $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val();
1521            $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue);
1522            $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join(""));
1523            // 배송국가 선택을 사용해야 레이어를 보이게 함
1524            if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === true) {
1525                $(".xans-layout-multishopshipping").show();
1526            }
1527        }
1528
1529        $(".xans-layout-multishopshipping .close").bind("click", function() {
1530            $(".xans-layout-multishopshipping").hide();
1531        });
1532
1533        $(".xans-layout-multishopshipping .ec-base-button a").bind("click", function() {
1534            var expires = new Date();
1535            expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30일간 쿠키 유지
1536            document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString();
1537
1538            // 도메인 문제로 쿠키로 배송국가 설정이 안 되는 경우를 위해 query string으로 배송국가 값
1538을 넘김
1539            var sQuerySting = (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) ? "" : "/?country="+encodeURIComponent($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val());
1540
1541            location.href = '//'+$(".xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist").val()+sQuerySting;
1542        });
1543        $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a").bind("click", function() {
1544            $(".xans-layout-multishopshipping").show();
1545        });
1546    }
1547});

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.