PageSourceSearch

https://www.daea.com/assets/website/_Js/layout_main.js

js daea.com collected 2026-10-02 12:10:48 UTC 17,205 bytes, 603 lines download raw bytes

1////////////////////////////////////////////////////
2	var _thisSite = {};	var _thisPage = {};
3	var _isLowBr_ = false,_isMobile_ = false;
4	var _thisPage_cfg  = {};
5
6	//레이아웃 리셋
7	function resetPageLayout(){
8		mainNavi._reset();
9		_resetFooterHeight();
10
11		//팝업이미지 리사이징에 따른 높이 처리
12		if($(".top-wide-popups").attr("isOpen")=="1"){
13			resetTopWidePopups();
14		}
15	}
16
17	//레이아웃 높이 리셋
18	function resizePageLayoutHeight(){
19	}
20
21	//윈도우 회전시 실행할 함수
22	function setWindowRotation(){
23		if(typeof(thisPageRotation)=="function" && thisPageRotation!=undefined){  thisPageRotation(); }
24		else {
25			//기본 회전시 실행할 함수
26			//resetPageLayout();
27		}
28	}
29
30	//document.addEventListener('DOMContentLoaded', loaded, false);
31	if('onorientationchange' in window){
32		window.addEventListener('onorientationchange', setWindowRotation, false);
33	}
34
35	$(document).ready(function(){
36		//console.log("1.Ready");
37
38		//initPageCssFiles();
39		try{getWindowSize();	}catch(e){}
40		try{getPageSize();	}catch(e){}
41		if(_isMobile_) $alertLoading("Page Loading...");
42		try{setLowBrowser();	}catch(e){	}
43		try{setMediaObjectFunc();	}catch(e){	}
44		try{ _thisLayout_style = getPageStyle(); }catch(e){}
45		initNavigation();
46		docLoading(function(){
47			// console.log("3.docLoad");
48			// initImgSizeInfo();
49		});
50	});
51
52	$(window).load(function(){
53		//console.log("2.Load");
54	});
55
56	$(window).resize(function(e){
57		//var resizeTimeGap = (_isLowBr_)?  250 : 10;
58		var resizeTimeGap = 10;
59		if(_isLowBr_) resizeTimeGap=100;
60		clearTimeout(window.resizeEvt);
61		window.resizeEvt = setTimeout(function()
62		{
63			//console.log("Resize");
64			getWindowSize();
65			getPageSize();
66			try{
67			if(old_wsize.win== undefined ||  wsize.win.w!=old_wsize.win.w){
68				resetPageLayout();
69			}else{
70				resizePageLayoutHeight();
71			}
72			}catch(e){
73				resetPageLayout();
74			}
75		}, resizeTimeGap);
76	});
77////////////////////////////////////////////////////
78//-- 메인 비쥬얼 --/
79$(function() {
80	mVisual.init();
81	mtabGallery.init();
82	mBanner.init();	
83	mPopup.init();
84	mSnsSec.init();
85	mPop.init();
86});
87var mVisual = {
88	init : function(){
89		this.mVisSlide();
90	},
91	mVisSlide : function() {
92		var mVis = $("#mVisual");
93		var mVisSld = $(".dataList", mVis );
94		var mVisLen = $(".item", mVisSld ).length;
95		var mVisCtrl = $(".dataCtrl", mVis );
96		var mVisAuto = $(".dataAuto", mVisCtrl );
97		var mVisDots = $(".dataDots", mVisCtrl );
98		var mVisNav = $(".dataNav", mVisCtrl );
99		var mVisPress = $(".press", mVisCtrl);
100		var mVisTotal = $(".total", mVisCtrl);
101		var mVisDelay = 6000;
102		var mVisSpeed = 750;
103		var mVisIsAuto = true;
104		mVisTotal.text( "0" + mVisLen );
105		if ( mVisLen == 1 || $(".item", mVisSld ).hasClass("no-data") ) {
106			// no-data
107			var mVisUtilLoop = false;
108			var mVisUtilAuto = false;
109		} else {
110			// not-no-data
111			var mVisUtilLoop = true;
112			var mVisUtilAuto = true;
113		}
114		mVisTotal.text( "0" +mVisLen );
115		mVisSld.owlCarousel({
116			items : 1
117			, loop : mVisUtilLoop
118			, autoplay : mVisUtilAuto
119			, nav : true
120			, navText: ["<span class='blind'>이전 장면</span>", "<span class='blind'>다음 장면</span>"]
121			, autoplayTimeout : mVisDelay
122			, navContainer : mVisNav
123			, autoplayHoverPause : false
124			, dots : false
125			, dotsContainer : mVisDots
126			//, animateIn: 'fadeIn'
127			//, animateOut: 'fadeOut'
128			, smartSpeed : mVisSpeed
129			, responsiveRefreshRate : 0
130			, onInitialized : onInitd
131			, onTranslate : onTranse
132			, onTranslated : onTransed
133			, onResized : onResized
134		});
135		$(".btn-stop", mVisAuto ).on("click",function(){
136			mVisIsAuto = false;
137			$(this).hide();
138			$(this).next().show().focus();
139			mVisSld.trigger("stop.owl.autoplay");
140		});
141		$(".btn-play", mVisAuto ).on("click",function(){
142			mVisIsAuto = true;
143			$(this).hide();
144			$(this).prev().show().focus();
145			mVisSld.trigger("play.owl.autoplay", [mVisDelay]);
146		});
147		function onInitd ( event ) {
148			var element = $(event.target);
149			$("button", mVisDots ).each( function( index, item ) {
150				$("span", $(this) ).html( (index+1) + "번째 장면 <span class='isSel'>선택됨</span>" );
151			});
152		}
153		function onTranse( event ) {	// ** auto trans 타이밍시 수동
153전환후 연속 2회 슬라이딩 방지
154			var element = $(event.target);
155			mVisSld.trigger("stop.owl.autoplay");
156		}
157		function onTransed( event ) {	// ** auto trans 타이밍시 수동전환후 연속 2회 슬라이딩 방지
158			var element = $(event.target);
159			var mVisIdx = $(".owl-item.active .item", element ).data("idx");
160			mVisPress.text( "0" + mVisIdx );
161			if ( mVisIsAuto ) {
162				mVisSld.trigger("play.owl.autoplay", [mVisDelay]);
163			}
164		}
165		function onResized( event ) {
166			var element = $(event.target);
167			if ( mVisIsAuto ) {
168				mVisSld.trigger("play.owl.autoplay", [mVisDelay]);
169			} else {
170				mVisSld.trigger("stop.owl.autoplay");
171			}
172		}
173	}
174}
175
176//-- 갤러리 --/
177
178var mtabGallery = {
179	init : function(){
180		this.mtabGallerySlide();
181	},
182	mtabGallerySlide : function() {
183		var mGallery = $("#mtabGallery1");
184		var mGallerySld = $(".galleryWr", mGallery );
185		var mGalleryLen = $(".item", mGallerySld ).length;
186		var mGalleryCtrl = $(".dataCtrl", mGallery );
187		var mGalleryAuto = $(".dataAuto", mGalleryCtrl );
188		var mGalleryNav = $(".dataNav", mGallery );
189		var mGalleryDelay = 5000;
190		var mGallerySpeed = 750;
191		var mGalleryIsAuto = true;
192		var mGalleryItem = 2;
193		if ( mGalleryLen == 1 || $(".item", mGallerySld ).hasClass("hasNoData") ) {
194			// no-data
195			var mGalleryItem = 1;
196			var mGalleryLoop = false;
197			var mGalleryIsAuto = false;
198		} else {
199			// not-no-data
200			var mGalleryLoop = true;
201			var mGalleryIsAuto = true;
202		}
203		mGallerySld.owlCarousel({
204			items : 1
205			, loop : mGalleryLoop
206			, autoplay : mGalleryIsAuto
207			, nav : true
208			, navText: ["<span class='blind'>이전 장면</span>", "<span class='blind'>다음 장면</span>"]
209			, autoplayTimeout : mGalleryDelay
210			, navContainer : mGalleryNav
211			, autoplayHoverPause : false
212			, dots : false
213			, smartSpeed : mGallerySpeed
214			, responsiveRefreshRate : 0
215			, responsive : {
216				300 : {
217					items : 1
218					, margin : 0
219				},
220				500 : {
221					items : 1
222					, margin : 15
223				},
224				700 : {
225					items : 1
226					, margin : 0
227				},				
228				1000 : {
229					items : 1
230					, margin : 15
231				},
232				1300 : {
233					items : 1
234					, margin : 30
235				},
236			}
237			, onTranslate : onTranse
238			/*, onTranslated : onTransed*/
239			, onResized : onResized
240		});
241		$(".btn-stop", mGalleryAuto ).on("click",function(){
242			mGalleryIsAuto = false;
243			$(this).hide();
244			$(this).next().show().focus();
245			mGallerySld.trigger("stop.owl.autoplay");
246		});
247		$(".btn-play", mGalleryAuto ).on("click",function(){
248			mGalleryIsAuto = true;
249			$(this).hide();
250			$(this).prev().show().focus();
251			mGallerySld.trigger("play.owl.autoplay", [mGalleryDelay]);
252		});
253		function onTranse( event ) {	// ** auto trans 타이밍시 수동전환후 연속 2회 슬라이딩 방지
254			var element = $(event.target);
255			mGallerySld.trigger("stop.owl.autoplay");
256		}
257		/*function onTransed( event ) {	// ** auto trans 타이밍시 수동전환후 연속 2회 슬라이딩 방지
258			var element = $(event.target);
259			var mGalleryIdx = $(".owl-item.active .item", element ).data("idx");
260			mVisPress.text( "0" + mGalleryIdx );
261			if ( mGalleryIsAuto ) {
262				mGallerySld.trigger("play.owl.autoplay", [mGalleryDelay]);
263			}
264		}*/
265		function onResized( event ) {
266			var element = $(event.target);
267			if ( mGalleryIsAuto ) {
268				mGallerySld.trigger("play.owl.autoplay", [mGalleryDelay]);
269			} else {
270				mGallerySld.trigger("stop.owl.autoplay");
271			}
272		}
273	}
274}
275//-- 베너 --/
276var mBanner = {
277	init : function(){
278		this.mBannerSlide();
279	},
280	mBannerSlide : function() {
281		var mBann = $("#bannerWr");
282		var mBannSld = $(".dataList", mBann );
283		var mBannLen = $(".item", mBannSld ).length;
284		var mBannCtrl = $(".dataCtrl", mBann );
285		var mBannAuto = $(".dataAuto", mBannCtrl );
286		var mBannNav = $(".dataNav", mBann);
287		var mBannDelay = 5000;
288		var mBannSpeed = 750;
289		if ( mBannLen == 1 || $(".item", mBannSld ).hasClass("no-data") ) {
290			// no-data
291			var mBannlLoop = false;
292			var mBannlAuto = false;
293		} else {
294			// not-no-data
295			var mBannlLoop = true;
296			var mBannlAuto = true;
297		}
298		mBannSld.owlCarousel({
299			items : 4
300			, loop : mBannlLoop
301			, autoplay : mBannlAuto
302			, nav : true
303			, navText: ["<i class='fa-solid fa-angle-left'></i><span class='blind'>이전 장면</span>", "<i class='fa-solid fa-angle-right'><span class='blind'>다음 장면</span>"]
304			, autoplayTimeout : mBannDelay
305			, navContainer : mBannNav
306			, autoplayHoverPause : false
307			, dots : false
308			, animateOut: 'fadeOut'
309			, smartSpeed : mBannSpeed
310			, responsiveRefreshRate : 0
311			, responsive : {		
312				300 : {
313					items : 2
314					, margin : 5
315				},					
316				400 : {
317					items : 2
318					, margin : 5
319				},				
320				500 : {
321					items : 4
322					, margin : 5
323				},
324				700 : {
325					items : 4
326					, margin : 10
327				},
328				1000 : {
329					items : 4
330					, margin : 10
331				},
332				1200 : {
333					items : 4
334					, margin : 10
335				},
336			}	
337		});
338		$(".btn-stop", mBannAuto ).on("click",function(){
339			mBannAuto = false;
340			$(this).hide();
341			$(this).next().show().focus();
342			mBannSld.trigger("stop.owl.autoplay");
343		});
344		$(".btn-play", mBannAuto ).on("click",function(){
345			mBannAuto = true;
346			$(this).hide();
347			$(this).prev().show().focus();
348			mBannSld.trigger("play.owl.autoplay", [mBannDelay]);
349		});
350	}
351}
352
353//-- 팝업 --/
354var mPopup = {
355	init : function(){
356		//this.mPopSlide();
357	},
358	mPopSlide : function() {
359		var mPop = $("#mPopup");
360		var mPopSld = $(".dataList", mPop );
361		var mPopLen = $(".item", mPopSld ).length;
362		var mPopCtrl = $(".dataCtrl", mPop );
363		var mPopAuto = $(".dataAuto", mPopCtrl );
364		var mPopDots = $(".dataDots", mPopCtrl );
365		var mPopNav = $(".dataNav", mPopCtrl );
366		var mPopPress = $(".press", mPopCtrl);
367		var mPopTotal = $(".total", mPopCtrl);
368		var mPopDelay = 5000;
369		var mPopSpeed = 750;
370		var mPopIsAuto = true;
371		mPopTotal.text( "/" + mPopLen );
372		if ( mPopLen == 1 || $(".item", mPopSld ).hasClass("no-data") ) {
373			// no-data
374			var mPopUtilLoop = false;
375			var mPopUtilAuto = false;
376		} else {
377			// not-no-data
378			var mPopUtilLoop = true;
379			var mPopUtilAuto = true;
380		}
381		mPopTotal.text( "/ " +mPopLen );
382		mPopSld.owlCarousel({
383			items : 4
384			, loop : mPopUtilLoop
385			, autoplay : mPopUtilAuto
386			, nav : true
387			, navText: ["<span class='blind'>이전 장면</span>", "<span class='blind'>다음 장면</span>"]
388			, autoplayTimeout : mPopDelay
389			, navContainer : mPopNav
390			, autoplayHoverPause : false
391			, dots : false
392			//, dotsContainer : mPopDots
393			, smartSpeed : mPopSpeed
394			, responsiveRefreshRate : 0
395			, onInitialized : onInitd
396			, onTranslate : onTranse
397			, onTranslated : onTransed
398			, onResized : onResized
399		});
400		$(".btn-stop", mPopAuto ).on("click",function(){
401			mPopIsAuto = false;
402			$(this).hide();
403			$(this).next().show().focus();
404			mPopSld.trigger("stop.owl.autoplay");
405		});
406		$(".btn-play", mPopAuto ).on("click",function(){
407			mPopIsAuto = true;
408			$(this).hide();
409			$(this).prev().show().focus();
410			mPopSld.trigger("play.owl.autoplay", [mPopDelay]);
411		});
412		function onInitd ( event ) {
413			var element = $(event.target);
414			//$("button", mPopDots ).each( function( index, item ) {
415			//	$("span", $(this) ).html( (index+1) + "번째 장면 <span class='isSel'>선택됨</span>" );
416			//});
417		}
418		function onTranse( event ) {	// ** auto trans 타이밍시 수동전환후 연속 2회 슬라이딩 방지
419			var element = $(event.target);
420			mPopSld.trigger("stop.owl.autoplay");
421		}
422		function onTransed( event ) {	// ** auto trans 타이밍시 수동전환후 연속 2회 슬라이딩 방지
423			var element = $(event.target);
424			var mPopIdx = $(".owl-item.active .item", element ).data("idx");
425			mPopPress.text( mPopIdx );
426			if ( mPopIsAuto ) {
427				mPopSld.trigger("play.owl.autoplay", [mPopDelay]);
428			}
429		}
430		function onResized( event ) {
431			var element = $(event.target);
432			if ( mPopIsAuto ) {
433				mPopSld.trigger("play.owl.autoplay", [mPopDelay]);
434			} else {
435				mPopSld.trigger("stop.owl.autoplay");
436			}
437		}
438	}
439}
440
441//-- snsContainer --/
442var mSnsSec = {
443	init : function(){
444		this.mSnsSecSlide();
445	},
446	mSnsSecSlide : function() {
447		var mSns = $("#snsContainer");
448		var mSnsSld = $(".dataList", mSns );
449		var mSnsLen = $(".item", mSnsSld ).length;
450		var mSnsCtrl = $(".dataCtrl", mSns );
451		var mSnsAuto = $(".dataAuto", mSnsCtrl );
452		var mSnsNav = $(".dataNav", mSns );
453		var mSnsDelay = 5000;
454		var mSnsSpeed = 750;
455		var mSnsIsAuto = true;	
456		mSnsSld.owlCarousel({
457			nav : false
458			, navText: ["<span class='blind'>이전 장면</span>", "<span class='blind'>다음 장면</span>"]
459			, autoplayTimeout : mSnsDelay
460			, navContainer : mSnsNav
461			, autoplayHoverPause : false
462			, dots : false
463			, smartSpeed : mSnsSpeed
464			, responsiveRefreshRate : 0
465			, responsive : {
466				300 : {
467					items : 1
468					, margin : 0
469					, autoplay : (mSnsLen > 1) ? true : false
470					, loop : (mSnsLen > 1) ? true : false
471				},					
472				430 : {
473					items : 2
474					, margin : 0
475					, autoplay : (mSnsLen > 2) ? true : false
476					, loop : (mSnsLen > 2) ? true : false	
477				},				
478				768 : {
479					items : 2
480					, margin : 0
481					, autoplay : (mSnsLen > 2) ? true : false
482					, loop : (mSnsLen > 2) ? true : false
483				},				
484				899 : {
485					items : 4
486					, margin : 0
487					, autoplay : (mSnsLen > 4) ? true : false
488					, loop : (mSnsLen > 4) ? true : false
489				},
490				1300 : {
491					items : 4
492					, margin : 0
493					, autoplay : (mSnsLen > 4) ? true : false
494					, loop : (mSnsLen > 4) ? true : false
495				}
496			}
497			, onTranslate : onTranse
498			/*, onTranslated : onTransed*/
499			, onResized : onResized			
500		});
501		$(".btn-stop", mSnsAuto ).on("click",function(){
502			mSnsIsAuto = false;
503			$(this).hide();
504			$(this).next().show().focus();
505			mSnsSld.trigger("stop.owl.autoplay");
506		});
507		$(".btn-play", mSnsAuto ).on("click",function(){
508			mSnsIsAuto = true;
509			$(this).hide();
510			$(this).prev().show().focus();
511			mSnsSld.trigger("play.owl.autoplay", [mSnsDelay]);
512		});
513		function onTranse( event ) {	// ** auto trans 타이밍시 수동
513전환후 연속 2회 슬라이딩 방지
514			var element = $(event.target);
515			mSnsSld.trigger("stop.owl.autoplay");
516		}
517		/*function onTransed( event ) {	// ** auto trans 타이밍시 수동전환후 연속 2회 슬라이딩 방지
518			var element = $(event.target);
519			var mSnsIdx = $(".owl-item.active .item", element ).data("idx");
520			mVisPress.text( "0" + mSnsIdx );
521			if ( mSnsIsAuto ) {
522				mSnsSld.trigger("play.owl.autoplay", [mSnsDelay]);
523			}
524		}*/
525		function onResized( event ) {
526			var element = $(event.target);
527			if ( mSnsIsAuto ) {
528				mSnsSld.trigger("play.owl.autoplay", [mSnsDelay]);
529			} else {
530				mSnsSld.trigger("stop.owl.autoplay");
531			}
532		}
533	}
534}
535
536////////////////////////////////////////////////////
537
538// **
539var mPop = {
540	init : function(){
541		this.addListeners();
542		$mPopChk = $("#chk-close");
543		if ( getCookie("main-pop") != "done" && $(".isMain").length > 0 ) {
544			// ** 팝업열기.
545			$mPopChk.prop( "checked", false );
546			setTimeout(function() {
547				$("#header .mPopClick").trigger("click");
548			}, 2000);
549			setTimeout(function() {
550				if($(".mSidezone").hasClass("on")) {
551					mPop.deactivateTabs("#mPopup");
552				} 
553			}, 4500);
554		}
555	},
556	addListeners : function(){
557		$(".mPopClick").on("click", function(e){
558			e.preventDefault();
559			if($(".mSidezone").hasClass("on")) {
560				mPop.deactivateTabs("#mPopup");
561			} else {
562				$(".mSidezone").addClass("on");
563				var id = $(this).attr("href");
564				mPop.activateTab(id);
565				return false;
566			}
567
568		});
569	},
570	activateTab : function(id){
571		//$(id).show(300, function(){	
572			$("#mPopup").attr("aria-hidden", "false").addClass("active");
573			$("#mPopup").css({"opacity":1});
574			$("#doc-wrap").addClass("mPop-on");
575			mPopup.mPopSlide();		
576			//$("#mPopup .dataList").trigger("play.owl.autoplay", 5000);
577		//});
578	},
579	deactivateTabs : function(id) {
580		if ( $mPopChk.is(":checked") ) {
581			setCookie( "main-pop", "done" , 1);
582		} else {
583			delCookie( "main-pop" );
584		}
585		$(id).removeClass("active");
586		$("#doc-wrap").removeClass("mPop-on");
587		setTimeout(function(){
588			$("#mPopup").css({"opacity":0});
589		}, 300);
590		setTimeout(function(){
591			///$(id).hide(400, function(){
592				$("#mPopup").attr("aria-hidden", "true").removeClass("active");
593				$("#mPopup .dataList").trigger('destroy.owl.carousel');
594				$("#mPopup .dataList").find(".owl-stage-outer").children().unwrap();
595				//$("#mPopup .dataList").trigger("stop.owl.autoplay");
596				
597			//});
598				$(".mSidezone").removeClass("on");
599				
600		}, 350);
601	},
602
603};

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.