PageSourceSearch

https://hd-hyundairobotics.com/resources/resource/js/common.js?v=5edaa79e02a1495999a113f26c0bc0e9

js hd-hyundairobotics.com collected 2026-10-09 04:41:18 UTC 28,929 bytes, 921 lines download raw bytes

1
2
3
4
5
6
7// nav Color change
8var winW = $(window).width();
9function mobileCheck(){
10	if (winW > 768) {
11		$('body').removeClass('is-mobile');
12	} else {
13		$('body').addClass('is-mobile');
14	}
15}
16
17function menubar(){
18	$("header .gnb ul li").hover(function(){
19		$(".menu_depth02").addClass("active");
20	},function(){
21		$(".menu_depth02").removeClass("active");
22	});
23}
24
25// pc-mobile other var
26function mobileChkValle(m,w){
27	if (winW > 768) {
28		return w;
29	}else{
30		return m;
31	}
32}
33
34// nav Color change
35function changNav(){
36	var $window = $(window),
37		$section = $('section[data-color]'),
38		$nav = $('.btn-nav'),
39		$bar = $('.fixed-bar');
40
41	var navPoint = $window.scrollTop() + parseInt($nav.css('top')) + $nav.outerHeight();
42	var barPoint = $window.scrollTop() + $window.height() - $bar.height();
43
44	$section.each(function () {
45		var $this = $(this);
46		var myTopPosi = $this.position().top,
47			myBtmPosi = $this.position().top + $this.height(),
48			myColor = $this.data('color');
49
50		//navColor
51		if (myTopPosi <= navPoint && myBtmPosi > navPoint) {
52			if (myColor == 'black') {
53				$nav.addClass('white');
54			}
55			if (myColor == 'white') {
56				$nav.removeClass('white');
57			}
58		}
59
60		//barColor
61		if (myTopPosi <= barPoint && myBtmPosi > barPoint) {
62			if (myColor == 'black') {
63				$bar.addClass('white');
64			}
65			if (myColor == 'white') {
66				$bar.removeClass('white');
67			}
68		}
69	});
70}
71
72var popClose =  function(e) {
73    $('.layer-popup').removeClass('active');
74    $('body, #wrap').css('height', 'auto');
75    $('body, #wrap').css('overflow', 'visible');
76};
77
78//wow
79wow = new WOW(
80	{
81		boxClass:     'wow',      // default
82		animateClass: 'animated', // default
83		offset:       0,          // default
84		mobile:       true,       // default
85		live:         true        // default
86	}
87)
88wow.init();
89
90
91
92$(function(){
93	menubar();
94	mobileCheck();
95	$('.pop-close, .layer-wrap .bg, .btn.confirm').on('click', function() {
96        $(this).parents('.layer-popup').removeClass('active');
97        $('body, #wrap').css('height', 'auto');
98        $('body, #wrap').css('overflow', 'visible');
99    });
100	
101	
102	
103	//changNav();
104	$("ul.tab li").on("click",function(){
105		$(this).parents(".list-wrap").find("ul.tab li").removeClass("on");
106		
107		$(this).addClass("on");
108		var cont = $(this).data("cont");
109		
110		$(this).parents(".list-wrap").find(".tabCont").removeClass("on");
111		$(this).parents(".list-wrap").find("."+cont).addClass("on");
112	});
113	
114	$('ul.tabs li').click(function(){
115			var tab_id = $(this).attr('data-tab');
116
117			$('ul.tabs li').removeClass('current');
118			$('.tab-content').removeClass('current');
119
120			$(this).addClass('current');
121			$("#"+tab_id).addClass('current');
122		})
123	
124/**컴포넌트 selectbox */
125const label = document.querySelectorAll('.label');
126label.forEach(function(lb){
127    lb.addEventListener('click', e => {
128        let optionList = lb.nextElementSibling;
129        let optionItems = optionList.querySelectorAll('.optionItem');
130        clickLabel(lb, optionItems);
131    })
132});
133const clickLabel = (lb, optionItems) => {
134    if(lb.parentNode.classList.contains('active')) {
135        lb.parentNode.classList.remove('active');
136        optionItems.forEach((opt) => {
137            opt.removeEventListener('click', () => {
138                handleSelect(lb, opt)
139            })
140        })
141    } else {
142        lb.parentNode.classList.add('active');
143        optionItems.forEach((opt) => {
144            opt.addEventListener('click', () => {
145                handleSelect(lb, opt)
146            })
147        })
148    }
149}
150
151
152
153const handleSelect = (label, item) => {
154	if($(label).data("type")!="family"){ label.innerHTML = item.textContent;}
155    label.parentNode.classList.remove('active');
156}
157$(".working").on("click",function(){
158	alert("준비중입니다.");
159});
160
161	// NAV
162	$('.btn-nav').click(function() {
163		$(this).toggleClass('active');
164		$(this).parents('body').toggleClass('nav-active');
165		$('nav').toggleClass('active');
166		return false;
167	});
168
169	$('header .gnb > li').click(function() {
170		
171		//return false;
172	});
173
174	$('header').hover(
175		function () {
176			$("header#top").addClass('active');
177		}, 
178		function () {
179			$("header#top").removeClass('active');
180		}
181	);
182
183	
184
185	// SCROLL
186	var header = $("header#scroll");
187	var body = $("body");
188	var introText = $(".intro .text");
189	let lastScroll = 0;
190	
191	$(window).scroll(function() {
192
193		//changNav();
194		mobileCheck();
195		let scrollTop = $(this).scrollTop();
196		if(scrollTop > 100){
197			
198			if(scrollTop > lastScroll) {
199				//down
200				$("header#scroll").addClass('fixed');
201				$("header#scroll").addClass('hide');
202				$("header#scroll").removeClass('show');
203				$("header#scroll").removeClass('white');
204				$("header#top").removeClass('active');
205				
206				$("section.nav").removeClass('up');
207				
208			} else {
209				// up
210				$("header#scroll").removeClass('fixed');
211				$("header#scroll").removeClass('hide');
212				$("header#scroll").addClass('show');
213				$("header#scroll").addClass('white');
214				$("section.nav").addClass('up');
215			}
216		}
217		else{
218			$("header#scroll").removeClass('fixed');
219		}
220		
221		lastScroll = scrollTop;
222
223		var scroll = $(window).scrollTop();
224		if (scroll >= 100) {
225			header.addClass("fixed");
226			
227		} else {
228			header.removeClass("fixed");
229			
230		}
231
232		if(scrollTop < 100)
233		{
234			$("header").removeClass('hide');
235
236			
237			//$(".section.nav.fixed").removeClass('up');
238		}
239
240	});
241
242	function getParameter(param) {
243		param = param.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
244		let regex = new RegExp("[\\?&]" + param + "=([^&#]*)"),
245			results = regex.exec(location.search);
246		return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
247	}
248
249	$(document).ready(function(){
250
251		$("#btnScrollTop").on("click",function(){
252			$('html, body').animate({scrollTop : 0},100);
253		});
254
255		$(document).on("click", ".btn-header-login", function () {
256		    var path = window.location.pathname + window.location.search + window.location.hash;
257		    location.href = "/user/login?goto=" + encodeURIComponent(path);
258		});
259		
260		$('.pop-close, .layer-wrap .bg, .btn.confirm , .layer-popup .nav-close, .layer-popup .btn.close').on('click', function() {
261			$(this).parents('.layer-popup').removeClass("active");
262			$('body, #wrap').css('height', 'auto');
263			$('body, #wrap').css('overflow', 'visible');
264		});
265		
266		$("#btn_privateConfirm").on("click",function(){
267			$("#cb-terms-1").prop("checked", true);
268			$(this).parents('.layer-popup').removeClass("active");
269			$('body, #wrap').css('height', 'auto');
270			$('body, #wrap').css('overflow', 'visible');
271		});
272		
273		$("#btn_useConfirm").on("click",function(){
274			$("#cb-terms-2").prop("checked", true);
275			$(this).parents('.layer-popup').removeClass("active");
276			$('body, #wrap').css('height', 'auto');
277			$('body, #wrap').css('overflow', 'visible');
278		});
279		
280		$(".agree-view").on("click",function(e){
281			e.preventDefault();
282			$("#pop_cb_terms_1").addClass("active");
283		});
284		
285		$(".agree-use-view").on("click",function(e){
286			e.preventDefault();
287			$("#pop_cb_terms_2").addClass("active");
288		});
289		
290		$("header .ico.search").on("click",function(e){
291			e.preventDefault();
292			$(".search-wrap").addClass("on");
293		});
294		
295		$(".search-wrap .btn.close").on("click",function(e){
296			e.preventDefault();
297			$(".search-wrap").removeClass("on");
298		});
299		
300		$(".search-wrap .tag span").on("click",function(e){
301			$("#keyword").val($(this).text());
302		});
303		
304		$("header .rightMenu .selected").on("click",function(e){
305			e.stopPropagation();
306			$(this).toggleClass('active');
307		});
308		
309		$(document).click(function(event) {
310			if (!$(event.target).closest(".your-element").length) {
311		    $("header .rightMenu .selected").removeClass("active");
312			}
313		});
314		
315		$('.eyes').on('click', function() {
316		    // .input_wrap 요소에 active 클래스를 토글(추가 또는 제거)합니다.
317		    $('.input-text').toggleClass('active');
318		    
319		    // .input_wrap 요소에 active 클래스가 추가되었을 때 (즉, 비밀번호가 보이는 상태일 때)
320		    if ($('.input-text').hasClass('active')) {
321		      // 아이콘을 눈 모양에서 눈 슬래시 모양으로 변경합니다.
322		      $(this).find('.fa-eye').attr('class', "fas fa-eye-slash");
323		      // 비밀번호 입력 필드의 type을 "text"로 변경하여 비밀번호를 표시합니다.
324		      $(this).prev("input").attr('type', "text");
325		    } 
326		    // .input_wrap 요소에 active 클래스가 제거되었을 때 (즉, 비밀번호가 숨겨진 상태일 때)
327		    else {
328		      // 아이콘을 눈 슬래시 모양에서 눈 모양으로 다시 변경합니다.
329		      $(this).find('.fa-eye-slash').attr('class', "fas fa-eye");
330		      // 비밀번호 입력 필드의 type을 "password"로 변경하여 비밀번호를 숨깁니다.
331		      $(this).prev("input").attr('type', "password");
332		    }
333		  });
334		  
335		  $(".tabs.type07 input:radio").click(function(){
336			$(this).parents(".tabs.type07").removeClass("not");
337		  });
338
339		//$("#footer").load("../footer.html");
340		/*
341		if(getParameter("mode")=="mo")
342		{
343			console.log("mo");
344			$("html").css({"width":"480px","margin":"0 auto"});
345			$(window).width("480px");
346		}*/
347		
348		$("body").on("click",".btn_qna",function(){
349        	moveIsMember("/cs/one-qa");
350        });
351		
352		$("body").on("click",".btn_as",function(){
353		    moveIsMember("/cs/online-as");
354        });
355		
356		var objFilter = null;
357		/*$(".btnFilter").off('click').on("click",function(){
358			var filter = $(this).data("filter");
359			var type = $(this).data("type");
360			
361			objFilter = $(this);
362			
363			$("#hdn_filter_id").val(filter);
364			$("#hdn_filter_type").val(type);
365			
366			
367			$(".popFilterTitle").text($(this).data("tit"));
368			if(type=="select"){
369				$("#setFilterPopup .radio_circle.two").html("");
370				$("#"+filter+" option").each(function (index, option) {
371					
372	                var value = $(option).val();   // 옵션의 value 값
373	                var text = $(option).text();  // 옵션의 텍스트 값
374	                
375	                $("#setFilterPopup .radio_circle.two").append('<input type="radio" id="rdo_'+(index + 1)+'" name="rdo_pop" value="'+value+'"><label for="rdo_'+(index + 1)+'">'+text+'</label>');
376	            });
377			}
378			else if(type=="radio"){
379				$("#setFilterPopup .radio_circle.two").html("");
380				
381				$("input[name='"+filter+"']").each(function (index, option) {
382
383	                var value = $(option).val();   // 옵션의 value 값
384	                var text = $(option).text();  // 옵션의 텍스트 값
385					var textLabel=$("label[for='"+$(this).attr("id")+"']").text();
386	                
387	                $("#setFilterPopup .radio_circle.two").append('<input type="radio" id="rdo_'+(index + 1)+'" name="rdo_pop" value="'+value+'"><label for="rdo_'+(index + 1)+'">'+textLabel+'</label>');
388	            });
389			}
390			else if(type=="check"){
391				$("#setFilterPopup .radio_circle.two").html("");
392
393				$("input[name='"+filter+"']").each(function (index, option) {
394					
395	                var value = $(option).val();   // 옵션의 value 값
396	                var text = $(option).text();  // 옵션의 텍스트 값
397					var textLabel=$("label[for='"+$(this).attr("id")+"']").text();
398	                
399	                $("#setFilterPopup .radio_circle.two").append('<input type="checkbox" id="rdo_'+(index + 1)+'" name="rdo_pop" value="'+value+'"><label for="rdo_'+(index + 1)+'">'+textLabel+'</label>');
400	            });
401			}
402			
403			$("#setFilterPopup").addClass("active");
404		});*/
405		$(".btnFilter").off('click').on("click", function () {
406		    var filter = $(this).data("filter");
407		    var type = $(this).data("type");
408
409		    objFilter = $(this);
410
411		    $("#hdn_filter_id").val(filter);
412		    $("#hdn_filter_type").val(type);
413
414		    $(".popFilterTitle").text($(this).data("tit"));
415		    $("#setFilterPopup .radio_circle.two").html("");
416
417		    if (type == "select") {
418		        const selectedVal = $("#" + filter).val();
419
420		        $("#" + filter + " option").each(function (index, option) {
421		            var value = $(option).val();
422		            var text = $(option).text();
423		            var isChecked = value === selectedVal ? "checked" : "";
424
425		            $("#setFilterPopup .radio_circle.two").append(
426		                '<input type="radio" id="rdo_' + (index + 1) + '" name="rdo_pop" value="' + value + '" ' + isChecked + '>
426' +
427		                '<label for="rdo_' + (index + 1) + '">' + text + '</label>'
428		            );
429		        });
430		    } else if (type == "radio") {
431		        $("input[name='" + filter + "']").each(function (index, option) {
432		            var value = $(option).val();
433		            var textLabel = $("label[for='" + $(this).attr("id") + "']").text();
434		            var isChecked = $(option).is(":checked") ? "checked" : "";
435
436		            $("#setFilterPopup .radio_circle.two").append(
437		                '<input type="radio" id="rdo_' + (index + 1) + '" name="rdo_pop" value="' + value + '" ' + isChecked + '>' +
438		                '<label for="rdo_' + (index + 1) + '">' + textLabel + '</label>'
439		            );
440		        });
441		    } else if (type == "check") {
442		        $("input[name='" + filter + "']").each(function (index, option) {
443		            var value = $(option).val();
444		            var textLabel = $("label[for='" + $(this).attr("id") + "']").text();
445		            var isChecked = $(option).is(":checked") ? "checked" : "";
446
447		            $("#setFilterPopup .radio_circle.two").append(
448		                '<input type="checkbox" id="rdo_' + (index + 1) + '" name="rdo_pop" value="' + value + '" ' + isChecked + '>' +
449		                '<label for="rdo_' + (index + 1) + '">' + textLabel + '</label>'
450		            );
451		        });
452		    }
453
454		    $("#setFilterPopup").addClass("active");
455		});
456
457	/*
458		$("#btnSaveFilter").off('click').on("click",function(){
459			var filter = $("#hdn_filter_id").val();
460			var type = $("#hdn_filter_type").val();
461			if(type=="select"){
462				$("#"+filter).val($("input[name='rdo_pop']:checked").val()).trigger('change');
463				
464				var textLabel=$("label[for='"+$("input[name='rdo_pop']:checked").attr("id")+"']").text();
465							
466				objFilter.html(textLabel + '<span class="arrow"></span>');
467			}	
468			else if(type=="radio"){
469				$("input[name='"+filter+"']").prop('checked', false).trigger('change');
470
471				$('input[name="rdo_pop"]').each(function () {
472                    if ($(this).is(':checked')) {
473                        // 선택된 라디오 버튼의 값을 가져오기
474                        const selectedValue = $(this).val();
475                        // B 그룹에서 동일한 값을 가진 라디오 버튼을 체크
476                        $(`input[name="${filter}"][value="${selectedValue}"]`).prop('checked', true).trigger('change');
477                    }
478                });
479			}	
480			else if(type=="check"){
481				$("input[name='"+filter+"']").prop('checked', false).trigger('change');
482
483				$('input[name="rdo_pop"]').each(function () {
484                    if ($(this).is(':checked')) {
485                        // 선택된 라디오 버튼의 값을 가져오기
486                        const selectedValue = $(this).val();
487                        // B 그룹에서 동일한 값을 가진 라디오 버튼을 체크
488                        $(`input[name="${filter}"][value="${selectedValue}"]`).prop('checked', true).trigger('change');
489                    }
490                });
491			}
492			$("#setFilterPopup").removeClass("active");	
493			setMobileFilterArea();
494			
495			
496		});
497		*/
498		$("#btnSaveFilter").off('click').on("click", function () {
499		    const filter = $("#hdn_filter_id").val();
500		    const type = $("#hdn_filter_type").val();
501		    let $targetInputs = $(`input[name="${filter}"]`);
502		    let hasChanged = false;
503
504		    if (type === "select") {
505		        const val = $("input[name='rdo_pop']:checked").val();
506		        const $target = $("#" + filter);
507		        if ($target.val() !== val) {
508		            $target.val(val).trigger('change'); // 이건 그대로 OK
509		        }
510
511		        const labelText = $("label[for='" + $("input[name='rdo_pop']:checked").attr("id") + "']").text();
512		        objFilter.html(labelText + '<span class="arrow"></span>');
513
514		    } else {
515		        // 기존 값 clear (필요시만)
516		        $targetInputs.filter(":checked").prop("checked", false).trigger('change');
517
518		        // 선택된 rdo_pop 값들 적용
519		        $('input[name="rdo_pop"]:checked').each(function () {
520					const val = $(this).val();
521		            /*const val = $(this).val();
522		            const $target = $targetInputs.filter(`[value="${val}"]`);
523		            if (!$target.prop("checked")) {
524		                $target.prop("checked", true);
525		                hasChanged = true;
526		            }*/
527					$(`input[name="${filter}"][value="${val}"]`).prop('checked', true).trigger('change');
528		        });
529
530		        // 최종적으로 한 번만 change 발생
531		        if (hasChanged) {
532		            $targetInputs.first().trigger('change');
533		        }
534				else{
535					//$targetInputs.first().trigger('change');
536				}
537		    }
538
539		    $("#setFilterPopup").removeClass("active");
540		    setMobileFilterArea();
541		});
542
543		
544		function setMobileFilterArea(){
545			if($(".filter.mo .filter-arr .tag").length>0){
546				$(".optionFilter").addClass("on");	
547			}
548			else
549			{
550				$(".optionFilter").removeClass("on");
551			}
552		}
553		
554		
555		view.ajax.commonGet('/menu/all', {})
556		        .then(res => {
557		            //console.log(res);
558		            setMenu(res.data);
559		        })
560		        .catch(err => {
561		            console.log('ERR : ', JSON.stringify(err));
562
563		        });
564			
565			
566			function setMenu(menuData){
567			
568				var currentUrl = window.location.pathname;
569				console.log(lang);
570			    // URL과 일치하는 메뉴를 찾는 함수 (재귀 탐색)
571			    function findMenuByUrl(url, menuList, depth = 1, path = []) {
572			        for (var i = 0; i < menuList.length; i++) {
573			            var menu = menuList[i];
574			            if (menu.url === url) {
575			                return { menu: menu, depth: depth, path: [...path, menu] };
576			            }
577			            if (menu.children && menu.children.length > 0) {
578			                var result = findMenuByUrl(url, menu.children, depth + 1, [...path, menu]);
579			                if (result) {
580			                    return result;
581			                }
582			            }
583			        }
584			        return null;
585			    }
586			
587			    // 첫 번째 Depth 메뉴 가져오기
588			    function getFirstDepthMenu(menuList) {
589			        return menuList.map(menu => menu);
590			    }
591			
592			    // 두 번째 Depth 메뉴 가져오기
593			    function getSecondDepthMenu(menu) {
594			        return menu.children || [];
595			    }
596			
597			    // 세 번째 Depth 메뉴 가져오기
598			    function getThirdDepthMenu(menu) {
599			        return (menu.children || []).flatMap(child => child.children || []);
600			    }
601			
602			    // 현재 URL에 해당하는 메뉴와 Depth 정보 가져오기
603			    var currentMenuResult = findMenuByUrl(currentUrl, menuData);
604				console.log(currentMenuResult);
605			    if (currentMenuResult) {
606			        var currentMenu = currentMenuResult.menu;
607			        var depth = currentMenuResult.depth;
608			        var path = currentMenuResult.path;
609/*			
610			        console.log("현재 URL:", currentUrl);
611			        console.log("현재 메뉴 정보:", currentMenu);
612			        console.log("현재 메뉴 Depth:", depth);
613			        console.log("현재 메뉴 경로(Path):", path);
614			        $("#navDepth3 > .label").text(currentMenu.ko);*/
615					
616					
617					if(depth==1){
618						$("#navDepth2 .optionList").html('');
619				        path[0].children.forEach(function (menu) {
620							
621				        	$("#navDepth2 .optionList").append('<li class="optionItem '+((currentMenu.id==menu.id)?'on':'')+'"><a href="'+menu.url+'">'+((lang == "en")?menu.en:((lang == "de")?menu.de:menu.ko))+'</a></li>'); // ko 이름을 표시하고 id를 값으로 설정
622				        });
623						$("#navDepth2 .label").text(((lang == "en")?currentMenu.en:((lang == "de")?currentMenu.de:currentMenu.ko)));
624						
625						$("#navDepth3 .optionList").html('');
626				        path[0].children[0].children.forEach(function (menu) {
627				        	$("#navDepth3 .optionList").append('<li class="optionItem '+((currentMenu.id==menu.id)?'on':'')+'"><a href="'+menu.url+'">'+((lang == "en")?menu.en:((lang == "de")?menu.de:menu.ko))+'</a></li>'); // ko 이름을 표시하고 id를 값으로 설정
628				        });
629					}
630					else if(depth ==2){
631						$("#navDepth2 .optionList").html('');
632				        path[0].children.forEach(function (menu) {
633				        	$("#navDepth2 .optionList").append('<li class="optionItem '+((currentMenu.id==menu.id)?'on':'')+'"><a href="'+menu.url+'">'+((lang == "en")?menu.en:((lang == "de")?menu.de:menu.ko))+'</a></li>'); // ko 이름을 표시하고 id를 값으로 설정
634				        });
635						$("#navDepth2 .label").text(((lang == "en")?currentMenu.en:((lang == "de")?currentMenu.de:currentMenu.ko)));
636						
637						$("#navDepth3 .optionList").html('');
638				        path[1].children.forEach(function (menu) {
639				        	$("#navDepth3 .optionList").append('<li class="optionItem '+((currentMenu.id==menu.id)?'on':'')+'"><a href="'+menu.url+'">'+((lang == "en")?menu.en:((lang == "de")?menu.de:menu.ko))+'</a></li>'); // ko 이름을 표시하고 id를 값으로 설정
640				        });
641					}
642					else if(depth ==3){
643						$("#navDepth3 .optionList").html('');
644				        path[1].children.forEach(function (menu) {
645				        	$("#navDepth3 .optionList").append('<li class="optionItem '+((currentMenu.id==menu.id)?'on':'')+'"><a href="'+menu.url+'">'+((lang == "en")?menu.en:((lang == "de")?menu.de:menu.ko))+'</a></li>'); // ko 이름을 표시하고 id를 값으로 설정
646				        });
647						$("#navDepth3 .label").text(((lang == "en")?currentMenu.en:((lang == "de")?currentMenu.de:currentMenu.ko)));
648				        // 첫 번째 Depth 메뉴 정보
649				        var firstDepthMenu = path.length > 0 ? path[0] : null;
650				        //console.log("첫 번째 Depth 메뉴 정보:", firstDepthMenu);
651				        path[0].children.forEach(function (menu) {
652				        	$("#navDepth2 .optionList").append('<li class="optionItem on"><a href="'+menu.url+'">'+((lang == "en")?menu.en:((lang == "de")?menu.de:menu.ko))+'</a></li>'); // ko 이름을 표시하고 id를 값으로 설정
653				        });	
654					}
655			        
656			
657			        // 두 번째 Depth 메뉴 리스트
658			        var secondDepthMenuList = firstDepthMenu ? getSecondDepthMenu(firstDepthMenu) : [];
659			        //console.log("두 번째 Depth 메뉴 리스트:", secondDepthMenuList);
660			        
661			
662			        // 세 번째 Depth 메뉴 리스트
663			        var thirdDepthMenuList = currentMenu.children || [];
664			        //console.log("세 번째 Depth 메뉴 리스트:", thirdDepthMenuList);
665			    } else {
666			        console.log("현재 URL에 해당하는 메뉴를 찾을 수 없습니다.");
667			    }
668			}
669		
670	});
671})
672
673function loadHTML(file)
674{
675    var rawFile = new XMLHttpRequest();
676    rawFile.open("GET", file, false);
677    rawFile.onreadystatechange = function ()
678    {
679        if(rawFile.readyState === 4)
680        {
681            if(rawFile.status === 200 || rawFile.status == 0)
682            {
683                var allText = rawFile.responseText;
684                document.write(allText);
685            }
686        }
687    }
688    rawFile.send(null);
689}
690
691
692
693function moveIsMember(page){
694	if(IS_LOGIN=="false"){
695		if(confirm("회원 로그인이 필요합니다. 로그인페이지로 이동하시겠습니까?"))
696		{
697			var path = window.location.pathname + window.location.search + window.location.hash;
698			location.href="/user/login?goto="+path;	
699		}
700		
701	}
702	else{
703		location.href=page;
704	}
705}
706
707function setNav(){
708	var top = $('section.nav.pc').offset().top; //- parseFloat($('section.nav').css('margin-top').replace(/auto/, 0));
709	$(window).scroll(function() {
710
711		let scrollTop = $(this).scrollTop() + 95;
712		
713		console.log("scrollTop : "+scrollTop);
714		console.log("top : "+top);
715		if(scrollTop >= top)
716		{
717			$('section.nav.pc').addClass('fixed');
718		} else {
719			$('section.nav.pc').removeClass('fixed');
720
721		}
722
723	});
724	
725	var motop = $('section.nav.mo').offset().top; //- parseFloat($('section.nav').css('margin-top').replace(/auto/, 0));
726		$(window).scroll(function() {
727
728			let scrollTop = $(this).scrollTop() + 95;
729			
730			console.log("scrollTop : "+scrollTop);
731			console.log("top : "+motop);
732			if(scrollTop >= motop)
733			{
734				$('section.nav.mo').addClass('fixed');
735			} else {
736				$('section.nav.mo').removeClass('fixed');
737
738			}
739
740		});
741}
742
743class StickyNavigation {
744	
745	constructor() {
746		this.currentId = null;
747		this.currentTab = null;
748		this.tabContainerHeight = 70;
749		let self = this;
750		$('.nav-tab').click(function() { 
751			self.onTabClick(event, $(this)); 
752		});
753		$(window).scroll(() => { this.onScroll(); });
754		$(window).resize(() => { this.onResize(); });
755	}
756	
757	onTabClick(event, element) {
758		event.preventDefault();
759		let scrollTop = $(element.data('href')).offset().top - this.tabContainerHeight + 1;
760		$('html, body').animate({ scrollTop: scrollTop }, 600);
761	}
762	
763	onScroll() {
764		//this.checkTabContainerPosition();
765    this.findCurrentTabSelector();
766	}
767	
768	onResize() {
769		if(this.currentId) {
770			this.setSliderCss();
771		}
772	}
773	/*
774	checkTabContainerPosition() {
775		let offset = $('.nav.wide.pc').offset().top + $('.nav.wide.pc').height() - this.tabContainerHeight;
776		if($(window).scrollTop() > offset) {
777			$('.nav.wide.pc').addClass('fixed');
778		} 
779		else {
780			$('.nav.wide.pc').removeClass('fixed');
781		}
782	}*/
783	
784	findCurrentTabSelector(element) {
785		let newCurrentId;
786		let newCurrentTab;
787		let self = this;
788		$('.nav-tab').each(function() {
789			let id = $(this).data('href');
790			if (!id) return;
791			let offsetTop = $(id).offset().top - 200;
792			let offsetBottom = $(id).offset().top + $(id).height() - 200;
793			if($(window).scrollTop() > offsetTop && $(window).scrollTop() < offsetBottom) {
794				newCurrentId = id;
795				newCurrentTab = $(this);
796				$(this).addClass("on");
797			}
798		});
799		
800		if(this.currentId != newCurrentId || this.currentId === null) {
801			this.currentId = newCurrentId;
802			this.currentTab = newCurrentTab;
803			
804			console.log(newCurrentTab);
805			if(typeof(newCurrentTab)!="undefined"){
806				$('.nav-tab').removeClass("on");
807				newCurrentTab.addClass("on");	
808			}
809			
810		}
811	}
812	
813	setSliderCss() {
814		let width = 0;
815		let left = 0;
816		if(this.currentTab) {
817			width = this.currentTab.css('width');
818			left = this.currentTab.offset().left;
819		}
820		$('.et-hero-tab-slider').css('width', width);
821		$('.et-hero-tab-slider').css('left', left);
822	}
823	
824}
825
826function showModal(type,title, message, onOk, onCancel, okText, cancelText) {
827		$('#commonModalMessage').text(message);
828		$(".modal-content h3").text(title);
829		$('#commonModalInput').hide().val('');
830		$('#commonModalCancelBtn').hide();
831		const $in = $('#commonModalInput');
832		$in.prevAll('.modal-label').remove(); 
833
834		// ok/cancel 텍스트 기본 적용
835		okText = okText || '확인';
836		cancelText = cancelText || '취소';
837
838		$('#commonModalOkBtn').text(okText);
839		$('#commonModalCancelBtn').text(cancelText);
840
841		// 타입별 설정
842		if (type === 'alert') {
843			$('#commonModalCancelBtn').hide();
844		} else if (type === 'confirm') {
845			$('#commonModalCancelBtn').show();
846		} else if (type === 'prompt') {
847			$('#commonModalInput').show();
848			$('#commonModalCancelBtn').show();
849		} else if (type === 'promptReason') {
850			$('#commonModalInput').show();
851			
852			if (!$in.prev('label[for="commonModalInput"]').length) {
853				$('<label for="commonModalInput" class="modal-label">Reason</label>')
854				.insertBefore($in);
855			}
856			$('#commonModalCancelBtn').show();
857		}
858		
859
860		// 버튼 핸들러
861		$('#commonModalOkBtn').off('click').on('click', function() {
862			$('#commonModal').fadeOut();
863			if (typeof onOk === 'function') {
864				if (type === 'prompt' || type === 'promptReason') {
865					if($('#commonModalInput').val()=="")
866					{
867						onOk($('#commonModalInput').val());
868						//return;
869					}
870					else{
871						onOk($('#commonModalInput').val());
872					}
873					
874				} else {
875					onOk();
876				}
877			}
878		});
879
880		$('#commonModalCancelBtn').off('click').on('click', function() {
881			$('#commonModal').fadeOut();
882			if (typeof onCancel === 'function') {
883				onCancel();
884			}
885		});
886
887		$('#commonModal').fadeIn();
888	}
889
890	// 사용하기 쉽게 wrapper 함수 제공
891
892	function customAlert(title, message, callback, okText) {
893		showModal('alert',title, message, callback, null, okText);
894	}
895
896	function customConfirm(title, message, onYes, onNo, okText, cancelText) {
897		showModal('confirm', title, message, onYes, onNo, okText, cancelText);
898	}
899
900	function customPrompt(title, message, onOk, onCancel, okText, cancelText) {
901		showModal('prompt', title, message, onOk, onCancel, okText, cancelText);
902	}
903
904	function customPromptReason(title, message, onOk, onCancel, okText, cancelText) {
905		showModal('promptReason', title, message, onOk, onCancel, okText, cancelText);
906	}
907	
908$(document).ready(function(){
909
910				
911	$(".ico.talk").on("click",function(){
912		view.chatbot.open();  
913	});
914	          
915
916	
917
918	        
919	        
920	
921});

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.