PageSourceSearch

https://www.suprema.co.kr/embedded-modules/en/asset/js/index.js?v?250311

js suprema.co.kr collected 2026-10-05 07:32:52 UTC 16,234 bytes, 442 lines download raw bytes

1/*gnb*/
2$(document).ready(function() {
3
4    $(".gnb li").hover(function() { //Hover over event on list item
5        $(this).children('.sn_container').stop(); //Show the subnav
6		$(this).find(".sn_container").fadeIn(); //Show the subnav
7	} , function() { //on hover out...
8        $(this).children('.sn_container, .sn_inner').stop(); //Hide the subnav
9        $(this).children('.sn_container, .sn_inner').css('display','none'); //Hide the subnav
10        $(this).children('.sn_container, .sn_inner').hide(); //Hide the subnav
11        $(this).children('.sn_container, .sn_inner').close(); //Hide the subnav
12	});
13  
14
15});
16
17$(document).ready(function(){
18    $('span.txt').click(function(){
19        $(this).siblings('ul').slideToggle();
20    });
21    $('.select li a').click(function(){
22        $('.select').hide().stop();
23    });
24});
25
26//header
27$(window).scroll(function(){ 
28    if($(document).scrollTop() > 50){
29        $('#header').addClass('white_header');
30        $('.btn_top').css('display','block');
31    }else{
32        $('#header').removeClass('white_header'); 
33        $('.btn_top').css('display','none');
34    }
35
36if ( $("#top_odd .selectBox .txt").hasClass("on") ){
37		$("#top_odd .selectBox .txt").removeClass("on");
38		$("#top_odd .selectBox .select").stop().slideUp("fast");
39	}
40
41});
42
43$(window).scroll(function(){
44    if($(document).scrollTop() > 50){
45        $('.navbar').addClass('white');
46        $('.navbar .hamburger rect').css('fill','#222');
47        $('.m_main .navbar .hamburger rect').css('fill','#222');
48        $('.navbar > .logo > a > img').attr('src','/en/asset_m/images/common/m_logo_r.svg');
49        $('.m_btn_search img').attr('src','/embedded-modules/ko/asset_m/images/common/m_btn_search_b.png');
50    }else{
51        $('.navbar').removeClass('white'); 
52        $('.navbar .hamburger rect').css('fill','#fff'); 
53        $('.m_main .navbar .hamburger rect').css('fill','#fff');
54        $('.navbar > .logo > a > img').attr('src','/en/asset_m/images/common/m_logo.svg');
55        $('.m_btn_search img').attr('src','/embedded-modules/ko/asset_m/images/common/m_btn_search.png');
56        $('.m_main .navbar > .logo > a > img').attr('src','/en/asset_m/images/common/m_logo.svg');
57        $('.m_main .m_btn_search img').attr('src','/embedded-modules/ko/asset_m/images/common/m_btn_search.png');                    
58    }
59});
60
61$(document).ready(function() {
62    $('.drawermenu').drawermenu({
63        speed:300,
64        position:'left'
65    });
66});
67
68
69//index.js
70$(document).ready(function(){
71    //상단 검색버튼 클릭시 검색창 활성화
72    $('.all_search_container .btn_all_search').click(function(){
73        $('.all_search_container input').animate({
74            width: '420px'
75        });
76        $('.all_search_container input').css('padding','0 25px');
77        $(this).hide();
78        $('.all_search_container .btn_search_close').show();
79		$('.all_search_container .on').show();
80        $('.all_search_container .btn_all_search').hide();
81    });
82    $('.all_search_container .btn_search_close').click(function(){
83        $('.all_search_container input').animate({
84            width: '0'
85        });
86        $('.all_search_container input').css('padding','0');
87        $(this).hide();
88        $('.all_search_container .btn_all_search').show();
89				$('.all_search_container .on').hide();
90    });
91
92    $(window).on('scroll',function() {
93        if (checkVisible($('#footer'))) {            
94            $('.product_compare_wrap').stop();
95            $('.product_compare_wrap').css('display','none');
96        } else {
97            $('.product_compare_wrap').css('display','block');
98        }
99    });  
100    
101$("#top_odd .selectBox .txt").mouseenter(function(){
102		if ( $("#top_odd .selectBox .txt").hasClass("on") ){
103			$("#top_odd .selectBox .txt").removeClass("on");
104			$("#top_odd .selectBox .select").stop().slideUp("fast");
105		}
106		$(this).siblings('ul').stop().slideDown("fast");
107		$(this).addClass("on");
108    });
109
110	$("#top_odd .selectBox .select").mouseleave(function(){
111		$(this).siblings('.txt').removeClass("on");
112		$(this).stop().slideUp("fast");
113    });
114
115    function checkVisible( elm, eval ) {
116        eval = eval || "object visible";
117        var viewportHeight = $(window).height(), // Viewport Height
118            scrolltop = $(window).scrollTop(), // Scroll Top
119            y = $(elm).offset().top,
120            elementHeight = $(elm).height();   
121        
122        if (eval == "object visible") return ((y < (viewportHeight + scrolltop)) && (y > (scrolltop - elementHeight)));
123        if (eval == "above") return ((y < (viewportHeight + scrolltop)));
124    }
125
126    //비교하기 : 제품선택목록
127    $(".product_compare_wrap .top a").click(function() {
128        $(this).hasClass('disappear')
129        if ($(this).hasClass('disappear')) {
130            $(this).children('img').attr('src', '../asset/images/common/icon_white_bar_plus.png');
131            $(this).removeClass('disappear');
132            $('.cont').slideUp();
133        } else {
134            $(this).children('img').attr('src', '../asset/images/common/icon_white_bar.png');
135            $(this).addClass('disappear');
136            $('.cont').slideDown();
137        }
138    });
139
140    $(".check_box_01").click(function() {
141        $('.product_compare_wrap .top a').addClass('disappear')
142        $('.cont').css('display','block');
143        $('.product_compare_wrap .top a').children('img').attr('src', '../asset/images/common/icon_white_bar.png');
144    });    
145
146    
147    //셀렉트 박스
148
149    $(".dropdown img.flag").addClass("flagvisibility");
150
151    $(".dropdown dt a").click(function() {
152      $(this).parent().siblings().children("ul").toggle();
153    });
154
155    $(".dropdown dd ul li a").click(function() {
156      var text = $(this).html();
157      $(this).parent().parent().parent().siblings().children().children("span").html(text);
158      $(".dropdown dd ul").hide();
159      /* $("#result").html("Selected value is: " + getSelectedValue("sample"));*/
160    });
161
162    function getSelectedValue(id) {
163      return $("#" + id).find("dt a span.value").html();
164    }
165
166    $(document).bind('click', function(e) {
167      var $clicked = $(e.target);
168      if (!$clicked.parents().hasClass("dropdown"))
169        $(".dropdown dd ul").hide();
170    });
171
172    $(".dropdown img.flag").toggleClass("flagvisibility");    
173    
174        //Top버튼클릭시 상단으로이동
175        $('.m_btn_top, .btn_top').click(function(){
176            $('html, body').animate({scrollTop:0},800);
177        });
178        //비디오 pop_up 창
179        $('.btn_play').click(function(){
180            $('.video_pop').stop().fadeIn();
181        });
182        $('.video_close').click(function(){
183            $('.video_pop').stop().fadeOut();
184        });     
185
186        // inquery 버튼 
187        $('#btn_inquiry').click(function(){
188            $('#dm_bg').stop().fadeIn();
189            $('#inquiry_box').stop().fadeIn();
190            $('body').addClass('hidden');
191
192			//버튼 클릭시 초기화
193			$("#inquiry_sEMAIL").val('');
194			$("#inquiry_sNM").val('');
195			//$("#inquiry_sCOUNTRY").val('');
196			$("#inquiry_sCOMPANY").val('');
197			$("#inquiry_sTEL").val('');
198			$("#inquiry_xCONT").val('');
199			$("#inquiry_sPRIVACY_YN").attr("checked", false);
200			$("#inquiry_sNEWSFEED_YN").attr("checked", false);
201        });
202
203        $('#dm_bg, .inquiry_close').click(function(){
204            $('#dm_bg').stop().fadeOut();
205            $('#inquiry_box').stop().fadeOut();
206            $('body').removeClass('hidden');
207        }); 
208
209        $('#dm_bg, .inquiry_close').click(function(){
210            $('#dm_bg').stop().fadeOut();
211            $('#inquiry_box').stop().fadeOut();
212            $('body').removeClass('hidden');
213        }); 
214        
215        $('#dm_bg').on('scroll touchmove mousewheel', function(event) {
216            event.preventDefault();
217            event.stopPropagation();
218            return false;
219          });               
220        
221
222        //문의페이지 내 X 클릭시
223        $('#inquiry_complete .btn_x').click(function(){
224            $('#inquiry_complete').stop().fadeOut();
225            $('#dm_bg').stop().fadeOut();
226            $('body').removeClass('hidden');
227            return false;            
228        });          
229            
230        $('.inquiry_close').click(function(){
231            $('#dm_bg').stop().fadeOut();
232            $('#inquiry_box').stop().fadeOut();
233            $('body').removeClass('hidden');
234        });            
235
236        $('.inquiry_body .btn_area .box_radio label').click(function(){
237            $(this).parent().addClass('on');
238            $(this).parent().siblings().removeClass('on');
239        });  
240
241          //모바일 메뉴_클래스
242          $('.drawermenu .depth_01 li a').click(function(){
243              
244           // $('.drawermenu depth_01 li a').addClass('on');
245           // $(this).removeClass('on');
246          $(this).toggleClass('on');
247          $(this).parent().siblings().children("a").removeClass('on');
248             // if($(this).attr('on').length){
249               //      $(this).removeClass('on'); 
250                //  };
251          });    
252          $('.sfm_slim a').mouseover(function(){
253            var src = $('.tab1 img').attr('src');
254            $('.tab1 img').attr('src','/embedded-modules/en/asset/images/common/sn_img_01.jpg');
255        });
256
257        $('.sfm_6000 a').mouseover(function(){
258            var src = $('.tab1 img').attr('src');
259            $('.tab1 img').attr('src','/embedded-modules/en/asset/images/common/sn_img_0102.jpg');
260        });
261
262        $('.sfm_5500 a').mouseover(function(){
263            var src = $('.tab1 img').attr('src');
264            $('.tab1 img').attr('src','/embedded-modules/en/asset/images/common/sn_img_0103.jpg');
265        });
266
267        $('.sfm_5000 a').mouseover(function(){
268            var src = $('.tab1 img').attr('src');
269            $('.tab1 img').attr('src','/embedded-modules/en/asset/images/common/sn_img_0104.jpg');
270        });
271
272        $('.sfm_4000 a').mouseover(function(){
273            var src = $('.tab1 img').attr('src');
274            $('.tab1 img').attr('src','/embedded-modules/en/asset/images/common/sn_img_0105.jpg');
275        });
276
277        $('.sfm_3000 a').mouseover(function(){
278            var src = $('.tab1 img').attr('src');
279            $('.tab1 img').attr('src','/embedded-modules/en/asset/images/common/sn_img_0106.jpg');
280        });
281
282        $('.all_module a').mouseover(function(){
283            var src = $('.tab1 img').attr('src');
284            $('.tab1 img').attr('src','/embedded-modules/en/asset/images/common/sn_img_0000.jpg');
285        }); 
286        
287        $('.evks a').mouseover(function(){
288            var src = $('.tab2 img').attr('src');
289            $('.tab2 img').attr('src','/embedded-modules/en/asset/images/common/sn_img_0201.jpg');
290        });               
291
292        $('.sdk a').mouseover(function(){
293            var src = $('.tab2 img').attr('src');
294            $('.tab2 img').attr('src','/embedded-modules/en/asset/images/common/sn_img_0202.jpg');
295        });  
296        
297        $('.smf a').mouseover(function(){
298            var src = $('.tab2 img').attr('src');
299            $('.tab2 img').attr('src','/embedded-modules/en/asset/images/common/sn_img_0000.jpg');
300        });                     
301
302        // SNS 공유하기
303        $(document).ready(function() {
304            $('.btn_share').click(function(){
305                $(this).siblings('.share_area').stop().fadeToggle();                
306            });  
307    
308            $(document).mouseup(function(e){
309                var container=$(".share_area");
310                if(container.has(e.target).length===0)
311                container.hide();
312            });
313        });        
314    
315        $('.m_btn_search').click(function(){    
316            $('.mb_search_container').slideDown();
317            $(this).hide();
318            $('.btn_search_close').fadeIn();
319        });  
320        
321        $('.btn_search_close').click(function(){    
322            $('.mb_search_container').fadeOut();
323            $(this).hide();
324            $('.m_btn_search').fadeIn();
325        });  
326
327
328});
329
330
331//심플 SNS 공유
332function sendSns(sns, url, txt)
333{
334    var o;
335    var _url = encodeURIComponent(url);
336    var _txt = encodeURIComponent(txt);
337    var _br  = encodeURIComponent('\r\n');
338 
339    switch(sns)
340    {
341        case 'facebook':
342            o = {
343                method:'popup',
344                url:'http://www.facebook.com/sharer/sharer.php?u=' + _url
345            };
346            break;
347 
348        case 'twitter':
349            o = {
350                method:'popup',
351                url:'https://twitter.com/intent/tweet?text=' + _txt + '&url=' + _url
352            };
353            break;
354 
355        case 'linkedin':
356            o = {
357                method:'popup',
358                url:'https://www.linkedin.com/shareArticle?mini=true&source=suprema&title=' + _txt + '&summary=' + _txt + '&url=' + _url
359            };
360            break;
361
362        case 'me2day':
363            o = {
364                method:'popup',
365                url:'http://me2day.net/posts/new?new_post[body]=' + _txt + _br + _url + '&new_post[tags]=epiloum'
366            };
367            break;
368 
369        case 'kakaotalk':
370            o = {
371                method:'web2app',
372                param:'sendurl?msg=' + _txt + '&url=' + _url + '&type=link&apiver=2.0.1&appver=2.0&appid=dev.epiloum.net&appname=' + encodeURIComponent('Epiloum 개발노트'),
373                a_store:'itms-apps://itunes.apple.com/app/id362057947 mt=8',
374                g_store:'market://details id=com.kakao.talk',
375                a_proto:'kakaolink://',
376                g_proto:'scheme=kakaolink;package=com.kakao.talk'
377            };
378            break;
379 
380        case 'kakaostory':
381            o = {
382                method:'web2app',
383                param:'posting?post=' + _txt + _br + _url + '&apiver=1.0&appver=2.0&appid=dev.epiloum.net&appname=' + encodeURIComponent('Epiloum 개발노트'),
384                a_store:'itms-apps://itunes.apple.com/app/id486244601 mt=8',
385                g_store:'market://details id=com.kakao.story',
386                a_proto:'storylink://',
387                g_proto:'scheme=kakaolink;package=com.kakao.story'
388            };
389            break;
390 
391        case 'band':
392            o = {
393                method:'web2app',
394                param:'create/post?text=' + _txt + _br + _url,
395                a_store:'itms-apps://itunes.apple.com/app/id542613198?mt=8',
396                g_store:'market://details id=com.nhn.android.band',
397                a_proto:'bandapp://',
398                g_proto:'scheme=bandapp;package=com.nhn.android.band'
399            };
400            break;
401 
402        default:
403            alert('지원하지 않는 SNS입니다.');
404            return false;
405    }
406 
407    switch(o.method)
408    {
409        case 'popup':
410            window.open(o.url);
411            break;
412 
413        case 'web2app':
414            if(navigator.userAgent.match(/android/i))
415            {
416                // Android
417                setTimeout(function(){ location.href = 'intent://' + o.param + '#Intent;' + o.g_proto + ';end'}, 100);
418            }
419            else if(navigator.userAgent.match(/(iphone)|(ipod)|(ipad)/i))
420            {
421                // Apple
422                setTimeout(function(){ location.href = o.a_store; }, 200);          
423                setTimeout(function(){ location.href = o.a_proto + o.param }, 100);
424            }
425            else
426            {
427                alert('이 기능은 모바일에서만 사용할 수 있습니다.');
428            }
429            break;
430    }
431}
432
433//Clipboard Copy
434function copyToClipboard(element) {
435  var $temp = $("<input>");
436  $("body").append($temp);
437  //$temp.val($(element).text() + " "+ window.location.href).select();
438  $temp.val(element + " "+ window.location.href).select();
439  document.execCommand("copy");
440  $temp.remove();
441  alert('ClipBoard에 복사 되었습니다.');
442}

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.