PageSourceSearch

https://haessal.net/ind-script/optimizer_user.php?filename=jY1RCsI…ba3f09a801b3b4560554f2b&t=1629262023&user=T

js haessal.net collected 2026-10-04 13:27:56 UTC 20,256 bytes, 511 lines download raw bytes

1/**
2 * 움직이는 배너 Jquery Plug-in
3 * @author  cafe24
4 */
5
6(function($){
7
8    $.fn.floatBanner = function(options) {
9        options = $.extend({}, $.fn.floatBanner.defaults , options);
10
11        return this.each(function() {
12            var aPosition = $(this).position();
13            var jbOffset = $(this).offset();
14            var node = this;
15
16            $(window).scroll(function() {
17                var _top = $(document).scrollTop();
18                _top = (aPosition.top < _top) ? _top : aPosition.top;
19
20                setTimeout(function () {
21                    var newinit = $(document).scrollTop();
22
23                    if ( newinit > jbOffset.top ) {
24                        _top -= jbOffset.top;
25                        var container_height = $("#wrap").height();
26                        var quick_height = $(node).height();
27                        var cul = container_height - quick_height;
28                        if(_top > cul){
29                            _top = cul;
30                        }
31                    }else {
32                        _top = 0;
33                    }
34
35                    $(node).stop().animate({top: _top}, options.animate);
36                }, options.delay);
37            });
38        });
39    };
40
41    $.fn.floatBanner.defaults = {
42        'animate'  : 500,
43        'delay'    : 500
44    };
45
46})(jQuery);
47
48/**
49 * 문서 구동후 시작
50 */
51$(document).ready(function(){
52    $('#banner:visible, #quick:visible').floatBanner();
53
54    //placeholder
55    $(".ePlaceholder input, .ePlaceholder textarea").each(function(i){
56        var placeholderName = $(this).parents().attr('title');
57        $(this).attr("placeholder", placeholderName);
58    });
59    /* placeholder ie8, ie9 */
60    $.fn.extend({
61        placeholder : function() {
62            //IE 8 버전에는 hasPlaceholderSupport() 값이 false를 리턴
63           if (hasPlaceholderSupport() === true) {
64                return this;
65            }
66            //hasPlaceholderSupport() 값이 false 일 경우 아래 코드를 실행
67            return this.each(function(){
68                var findThis = $(this);
69                var sPlaceholder = findThis.attr('placeholder');
70                if ( ! sPlaceholder) {
71                   return;
72                }
73                findThis.wrap('<label class="ePlaceholder" />');
74                var sDisplayPlaceHolder = $(this).val() ? ' style="display:none;"' : '';
75                findThis.before('<span' + sDisplayPlaceHolder + '>' + sPlaceholder + '</span>');
76                this.onpropertychange = function(e){
77                    e = event || e;
78                    if (e.propertyName == 'value') {
79                        $(this).trigger('focusout');
80                    }
81                };
82                //공통 class
83                var agent = navigator.userAgent.toLowerCase();
84                if (agent.indexOf("msie") != -1) {
85                    $(".ePlaceholder").css({"position":"relative"});
86                    $(".ePlaceholder span").css({"position":"absolute", "padding":"0 4px", "color":"#878787"});
87                    $(".ePlaceholder label").css({"padding":"0"});
88                }
89            });
90        }
91    });
92
93    $(':input[placeholder]').placeholder(); //placeholder() 함수를 호출
94
95    //클릭하면 placeholder 숨김
96    $('body').delegate('.ePlaceholder span', 'click', function(){
97        $(this).hide();
98    });
99
100    //input창 포커스 인 일때 placeholder 숨김
101    $('body').delegate('.ePlaceholder :input', 'focusin', function(){
102        $(this).prev('span').hide();
103    });
104
105    //input창 포커스 아웃 일때 value 가 true 이면 숨김, false 이면 보여짐
106    $('body').delegate('.ePlaceholder :input', 'focusout', function(){
107        if (this.value) {
108            $(this).prev('span').hide();
109        } else {
110            $(this).prev('span').show();
111        }
112    });
113
114    //input에 placeholder가 지원이 되면 true를 안되면 false를 리턴값으로 던져줌
115    function hasPlaceholderSupport() {
116        if ('placeholder' in document.createElement('input')) {
117            return true;
118        } else {
119            return false;
120        }
121    }
122});
123
124/**
125 *  썸네일 이미지 엑박일경우 기본값 설정
126 */
127$(window).load(function() {
128    $("img.thumb,img.ThumbImage,img.BigImage").each(function($i,$item){
129        var $img = new Image();
130        $img.onerror = function () {
131                $item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif";
132        }
133        $img.src = this.src;
134    });
135});
136
137/**
138 *  tooltip
139 */
140$('.eTooltip').each(function(i){
141    $(this).find('.btnClose').attr('tabIndex','-1');
142});
143//tooltip input focus
144$('.eTooltip').find('input').focus(function() {
145    var targetName = returnTagetName(this);
146    targetName.siblings('.ec-base-tooltip').show();
147});
148$('.eTooltip').find('input').focusout(function() {
149    var targetName = returnTagetName(this);
150    targetName.siblings('.ec-base-tooltip').hide();
151});
152function returnTagetName(_this){
153    var ePlacename = $(_this).parent().attr("class");
154    var targetName;
155    if(ePlacename == "ePlaceholder"){ //ePlaceholder 대응
156        targetName = $(_this).parents();
157    }else{
158        targetName = $(_this);
159    }
160    return targetName;
161}
162
163/**
164 *  eTab
165 */
166 $("body").delegate(".eTab a", "click", function(e){
167    // 클릭한 li 에 selected 클래스 추가, 기존 li에 있는 selected 클래스는 삭제.
168    var _li = $(this).parent("li").addClass("selected").siblings().removeClass("selected"),
169    _target = $(this).attr("href"),
170    _siblings = $(_target).attr("class"),
171    _arr = _siblings.split(" "),
172    _classSiblings = "."+_arr[0];
173
174    //클릭한 탭에 해당하는 요소는 활성화, 기존 요소는 비활성화 함.
175    $(_target).show().siblings(_classSiblings).hide();
176
177
178    //preventDefault 는 a 태그 처럼 클릭 이벤트 외에 별도의 브라우저 행동을 막기 위해 사용됨.
179    e.preventDefault();
180});
181
182
183
184//window popup script
185function winPop(url) {
186    window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no");
187}
188/**
189 * document.location.href split
190 * return array Param
191 */
192function getQueryString(sKey)
193{
194    var sQueryString = document.location.search.substring(1);
195    var aParam       = {};
196
197    if (sQueryString) {
198        var aFields = sQueryString.split("&");
199        var aField  = [];
200        for (var i=0; i<aFields.length; i++) {
201            aField = aFields[i].split('=');
202            aParam[aField[0]] = aField[1];
203        }
204    }
205
206    aParam.page = aParam.page ? aParam.page : 1;
207    return sKey ? aParam[sKey] : aParam;
208};
209
210$(document).ready(function(){
211    // tab
212    $.eTab = function(ul){
213        $(ul).find('a').click(function(){
214            var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'),
215                _target = $(this).attr('href'),
216                _siblings = '.' + $(_target).attr('class');
217            $(_target).show().siblings(_siblings).hide();
218            return false
219        });
220    }
221    if ( window.call_eTab ) {
222        call_eTab();
223    };
224});
225(function($){
226$.fn.extend({
227    center: function() {
228        this.each(function() {
229            var
230                $this = $(this),
231                $w = $(window);
232            $this.css({
233                position: "absolute",
234                top: ~~(($w.height() - $this.outerHeight()) / 2) + $w.scrollTop() + "px",
235                left: ~~(($w.width() - $this.outerWidth()) / 2) + $w.scrollLeft() + "px"
236            });
237        });
238        return this;
239    }
240});
241$(function() {
242    var $container = function(){/*
243<div id="modalContainer">
244    <iframe id="modalContent" scroll="0" scrolling="no" frameBorder="0"></iframe>
245</div>');
246*/}.toString().slice(14,-3);
247    $('body')
248    .append($('<div id="modalBackpanel"></div>'))
249    .append($($container));
250    function closeModal () {
251        $('#modalContainer').hide();
252        $('#modalBackpanel').hide();
253    }
254    $('#modalBackpanel').click(closeModal);
255    zoom = function ($piProductNo, $piCategoryNo, $piDisplayGroup) {
256        var $url = '/product/image_zoom.html?product_no=' + $piProductNo + '&cate_no=' + $piCategoryNo + '&display_group=' + $piDisplayGroup;
257        $('#modalContent').attr('src', $url);
258        $('#modalContent').bind("load",function(){
259            $(".header .close",this.contentWindow.document.body).bind("click", closeModal);
260        });
261        $('#modalBackpanel').css({width:$("body").width(),height:$("body").height(),opacity:.4}).show();
262        $('#modalContainer').center().show();
263    }
264});
265})(jQuery);
266$(document).ready(function() {  
267     // 쿠키 생성
268     function setCookie(cName, cValue, cDay){
269          var expire = new Date();
270          expire.setDate(expire.getDate() + cDay);
271          cookies = cName + '=' + escape(cValue) + '; path=/ '; // 한글 깨짐을 막기위해 escape(cValue)를 합니다.
272          if(typeof cDay != 'undefined') cookies += ';expires=' + expire.toGMTString() + ';';
273          document.cookie = cookies;
274     }
275
276     // 쿠키 가져오기
277     function getCookie(cName) {
278          cName = cName + '=';
279          var cookieData = document.cookie;
280          var start = cookieData.indexOf(cName);
281          var cValue = '';
282          if(start != -1){
283               start += cName.length;
284               var end = cookieData.indexOf(';', start);
285               if(end == -1)end = cookieData.length;
286               cValue = cookieData.substring(start, end);
287          }
288          return unescape(cValue);
289     }
290 
291    
292    if(getCookie("sldban") == "sldclose"){
293        $('#topSlide').css('display','none');
294        $('#sldOpen').css('display','block');    //****최상단 슬라이드 사용시: block , 미사용시: none  ##### 이 라인만 수정해주세요#### ******
295        $('#sldClose').css('display','none');         
296    }else{
297        $('#topSlide').css('display','block');  //****최상단 슬라이드 사용시: block , 미사용시: none  ##### 이 라인만 수정해주세요#### ******
298        $('#sldOpen').css('display','none');          
299    }
300   
301    $('#topSlideOn').css('display','block');  //****최상단 슬라이드 사용: block , 미사용: none  ##### 이 라인만 수정해주세요#### ******
302    $('#top_leftAd').css('visibility','visible');  //****상단좌측배너 사용: visible , 미사용: hidden   ##### 이 라인만 수정해주세요#### ******
303  
304    $('#sldClose').click(function() {       
305         setCookie("sldban","sldclose",1)  ;       
306         $('#topSlide').slideUp('slow');
307         $('#sldClose').css('display','none');       
308         $('#sldOpen').delay(350).slideDown(300); 
309       });  
310
311    $('#sldOpen').click(function() {  
312         setCookie("sldban","",-1)  ;         
313         $('#sldOpen').css('display','none');       
314         $('#sldClose').delay(350).slideDown(300);
315         $('#topSlide').slideDown('slow');        
316       });     
317
318}); 
319/**
320 * 카테고리 마우스 오버 이미지
321 * 카테고리 서브 메뉴 출력
322 */
323
324$(document).ready(function(){
325
326    var methods = {
327        aCategory    : [],
328        aSubCategory : {},
329
330        get: function()
331        {
332             $.ajax({
333                url : '/exec/front/Product/SubCategory',
334                dataType: 'json',
335                success: function(aData) {
336
337                    if (aData == null || aData == 'undefined') return;
338                    for (var i=0; i<aData.length; i++)
339                    {
340                        var sParentCateNo = aData[i].parent_cate_no;
341
342                        if (!methods.aSubCategory[sParentCateNo]) {
343                            methods.aSubCategory[sParentCateNo] = [];
344                        }
345
346                        methods.aSubCategory[sParentCateNo].push( aData[i] );
347                    }
348                }
349            });
350        },
351
352        getParam: function(sUrl, sKey) {
353
354            var aUrl         = sUrl.split('?');
355            var sQueryString = aUrl[1];
356            var aParam       = {};
357
358            if (sQueryString) {
359                var aFields = sQueryString.split("&");
360                var aField  = [];
361                for (var i=0; i<aFields.length; i++) {
362                    aField = aFields[i].split('=');
363                    aParam[aField[0]] = aField[1];
364                }
365            }
366            return sKey ? aParam[sKey] : aParam;
367        },
368
369        getParamSeo: function(sUrl) {
370            var aUrl         = sUrl.split('/');
371            return aUrl[3] ? aUrl[3] : null;
372        },
373
374        show: function(overNode, iCateNo) {
375
376            if (methods.aSubCategory[iCateNo].length == 0) {
377                return;
378            }
379
380            var aHtml = [];
381            aHtml.push('<ul>');
382            $(methods.aSubCategory[iCateNo]).each(function() {
383                aHtml.push('<li><a href="'+this.link_product_list+'">'+this.name+'</a></li>');
384            });
385            aHtml.push('</ul>');
386
387
388            var offset = $(overNode).offset();
389            $('<div class="sub-category"></div>')
390                .appendTo(overNode)
391                .html(aHtml.join(''))
392                .find('li').mouseover(function(e) {
393                    $(this).addClass('over');
394                }).mouseout(function(e) {
395                    $(this).removeClass('over');
396                });
397        },
398
399        close: function() {
400            $('.sub-category').remove();
401        }
402    };
403
404    methods.get();
405
406
407    $('.xans-layout-category li').mouseenter(function(e) {
408        var $this = $(this).addClass('on'),
409        iCateNo = Number(methods.getParam($this.find('a').attr('href'), 'cate_no'));
410
411        if (!iCateNo) {
412            iCateNo = Number(methods.getParamSeo($this.find('a').attr('href')));
413        }
414
415        if (!iCateNo) {
416           return;
417        }
418
419        methods.show($this, iCateNo);
420     }).mouseleave(function(e) {
421        $(this).removeClass('on');
422
423          methods.close();
424     });
425});
426$(document).ready(function(){
427    if (typeof(EC_SHOP_MULTISHOP_SHIPPING) != "undefined") {
428        var sShippingCountryCode4Cookie = 'shippingCountryCode';
429        var bShippingCountryProc = false;
430
431        // 배송국가 선택 설정이 사용안함이면 숨김
432        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) {
433            $('.xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist').hide();
434            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptioncountry').hide();
435        } else {
436            $('.thumb .xans-layout-multishoplistitem').hide();
437            var aShippingCountryCode = document.cookie.match('(^|;) ?'+sShippingCountryCode4Cookie+'=([^;]*)(;|$)');
438            if (typeof(aShippingCountryCode) != 'undefined' && aShippingCountryCode != null && aShippingCountryCode.length > 2) {
439                var sShippingCountryValue = aShippingCountryCode[2];
440            }
441
442            // query string으로 넘어 온 배송국가 값이 있다면, 그 값을 적용함
443            var aHrefCountryValue = decodeURIComponent(location.href).split("/?country=");
444
445            if (aHrefCountryValue.length == 2) {
446                var sShippingCountryValue = aHrefCountryValue[1];
447            }
448
449            // 메인 페이지에서 국가선택을 안한 경우, 그 외의 페이지에서 셋팅된 값이 안 나오는 현상 처리
450            if (location.href.split("/").length != 4 && $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()) {
451                $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join(""));
452
453                if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) {
454                    $("#f_country").val($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val());
455                }
456            }
457            if (typeof(sShippingCountryValue) != "undefined" && sShippingCountryValue != "" && sShippingCountryValue != null) {
458                sShippingCountryValue = sShippingCountryValue.split("#")[0];
459                var bShippingCountryProc = true;
460
461                $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue);
462                $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join(""));
463                var expires = new Date();
464                expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30일간 쿠키 유지
465                document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString();
466                if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) {
467                    $("#f_country").val(sShippingCountryValue).change();;
468                }
469            }
470        }
471        // 언어선택 설정이 사용안함이면 숨김
472        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingLanguageSelection === false) {
473            $('.xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist').hide();
474            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptionlanguage').hide();
475        } else {
476            $('.thumb .xans-layout-multishoplistitem').hide();
477        }
478
479        // 배송국가 및 언어 설정이 둘 다 사용안함이면 숨김
480        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShipping === false) {
481            $(".xans-layout-multishopshipping").hide();
482            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption').hide();
483        } else if (bShippingCountryProc === false && location.href.split("/").length == 4) { // 배송국가 값을 처리한 적이 없고, 메인화면일 때만 선택 레이어를 띄움
484            var sShippingCountryValue = $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val();
485            $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue);
486            $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join(""));
487            // 배송국가 선택을 사용해야 레이어를 보이게 함
488            if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === true) {
489                $(".xans-layout-multishopshipping").show();
490            }
491        }
492
493        $(".xans-layout-multishopshipping .close").bind("click", function() {
494            $(".xans-layout-multishopshipping").hide();
495        });
496
497        $(".xans-layout-multishopshipping .ec-base-button a").bind("click", function() {
498            var expires = new Date();
499            expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30일간 쿠키 유지
500            document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString();
501
502            // 도메인 문제로 쿠키로 배송국가 설정이 안 되는 경우를 위해 query string으로 배송국가 값
502을 넘김
503            var sQuerySting = (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) ? "" : "/?country="+encodeURIComponent($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val());
504
505            location.href = '//'+$(".xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist").val()+sQuerySting;
506        });
507        $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a").bind("click", function() {
508            $(".xans-layout-multishopshipping").show();
509        });
510    }
511});

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.