PageSourceSearch

https://daihan.com/js/inc.js?v=1.1

js daihan.com collected 2026-10-05 23:18:00 UTC 7,150 bytes, 276 lines download raw bytes

1// JavaScript Document
2
3//<![CDATA[
4
5
6//bookmark
7$(document).on('click', '#bookmark', function(e){
8	e.preventDefault();
9	var bUrl = location.href;
10	var bTitle = "<?=$site_name?>";
11	try {
12		if (window.sidebar) {
13			window.sidebar.addPanel(bTitle, bUrl, "");
14		} else if (window.external || document.all) {
15			window.external.AddFavorite(bUrl, bTitle);
16		} else if (window.opera) {
17			$("a#bookmark").attr("rel","sidebar");
18		}
19	} catch (err) {
20		alert("죄송합니다. 현재 브라우저는 스크립트로 즐겨찾기 추가 기능을 지원하지 않습니다.\n즐겨찾기에 추가하시려면,\n Ctrl + D 키를 눌러주십시오.");
21	}
22});
23
24
25
26$(window).scroll(function(){
27	$(".prod_tab .wrap_idx .tab_idx > li").click(function () {
28		$('body, html').animate({ scrollTop: $(".prod_tab").offset().top });
29	});
30
31});
32
33
34//
35$(function(){
36	$(".right_menu .lang").mouseenter(function(){
37		if( $(".lang_under").css("display")=="none"){
38			$(".lang_under").slideDown();
39			}
40	})
41
42	$(".right_menu .lang").mouseleave(function(){
43		if( $(".lang_under").css("display")=="block"){
44			$(".lang_under").slideUp();
45			}
46	})
47})
48
49
50$(window).scroll(function(){
51	var pos = $(window).scrollTop()
52
53	if(pos>50){
54	$("#header").addClass("ani")
55	}else{
56	$("#header").removeClass("ani")
57	}
58})
59
60
61
62//hammenu
63$(function(){
64	var winW = $(window).width();
65	$("#header .ham_btn").click(function(){
66		if( $(".ham_menu").css("display")=="none"){
67			$(".ham_menu").slideDown();
68			equalH("#header .ham_menu .ham_gnb .gnb > li");
69			}else{
70				$(".ham_menu").slideUp()
71			}
72	});
73	$(".ham_menu .close").click(function(){
74		$(".ham_menu").slideUp();
75	});
76
77})
78
79
80//
81$(window).load(function(){
82	$(".sub .svisu_area .visu_sgarea").animate({
83		paddingTop:180, opacity:1
84
85		},2000,'swing');
86
87})
88
89
90//equalizeHeights
91$.fn.equalizeHeights = function() {
92var maxHeight = this.map(function( i, e ) {
93return $( e ).height();
94}).get();
95return this.height( Math.max.apply( this, maxHeight ) );
96};
97
98function equalH(t){
99	if(t==null){
100	t="equal"
101	}
102	$(""+t+"").equalizeHeights();
103}
104
105
106//gotop
107function goTop() {
108	$('body, html').animate({ scrollTop: 0 }, 500);
109}
110
111
112//tab
113$(function(){
114	$(".tab_idx.over > li").each(function () {
115		}).mouseenter(function () {
116		var n = $(this).index();
117		$(this).parents(".wrap_idx").find(".con_idx .idx").removeClass("on");
118		$(this).parents(".wrap_idx").find(".con_idx .idx:eq("+n+")").addClass("on");
119		$(this).parents(".wrap_idx").find(".tab_idx > li").removeClass("on");
120		$(this).addClass("on");
121	});
122	$(".tab_idx.click > li").each(function () {
123		}).click(function () {
124		var n = $(this).index();
125		$(this).parents(".wrap_idx").find(".con_idx .idx").removeClass("on");
126		$(this).parents(".wrap_idx").find(".con_idx .idx:eq("+n+")").addClass("on")
127		$(this).parents(".wrap_idx").find(".tab_idx > li").removeClass("on");
128		$(this).addClass("on");
129	});
130});
131
132//tab2
133$(function(){
134	$(".tab_idx2.over > li").each(function () {
135		}).mouseenter(function () {
136		var n = $(this).index();
137		$(this).parents(".wrap_idx2").find(".con_idx2 .idx2").removeClass("on");
138		$(this).parents(".wrap_idx2").find(".con_idx2 .idx2:eq("+n+")").addClass("on");
139		$(this).parents(".wrap_idx2").find(".tab_idx2 > li").removeClass("on");
140		$(this).addClass("on");
141	});
142	$(".tab_idx2.click > li").each(function () {
143		}).click(function () {
144		var n = $(this).index();
145		$(this).parents(".wrap_idx2").find(".con_idx2 .idx2").removeClass("on");
146		$(this).parents(".wrap_idx2").find(".con_idx2 .idx2:eq("+n+")").addClass("on")
147		$(this).parents(".wrap_idx2").find(".tab_idx2 > li").removeClass("on");
148		$(this).addClass("on");
149	});
150});
151
152
153//img_resize
154function img_resize(r,t){
155	function resize(){
156		if(r==null){
157		r=1
158		}
159		if(t==null){
160		t=".img_resize"
161		}
162		$(""+t+"").css("display","block");
163		$(""+t+"").each(function (i) {
164			var imgW = $(this).width();
165			$(this).height(imgW*r)
166		});
167
168	}
169	$(document).ready(function(){
170		resize()
171	})
172	$(window).resize(function(){
173		resize()
174	})
175}
176
177
178//
179//pop
180function layerOpen(url){
181	var bg = '<div class="layer_bg" onclick="layerClose()"></div>'
182	var frame ='<iframe class="layer_frame" src="'+url+'" frameborder="0" scrolling="no" allowtransparency="true"></iframe>'
183	var wrap = '<div class="layer_wrap">'+bg+frame+'</div>'
184	$("body").append(wrap);
185	$("html").css("overflow-y","hidden");
186	layerLoad()
187};
188function layerLoad(){
189	$(".layer_frame").load(function(){
190		$(".layer_wrap").addClass("on")
191		var obj = $(".layer_frame").contents().find('.popIn');
192		var btnClose = "<a href='javascript:parent.layerClose()' class='popClose'>&Cross;</a>"
193		obj.append(btnClose)
194	})
195}
196
197function layerClose(){
198	$(".layer_wrap").remove()
199	$("html").css("overflow-y","scroll");
200};
201
202function popOpenC(u,w,h){
203	var winW = window.screen.width;
204	var winH = window.screen.height;
205	var L = (winW-w)/2
206	var T = (winH-h)/2
207	window.open(u,'','width='+w+',height='+h+',left='+L+',top='+T+', status=yes, toolbar=no, menubar=no, location=no, scrollbars=yes')
208}
209
210
211
212
213
214//history
215$(function(){
216	$(".history > li:odd").addClass("left");
217	$(".history > li:even").addClass("right");
218})
219
220function loadHistory(){
221	var beforeTop;
222	var arrBeforeTop;
223	var beforeTopNum;
224	var prevTop;
225	var arrPrevTop;
226	$(".history > li").each(function( index ) {
227		if( index == 0 ) {
228			beforeTopNum = 0;
229		} else {
230			beforeTop = $(".history > li").eq(index - 1).css("top");
231			arrBeforeTop = beforeTop.split("p");
232			beforeTopNum = Number(arrBeforeTop[0]) + $(".history > li").eq(index - 1).height();
233
234			prevTop = $(this).prev().css("top");
235			arrPrevTop = prevTop.split("p");
236			if ( beforeTopNum < Number(arrPrevTop[0]) ) {
237				beforeTopNum = Number(arrPrevTop[0]);
238			}
239		}
240		$(this).css( "top", beforeTopNum - 40);
241		$(".history > li:first-child").css( "top", 60);
242	});
243	// timeline - backline
244	var timeLastTop = $(".history > li:last").css("top");
245	var arrTimeLastTop = timeLastTop.split("p");
246	// timeline - height
247	$(".history_line").css("height", Number(arrTimeLastTop[0]) + 30 );
248	$(".history").css("height", Number(arrTimeLastTop[0]) + $(".history > li:last").height());
249}
250
251
252//
253function layer_open2(obj){
254	var maxH = $(window).height();
255	var src = $(obj).find("img").attr("src");
256	var layer_frame = '<div class="layer_img" style="position:fixed; width:90%; text-align:center; left:5%; top:5%; z-index:10000000000;cursor:pointer"><img src='+src+' class="img_file" style="max-height:100%" /></div>'
257	var layer_bg2 = '<div class="layer_bg2" style="cursor:pointer"></div>';
258
259	$("body").append(layer_bg2, layer_frame);
260	$(".layer_bg2").fadeIn(400);
261	var imgH = $(".layer_img").height()/2
262	if(imgH*2 > maxH){
263		$(".layer_img").css("height","90%")
264	}else{
265		$(".layer_img").css("top","50%").css("margin","-"+imgH+"px 0 0 0")
266	}
267	$(".layer_bg2, .layer_img").click(function(){
268		layer_close2();
269	});
270};
271function layer_close2(){
272	$(".layer_bg2, .layer_img").fadeOut(500,function(){
273		$(".layer_bg2, .layer_img").remove()
274	})
275};
276

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.