PageSourceSearch

https://guwolsibil.com/ind-script/optimizer_user.php?filename=jY9L…0d9b86d1d26a6bff0c5f749&t=1778044163&user=T

js guwolsibil.com collected 2026-10-06 14:04:15 UTC 47,167 bytes, 1,125 lines download raw bytes

1/**
2 * 카테고리 마우스 오버 이미지
3 * 카테고리 서브 메뉴 출력
4 */
5
6$(document).ready(function(){
7
8    var methods = {
9        aCategory    : [],
10        aSubCategory : {},
11
12        get: function()
13        {
14             $.ajax({
15                url : '/exec/front/Product/SubCategory',
16                dataType: 'json',
17                success: function(aData) {
18
19                    if (aData == null || aData == 'undefined') return;
20                    for (var i=0; i<aData.length; i++)
21                    {
22                        var sParentCateNo = aData[i].parent_cate_no;
23
24                        if (!methods.aSubCategory[sParentCateNo]) {
25                            methods.aSubCategory[sParentCateNo] = [];
26                        }
27
28                        methods.aSubCategory[sParentCateNo].push( aData[i] );
29                    }
30
31                    // 데이터 로딩 후 자식이 있는 li 요소에 클래스 추가
32                    methods.addParentClass();
33                }
34            });
35        },
36
37        addParentClass: function () {
38            $('.xans-layout-category li').each(function () {
39                var $this = $(this);
40                var iCateNo = Number(methods.getParam($this.find('a').attr('href'), 'cate_no'));
41
42                if (!iCateNo) {
43                    iCateNo = Number(methods.getParamSeo($this.find('a').attr('href')));
44                }
45
46                if (iCateNo && methods.aSubCategory[iCateNo] && methods.aSubCategory[iCateNo].length > 0) {
47                    $this.addClass('has-');
48                }
49            });
50        },
51        
52        getParam: function(sUrl, sKey) {
53
54            var aUrl         = sUrl.split('?');
55            var sQueryString = aUrl[1];
56            var aParam       = {};
57
58            if (sQueryString) {
59                var aFields = sQueryString.split("&");
60                var aField  = [];
61                for (var i=0; i<aFields.length; i++) {
62                    aField = aFields[i].split('=');
63                    aParam[aField[0]] = aField[1];
64                }
65            }
66            return sKey ? aParam[sKey] : aParam;
67        },
68
69        getParamSeo: function(sUrl) {
70            var aUrl         = sUrl.split('/');
71            return aUrl[3] ? aUrl[3] : null;
72        },
73
74        show: function(overNode, iCateNo) {
75
76            if (methods.aSubCategory[iCateNo].length == 0) {
77                return;
78            }
79
80            var aHtml = [];
81            aHtml.push('<ul>');
82            $(methods.aSubCategory[iCateNo]).each(function() {
83                var sHref_prev = this.link_product_list;
84                var shop_skin = sHref_prev.split('/category')[0];
85                var sHref = shop_skin + '/' + this.design_page_url + this.param;
86
87                var sSubCateNo = String(this.cate_no); // 중요
88                var hasSub = methods.aSubCategory[sSubCateNo] ? true : false;
89
90                // li에 has 클래스 조건부 추가
91                aHtml.push('<li' + (hasSub ? ' class="has"' : '') + '>');
92                aHtml.push('<a href="' + sHref + '">' + this.name + '</a>');
93
94                // 3depth 있는지 확인
95                if (methods.aSubCategory[sSubCateNo]) {
96                    aHtml.push('<ul class="sub-category-2">');
97                    $(methods.aSubCategory[sSubCateNo]).each(function() {
98                        var sHref_2 = shop_skin + '/' + this.design_page_url + this.param;
99                        aHtml.push('<li><a href="' + sHref_2 + '">' + this.name + '</a></li>');
100                    });
101                    aHtml.push('</ul>');
102                }
103
104                aHtml.push('</li>');
105            });
106
107            aHtml.push('</ul>');
108
109            $(overNode).append('<div class="sub-category"></div>')
110                .find('.sub-category').html(aHtml.join(''));
111            
112        },
113
114        close: function() {
115            $('.header-cate .sub-category').remove();
116        }
117    };
118
119    methods.get();
120
121
122    $('.xans-layout-category li').mouseenter(function(e) {
123        var $this = $(this).addClass('on'),
124        iCateNo = Number(methods.getParam($this.find('a').attr('href'), 'cate_no'));
125
126        if (!iCateNo) {
127            iCateNo = Number(methods.getParamSeo($this.find('a').attr('href')));
128        }
129
130        if (!iCateNo) {
131           return;
132        }
133
134        methods.show($this, iCateNo);
135     }).mouseleave(function(e) {
136        $(this).removeClass('on');
137
138          methods.close();
139     });
140});
141/**
142 * 모바일쇼핑몰 슬라이딩메뉴 */
143var aCategory = [];
144$(document).ready(function(){
145    
146    var methods = {
147        aCategory    : [],
148        aSubCategory : {},
149        get: function()
150        {
151             $.ajax({
152                url : '/exec/front/Product/SubCategory',
153                dataType: 'json',
154                success: function(aData) {
155                    if (aData == null || aData == 'undefined') {
156                    methods.checkSub();
157                        return;
158                    }
159                    for (var i=0; i<aData.length; i++)
160                    {
161                        var sParentCateNo = aData[i].parent_cate_no;
162                        var sCateNo = aData[i].cate_no;
163                        if (!methods.aSubCategory[sParentCateNo]) {
164                            methods.aSubCategory[sParentCateNo] = [];
165                        }
166                        if (!aCategory[sCateNo]) {
167                            aCategory[sCateNo] = [];
168                        }
169                        methods.aSubCategory[sParentCateNo].push( aData[i] );
170                        aCategory[sCateNo] = aData[i];
171                    }
172                    methods.checkSub();
173                    methods.getMyCateList();
174                }
175            });
176        },
177        getParam: function(sUrl, sKey) {
178            if (typeof sUrl !== 'string') return;
179            var aUrl         = sUrl.split('?');
180            var sQueryString = aUrl[1];
181            var aParam       = {};
182            if (sQueryString) {
183                var aFields = sQueryString.split("&");
184                var aField  = [];
185                for (var i=0; i<aFields.length; i++) {
186                    aField = aFields[i].split('=');
187                    aParam[aField[0]] = aField[1];
188                }
189            }
190            return sKey ? aParam[sKey] : aParam;
191        },
192        show: function(overNode, iCateNo) {
193            var oParentNode = overNode;
194            var aHtml = [];
195            var sMyCateList = localStorage.getItem("myCateList");
196            if (methods.aSubCategory[iCateNo] != undefined) {
197                aHtml.push('<ul class="slideSubMenu">');
198                $(methods.aSubCategory[iCateNo]).each(function() {
199                    var sNextParentNo = this.cate_no;
200                    var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : '';
201                    if (methods.aSubCategory[sNextParentNo] == undefined) {
202                        aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">');
203                        //var sHref = '/'+this.design_page_url+this.param;
204                        var sHref_prev = this.link_product_list;
205                        var shop_skin = sHref_prev.split('/category')[0];
206                        var sHref = shop_skin+'/'+this.design_page_url+this.param;
207                    } else {
208                        aHtml.push('<li id="cate'+this.cate_no+'">');
209                        var sHref = '#none';
210                    }
211                    aHtml.push('<a href="'+sHref+'" class="cate" cate="'+this.param+'" onclick="subMenuEvent(this);">'+this.name+'</a>');
212                    //if (methods.aSubCategory[sNextParentNo] != undefined)  aHtml.push('<a href="/'+this.design_page_url+''+this.param+'" class="view">상품보기</a>');
213                    var sHref_prev = this.link_product_list;
214                    var shop_skin = sHref_prev.split('/category')[0];
215                    if (methods.aSubCategory[sNextParentNo] != undefined)  aHtml.push('<a href="'+shop_skin+'/'+this.design_page_url+''+this.param+'" class="view">상품보기</a>');
216
217                    if (methods.aSubCategory[sNextParentNo] != undefined) {
218                        aHtml.push('<ul>');
219                        $(methods.aSubCategory[sNextParentNo]).each(function() {
220                            var sNextParentNo2 = this.cate_no;
221                            var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : '';
222                            if (methods.aSubCategory[sNextParentNo2] == undefined) {
223                                aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">');
224                                //var sHref = '/'+this.design_page_url+this.param;
225                                var sHref_prev = this.link_product_list;
226                                var shop_skin = sHref_prev.split('/category')[0];
227                                var sHref = shop_skin+'/'+this.design_page_url+this.param;
228                                
229                            } else {
230                                aHtml.push('<li id="cate'+this.cate_no+'">');
231                                var sHref = '#none';
232                            }
233                            aHtml.push('<a href="'+sHref+'" class="cate" cate="'+this.param+'" onclick="subMenuEvent(this);">'+this.name+'</a>');
234                            //if (methods.aSubCategory[sNextParentNo] != undefined)  aHtml.push('<a href="/'+this.design_page_url+''+this.param+'" class="view">상품보기</a>');
235                            var sHref_prev = this.link_product_list;
236                            var shop_skin = sHref_prev.split('/category')[0];
237                            if (methods.aSubCategory[sNextParentNo] != undefined)  aHtml.push('<a href="'+shop_skin+'/'+this.design_page_url+''+this.param+'" class="view">상품보기</a>');
238
239                            if (methods.aSubCategory[sNextParentNo2] != undefined) {
240                                aHtml.push('<ul>');
241
242                                $(methods.aSubCategory[sNextParentNo2]).each(function() {
243                                    aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">');
244                                    var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : '';
245                                    //aHtml.push('<a href="/'+this.design_page_url+''+this.param+'" class="cate" cate="'+this.param+'" onclick="subMenuEvent(this);">'+this.name+'</a>');
246                                    var sHref_prev = this.link_product_list;
247                                    var shop_skin = sHref_prev.split('/category')[0];
248                                    aHtml.push('<a href="'+shop_skin+'/'+this.design_page_url+''+this.param+'" class="cate" cate="'+this.param+'" onclick="subMenuEvent(this);">'+this.name+'</a>');
249                                    
250                                    aHtml.push('</li>');
251                                });
252                                aHtml.push('</ul>');
253                            }
254                            aHtml.push('</li>');
255                        });
256                        aHtml.push('</ul>');
257                    }
258                    aHtml.push('</li>');
259                });
260                aHtml.push('</ul>');
261            }
262            $(oParentNode).append(aHtml.join('')).children('.slideSubMenu').hide().slideDown(300);
263        },
264        checkSub: function() {
265            $('.cate').each(function(){
266                var sParam = $(this).attr('cate');
267                var sParam2 = $(this).parent().find('.view').attr('href');
268                if (!sParam) return;
269                var iCateNo = Number(methods.getParam(sParam, 'cate_no'));
270                var result = methods.aSubCategory[iCateNo];
271                if (result == undefined) {
272                    if ($(this).closest('#slideProjectList').length) {
273                        
274                    } else {
275                        var sHref = sParam2;
276                    }
277                    $(this).attr('href', sHref);
278                    $(this).parent().attr('class', 'noChild');
279                }
280            });
281        },
282    };    
283
284    var offCover = {
285        init : function() {
286            $(function() {
287                offCover.resize();
288                $(window).resize(function(){
289                    offCover.resize();
290                });
291            });
292        },
293        layout : function(){
294            if ($('html').hasClass('expand')) {
295                setTimeout( function () {
296                    $("#aside").addClass('on');
297                }, 250);            
298                setTimeout(() => {
299                    let target = $('#aside .category-list > li a:contains("SHOP")').closest('li').find('a.cate');
300                    target.trigger('click');
301                }, 10);               
302                $("html").css('overflow','hidden');   
303                if ($(window).width() < 640) { 
304                    $("html").css('overflow','hidden'); 
305                } else {
306                    $("html").css('overflow','unset');  
307                }
308            } else {
309                $("#aside").removeClass('on');
310                $("html").css('overflow','unset');  
311            }
312            
313        },
314        resize : function(){        
315            if ($('html').hasClass('expand')) {   
316                setTimeout( function () {
317                    $("#aside").addClass('on');
318                }, 250);                
319                $("html").css('overflow','hidden');                
320                if ($(window).width() < 640) { 
321                    $("html").css('overflow','hidden'); 
322                } else {
323                    $("html").css('overflow','unset');  
324                }
325            } else {
326                $("#aside").removeClass('on');
327                $("html").css('overflow','unset');   
328            }
329        }
330    };
331    
332    methods.get();
333
334    offCover.init();
335    
336    $('#header .header-menu').click(function(e){
337        $('#header .header-menu').addClass('on');
338        //$('#dimmedSlider').toggle();
339        $('html').addClass('expand');
340        offCover.layout();        
341        e.preventDefault();  
342    });
343    
344    $('#header .aside-close').click(function(e){
345        $('#header .header-menu').removeClass('on');
346        //$('#dimmedSlider').toggle();
347        $('html').removeClass('expand');
348        offCover.layout();        
349        e.preventDefault();  
350    });
351    
352    $('.slideSubMenu02').slideUp(300);
353        
354    $('#aside li > a.cate').click(function(e) {
355        var iCateNo = Number(methods.getParam($(this).attr('cate'), 'cate_no'));    
356        $('.slideSubMenu').slideUp(300);   
357        $('.slideSubMenu02').slideUp(300);   
358        
359        if ($(this).closest('li').hasClass('selected')) {
360            $(this).closest('li').removeClass('selected');   
361            
362            $(this).parent().children('.slideSubMenu').slideUp(300, function() { $(this).remove(); });
363            
364            var p_d1 = $(this).parent().children('.slideSubMenu');
365            p_d1.slideUp(300);  
366            
367            var b_d1 = $(this).parent().children('.slideSubMenu02');
368            b_d1.slideUp(300);  
369            
370        } else {     
371            $('#aside li > a.cate').closest('li').removeClass('selected');   
372            $(this).parent().children('.slideSubMenu').slideUp(300, function() { $(this).remove(); });
373            
374            $(this).closest('li').addClass('selected');   
375            
376            methods.show(this.parentNode, iCateNo);
377            
378            var b_d1 = $(this).parent().children('.slideSubMenu02');
379            b_d1.slideDown(300);     
380        }        
381    });
382    
383});
384
385function checkInArray(sBookmarkList, iCateNo) {  }
386
387function subMenuEvent(obj) {
388    $(obj).parent().find('li').removeClass('selected');
389    $(obj).parent().toggleClass('selected');
390    
391    if ($(obj).parent().find('li').hasClass('selected') == true) {   
392        
393    } else {   
394        $(obj).parent().children('ul').slideToggle(300);  
395    }
396}
397
398$(document).ready(function(){
399    if (typeof(EC_SHOP_MULTISHOP_SHIPPING) != "undefined") {
400        var sShippingCountryCode4Cookie = 'shippingCountryCode';
401        var bShippingCountryProc = false;
402
403        // 배송국가 선택 설정이 사용안함이면 숨김
404        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) {
405            $('.xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist').hide();
406            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptioncountry').hide();
407        } else {
408            $('.thumb .xans-layout-multishoplistitem').hide();
409            var aShippingCountryCode = document.cookie.match('(^|;) ?'+sShippingCountryCode4Cookie+'=([^;]*)(;|$)');
410            if (typeof(aShippingCountryCode) != 'undefined' && aS
410hippingCountryCode != null && aShippingCountryCode.length > 2) {
411                var sShippingCountryValue = aShippingCountryCode[2];
412            }
413
414            // query string으로 넘어 온 배송국가 값이 있다면, 그 값을 적용함
415            var aHrefCountryValue = decodeURIComponent(location.href).split("/?country=");
416
417            if (aHrefCountryValue.length == 2) {
418                var sShippingCountryValue = aHrefCountryValue[1];
419            }
420
421            // 메인 페이지에서 국가선택을 안한 경우, 그 외의 페이지에서 셋팅된 값이 안 나오는 현상 처리
422            if (location.href.split("/").length != 4 && $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()) {
423                $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join(""));
424
425                if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) {
426                    $("#f_country").val($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val());
427                }
428            }
429            if (typeof(sShippingCountryValue) != "undefined" && sShippingCountryValue != "" && sShippingCountryValue != null) {
430                sShippingCountryValue = sShippingCountryValue.split("#")[0];
431                var bShippingCountryProc = true;
432
433                $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue);
434                $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join(""));
435                var expires = new Date();
436                expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30일간 쿠키 유지
437                document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString();
438                if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) {
439                    $("#f_country").val(sShippingCountryValue).change();;
440                }
441            }
442        }
443        // 언어선택 설정이 사용안함이면 숨김
444        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingLanguageSelection === false) {
445            $('.xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist').hide();
446            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptionlanguage').hide();
447        } else {
448            $('.thumb .xans-layout-multishoplistitem').hide();
449        }
450
451        // 배송국가 및 언어 설정이 둘 다 사용안함이면 숨김
452        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShipping === false) {
453            $(".xans-layout-multishopshipping").hide();
454            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption').hide();
455        } else if (bShippingCountryProc === false && location.href.split("/").length == 4) { // 배송국가 값을 처리한 적이 없고, 메인화면일 때만 선택 레이어를 띄움
456            var sShippingCountryValue = $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val();
457            $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue);
458            $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join(""));
459            // 배송국가 선택을 사용해야 레이어를 보이게 함
460            if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === true) {
461                $(".xans-layout-multishopshipping").show();
462            }
463        }
464
465        $(".xans-layout-multishopshipping .close").bind("click", function() {
466            $(".xans-layout-multishopshipping").hide();
467        });
468
469        $(".xans-layout-multishopshipping .ec-base-button a").bind("click", function() {
470            var expires = new Date();
471            expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30일간 쿠키 유지
472            document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString();
473
474            // 도메인 문제로 쿠키로 배송국가 설정이 안 되는 경우를 위해 query string으로 배송국가 값
474을 넘김
475            var sQuerySting = (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) ? "" : "/?country="+encodeURIComponent($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val());
476
477            location.href = '//'+$(".xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist").val()+sQuerySting;
478        });
479        $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a").bind("click", function() {
480            $(".xans-layout-multishopshipping").show();
481        });
482    }
483});
484/**
485 * 움직이는 배너 Jquery Plug-in
486 * @author  cafe24
487 **/
488(function($){
489
490    $.fn.floatBanner = function(options) {
491        options = $.extend({}, $.fn.floatBanner.defaults , options);
492
493        return this.each(function() {
494            var aPosition = $(this).position();
495            var jbOffset = $(this).offset();
496            var node = this;
497
498            $(window).on('scroll', function() {
499                var _top = $(document).scrollTop();
500                _top = (aPosition.top < _top) ? _top : aPosition.top;
501
502                setTimeout(function () {
503                    var newinit = $(document).scrollTop();
504
505                    if ( newinit > jbOffset.top ) {
506                        _top -= jbOffset.top;
507                        var container_height = $("#wrap").height();
508                        var quick_height = $(node).height();
509                        var cul = container_height - quick_height;
510                        if(_top > cul){
511                            _top = cul;
512                        }
513                    } else {
514                        _top = 0;
515                    }
516
517                    $(node).stop().animate({top: _top}, options.animate);
518                }, options.delay);
519            });
520        });
521    };
522
523    $.fn.floatBanner.defaults = {
524        'animate'  : 500,
525        'delay'    : 500
526    };
527
528})(jQuery);
529
530/**
531 * 문서 구동후 시작
532 */
533$(function(){
534    
535    //placeholder
536    $(".xans-product-addoption .ePlaceholder input").each(function(i){
537        var Area = $(this).parents('.ePlaceholder').siblings('.optionTit').text();
538        $(this).attr("placeholder", Area);
539    });  
540
541    //placeholder
542    $(".ePlaceholder input, .ePlaceholder textarea").each(function(i){
543        var placeholderName = $(this).parents().attr('title');
544        $(this).attr("placeholder", placeholderName);
545    });
546
547    /* placeholder ie8, ie9 */
548    $.fn.extend({
549        placeholder : function() {
550            //IE 8 버전에는 hasPlaceholderSupport() 값이 false를 리턴
551           if (hasPlaceholderSupport() === true) {
552                return this;
553            }
554            //hasPlaceholderSupport() 값이 false 일 경우 아래 코드를 실행
555            return this.each(function(){
556                var findThis = $(this);
557                var sPlaceholder = findThis.attr('placeholder');
558                if ( ! sPlaceholder) {
559                   return;
560                }
561                findThis.wrap('<label class="ePlaceholder" />');
562                var sDisplayPlaceHolder = $(this).val() ? ' style="display:none;"' : '';
563                findThis.before('<span' + sDisplayPlaceHolder + '>' + sPlaceholder + '</span>');
564                this.onpropertychange = function(e){
565                    e = event || e;
566                    if (e.propertyName == 'value') {
567                        $(this).trigger('focusout');
568                    }
569                };
570                //공통 class
571                var agent = navigator.userAgent.toLowerCase();
572                if (agent.indexOf("msie") != -1) {
573                    $(".ePlaceholder").css({"position":"relative"});
574                    $(".ePlaceholder span").css({"position":"absolute", "padding":"0 4px", "color":"#878787"});
575                    $(".ePlaceholder label").css({"padding":"0"});
576                }
577            });
578        }
579    });
580
581    $(':input[placeholder]').placeholder(); //placeholder() 함수를 호출
582
583    //클릭하면 placeholder 숨김
584    $('body').on('click', '.ePlaceholder span', function(){
585        $(this).hide();
586    });
587
588    //input창 포커스 인 일때 placeholder 숨김
589    $('body').on('focusin', '.ePlaceholder :input', function(){
590        $(this).prev('span').hide();
591    });
592
593    //input창 포커스 아웃 일때 value 가 true 이면 숨김, false 이면 보여짐
594    $('body').on('focusout', '.ePlaceholder :input', function(){
595        if (this.value) {
596            $(this).prev('span').hide();
597        } else {
598            $(this).prev('span').show();
599        }
600    });
601
602    //input에 placeholder가 지원이 되면 true를 안되면 false를 리턴값으로 던져줌
603    function hasPlaceholderSupport() {
604        if ('placeholder' in document.createElement('input')) {
605            return true;
606        } else {
607            return false;
608        }
609    }
610});
611
612/**
613 *  썸네일 이미지 엑박일경우 기본값 설정
614 */
615$(window).on('load', function() {
616    $("img.thumb,img.ThumbImage,img.BigImage").each(function($i,$item){
617        var $img = new Image();
618        $img.onerror = function () {
619            $item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif";
620        }
621        $img.src = this.src;
622    });
623});
624
625/**
626 *  tooltip
627 */
628$('.eTooltip').each(function(i){
629    $(this).find('.btnClose').attr('tabIndex','-1');
630});
631//tooltip input focus
632$('.eTooltip').find('input').on('focus', function() {
633    var targetName = returnTagetName(this);
634    targetName.siblings('.ec-base-tooltip').show();
635});
636$('.eTooltip').find('input').on('focusout', function() {
637    var targetName = returnTagetName(this);
638    targetName.siblings('.ec-base-tooltip').hide();
639});
640function returnTagetName(_this){
641    var ePlacename = $(_this).parent().attr("class");
642    var targetName;
643    if(ePlacename == "ePlaceholder"){ //ePlaceholder 대응
644        targetName = $(_this).parents();
645    }else{
646        targetName = $(_this);
647    }
648    return targetName;
649}
650
651/**
652 *  eTab
653 */
654$("body").on("click", ".eTab a", function(e){
655    // 클릭한 li 에 selected 클래스 추가, 기존 li에 있는 selected 클래스는 삭제.
656    var _li = $(this).parent("li").addClass("selected").siblings().removeClass("selected"),
657    _target = $(this).attr("href"),
658    _siblings = $(_target).attr("class"),
659    _arr = _siblings.split(" "),
660    _classSiblings = "."+_arr[0];
661
662    //클릭한 탭에 해당하는 요소는 활성화, 기존 요소는 비활성화 함.
663    $(_target).show().siblings(_classSiblings).hide();
664
665
666    //preventDefault 는 a 태그 처럼 클릭 이벤트 외에 별도의 브라우저 행동을 막기 위해 사용됨.
667    e.preventDefault();
668});
669
670
671
672//window popup script
673function winPop(url) {
674    window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no");
675}
676/**
677 * document.location.href split
678 * return array Param
679 */
680function getQueryString(sKey)
681{
682    var sQueryString = document.location.search.substring(1);
683    var aParam       = {};
684
685    if (sQueryString) {
686        var aFields = sQueryString.split("&");
687        var aField  = [];
688        for (var i=0; i<aFields.length; i++) {
689            aField = aFields[i].split('=');
690            aParam[aField[0]] = aField[1];
691        }
692    }
693
694    aParam.page = aParam.page ? aParam.page : 1;
695    return sKey ? aParam[sKey] : aParam;
696};
697
698$(function(){
699    // tab
700    $.eTab = function(ul){
701        $(ul).find('a').on('click', function(){
702            var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'),
703                _target = $(this).attr('href'),
704                _siblings = '.' + $(_target).attr('class');
705            $(_target).show().siblings(_siblings).hide();
706            return false
707        });
708    }
709    if ( window.call_eTab ) {
710        call_eTab();
711    };
712});
713(function($){
714    $.fn.extend({
715        center: function() {
716            this.each(function() {
717                var
718                    $this = $(this),
719                    $w = $(window);
720                $this.css({
721                    position: "absolute",
722                    top: ~~(($w.height() - $this.outerHeight()) / 2) + $w.scrollTop() + "px",
723                    left: ~~(($w.width() - $this.outerWidth()) / 2) + $w.scrollLeft() + "px"
724                });
725            });
726            return this;
727        }
728    });
729    $(function() {
730        var $container = function(){/*
731    <div id="modalContainer">
732        <iframe id="modalContent" scroll="0" scrolling="no" frameBorder="0"></iframe>
733    </div>');
734    */}.toString().slice(14,-3);
735        $('body')
736        .append($('<div id="modalBackpanel"></div>'))
737        .append($($container));
738        function closeModal () {
739            $('#modalContainer').hide();
740            $('#modalBackpanel').hide();
741        }
742        $('#modalBackpanel').on('click',closeModal);
743        zoom = function ($piProductNo, $piCategoryNo, $piDisplayGroup) {
744            var $url = '/product/image_zoom.html?product_no=' + $piProductNo + '&cate_no=' + $piCategoryNo + '&display_group=' + $piDisplayGroup;
745            $('#modalContent').attr('src', $url);
746            $('#modalContent').on("load",function(){
747                $(".header .close",this.contentWindow.document.body).on("click", closeModal);
748            });
749            $('#modalBackpanel').css({width:$("body").width(),height:$("body").height(),opacity:.4}).show();
750            $('#modalContainer').center().show();
751        }
752    });
753})(jQuery);
754// 헤더 - 움직임
755const headerBg = function(){
756    var topBn = $('.header-bn-text').height();
757    if ( typeof topBn == "undefined" ) { // 탑배너가 없는 경우
758        if ( $(document).scrollTop() > 0 ) {
759            $('#header').addClass('scroll');
760            $('#header').css('top',0);
761            $('.main-bn-hero').css('height','calc(100svh - 30px)');
762            $('#main #container .header-logo a').removeClass('on');
763            $('#main #header .header-logo a').addClass('on');
764        } else {
765            $('#header').removeClass('scroll');
766            $('#header').css('top',0);
767            $('.main-bn-hero').css('height','calc(100svh - 30px)');
768            $('#main #container .header-logo a').addClass('on');
769            $('#main #header .header-logo a').removeClass('on');
770        };
771    } else { // 탑배너가 있는 경우
772        if ( $(document).scrollTop() > topBn ) {
773            $('#header').addClass('scroll');
774            $('#header').css('top',0);
775            //$('#container .header-logo a').fadeOut(400);
776            $('#main #container .header-logo a').removeClass('on');
777            $('#main #header .header-logo a').addClass('on');
778        } else {
779            $('#header').removeClass('scroll');
780            $('#header').css('top',topBn);
781            //$('#container .header-logo a').fadeIn(400);
782            $('#main #container .header-logo a').addClass('on');
783            $('#main #header .header-logo a').removeClass('on');
784        };
785    };
786};    
787headerBg();    
788
789// 푸터 - 페이지 무브 스크롤시 노출
790const pageMove = function(){
791    if ( $(document).scrollTop() > 0 ) {
792        $('.page-move').fadeIn(300);
793    } else {
794        $('.page-move').fadeOut(300);   
795    }
796};
797pageMove();   
798
799// 상세 - 페이저
800function big_pager() {
801    var big_pager = $('.imgArea-mo .gallery-main .swiper-pagination-bullet').length;
802    $('.imgArea-mo .gallery-main .swiper-pagination-bullet').css('width',100/big_pager+'%');
803};    
804big_pager();
805
806$(document).ready(function(){
807    
808    // 헤더 Archive 위치 이동
809    $('#header .header-cate .header-cate-ul li').has('a[href*="lookbook-list.html"]').addClass('archive-cate');    
810    var archivePosition = $(".archive-cate").prop("innerHTML");
811    $(".archive-cate").remove();
812    $("#header .header-gnb .header-gnb-ul li.gnb-archive").html(archivePosition);
813
814    // 헤더 CS 링크 자동 설정
815    var header_cs = $('#header .header-gnb .header-gnb-ul .sub-category ul li:first-child a').attr('href');
816    $('#header .gnb-cs > a').attr('href',header_cs);
817
818    $('#header .gnb-search').on('click', function(){
819        var $popup = $('#search-popup'),
820            $bg    = $('#header .bg-search');
821
822        if ( $popup.is(':visible') ) {
823            $popup.stop(true, true).fadeOut(0);
824            $bg.stop(true, true).fadeOut(200);
825        } else {
826            $popup.stop(true, true).fadeIn(0);
827            $bg.stop(true, true).fadeIn(200);
828        }
829    });
830
831    // 헤더 | 검색창 닫기
832    $('#searchBarForm .search-close, #header .bg-search').on('click', function(){
833        $('#search-popup').fadeOut(0);
834        $('#header .bg-search').fadeOut(200);
835    });
836    
837    // 게시판 카카오
838    var $qa = $('.sub-category ul li').filter(function () {
839        return $(this).text().trim() === 'Q&A';
840    }).first();
841    var $kakao = $('.sub-category ul li.b-kakao');
842    if ($qa.length && $kakao.length) {
843        $qa.after($kakao);
844    }
845    $('.slideSubMenu02').each(function () {
846        var $ul = $(this);
847        var $qa = $ul.find('li a').filter(function () {
848            return $(this).text().trim() === 'Q&A';
849        }).closest('li');
850        var $kakao = $ul.find('li.b-kakao');
851        if ($qa.length && $kakao.length) {
852            $qa.after($kakao);
853        }
854    });
855        
856    // 인트로 로고
857    var header_logo = $('.header-logo a').html();  
858    $('#main-lazy p').html(header_logo).fadeIn();
859    
860    // 공통 페이드
861    $("#lazy").delay(200).fadeOut(700);
862    $("#main-lazy").delay(500).fadeOut(1000);
863            
864    // 상품 정보 클래스 부여 (일반/상세)
865    $('.ec-base-product .spec li span span:contains("최적할인가"), .xans-product-detaildesign th:contains("최적할인가")').closest('li, tr').addClass('prd-price-style');
866    $('.ec-base-product .spec li span span:contains("소비자가"), .xans-product-detaildesign th:contains("소비자가")').closest('li, tr').addClass('prd-price-style');
867    $('.ec-base-product .spec li span span:contains("판매가"), .xans-product-detaildesign th:contains("판매가")').closest('li, tr').addClass('prd-price-style');
868    $('.ec-base-product .spec li span span:contains("할인판매가")').closest('li').addClass('prd-price-style').addClass('prd-price-reverse');
869    $('.ec-base-product .spec li span span:contains("간략설명"),.xans-product-detaildesign th:contains("간략설명")').closest('li, tr').addClass('prd-simple-desc');    
870    $('.ec-base-product .spec li span:contains("할인 기간"), .xans-product-detaildesign th:contains("할인 기간")').closest('li, tr').addClass('prd-dc-data');
871        
872    // 상품 상세 할인기간 남은시간 숨김
873    $('.xans-product-detaildesign th:contains("할인 기간")').parent('tr').css('display','none');
874    
875    // 분류(+ 검색결과) 상품 정렬 클릭
876    $('.prd-list-order .icon-prd-filter .tune').click(function(){
877        $(this).toggleClass('close');
878    	$('.prd-list-order > ul').toggleClass('on');
879    });
880    
881    // 분류 베스트 상품 번호
882    $('.prd-list-best .prdList > li').each(function(){
883    	var prd_lst_best_inext = $(this).index() + 1;
884        $(this).find('.recommend-num').text(prd_lst_best_inext);
885    });
886    
887    // FAQ, 게시판 카테고리
888    $('.boardSort #board_category option').each(function(i, e){
889        var option = $(this).attr("value");                
890        $(this).wrapInner('<li><a alt='+option+'></a></li>');        
891        $('option[selected=selected]').find('li').addClass('selected');  
892        $('.boardSort select li').unwrap();
893        $(this).find('li').unwrap();
894        $('.boardSort li a').on('click', function(){
895            var path = $(location).attr('href');
896            var split_area = path.split("&");
897            var num = $(this).attr("alt");
898            var link = split_area[0] + '&category_no=' + num;        
899            $(this).attr("href",link);            
900        });
901    });
902    
903    // 아코디언 모듈
904    $('.accordion-toggle .accordion-tit').click(function(){
905        var accordion_cont = $(this).siblings('.accordion-cont');
906        var accordion_onoff = accordion_cont.css('display');
907        var accordion_speed = 300;
908        
909        // speed 0
910        if ( $(this).closest('.accordion-toggle').hasClass('speed-0') == true) {
911            accordion_speed = 0;
912        }
913
914        // not 토글
915        if ( $(this).closest('.accordion-toggle').hasClass('not-toggle') == true && accordion_onoff == 'none' ) {
916            $(this).closest('.accordion-toggle').find('.accordion-tit').removeClass('selected');
917            $(this).closest('.accordion-toggle').find('.accordion-cont').slideUp(accordion_speed);
918            $(this).addClass('selected');
919            accordion_cont.slideDown(accordion_speed,'swing');  
920
921        // 토글
922        } else if ( $(this).closest('.accordion-toggle').hasClass('not-toggle') != true && accordion_onoff == 'none' ) {
923            $(this).closest('.accordion-toggle').find('.accordion-tit').removeClass('selected');
924            $(this).closest('.accordion-toggle').find('.accordion-cont').slideUp(accordion_speed);
925            $(this).addClass('selected');
926            accordion_cont.slideDown(accordion_speed,'swing');  
927            
928        } else if ( $(this).closest('.accordion-toggle').hasClass('not-toggle') != true && accordion_onoff == 'block' )  {
929            $(this).closest('.accordion-toggle').find('.accordion-tit').removeClass('selected');
930            accordion_cont.slideUp(accordion_speed);
931        }
932    });
933
934    // 게시판 적립금주기 버튼 이미지
935    $(".xans-board-read .brdBoder .bBox .readBox2 ul li.writer a img"). attr ( "src", "/web/upload/yangji/givepoint.gif");
936
937    // 비회원 로그인
938    if(0 <= location.href.indexOf("?noMemberOrder")){
939        $('.guestBtn').css('display', 'none');  
940    }
941    if(0 <= location.href.indexOf("Forderform.html")){
942        $('.guestBtn').css('display', 'none');  
943    }
944
945    // 회원가입 약관
946    var agreeArea = $(".xans-member-join .agreeArea");     
947    agreeArea.find("h3 i").each(function(i, e){
948        $(this).on( "click", function(e) {
949            $(this).parent().siblings(".content").slideToggle( );
950            $(this).toggleClass('add');
951        });
952    });    
953
954    // 장바구니 페이지 수량폼 Type 변경
955    $('[id^="quantity"]').each(function() {
956        $(this).get(0).type = 'tel';
957    });
958            
959    // 푸터 - 운영시간 & 계좌정보 분리
960    var cs_text = $('#footer .run-time').text().split('$$');
961    $('#footer .cs-run').html('<pre>'+cs_text[0]+'</pre>');
962    $('#footer .cs-bank').html('<pre>'+cs_text[1]+'</pre>');
963    
964    // 푸터 - 페이지 무브 위로
965    $('.page-top').on('click', function(event){
966        event.preventDefault();                  
967        $('html, body').animate({
968            scrollTop: -10
969        }, 600);
970    });
971    
972    // 푸터 - 페이지 무브 아래로
973    $('.page-bottom').on('click', function(event){
974        event.preventDefault();        
975        $('html, body').animate({
976            scrollTop: $(document).height()
977        },600);
978    });
979    
980    // 공백 없애기
981    $('.main-bn-grid ul li').each(function() {
982        var html = $(this).html();
983        // &nbsp;를 빈 문자로 치환
984        html = html.replace(/&nbsp;/g, '');
985        $(this).html(html);
986    });
987
988    $('.ec-base-product .prdList .thumbnail').attr({ 
989        //'data-aos': 'fade-up',
990        'data-aos': 'fade-zoom-in',
991        //'data-aos-anchor-placement':'center-bottom',
992        'data-aos-easing': 'ease',
993        'data-aos-duration': 1000,
994        'data-aos-delay': 10,
995    });
996    AOS.init({
997        once: true,
998    });
999});
1000
1001$(window).on('scroll', function(){        
1002    // 푸터 - 페이지 무브 스크롤시 노출
1003    pageMove();
1004    // 헤더 - 움직임
1005    headerBg();
1006});
1007
1008$(window).on('load', function(){    
1009    // 푸터 - 페이지 무브 스크롤시 노출
1010    pageMove();
1011    // 헤더 - 움직임
1012    headerBg();    
1013});
1014
1015/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1016
1017	※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※
1018    
1019    					디자인양지 스킨 ★ on / off ★ 세팅 파일입니다. 
1020	    
1021					 반드시 아래 내용을 숙지한 후 수정해 주시기 바랍니다.
1022                              
1023	※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※ ※
1024    
1025    ■ 1. 수정 전 => 반드시 백업 진행! 
1026    	- 파일 복구 시 비용이 발생할 수 있으며, 복구 자체가 불가능할 수 있사오니 수정 전에는 반드시 백업을 진행해 주시기 바랍니다.
1027        
1028	■ 2. 수정 시 => 작은 따옴표 내 텍스트만 on 또는 off 중 선택하여 입력해 주시기 바랍니다.
1029    	- 작은 따옴표 내에 on 또는 off 외 다른 텍스트를 입력할 경우 오류가 발생할 수 있습니다. 
1030        - 작은 따옴표 내 텍스트 외 다른 코드가 변경될 경우 사이트 전체에 영향을 주어 오류가 발생할 수 있습니다. 
1031        
1032    ■ 3. 수정 후 => 인터넷 브라우저(크롬, 사파리 등) 쿠키 삭제 후 새로고침하여 확인!
1033    
1034--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
1035
1036
1037
1038
1039
1040/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1041
1042✅ 공통 ✅
1043
1044--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
1045
1046/*헤더 최상단 텍스트 슬라이드 배너*/
1047YANGJI.header_bn_text = 'on';
1048
1049/*로고 이미지 - 이미지 대신 텍스트 로고 노출을 원하시면 off*/
1050YANGJI.logo_img = 'on';
1051
1052/*SNS 아이콘 인스타그램*/
1053YANGJI.sns_instagram = 'on';
1054
1055/*SNS 아이콘 카카오톡*/
1056YANGJI.sns_kakaotalk = 'on';
1057
1058/*SNS 아이콘 유튜브*/
1059YANGJI.sns_youtube = 'off';
1060
1061/*SNS 아이콘 블로그*/
1062YANGJI.sns_blog = 'off';
1063
1064
1065
1066/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1067
1068✅ 메인 ✅
1069
1070--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
1071
1072/*메인 우측 하단 팝업 텍스트 배너*/
1073YANGJI.main_yj_popup = 'on';
1074
1075/*대표 4종 그리드 배너*/
1076YANGJI.main_bn_grid = 'on';
1077
1078/*하단부 흐르는 배너*/
1079YANGJI.main_bn_flow = 'on';
1080
1081/*메인 중앙 팝업 텍스트 배너 🟡추가🟡*/
1082YANGJI.main_yj_popup_center = 'on';
1083
1084
1085
1086/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1087
1088✅ 상세 ✅
1089
1090--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
1091
1092/*상세 리뷰 게시판 */
1093YANGJI.detail_board_review = 'on';
1094
1095/*상세 문의 게시판 */
1096YANGJI.detail_board_qna = 'on';
1097
1098/*상세 이용안내 */
1099YANGJI.prdInfo_mall_faq = 'on';
1100
1101
1102
1103/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1104
1105✅ 상품 슬라이드 적용 ✅
1106 - 슬라이드가 아닌 일반 진열을 원하시면 off
1107 - 해당 부분의 on/off는 영역 자체의 노출 여부가 아닌 슬라이드 적용 여부입니다. 
1108 - 상품 영역 자체 노출을 원하지 않으시는 경우 해당 영역에 상품을 진열하지 않으면 자동으로 노출되지 않습니다. 
1109
1110--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
1111
1112/*상세 관련상품 영역 ★슬라이드 적용★*/
1113YANGJI.prd_detail_relation_swiper = 'on';
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125

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.