PageSourceSearch

https://reddogch.com/js/script.js?ver=20261009020733

js reddogch.com collected 2026-10-08 17:08:03 UTC 10,627 bytes, 368 lines download raw bytes

1$(document).ready(function() {
2	// 타이틀 변환
3	var homeTile = jQuery('title').text();
4	var arrTitle = jQuery('.sub-title h2').text();
5	if($("#sub").length){
6		document.title=arrTitle + " | " + homeTile;		
7	}
8
9	$(".nav-menu").html($("#gnb").html());
10	$("#mobileUtil").html($("#header .head-util").html());
11	$(".btn-m-menu").click(function(e){
12		e.preventDefault();
13		if($("html").hasClass("menu-opened")){
14			$("html").removeClass("menu-opened");
15		}else{			
16			$("html").addClass("menu-opened"); 
17		}
18	});
19
20	$(window).scroll(function(){
21        if($(window).scrollTop() > 50){
22            $("html").addClass("header-fixed");
23        }else{
24            $("html").removeClass("header-fixed");
25        }
26    });
27
28	$("html").addClass("loaded");
29
30	new WOW().init();
31
32	$(".mobile-overlay").click(function(){				
33		$("html").removeClass("menu-opened");
34	});
35
36	$(".mobile-navigation nav > ul > li > a").click(function(){
37		t = $(this).parent('li');
38		if (t.hasClass('active')) {
39			t.removeClass('active');
40			t.find('.submenu').slideUp('fast');
41		}else {
42			$(".mobile-navigation nav li").removeClass('active');
43			t.addClass('active');
44			if(t.find('div').hasClass('submenu')){
45				$(".mobile-navigation nav .submenu").slideUp('fast');			
46				t.find('.submenu').slideDown('fast');
47				return false;
48			}	
49		}
50	});
51
52	// toggle down
53	var toggleBtn = $('.toggle-down');
54	toggleBtn.each(function(){
55		var $this = $(this);
56		$this.find('.toggle-button').click(function(){
57			if(!$this.hasClass('active')){
58				toggleBtn.removeClass('active');
59				toggleBtn.find('.toggle-layer').slideUp(100);
60				$this.addClass('active');
61				$this.find('.toggle-layer').slideDown(100);
62			}else{
63				$this.removeClass('active');
64				$this.find('.toggle-layer').slideUp(100);
65			}			
66		});
67	});
68
69	// 문서 클릭시 셀렉트박스 닫힘
70	$(document).click(function(e){
71		if(!$(event.target).closest('.toggle-down').length){
72			toggleBtn.removeClass('active');
73			toggleBtn.find('.toggle-layer').slideUp(100);
74		};		
75	});	
76
77	//scroll btn
78	$(window).load(function(){
79		$(".visual-scroll").click(function(event){
80			var id = $(this).attr('href');
81			var offset = $(id).offset().top;
82
83			$('html, body').animate({
84				scrollTop : offset-$("#header").height()
85			}, 1200, 'easeInOutCubic');
86
87			event.preventDefault();
88		});
89	});
90
91	// header
92	$(window).scroll(function(){
93		if($(window).scrollTop()>0){
94			$("#header").addClass("fixed");
95		}else{
96			$("#header").removeClass("fixed");
97		}
98	});
99
100	// 텝
101	$(".tab-content").hide();
102	$("ul.tabs>li:first").addClass("active"); 	
103	$(".tab-content:first").show();
104
105	$("ul.tabs>li").click(function(e) {
106		e.preventDefault();
107		$("ul.tabs>li").removeClass("active");
108		$(this).addClass("active");
109		$(".tab-content").hide();		
110		var activeTab = $(this).find("a").attr("href");
111		$(activeTab).show();
112		return false;
113	});
114
115	$('.perftap .tabs .item').each(function () {
116		var $item = $(this);
117		if (!$item.find('.sublist').length) return;
118		$item.find('.mainlist').on('click', function (e) {
119			var url;
120			try {
121				url = new URL(this.getAttribute('href') || '', window.location.href);
122			} catch (err) {
123				return;
124			}
125			if (url.pathname === window.location.pathname) {
126				e.preventDefault();
127				$item.toggleClass('open').siblings('.item').removeClass('open');
128			}
129		});
130	});
131	$(document).on('click', function (e) {
132		if (!$(e.target).closest('.perftap .tabs .item').length) {
133			$('.perftap .tabs .item.open').removeClass('open');
134		}
135	});
136
137	$('.show .slider-for').slick({
138		slidesToShow: 1,
139		slidesToScroll: 1,
140		arrows: false,
141		dots: true,
142		fade: true,
143		asNavFor: '.show .slider-nav'
144	  });
145	  $('.show .slider-nav').slick({
146		slidesToShow: 4,
147		slidesToScroll: 1,
148		arrows: false,
149		asNavFor: '.show .slider-for',
150		dots: false,
151		focusOnSelect: true,
152		responsive: [
153			{
154				breakpoint: 700,
155				settings: {
156					slidesToShow:2
157				}
158			}
159		]
160	  });
161
162	// lnb
163	if($(window).width()<=1025){
164		var lnbIndex = $(".lnb .swiper-slide.active").first().index();
165		var lnbSwiper = new Swiper('.lnb .swiper', {
166			slidesPerView: 'auto',
167			paginationClickable: true,
168			preventClicks: false,
169			initialSlide: lnbIndex
170		});
171		$('.lnb .swiper-slide a').focus(function() {
172			var idx = $(this).closest('.swiper-slide').index();
173			lnbSwiper.slideTo(idx);
174		});
175	}
176
177	$(document).on("click", ".lnb.lnb-drop .swiper-slide.has-sub a.top", function (e) {
178		if ($(window).width() > 1025) return;
179		e.preventDefault();
180		var $li = $(this).closest(".swiper-slide");
181		var isOpen = $li.hasClass("open");
182		$(".lnb.lnb-drop .swiper-slide.has-sub").removeClass("open");
183		if (!isOpen) $li.addClass("open");
184	});
185	$(document).on("click", function (e) {
186		if ($(window).width() > 1025) return;
187		if (!$(e.target).closest(".lnb.lnb-drop").length) {
188			$(".lnb.lnb-drop .swiper-slide.has-sub").removeClass("open");
189		}
190	});
191
192	jQuery('.go-top').click(function() {
193		jQuery('html, body').animate({scrollTop: '0px'}, 400);
194	});
195	
196	// usemap
197	$('img[usemap]').rwdImageMaps();
198
199	// 마우스오버시 이미지 변환
200	jQuery("img.rollover").mouseover(function(){
201		jQuery(this).attr("src",jQuery(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"));
202	}).mouseout(function(){
203		jQuery(this).attr("src",jQuery(this).attr("src").replace(/^(.+)_on(\.[a-z]+)$/, "$1$2"));
204	});
205
206
207	// path
208	$(".path-wrap .part>a").bind("click", function(){
209		var t = $(this).parent("div");
210		if(!t.hasClass("active")){
211			$(".path-wrap .part").removeClass("active").find("ul").slideUp(100);
212			t.addClass("active").find("ul").slideDown(200);
213		}else{
214			t.removeClass("active").find("ul").slideUp(100);
215		}
216		return false		
217	});
218	$(".path-wrap .part").each(function(){
219		$(this).find(".page-name").text($(this).find("li.active").text());
220	});
221
222	$(document).click(function(e){
223		if(!$(event.target).closest(".path-wrap .part").length){
224			$(".path-wrap .part").removeClass("active").find("ul").slideUp(100);
225		};
226	});
227
228	$(".main-inquiry .toggle").click(function(){
229		$(".main-inquiry").toggleClass("active");
230	});
231
232	$('.success-slider').slick({
233		slidesToShow: 3,
234		slidesToScroll: 1,
235		infinite: true,
236		speed: 600,
237		arrows: true,
238		responsive: [
239			{
240				breakpoint: 1024,
241				settings: {
242					slidesToShow: 2
243				}
244			},
245			{
246				breakpoint: 640,
247				settings: {
248					slidesToShow: 1
249				}
250			},
251		]
252	});
253
254	$('.pop_modal').click(function(e) {
255		e.preventDefault();
256		$(this).modal({
257			clickClose: false,
258			escapeClose: false
259		});
260	});
261
262	// fancybox
263	jQuery("a.zoom").fancybox({
264		padding     : 0,
265		margin      : 20,
266		openEffect	: 'none',
267		closeEffect	: 'none',
268		helpers:  {
269			overlay: {
270				locked: false
271			}
272		}
273	});
274
275	$(".pop_privacy").fancybox({
276		padding     : 0,
277		margin      : 10,
278		fitToView	: false,
279		closeClick	: false,
280		openEffect	: 'none',
281		closeEffect	: 'none',
282		type		: 'ajax',
283		helpers:  {
284			overlay: {
285				locked: false
286			}
287		}
288	});
289
290	$(".pop_email").fancybox({
291		padding     : 0,
292		margin      : 10,
293		fitToView	: false,
294		closeClick	: false,
295		openEffect	: 'none',
296		closeEffect	: 'none',
297		type		: 'ajax',
298		helpers:  {
299			overlay: {
300				locked: false
301			}
302		}
303	});
304
305	// datepicker
306	$(".datepicker").datepicker({
307		dateFormat: 'yy-mm-dd' //Input Display Format 변경
308		,showOtherMonths: true //빈 공간에 현재월의 앞뒤월의 날짜를 표시
309		,showMonthAfterYear:true //년도 먼저 나오고, 뒤에 월 표시         
310		//,showOn: "both" //button:버튼을 표시하고,버튼을 눌러야만 달력 표시 ^ both:버튼을 표시하고,버튼을 누르거나 input을 클릭하면 달력 표시
311		,prevText: "이전달"
312		,nextText: "다음달"
313		,buttonText: "날짜선택" //버튼에 마우스 갖다 댔을 때 표시되는 텍스트                
314		,yearSuffix: "년" //달력의 년도 부분 뒤에 붙는 텍스트
315		,monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'] //달력의 월 부분 텍스트
316		,monthNames: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'] //달력의 월 부분 Tooltip 텍스트
317		,dayNamesMin: ['일','월','화','수','목','금','토'] //달력의 요일 부분 텍스트
318		,dayNames: ['일요일','월요일','화요일','수요일','목요일','금요일','토요일'] //달력의 요일 부분 Tooltip 텍스트
319	}); 
320
321	$(".datepicker2").datepicker({
322		dateFormat: 'yy-mm-dd' //Input Display Format 변경
323		,showOtherMonths: true //빈 공간에 현재월의 앞뒤월의 날짜를 표시
324		,showMonthAfterYear:true //년도 먼저 나오고, 뒤에 월 표시    
325		,changeMonth: true //월 선택 표시
326		,changeYear: true //년도 선택 표시
327		,minDate: '-100y' // 현재날짜로부터 100년이전까지 년을 표시
328		,yearRange: 'c-100:c+10' // 년도 선택 셀렉트박스를 현재 년도에서 이전, 이후로 얼마의 범위를 표시할것인가.
329		,showOn: "both" //button:버튼을 표시하고,버튼을 눌러야만 달력 표시 ^ both:버튼을 표시하고,버튼을 누르거나 input을 클릭하면 달력 표시  
330		,prevText: "이전달"
331		,nextText: "다음달"
332		,buttonText: "날짜선택" //버튼에 마우스 갖다 댔을 때 표시되는 텍스트                
333		,monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'] //달력의 월 부분 텍스트
334		,monthNames: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'] //달력의 월 부분 Tooltip 텍스트
335		,dayNamesMin: ['일','월','화','수','목','금','토'] //달력의 요일 부분 텍스트
336		,dayNames: ['일요일','월요일','화요일','수요일','목요일','금요일','토요일'] //달력의 요일 부분 Tooltip 텍스트
337	}); 
338
339	// input
340	$("input[type=tel], input[numberOnly]").on("keyup", function() {
341		$(this).val($(this).val().replace(/[^0-9]/g,""));
342	});
343
344
345});
346
347$(window).bind("load resize", function(){
348	stageResize();
349});
350
351function stageResize(){
352	winH = $(window).height(),
353	docH = $(document).height(),
354	headH = $("#header").outerHeight(),
355	subH = $(".sub-visual").outerHeight(),
356	lnbH = $(".path-wrap").outerHeight(),
357	footH = $("#footer").outerHeight();
358
359	$("#sub #container").css("min-height",winH-headH-subH-lnbH-footH);
360}
361
362$(window).bind("load", function(){
363	AOS.init({
364		easing: 'ease',
365		duration: 1000,
366		once: true
367	});
368});

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.