PageSourceSearch

https://edhills.com/ind-script/optimizer_user.php?filename=K05J5U5…490ab335edd19efa42d3ed1&t=1753686307&user=T

js edhills.com collected 2026-10-08 07:37:28 UTC 9,805 bytes, 327 lines download raw bytes

1/**
2 * hasClass
3 */
4function hasClass(element, className){
5    return (' ' + element.className + ' ').indexOf(' ' + className+ ' ') > -1;
6};
7
8/**
9 *  toggle
10 */
11function toggleClassAll(element, handler, className){
12    var _handler = document.querySelector(handler);
13    document.querySelectorAll(handler).forEach(function(item){
14        item.addEventListener('click', function(){
15            var _element = item.parentNode;
16            if ( hasClass( _element, className ) ) {
17                _element.classList.remove( className );
18            } else {
19                _element.classList.add( className );
20            }
21        })
22    })
23};
24
25/**
26 *  findElements
27 */
28function findElements(element, findElement){
29    var resultElements = [];
30    document.querySelectorAll(element).forEach(function(item){
31        var findElementList = item.querySelectorAll(findElement);
32        findElementList = Array.prototype.slice.call(findElementList);
33        resultElements = resultElements.concat(findElementList);
34    })
35    return resultElements;
36};
37
38/**
39 *  setAttributeAl
40 */
41function setAttributeAll(elements, name, value){
42    elements.forEach(function(item){
43        item.setAttribute(name, value);
44    })
45};
46
47/**
48 *  상품 섬네일 로드되지 않을 경우, 기본값 설정
49 */
50function setDefaultImage(element) {
51    document.querySelectorAll(element).forEach(function(item){
52        var $img = new Image();
53        $img.onerror = function () {
54            item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif";
55        }
56        $img.src = item.src;
57    });
58};
59
60/**
61 *  tooltip
62 */
63function setTooltipEvent(){
64    var input = findElements('.eTooltip', 'input');
65    input.forEach(function(item){
66        item.addEventListener('focusin', function(event){
67            var targetName = returnTargetName(event.target);
68            targetName.nextElementSibling.style.display = 'block'
69        });
70        item.addEventListener('focusout', function(event){
71            var targetName = returnTargetName(event.target);
72            targetName.nextElementSibling.style.display = 'none'
73        });
74    });
75}
76
77/**
78 *  tooltip input focus
79 */
80function returnTargetName(_this){
81    var ePlacename = _this.parentElement.getAttribute("class");
82    var targetName;
83    if(ePlacename == "ePlaceholder"){ //ePlaceholder supported
84        targetName = _this.parentElement;
85    }else{
86        targetName = _this;
87    }
88    return targetName;
89}
90
91/**
92 * window load
93 */
94window.addEventListener('load', function(){
95    if (document.querySelector('.thumbnail')){
96        setDefaultImage('.thumbnail img');
97    }
98    if (document.querySelector('.eTooltip')){
99        setAttributeAll(findElements('.eTooltip', '.btnClose'),'tabIndex','-1');
100        setTooltipEvent();
101    }
102    if (document.querySelector('div.eToggle')){
103        toggleClassAll(false, 'div.eToggle .title', 'selected');
104    }
105}); 
106//window popup script
107function winPop(url) {
108    window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no");
109}
110/**
111 * document.location.href split
112 * return array Param
113 */
114function getQueryString(sKey)
115{
116    var sQueryString = document.location.search.substring(1);
117    var aParam       = {};
118
119    if (sQueryString) {
120        var aFields = sQueryString.split("&");
121        var aField  = [];
122        for(var i=0; i<aFields.length; i++){
123            aField = aFields[i].split('=');
124            aParam[aField[0]] = aField[1];            
125        }
126    }
127
128    aParam.page = aParam.page ? aParam.page : 1;
129    return sKey ? aParam[sKey] : aParam;
130};
131
132/**
133  *  구매버튼
134*/
135var globalBuyBtnScrollFunc = function() {
136    // 구매버튼 관련변수
137    var sFixId = $('#orderFixItem').length > 0  ? 'orderFixItem' : 'fixedActionButton',
138        $area = $('#orderFixArea'),
139        $item = $('#' + sFixId + '').not($area);
140
141    $(window).scroll(function(){
142        try {
143             // 구매버튼 관련변수
144            var iCurrentHeightPos = $(this).scrollTop() + $(this).height(),
145                iButtonHeightPos = $item.offset().top;
146
147            if (iCurrentHeightPos > iButtonHeightPos || iButtonHeightPos < $(this).scrollTop() + $item.height()) {
148                if (iButtonHeightPos < $(this).scrollTop() - $item.height()) {
149                    $area.fadeIn('fast');
150                } else {
151                    $area.hide();
152                }
153            } else {
154                $area.fadeIn('fast');
155            }
156        } catch(e) { }
157    });
158};
159
160$(function(){
161    // tab
162    $.eTab = function(ul) {
163        $(ul).find('a').on('click', function() {
164            var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'),
165                _target = $(this).attr('href'),
166                _siblings = '.' + $(_target).attr('class');
167            $(_target).show().siblings(_siblings).hide();
168            return false
169        });
170    }
171    if ( window.call_eTab ) {
172        call_eTab();
173    };
174    globalBuyBtnScrollFunc();
175});
176(function($){
177    $.fn.extend({
178        center: function() {
179            this.each(function() {
180                var
181                    $this = $(this),
182                    $w = $(window);
183                $this.css({
184                    position: "absolute",
185                    top: ~~(($w.height() - $this.outerHeight()) / 2) + $w.scrollTop() + "px",
186                    left: ~~(($w.width() - $this.outerWidth()) / 2) + $w.scrollLeft() + "px"
187                });
188            });
189            return this;
190        }
191    });
192    $(function() {
193        var $container = function(){/*
194    <div id="modalContainer">
195        <iframe id="modalContent" scroll="0" scrolling="no" frameBorder="0"></iframe>
196    </div>');
197    */}.toString().slice(14,-3);
198        $('body')
199        .append($('<div id="modalBackpanel"></div>'))
200        .append($($container));
201        function closeModal () {
202            $('#modalContainer').hide();
203            $('#modalBackpanel').hide();
204        }
205        $('#modalBackpanel').on('click', closeModal);
206        zoom = function ($piProductNo, $piCategoryNo, $piDisplayGroup) {
207            var $url = '/product/image_zoom.html?product_no=' + $piProductNo + '&cate_no=' + $piCategoryNo + '&display_group=' + $piDisplayGroup;
208            $('#modalContent').attr('src', $url);
209            $('#modalContent').on("load",function(){
210                $(".header .close",this.contentWindow.document.body).on("click", closeModal);
211            });
212            $('#modalBackpanel').css({width:$("body").width(),height:$("body").height(),opacity:.4}).show();
213            $('#modalContainer').center().show();
214        }
215    });
216})(jQuery);
217/**
218 * 카테고리 마우스 오버 이미지
219 * 카테고리 서브 메뉴 출력
220 */
221
222$(function() {
223
224    var methods = {
225        aCategory    : [],
226        aSubCategory : {},
227
228        get: function()
229        {
230             $.ajax({
231                url : '/exec/front/Product/SubCategory',
232                dataType: 'json',
233                success: function(aData) {
234
235                    if (aData == null || aData == 'undefined') return;
236                    for (var i=0; i<aData.length; i++)
237                    {
238                        var sParentCateNo = aData[i].parent_cate_no;
239
240                        if (!methods.aSubCategory[sParentCateNo]) {
241                            methods.aSubCategory[sParentCateNo] = [];
242                        }
243
244                        methods.aSubCategory[sParentCateNo].push( aData[i] );
245                    }
246                }
247            });
248        },
249
250        getParam: function(sUrl, sKey) {
251
252            var aUrl         = sUrl.split('?');
253            var sQueryString = aUrl[1];
254            var aParam       = {};
255
256            if (sQueryString) {
257                var aFields = sQueryString.split("&");
258                var aField  = [];
259                for (var i=0; i<aFields.length; i++) {
260                    aField = aFields[i].split('=');
261                    aParam[aField[0]] = aField[1];
262                }
263            }
264            return sKey ? aParam[sKey] : aParam;
265        },
266
267        getParamSeo: function(sUrl) {
268            var aUrl         = sUrl.split('/');
269            return aUrl[3] ? aUrl[3] : null;
270        },
271
272        show: function(overNode, iCateNo) {
273
274            if (methods.aSubCategory[iCateNo] === undefined) {
275                return;
276            }
277
278            var aHtml = [];
279            aHtml.push('<ul>');
280            $(methods.aSubCategory[iCateNo]).each(function() {
281                aHtml.push('<li><a href="'+this.link_product_list+'">'+this.name+'</a></li>');
282            });
283            aHtml.push('</ul>');
284
285
286            var offset = $(overNode).offset();
287            $('<div class="sub-category"></div>')
288                .appendTo(overNode)
289                .html(aHtml.join(''))
290                .find('li').on({
291                    mouseover: function(e) {
292                        $(this).addClass('over');
293                    },
294                    mouseout: function(e) {
295                        $(this).removeClass('over');
296                    }
297                });
298        },
299
300        close: function() {
301            $('.sub-category').remove();
302        }
303    };
304
305    methods.get();
306
307
308    $('.xans-layout-category li').on({
309        mouseenter: function () {
310            var $this = $(this).addClass('on'),
311                iCateNo = Number(methods.getParam($this.find('a').attr('href'), 'cate_no'));
312
313            if (!iCateNo) {
314                iCateNo = Number(methods.getParamSeo($this.find('a').attr('href')));
315            }
316
317            if (!iCateNo) {
318                return;
319            }
320            methods.show($this, iCateNo);
321        },
322        mouseleave: function () {
323            $(this).removeClass('on');
324            methods.close();
325        }
326    });
327});

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.