PageSourceSearch

https://pntbiz.ai/js/common.js?v=261005092554

js pntbiz.ai collected 2026-10-05 12:24:12 UTC 20,984 bytes, 611 lines download raw bytes

1$(function () {
2	$('footer .infobox .info .box.sns ul').clone().appendTo('header .sns');
3	$('#allmenuBox .menuBox').overlayScrollbars({  });
4    headerOn(); // 초기 호출
5    $(window).on("scroll resize", headerOn);
6	$("header").removeClass("off");
7
8    function headerOn() {
9        var document_scrollTop = $(window).scrollTop(); // 현재 스크롤 위치
10        var visual_height = $(".pageTop").outerHeight() - 100; // .pageTop 높이
11        //console.log("scrollTop:", document_scrollTop, "pageTop height:", visual_height);
12
13        if (document_scrollTop > visual_height) {
14            $("header").addClass("headerFixed");
15			$("header").removeClass("off");
16        } else {
17			$("header").addClass("off");
18        }
19    }
20
21
22	let $gnbUl = $('header #gnb > ul').clone();
23	$gnbUl.find('> li').each(function(index) {
24		let num = (index + 1).toString().padStart(2, '0');
25		$(this).attr('data-num', num);
26	});
27	$gnbUl.appendTo('#allmenuBox .menuBox .mCont');
28	
29    var $wrap = $('#wrap'),
30        $header = $('header'),
31        $navi = $('#navi'),
32        $gnb = $('#gnb > ul'),
33        $gnbHover = $('#navi #gnb > ul > li'),
34        $gnbSub = $('#navi #gnb > ul > li > ul'),
35        $btn_all = $('.allBox'),
36        $all_bg = $('#allmenuBox .allBg'),
37        $lnb_p = $('#lnb p.sub_title'),
38        $lnbul = $('#lnb ul'),
39        $lnbli = $('#lnb li'),
40        $btn_top = $('.btn_top'),
41        $e_mail = $('.btn_qbox .e_mail'),
42        $allmenuBox = $('#allmenuBox');
43
44
45    $(window).on('load scroll resize', function() {
46        bodyScroll = $(document).scrollTop();
47        if (bodyScroll > 0) {
48            $header.addClass('fix');
49            setTimeout(function() {
50                $('body').removeClass('intro');
51            }, 2700);
52        } else {
53            $header.removeClass('fix');
54            $("header").removeClass("headerFixed");
55            $("header").removeClass("off");
56        }
57    });
58
59    $btn_top.click(function(e) {
60        e.preventDefault();
61        $("html,body").stop().animate({
62            scrollTop: 0
63        });
64    })
65
66	$('header').on('click', '.searchBox .btn a', function(event) {
67		event.preventDefault();
68		const $searchBox = $('header .searchBox');
69		$searchBox.toggleClass('on');
70		$('header').addClass('over_all');
71		if ($searchBox.hasClass('on')) {
72			$('.searchBox .s-box').stop().slideDown();
73		} else {
74			$('.searchBox .s-box').stop().slideUp();
75		}
76	});
77
78    $('.language > a').on('mouseenter', function(e) {
79		e.preventDefault();
80        $(this).parent().addClass("on");
81		if ($('.language').hasClass('on')) {
82			$('.language .sbox ul').stop().stop().slideDown();
83		} else {
84			$('.language .sbox ul').stop().slideUp();
85		}
86    });
87    $('.language').on('mouseleave', function() {
88		$('.language').removeClass("on");
89		$('.language .sbox ul').stop().slideUp();
90    });
91
92    var menuCont = function() {
93
94		var wrapW = $('header .gnb-box').outerWidth(true);
95		$('header .searchBox .s-box, header #navi #gnb > ul > li > .subDepth').css({
96			'width': wrapW + 'px',
97		});
98
99        /* web gnb menu */
100        $('#lnb .subDepth .depth2 li').each(function() {
101            $(this).on('mouseenter', function() {
102                $('#lnb .subDepth .depth2 li').removeClass("off");
103                $(this).parent().addClass('on');
104            });
105            $('#lnb .subDepth .depth2 li').on('mouseleave', function() {
106                $('#lnb .subDepth .depth2 li').parent().removeClass("on");
107                $(this).addClass('off');
108            });
109        });
110
111        $(document).on('click', function() { // 복제
112            $('#allmenuBox #gnb > ul > li').each(function() {
113                $(this).not('.link').children("a").off("click").on("click", function(e) {
114                    e.preventDefault(); //a 태그 막기	
115                });
116            });
117        });
118
119        /* allmenu */
120        $btn_all.off('click');
121        $btn_all.click(function() {
122            if (!$(this).is('.active')) {
123                $('html, body').addClass('body_hidden');
124                $(this).addClass('active');
125                $allmenuBox.removeClass('off').addClass('on');
126                $('header').addClass('over_all');
127				$('#allmenuBox .menuBox .mCont > ul > li > .subDepth').removeAttr("style");
128				$('#allmenuBox .menuBox .mCont > ul > li').removeAttr("style");
129				$('.searchBox .s-box').stop().slideUp();
130				$('header .searchBox').removeClass('on');
131            } else {
132                $('.allBox').removeClass('active');
133                $('html, body').removeClass('body_hidden');
134                $allmenuBox.removeClass('on').addClass('off');
135                $('header').removeClass('over_all');
136            }
137        });
138
139    }
140
141    var windowSize = function() {
142
143        var winWidth = $(window).width();
144        if (winWidth > 760) {
145            $('.subtitleTop .submenu-box').removeAttr("style");
146            $('.subtitleTop .depthMenu .stit').removeClass("ov");
147        }
148        if (winWidth > 1024) {
149            $wrap.addClass('web');
150            $wrap.removeClass('mobile');
151            $('.allBox').removeClass('active');
152            $('html, body').removeClass('body_hidden');
153            $(this).addClass('active');
154            $allmenuBox.removeClass('on');
155			$('.menuBox .mCont > ul > li').removeClass('hover');
156			$('.searchBox .s-box').stop().slideUp();
157			$('header .searchBox').removeClass('on');
158
159            /* #gnb > ul > li width:size 
160            $('header #navi #gnb > ul > li').css('width', '');
161            $('header #navi #gnb > ul > li').each(function() {
162                var $aW = $(this).find('> a');
163                var contentWidth = $aW.outerWidth();
164                $(this).css('width', contentWidth + 'px');
165            });
166			*/
167			$('#gnb > ul > li').each(function () {
168				const titleText = $(this).find('> a').text().trim();
169				$(this).find('.title').first().text(titleText);
170			});
171
172            $('header #navi #gnb > ul > li').each(function() {
173                var a_hover = $(this).find('> a');
174                var subDep = $(this).find('.subDepth');
175                var sTit = $(this).find('.title');
176                var sub_h = $(this).find('.subDepth').outerHeight();
177
178                var subHeight = subDep;
179
180                $(this).on('mouseenter', function() {
181                    $(this).addClass('on');
182                    $('header').addClass('over');
183                    subDep.stop().slideDown();
184					$('.searchBox .s-box').stop().slideUp();
185					$('header .searchBox').removeClass('on');
186                });
187
188                $(this).on('mouseleave', function() {
189                    $(this).removeClass('on');
190                    $('header').removeClass('over');
191                    subDep.stop().slideUp();
192					setTimeout(() => {
193						$('header .subDepth').css({
194							'transition': 'none',
195						});
196					}, 50);
197                });
198            });
199
200        } else {
201            $wrap.removeClass('web');
202            $wrap.addClass('mobile');
203
204            $('.allBox').removeClass('active');
205            $('html, body').removeClass('body_hidden');
206            $(this).addClass('active');
207            $allmenuBox.removeClass('on');
208			$('#allmenuBox .menuBox .mCont > ul > li > .subDepth').removeAttr("style");
209			$('#allmenuBox .menuBox .mCont > ul > li').removeAttr("style");
210			$('.searchBox .s-box').stop().slideUp();
211			$('header .searchBox').removeClass('on');
212
213
214            /* mobile gnb menu */
215            $(document).on('click', function() { // 복제
216                $(".mobile #allmenuBox .menuBox .mCont > ul > li").each(function() {
217                    var subDepthDiv = $(this).find('.subDepth .box > ul');
218                    if (subDepthDiv.length > 0) {
219                        $(this).children("a").off('click').on('click', function(e) {
220                            e.preventDefault(); //a 태그 막기	
221                            var depth2 = $(this).siblings('.subDepth');
222                            if (!depth2.is(':visible')) {
223                                $('.menuBox .mCont > ul').find('.subDepth').stop().slideUp();
224                                depth2.stop().slideDown();
225                                $('.menuBox .mCont > ul > li').removeClass('hover');
226                                $(this).parent().addClass('hover');
227                            } else {
228                                $('.menuBox .mCont > ul > li').removeClass('hover');
229                                $('.menuBox .mCont > ul').find('.subDepth').stop().slideUp();
230                            };
231                        });
232                    }
233                });
234            });
235        }
236
237        $('#allmenuBox .btnClose').click(function() {
238            $('.allBox').removeClass('active');
239            $('html, body').removeClass('body_hidden');
240            $allmenuBox.removeClass('on').addClass('off');
241            $('header').removeClass('over_all');
242        });
243
244        menuCont();
245    }
246
247    var headerRe = function() {
248        if (!navigator.userAgent.match(/Android|Mobile|iP(hone|od|ad)|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/)) {
249            if ($btn_all.is('.active')) {
250                $btn_all.click();
251
252                $('.allBox').removeClass('active');
253                $('html, body').removeClass('body_hidden');
254                $(this).addClass('active');
255                $allmenuBox.removeClass('on').addClass('off');
256            }
257        }
258    }
259
260    $(window).load(function() {
261        windowSize();
262        headerRe();
263        menuCont;
264    });
265
266    $(window).resize(function() {
267        windowSize();
268        headerRe();
269        menuCont;
270    });
271
272    $(window).on("orientationchange", function(event) {
273        windowSize();
274        headerRe();
275        menuCont;
276    });
277
278    // 탑버튼
279    $(".btn_top").click(function() {
280        $("html,body").stop().animate({
281            scrollTop: 0
282        });
283    });
284
285    //서브페이지
286    $(".depthMenu").each(function() {
287        var sublist = $(this);
288        var tit = $(sublist).find('.stit');
289        $(tit).click(function() {
290            if (!$(this).is('.ov')) {
291                $(this).next('.submenu-box').stop().slideDown();
292                $(tit).addClass('ov');
293            } else {
294                $(this).next('.submenu-box').stop().slideUp();
295                $(tit).removeClass('ov');
296            }
297        });
298
299        /*
300        var winWidth = $(window).width();
301        if (winWidth > 760) {
302            $(tit).mouseenter(function() {
303                $(this).next('.submenu-box').stop().slideUp();
304                $(tit).removeClass('ov');
305            });
306        } else {
307            $(tit).click(function() {
308                if (!$(this).is('.ov')) {
309                    $(this).next('.submenu-box').stop().slideDown();
310                    $(tit).addClass('ov');
311                } else {
312                    $(this).next('.submenu-box').stop().slideUp();
313                    $(tit).removeClass('ov');
314                }
315            });
316			$(".depthMenu").not().mouseleave(function() {
317				$(".depthMenu .submenu-box").stop().slideUp();
318				$(".depthMenu .stit").removeClass('ov');
319			});
320        }
321		*/
322    });
323
324    var subTit1 = $("#navi #gnb > ul").children("li.hover").children("a").text();
325    $(".subtitleTop .subTitle .tit").text(subTit1);
326    var subTit2 = $("#gnb > ul > li.hover > .subDepth ul > li.over > a").text();
327    $(".subtitleTop .depthMenu .stit").text(subTit2);
328    console.log("tit1:"+subTit1)
329    console.log("tit2:"+subTit2)
330
331    for (var i = 1; i <= 20; i++) {
332        $("#navi #gnb > ul > li > .menu" + i + "> .box > ul").clone().appendTo(".subtitleTop .depthMenu .subm" + i);
333    };
334    $(".subtitleTop .submenu-box .depth2 ul").remove();
335
336    if ($(".subtitleTop .submenu-box > ul").length === 0) {
337        $(".subtitleTop .submenu-box").hide();
338    }
339	
340	$(".subtitleTop .submenu-box .depth3").remove();
341	
342    // lnb submenu 
343    for (var i = 1; i <= 20; i++) {
344        var $menu = $("#navi #gnb .menu" + i + "> ul").clone();
345        var hasDepth3 = $menu.find(".depth3").length > 0;
346        if (hasDepth3) {
347            for (var j = 1; j <= 20; j++) {
348                var $target = $(".products-box .products-sub .tab" + i + j);
349                var $pMain = $(".products-box .products-main .tab" + i + j);
350                var $depth3 = $menu.find(".depth3.menu-s" + j).clone();
351                if ($target.length) {
352                    if ($target.children(".depth3.menu-s" + j).length === 0) {
353                        $target.append($depth3);
354                        console.log($target)
355                    }
356                }
357                if ($pMain.children(".depth3.menu-s" + j).length === 0) {
358                    $pMain.append($depth3);
359                }
360            }
361        }
362    }
363
364
365    //text ani
366    $(".txt_ani").each(function() {
367        $(this).html(function(i, el) {
368            var spanizer = $.trim(el).split("");
369            return '<span>' + spanizer.join('</span><span>') + '</span>';
370        });
371    });
372    $(".txt_ani").each(function() {
373        $(this).find("> span").each(function(i) {
374            var i = 0.10 * i
375            $(this).css("animation-delay", (i) + "s")
376        })
377    })
378
379    $(".txt_ani_ul").each(function() {
380        $(this).find("> li").each(function(i) {
381            var i = 0.10 * i
382            $(this).css("animation-delay", (i) + "s")
383        })
384    })
385
386    // 갯수
387    $(".submenu-box > ul").addClass("m" + $(".submenu-box > ul > li").length);
388    /*
389    $("#lnb p").click(function() {
390    	$(this).next('ul').stop().slideToggle();
391    	$(this).toggleClass('ov');
392    })
393    var subTit = $("#lnb .depth2").children("li.on").children().text();
394    $("#lnb p").text(subTit);
395    */
396
397
398    //animation
399    var $section = $('.ani'),
400        $section_s = $('.ani_s'),
401        bodyScroll, windowHeight;
402	var currentPageUrl = window.location.pathname;
403
404    function sectionAni() {
405        bodyScroll = $(document).scrollTop();
406		if (currentPageUrl.indexOf("index.php") !== -1 || currentPageUrl.indexOf("") !== -1) {
407			windowHeight = $(window).height() / 1.3;
408		} else {
409			windowHeight = $(window).height() / 1.3;
410		}
411
412        $section.each(function() {
413            if (bodyScroll >= $(this).offset().top + 80 - windowHeight && bodyScroll < $(this).offset().top + $(this).height()) {
414                $(this).addClass('on');
415                $(this).addClass('subOn');
416                $('.main .pnt-box').each(function() {
417                    var box = $(this).find('.listbox');
418                    if ($(this).hasClass('subOn')) {
419                        $(this).addClass('subOn');
420                        setTimeout(function() {
421                            box.addClass('active');
422                        }, 1700);
423                    }
424                });
425            } else {
426                $(this).removeClass('on');
427            }
428        });
429    }
430    $(function() {
431        sectionAni();
432    });
433    $(window).on('load scroll', function() {
434        sectionAni();
435    });
436
437    //file upload
438    var fileTarget = $(".file-hidden");
439    fileTarget.on('change', function() {
440        if (window.FileReader) {
441            var filename = $(this)[0].files[0].name;
442        } else {
443            var filename = $(this).val().split('/').pop().split('\\').pop();
444        }
445        $(this).siblings('.upload-name').val(filename);
446    });
447
448
449    var didScroll;
450    var lastScrollTop = 0;
451    var delta = 0;
452    var subVHeight = $('.subVisual').outerHeight();
453    $(window).scroll(function(event) {
454        didScroll = true;
455    });
456    setInterval(function() {
457        if (didScroll) {
458            hasScrolled();
459            didScroll = false;
460        }
461    }, 1);
462
463    function hasScrolled() {
464        var st = $(this).scrollTop();
465        if (Math.abs(lastScrollTop - st) <= delta) return;
466        if (st > lastScrollTop && st > subVHeight - 28) {
467            $('header').addClass('nav');
468        } else {
469            $('header').removeClass('nav');
470        }
471        lastScrollTop = didScroll;
472    }
473
474    $(".subTabmenuCont").addClass("m" + $(".subTabmenuCont li").length);
475
476    /* tab */
477    $(".subTabmenu li a").click(function() {
478        var index = $(this).parent().index();
479        $(".subTabmenu li").removeClass("on");
480        $(".subTabmenu li:nth-child(" + (index + 1) + ")").addClass("on");
481        $(".subtabCont .tcont").removeClass("active");
482        $(".subtabCont .tcont:nth-child(" + (index + 1) + ")").addClass("active");
483    });
484
485    stickyTop();
486    $(window).scroll(stickyTop).resize(stickyTop);
487
488});
489
490function stickyTop() {
491    document_height = $(document).height(); // 문서 전체 높이
492    document_scrollTop = $(document).scrollTop(); // 문서 전체 높이 중 스크롤 위치
493    window_height = $(window).height(); // 창 높이
494
495    visual_height = $('.topActive').height() - window_height;
496
497    if (document_scrollTop > visual_height) {
498        $('.quickMenu').addClass('active')
499    } else {
500        $('.quickMenu').removeClass('active')
501    }
502}
503
504//popup
505function popup() {
506    var url = "/kr/sub/company/company_popup.asp";
507    var name = "popup test";
508    var option = "width = 595, height = 760, top = 100, left = 200, location = no"
509    window.open(url, name, option);
510}
511
512$(function() {
513    /* gnb */
514    var didScroll;
515    var lastScrollTop = 0;
516    var delta = 5;
517    var navbarHeight = $('header').outerHeight();
518    $(window).scroll(function(event) {
519        didScroll = true;
520    });
521    setInterval(function() {
522        if (didScroll) {
523            hasScrolled();
524            didScroll = false;
525        }
526    }, 250);
527
528    function hasScrolled() {
529        var st = $(this).scrollTop();
530
531        if (Math.abs(lastScrollTop - st) <= delta) return;
532        if (st > lastScrollTop && st > navbarHeight) {
533            $('header').removeClass('nav-down').addClass('nav-up');
534        } else {
535            if (st + $(window).height() < $(document).height()) {
536                $('header').removeClass('nav-up').addClass('nav-down');
537            }
538        }
539        lastScrollTop = st;
540    }
541    stickyFooter();
542    $(window).scroll(stickyFooter).resize(stickyFooter);
543
544    var $w = $(window),
545        footerHei = $('footer').outerHeight() - 60,
546        $btn_top = $('#btn_top');
547    $w.on('scroll', function() {
548        var sT = $w.scrollTop();
549        var val = $(document).height() - $w.height() - footerHei;
550        if (sT >= val) {
551            $btn_top.addClass('active');
552        } else {
553            $btn_top.removeClass('active');
554        }
555    });
556});
557
558function stickyFooter() {
559    document_height = $(document).height(); // 문서 전체 높이
560    document_scrollTop = $(document).scrollTop(); // 문서 전체 높이 중 스크롤 위치
561    window_height = $(window).height(); // 창 높이
562    footer_height = $("footer .copyright").height();
563
564    gap = document_height - footer_height - window_height;
565    bottom = document_scrollTop - gap;
566
567    if (document_scrollTop > gap) {
568        $("#wrap").addClass('s_off')
569    } else {
570        $("#wrap").removeClass('s_off')
571    }
572
573    visual_height = $(".subtitleTop").height() - 50;
574    //console.log(visual_height,document_scrollTop)
575
576    if (document_scrollTop > visual_height) {
577        $("header").addClass('active')
578    } else {
579        $("header").removeClass('active')
580    }
581}
582
583
584
585// 게시글 동영상 반응형
586document.addEventListener("DOMContentLoaded", function() {
587    // 모든 iframe 요소를 선택
588    var iframes = document.querySelectorAll('.content-area iframe');
589
590    iframes.forEach(function(iframe) {
591        // 새 div 요소 생성
592        var div = document.createElement('div');
593        div.className = 'video-container';
594
595        // iframe의 부모 노드에 div를 추가하고 iframe을 그 안에 넣음
596        iframe.parentNode.insertBefore(div, iframe);
597        div.appendChild(iframe);
598    });
599
600    // 모든 video 요소를 선택
601    var videos = document.querySelectorAll('.content-area video');
602    videos.forEach(function(video) {
603        // 새 div 요소 생성
604        var div = document.createElement('div');
605        div.className = 'video-container';
606
607        // video의 부모 노드에 div를 추가하고 video를 그 안에 넣음
608        video.parentNode.insertBefore(div, video);
609        div.appendChild(video);
610    });
611});

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.