PageSourceSearch

https://bonfre.kr/ind-script/optimizer_user.php?filename=jcxBCoAgE…61cd8263cb169d7a3636124&t=1540448784&user=T

js bonfre.kr collected 2026-10-08 23:12:55 UTC 23,145 bytes, 705 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 node = this;
14            
15            $(window).scroll(function() {       
16                var _top = $(document).scrollTop();
17                _top = (aPosition.top < _top) ? _top : aPosition.top;
18
19                setTimeout(function () {
20                    $(node).stop().animate({top: _top}, options.animate);
21                }, options.delay);
22            });
23        });
24    };
25
26    $.fn.floatBanner.defaults = { 
27        'animate'  : 500,
28        'delay'    : 500
29    };
30
31})(jQuery);
32    
33/**
34 * 문서 구동후 시작
35 */
36$(document).ready(function(){
37    $('#banner, #quick').floatBanner();
38});
39
40/**
41 *  썸네일 이미지 엑박일경우 기본값 설정
42 */
43$(window).load(function() {
44    $("img.thumb,img.ThumbImage,img.BigImage").each(function($i,$item){
45        var $img = new Image();
46        $img.onerror = function () {
47                $item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif";
48        }
49        $img.src = this.src;
50    });
51});
52//https 로 이동
53
54
55if (location.protocol === 'http:' && location.host.indexOf('cafe24.com') === -1) {
56
57    var sUrl = 'https://' + location.host + location.pathname + location.search;
58
59
60
61
62    window.location.replace(sUrl);
63
64}
65
66//window popup script
67function winPop(url) {
68    window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no");
69}
70/**
71 * document.location.href split
72 * return array Param
73 */
74function getQueryString(sKey)
75{
76    var sQueryString = document.location.search.substring(1);
77    var aParam       = {};
78
79    if (sQueryString) {
80        var aFields = sQueryString.split("&");
81        var aField  = [];
82        for (var i=0; i<aFields.length; i++) {
83            aField = aFields[i].split('=');
84            aParam[aField[0]] = aField[1];
85        }
86    }
87
88    aParam.page = aParam.page ? aParam.page : 1;
89    return sKey ? aParam[sKey] : aParam;
90};
91
92
93/**
94 * paging HTML strong tag로 변형
95 */
96function convertPaging(){
97
98    $('.paging ol a').each(function() {
99        var sPage = $(this).text() ? $(this).text() : 1;
100
101        if (sPage == '['+getQueryString('page')+']') {
102            $(this).parent().html('<strong title="현재페이지">'+sPage+'</strong>');
103        } else {
104            var sHref = $(this).attr('href');
105            $(this).parent().html('<a href="'+sHref+'" title="'+sPage+'페이지로 이동">'+sPage+'</a>');
106        }
107    });
108}
109
110$(document).ready(function(){
111    // tab
112    $.eTab = function(ul){
113        $(ul).find('a').click(function(){
114            var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'),
115                _target = $(this).attr('href'),
116                _siblings = '.' + $(_target).attr('class');
117            $(_target).show().siblings(_siblings).hide();
118            return false
119        });
120    }
121    if ( window.call_eTab ) {
122        call_eTab();
123    };
124});
125
126
127
128
129//--------------------------------------------------------------------------------
130// GNB Navigation
131// 3초후 사라지는 메뉴
132//--------------------------------------------------------------------------------
133// 메뉴 seq는 활성화이미지 넘버(1부터), target는 메뉴 아이디
134function initNavigation(seq, target) {
135	var nav = document.getElementById(target);
136	nav.menu = new Array(); // 메뉴의 1뎁스 a링크
137	nav.current = null; // 활성화되었던 1뎁스 a링크
138	nav.menuseq = 1; // 메뉴의 고유index번호 (0, 1, 2, 3...)
139	nav.initActiveImg = null; // 1뎁스 문서초기 활성화된 이미지기억
140
141	// 이미지 프리로딩
142	/*
143	$(window).ready(function(){
144		var menuImages = nav.getElementsByTagName("IMG");
145		for(i = 0; i<menuImages.length; i++){
146			if(menuImages[i].src.indexOf("_on.gif") != -1)
147				(new Image()).src = menuImages[i].src;
148			else
149				(new Image()).src = menuImages[i].src.replace("_on.gif", "_off.gif");
150		}
151	});
152	*/
153
154	// 2뎁스 a링크 이벤트
155	var allA = nav.getElementsByTagName("a");
156	for(k = 0; k < allA.length; k++) {
157		allA.item(k).onmouseover = allA.item(k).onfocus = function(){
158			nav.isOver = true;
159		}
160		allA.item(k).onmouseout = allA.item(k).onblur = function(){
161			nav.isOver = false;
162			setTimeout(function () {
163				if (nav.isOver == false) {
164					if (nav.menu[seq])
165						// 메뉴가 고정형식으로 활성화 될때
166						nav.menu[seq].onmouseover();
167					else if(nav.current){
168						// nav.current 는 활성화되었던 a링크가 저장되어 있음.
169						if(nav.initActiveImg != menuImg)
170							menuImg.src = menuImg.src.replace("_on.gif", "_off.gif");
171						if (nav.current.submenu)
172							nav.current.submenu.style.display = "none";
173						nav.current = null;
174					}
175				}
176			}, 1000);
177		}
178	}
179
180	// 1뎁스 a링크 이벤트
181	var navLen = nav.childNodes.length;
182	var menuImg = null; // 활성화된 1메뉴의 링크에 포함된 이미지 저장
183	for(var i = 0; i < navLen; i++) {
184		var navItem = nav.childNodes.item(i);
185		if (navItem.tagName != "LI") continue;
186
187		var navAnchor = navItem.getElementsByTagName("a").item(0);
188		navAnchor.submenu = navItem.getElementsByTagName("div").item(0);
189		
190		// 문서초기 활성화된 이미지는 src경로 안바꾸기
191		navAnchor.img = navAnchor.getElementsByTagName("img").item(0);
192		if(navAnchor.img.src.indexOf("_on.gif") != -1)
193			nav.initActiveImg = navAnchor.img;
194		
195		navAnchor.onmouseover = navAnchor.onfocus = function() {
196			if(nav.current){
197				menuImg = nav.current.childNodes.item(0);
198				if(nav.initActiveImg != menuImg)
199					menuImg.src = menuImg.src.replace("_on.gif", "_off.gif");
200				if (nav.current.submenu)
201					nav.current.submenu.style.display = "none";
202
203				nav.current = null;
204			}
205			if(nav.current != this){
206				menuImg = this.childNodes.item(0);
207				menuImg.src = menuImg.src.replace("_off.gif", "_on.gif");
208				if(this.submenu)
209					this.submenu.style.display = "block";
210				if(nav.current){
211					smenuImg = this.submenu.childNodes.item(0);
212					sMenuImgt = smenuImg.getElementsByTagName("img").item(0);
213					sMenuImgt.src = sMenuImgt.src.replace("_off.gif", "_on.gif");
214				} 
215				nav.current = this;
216			}
217			nav.isOver = true;
218		}
219
220		nav.menuseq++;
221		nav.menu[nav.menuseq] = navAnchor;
222	}
223	if (nav.menu[seq]) nav.menu[seq].onmouseover();
224}
225
226//--------------------------------------------------------------------------------
227// Image Over
228// 사용예 <img src="" onmouseover="menuOn(this)" onmouseout="menuOut(this)"  alt="" />
229//--------------------------------------------------------------------------------
230
231function menuOn(imgEl){ 
232	imgEl.src = imgEl.src.replace("_off.png","_on.png") 
233}
234function menuOut(imgEl){ 
235	imgEl.src = imgEl.src.replace("_on.png","_off.png") 
236}
237
238//--------------------------------------------------------------------------------
239// Flash Insert
240// <script type="text/javascript">FlashInsert('GlobalNavigation', '../swf/top.swf', '1000px', '115px', 'always', 'transparent', '', 'high', '');<'/script>
241//--------------------------------------------------------------------------------
242function FlashInsert(FlashIDName, FlashFileName, FlashWidth, FlashHeight, DNSSetting, WMODESetting, FlashBGColor, QSetting, FlashAlign){
243	document.write('<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
244	document.write('CODEBASE="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version=8,0,22,0" ');
245	document.write(' ID="'+FlashIDName+'" WIDTH="' + FlashWidth + '" HEIGHT="' + FlashHeight + '" ALIGN="'+FlashAlign+'">');
246	document.write('<PARAM NAME="movie" VALUE="'+ FlashFileName +'">');
247	document.write('<PARAM NAME="quality" VALUE="'+QSetting+'">');
248	document.write('<PARAM NAME="bgcolor" VALUE="'+FlashBGColor+'">');
249	document.write('<PARAM NAME="wmode" VALUE="'+WMODESetting+'">');
250	document.write('<PARAM NAME="allowScriptAccess" VALUE="'+DNSSetting+'">');
251	document.write('<EMBED SRC="'+ FlashFileName +'"  NAME="'+FlashIDName+'"');
252	document.write(' WIDTH="' + FlashWidth + '" HEIGHT="' + FlashHeight + '" QUALITY="'+QSetting+'" BGCOLOR="'+FlashBGColor+'"');
253	document.write(' ALLOWSCRIPTACCESS="'+DNSSetting+'" ALIGN="'+FlashAlign+'" WMODE="'+WMODESetting+'" TYPE="application/x-shockwave-flash" ');
254	document.write(' PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" >');
255	document.write('</EMBED>');
256	document.write('</OBJECT>');
257}
258
259//--------------------------------------------------------------------------------
260// Input type="radio" Border:none /* IE6에서 선택자가 적용되지 않아서 사용 */
261// *html input{z-index:expression(input_nb(this));} /* css/common.css와 연동 */
262//--------------------------------------------------------------------------------
263function input_nb(obj){
264	obj.style.zIndex="1";
265	if(obj.type.toLowerCase()=="radio" || obj.type.toLowerCase()=="image" || obj.type.toLowerCase()=="checkbox") {
266		obj.style.border="0";
267	}
268}
269
270
271//--------------------------------------------------------------------------------
272// 텝메뉴 */
273// * */
274//--------------------------------------------------------------------------------
275
276function NeoMenu(num){
277	for(i=1;i<=4;i++){				//중간 i의 초대값은 메인의 탭메뉴 갯수
278	var two = "neo_new" + i;
279	var btn = "neo_btn" + i;
280	document.getElementById(two).style.display = "none";
281	document.getElementById(btn).src = "./images/index/notice_tap" + i + ".gif";
282	}
283	var tc = "neo_new" + num;
284 
285	document.getElementById(tc).style.display = "block";
286	document.getElementById('neo_btn' + num).src = "/_yc/images/index/notice_tap" + num  + "_on.gif";
287}
288function InfoSetting(index){
289	var img_src = document.getElementById("infoSetting_img" + index);
290	var div_display = document.getElementById("info_list_" + index);
291	var freq_menu = document.getElementById("frequently_menu" + index);
292	for (i=1; i<4; i++){
293		var ex_div = document.getElementById("info_list_" + i);
294		ex_div.style.display = "none";
295		var ex_img = document.getElementById("infoSetting_img" + i);
296		ex_img.src = "/_yc/images/index/frequently_m" + i + "_off.gif";
297		ex_freq_menu = document.getElementById("frequently_menu" + i);
298 
299	}
300	div_display.style.display = "block";
301	img_src.src = "/_yc/images/index/frequently_m" + index + "_on.gif";
302}
303 
304var currpopindex = 1;
305var popuptogle = 1;
306var popinterval = null;
307var currbannerindex = 1;
308var banneruptogle = 1;
309var bannerinterval = null;
310
311
312//--------------------------------------------------------------------------------
313// PNG
314// png24 {tmp:expression(setPNG24(this));} /* css/common.css png24 class와 연동 */
315//--------------------------------------------------------------------------------
316function setPNG24(obj){
317    obj.width=obj.height=1;
318    obj.className=obj.className.replace(/\bPNG24\b/i,'');
319    obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
320    obj.src='';
321    return '';
322}
323$.fn.extend({
324    center: function() {
325        this.each(function() {
326            var
327                $this = $(this),
328                $w = $(window);
329            $this.css({
330                position: "absolute",
331                top: ~~(($w.height() - $this.outerHeight()) / 2) + $w.scrollTop() + "px",
332                left: ~~(($w.width() - $this.outerWidth()) / 2) + $w.scrollLeft() + "px"
333            });
334        });
335        return this;
336    }
337});
338$(function() {
339    var $container = function(){/*
340<div id="modalContainer">
341    <iframe id="modalContent" scroll="0" scrolling="no" frameBorder="0"></iframe>
342</div>');
343*/}.toString().slice(14,-3);
344    $('body')
345    .append($('<div id="modalBackpanel"></div>'))
346    .append($($container));
347    function closeModal () {
348        $('#modalContainer').hide();
349        $('#modalBackpanel').hide();
350    }
351    $('#modalBackpanel').click(closeModal);
352    zoom = function ($piProductNo, $piCategoryNo, $piDisplayGroup) {
353        var $url = '/product/image_zoom.html?product_no=' + $piProductNo + '&cate_no=' + $piCategoryNo + '&display_group=' + $piDisplayGroup;
354        $('#modalContent').attr('src', $url);
355        $('#modalContent').bind("load",function(){
356            $(".header .close",this.contentWindow.document.body).bind("click", closeModal);
357        });
358        $('#modalBackpanel').css({width:$("body").width(),height:$("body").height(),opacity:.4}).show();
359        $('#modalContainer').center().show();
360    }
361});
362/**
363 * 카테고리 마우스 오버 이미지
364 * 카테고리 서브 메뉴 출력
365 */
366
367$(document).ready(function(){
368
369    var methods = {
370        aCategory    : [],
371        aSubCategory : {},
372
373        get: function()
374        {
375             $.ajax({
376                url : '/exec/front/Product/SubCategory',
377                dataType: 'json',
378                success: function(aData) {
379
380                    if (aData == null || aData == 'undefined') return;
381                    for (var i=0; i<aData.length; i++)
382                    {
383                        var sParentCateNo = aData[i].parent_cate_no;
384
385                        if (!methods.aSubCategory[sParentCateNo]) {
386                            methods.aSubCategory[sParentCateNo] = [];
387                        }
388
389                        methods.aSubCategory[sParentCateNo].push( aData[i] );
390                    }
391                }
392            });
393        },
394
395        getParam: function(sUrl, sKey) {
396
397            var aUrl         = sUrl.split('?');
398            var sQueryString = aUrl[1];
399            var aParam       = {};
400
401            if (sQueryString) {
402                var aFields = sQueryString.split("&");
403                var aField  = [];
404                for (var i=0; i<aFields.length; i++) {
405                    aField = aFields[i].split('=');
406                    aParam[aField[0]] = aField[1];
407                }
408            }
409            return sKey ? aParam[sKey] : aParam;
410        },
411
412
413        show: function(overNode, iCateNo) {
414
415            if (methods.aSubCategory[iCateNo].length == 0) {
416                return;
417            }
418
419            var aHtml = [];
420            aHtml.push('<ul>');
421            $(methods.aSubCategory[iCateNo]).each(function() {
422                aHtml.push('<li><a href="/'+this.design_page_url+this.param+'">'+this.name+'</a></li>');
423            });
424            aHtml.push('</ul>');
425
426
427            var offset = $(overNode).offset();
428            $('<div class="sub-category"></div>')
429                .appendTo(overNode)
430                .html(aHtml.join(''))
431                .find('li').mouseover(function(e) {
432                    $(this).addClass('over');
433                }).mouseout(function(e) {
434                    $(this).removeClass('over');
435                });
436        },
437
438        close: function() {
439            $('.sub-category').remove();
440        }
441    };
442
443    methods.get();
444
445
446    $('.xans-layout-category li').mouseenter(function(e) {
447          var $this = $(this).addClass('on'),
448            iCateNo = Number(methods.getParam($this.find('a').attr('href'), 'cate_no'));
449
450          if (!iCateNo) {
451               return;
452          }
453
454          methods.show($this, iCateNo);
455     }).mouseleave(function(e) {
456        $(this).removeClass('on');
457
458          methods.close();
459     });
460});
461
462/**
463* @class
464*   이미지 롤링를 처리 합니다.
465*
466* @example
467*    $.fn.roate.defaults  = {
468*        'duration' : '3000',
469*       'stopButton' : '#stopButton',
470*        'playButton' : '#playButton',
471*        'prevButton' : '#prevButton',
472*        'nextButton' : '#nextButton',
473*        'movement'  : 'left',
474*        'scroll'     : 1,
475*        'autoStart'   : false,
476*        'interval'   : 2000
477*    };
478*
479*/
480
481;(function($){
482
483    $.fn.roate = function( options ) {
484
485        var opts = $.extend( {}, $.fn.roate.defaults, options ),
486            containerBox = [],
487            $this = $(this),
488            defaultWidth, defaultHeight, curentIndex = 0, distance, childLength, isAnimate = false, timer = null;
489
490        var pm = {}
491
492        var _init = function() {
493            _setDefaultSize();
494            _setDistance();
495            _displayOverFlow();
496            _setContainerBox();
497            if(childLength > 1) {
498                _setEventBind();
499            } else {
500                _displayPlayButton();
501            }
502        }
503        , _setDefaultSize = function() {
504            defaultWidth  = opts.defaultWidth || $this.children().eq(0).width();
505            defaultHeight = opts.defaultHeight || $this.children().eq(0).height();
506            childLength   = $this.children().length;
507            if ( opts.movement == 'top' ) {
508                defaultHeight = defaultHeight * parseInt(opts.scroll,10);
509            } else {
510                defaultWidth  = defaultWidth * parseInt(opts.scroll,10);
511                $this.children().css('float','left');
512            }
513        }
514        , _setDistance = function() {
515            if ( opts.movement == 'top') {
516                distance = defaultHeight;
517            } else {
518                distance = defaultWidth;
519            }
520        }
521        , _displayOverFlow = function() {
522            var $wrap = $("<div class='containterWrap'></div>").css({
523                'overflow' : 'hidden',
524                'position' : 'relative',
525                'width' : defaultWidth,
526                'height' : opts.defaultHeight || defaultHeight
527            });
528            $this.wrap( $wrap );
529            $this.css({'position':'absolute', 'left': '0', 'top' : '0' });
530        }
531        , _setContainerBox = function() {
532            $this.children().each(function(i){
533                containerBox[ containerBox.length ] = this;
534            });
535        }
536        , _setEventBind  = function() {
537            $(options.nextButton).bind('click.roate', function(){
538                pm.next();
539            });
540
541            $(options.prevButton).bind('click.roate', function(){
542                pm.prev();
543            });
544
545            $(options.playButton).bind('click.roate', function(){
546                _stopTimer();
547                pm.play();
548            });
549
550            $(options.stopButton).bind('click.roate', function(){
551                pm.stop();
552            });
553            $this.hover( function(){
554                pm.stop();
555            }, function(){
556                _stopTimer();
557                pm.play();
558            });
559        }
560        , _addCurrent = function() {
561            curentIndex++;
562
563            if ( curentIndex >= childLength ) {
564                curentIndex = 0;
565            }
566        }, _minusCurrent = function() {
567            curentIndex--;
568            if ( curentIndex < 0 ) {
569                curentIndex = childLength -1;
570            }
571        }
572        , _isAmimate = function() {
573            if ( isAnimate ) {
574                return true;
575            }
576            isAnimate = true;
577            return false;
578        }, _stopTimer = function(){
579            if ( timer ) {
580                clearInterval( timer );
581                _displayPlayButton();
582            }
583        }, _displayPlayButton = function() {
584            $(opts.playButton).css('display', 'inline');
585            $(opts.stopButton).css('display', 'none');
586        }, _displayStopButton = function() {
587            $(opts.playButton).css('display', 'none');
588            $(opts.stopButton).css('display', 'inline');
589        }, _setOpacity = function ( style ) {
590              if ( opts.opacity ) {
591                style['display'] = 'none';
592                style['opacity'] = 1;
593            }
594            return style;
595        };
596
597        pm.next = function() {
598            this.nextMovement( $(containerBox[ curentIndex ]) );
599        };
600
601        pm.prev = function() {
602            this.prevMovement( $(containerBox[ curentIndex ]) );
603        };
604
605        pm.play = function() {
606            timer = setInterval(function(){ pm.next() }, opts.interval);
607            _displayStopButton();
608        };
609
610        pm.stop = function() {
611            _stopTimer();
612        };
613
614        pm.nextMovement = function ($el) {
615            var moveDistance = $this.offset().left - $el.offset().left - distance;
616
617            if ( _isAmimate() === false ) {
618                var moveType = {},setCss = {}
619                moveType[opts.movement] = moveDistance;
620                if ( opts.opacity) {
621                    moveType['opacity'] = 0;
622                }
623                setCss[opts.movement] = parseInt(moveDistance,10) + parseInt(distance,10);
624                setCss = _setOpacity( setCss );
625                $this.animate(moveType, opts.duration, function(){
626                    $this.children(':last').after($el);
627                    $this.css(setCss);
628                    if ( opts.opacity ) {
629                        $this.fadeIn(opts.duration);
630                    }
631                    isAnimate = false;
632                    _addCurrent();
633                });
634            }
635        }
636
637        pm.prevMovement = function ($el) {
638            var moveDistance = $this.offset().left - $el.offset().left + distance;
639            if ( _isAmimate() === false ) {
640                var moveType = {},setCss = {}
641                moveType[opts.movement] = moveDistance;
642                if ( opts.opacity ) {
643                    moveType['opacity'] = 0;
644                }
645                setCss[opts.movement] = parseInt(moveDistance,10) - parseInt(distance,10);
646                setCss = _setOpacity( setCss );
647                if ( opts.movement == 'top' ) {
648                    $this.css('top',-defaultHeight);
649                    moveType[opts.movement] = 0;
650                    $this.children(':first').before($this.children(':last'));
651                }
652                $this.animate(moveType, opts.duration, function(){
653                    if ( opts.movement == 'left' ) {
654                        $this.children(':first').before($this.children(':last'));
655                    }
656                    $this.css(setCss);
657                    if ( opts.opacity ) {
658                        $this.fadeIn(opts.duration);
659                    }
660                    _minusCurrent();
661                    isAnimate = false;
662                });
663            }
664        }
665
666        _init();
667
668        if ( opts.autoStart && childLength > 1) {
669            pm.play();
670        }
671
672        return pm;
673    };
674
675    $.fn.roate.defaults  = {
676        'duration' : '3000',
677        'stopButton' : '#stopButton',
678        'playButton' : '#playButton',
679        'prevButton' : '#prevButton',
680        'nextButton' : '#nextButton',
681        'movement'  : 'left',
682        'scroll'     : 1,
683        'autoStart'   : false,
684        'interval'   : 2000,
685        'opacity'    : false
686    };
687
688})(jQuery);
689
690$(document).ready(function(){
691    $(".xans-layout-project ul").roate({
692        'duration' : '1000',
693        'interval' : 3000,
694        'stopButton' : '#stopButton-project',
695        'playButton' : '#playButton-project',
696        'prevButton' : '#prevButton-project',
697        'nextButton' : '#nextButton-project',
698        'defaultWidth':  '180',
699        'defaultHeight' : '180',
700        'movement'  : 'top',
701        'opacity' : false,
702        'autoStart' : true
703    });
704});
705

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.