PageSourceSearch

https://lalasweet.kr/ind-script/optimizer_user.php?filename=K05J5U…f4c2a193b4156b722551aa3&t=1782346058&user=T

js lalasweet.kr collected 2026-09-25 15:11:04 UTC 14,964 bytes, 346 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 + 100;
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    // 배너관리 img 마우스오버시 타이틀 노출 취소
127    $(".xans-bannermanage2 a img").attr("title","");
128    
129    // 박스 스타일 카테고리 중 내가 선택한 카테고리에 seleted 클래스 삽입하기 - company, shop
130    var li = $('.box_menu > ul > li');    
131    li.find('a').each(function(i, e){
132        var a_link = $(this).attr('href');
133        if(0 <= location.href.indexOf(a_link)){       
134            $(this).parent().addClass('selected');
135        }
136    });
137    
138    // BEST 상품 번호
139    var bestLi = $(".xans-product-listrecommend > .prdList > li");
140    bestLi.each(function(i, e){
141        var no = $(this).index() + 1;        
142        $(this).find('.best_cnt i').text(no);
143    });
144 
145});      
146
147/**
148 *  썸네일 이미지 엑박일경우 기본값 설정
149 */
150$(window).load(function() {
151    $("img.thumb,img.ThumbImage,img.BigImage").each(function($i,$item){
152        var $img = new Image();
153        $img.onerror = function () {
154                $item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif";
155        }
156        $img.src = this.src;
157    });
158});  
159
160/* 헤더 */
161$(window).ready(function(){
162    var fix = $("#header").offset().top; 
163        $(window).scroll(function(){                
164            if( $(window).scrollTop() > fix +  $(window).height()-65 ) {
165                $('#header #headerBottom').addClass('fixedstyle');
166            } else {
167                $('#header #headerBottom').removeClass('fixedstyle');
168            }
169        });
170        $(window).ready(function(){                
171            if( $(window).scrollTop() > fix +  $(window).height() -65 ) {
172                $('#header #headerBottom').addClass('fixedstyle');
173            } else {
174                $('#header #headerBottom').removeClass('fixedstyle');
175            }
176        });
177   });    
178
179//window popup script
180function winPop(url) {
181    window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no");
182}
183/**
184 * document.location.href split
185 * return array Param
186 */
187function getQueryString(sKey)
188{
189    var sQueryString = document.location.search.substring(1);
190    var aParam       = {};
191
192    if (sQueryString) {
193        var aFields = sQueryString.split("&");
194        var aField  = [];
195        for (var i=0; i<aFields.length; i++) {
196            aField = aFields[i].split('=');
197            aParam[aField[0]] = aField[1];
198        }
199    }
200
201    aParam.page = aParam.page ? aParam.page : 1;
202    return sKey ? aParam[sKey] : aParam;
203};
204
205$(document).ready(function(){
206    // tab
207    $.eTab = function(ul){
208        $(ul).find('a').click(function(){
209            var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'),
210                _target = $(this).attr('href'),
211                _siblings = '.' + $(_target).attr('class');
212            $(_target).show().siblings(_siblings).hide();
213            return false
214        });
215    }
216    if ( window.call_eTab ) {
217        call_eTab();
218    };
219});
220(function($){
221$.fn.extend({
222    center: function() {
223        this.each(function() {
224            var
225                $this = $(this),
226                $w = $(window);
227            $this.css({
228                position: "absolute",
229                top: ~~(($w.height() - $this.outerHeight()) / 2) + $w.scrollTop() + "px",
230                left: ~~(($w.width() - $this.outerWidth()) / 2) + $w.scrollLeft() + "px"
231            });
232        });
233        return this;
234    }
235});
236$(function() {
237    var $container = function(){/*
238<div id="modalContainer">
239    <iframe id="modalContent" scroll="0" scrolling="no" frameBorder="0"></iframe>
240</div>');
241*/}.toString().slice(14,-3);
242    $('body')
243    .append($('<div id="modalBackpanel"></div>'))
244    .append($($container));
245    function closeModal () {
246        $('#modalContainer').hide();
247        $('#modalBackpanel').hide();
248    }
249    $('#modalBackpanel').click(closeModal);
250    zoom = function ($piProductNo, $piCategoryNo, $piDisplayGroup) {
251        var $url = '/product/image_zoom.html?product_no=' + $piProductNo + '&cate_no=' + $piCategoryNo + '&display_group=' + $piDisplayGroup;
252        $('#modalContent').attr('src', $url);
253        $('#modalContent').bind("load",function(){
254            $(".header .close",this.contentWindow.document.body).bind("click", closeModal);
255        });
256        $('#modalBackpanel').css({width:$("body").width(),height:$("body").height(),opacity:.4}).show();
257        $('#modalContainer').center().show();
258    }
259});
260})(jQuery);
261$(document).ready(function(){
262    if (typeof(EC_SHOP_MULTISHOP_SHIPPING) != "undefined") {
263        var sShippingCountryCode4Cookie = 'shippingCountryCode';
264        var bShippingCountryProc = false;
265
266        // 배송국가 선택 설정이 사용안함이면 숨김
267        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) {
268            $('.xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist').hide();
269            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptioncountry').hide();
270        } else {
271            $('.thumb .xans-layout-multishoplistitem').hide();
272            var aShippingCountryCode = document.cookie.match('(^|;) ?'+sShippingCountryCode4Cookie+'=([^;]*)(;|$)');
273            if (typeof(aShippingCountryCode) != 'undefined' && aShippingCountryCode != null && aShippingCountryCode.length > 2) {
274                var sShippingCountryValue = aShippingCountryCode[2];
275            }
276
277            // query string으로 넘어 온 배송국가 값이 있다면, 그 값을 적용함
278            var aHrefCountryValue = decodeURIComponent(location.href).split("/?country=");
279
280            if (aHrefCountryValue.length == 2) {
281                var sShippingCountryValue = aHrefCountryValue[1];
282            }
283
284            // 메인 페이지에서 국가선택을 안한 경우, 그 외의 페이지에서 셋팅된 값이 안 나오는 현상 처리
285            if (location.href.split("/").length != 4 && $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()) {
286                $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join(""));
287
288                if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) {
289                    $("#f_country").val($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val());
290                }
291            }
292            if (typeof(sShippingCountryValue) != "undefined" && sShippingCountryValue != "" && sShippingCountryValue != null) {
293                sShippingCountryValue = sShippingCountryValue.split("#")[0];
294                var bShippingCountryProc = true;
295
296                $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue);
297                $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join(""));
298                var expires = new Date();
299                expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30일간 쿠키 유지
300                document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString();
301                if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) {
302                    $("#f_country").val(sShippingCountryValue).change();;
303                }
304            }
305        }
306        // 언어선택 설정이 사용안함이면 숨김
307        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingLanguageSelection === false) {
308            $('.xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist').hide();
309            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptionlanguage').hide();
310        } else {
311            $('.thumb .xans-layout-multishoplistitem').hide();
312        }
313
314        // 배송국가 및 언어 설정이 둘 다 사용안함이면 숨김
315        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShipping === false) {
316            $(".xans-layout-multishopshipping").hide();
317            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption').hide();
318        } else if (bShippingCountryProc === false && location.href.split("/").length == 4) { // 배송국가 값을 처리한 적이 없고, 메인화면일 때만 선택 레이어를 띄움
319            var sShippingCountryValue = $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val();
320            $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue);
321            $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join(""));
322            // 배송국가 선택을 사용해야 레이어를 보이게 함
323            if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === true) {
324                $(".xans-layout-multishopshipping").show();
325            }
326        }
327
328        $(".xans-layout-multishopshipping .close").bind("click", function() {
329            $(".xans-layout-multishopshipping").hide();
330        });
331
332        $(".xans-layout-multishopshipping .ec-base-button a").bind("click", function() {
333            var expires = new Date();
334            expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30일간 쿠키 유지
335            document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString();
336
337            // 도메인 문제로 쿠키로 배송국가 설정이 안 되는 경우를 위해 query string으로 배송국가 값
337을 넘김
338            var sQuerySting = (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) ? "" : "/?country="+encodeURIComponent($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val());
339
340            location.href = '//'+$(".xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist").val()+sQuerySting;
341        });
342        $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a").bind("click", function() {
343            $(".xans-layout-multishopshipping").show();
344        });
345    }
346});

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.