﻿<!--
// addLoadEvent
function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}

//인자 값
function isAgm(agm, len, val){
	var agmL = agm.length - 1;
	return agmL < len ? val : agm[len];
};

//브라우져 별 아이디 객체 스타일
function getStyleObject(objectId) {
	if(document.getElementById && document.getElementById(objectId)){
		return document.getElementById(objectId).style;
	}else if (document.all && document.all(objectId)){
		return document.all(objectId).style;
	}else if (document.layers && document.layers[objectId]){
		return document.layers[objectId];
	}else{
		return false;
	}
};

//브라우져 별 아이디 객체
function getObject(objectId) {
	if(document.getElementById && document.getElementById(objectId)){
		return document.getElementById(objectId);
	}else if (document.all && document.all(objectId)){
		return document.all(objectId);
	}else if (document.layers && document.layers[objectId]){
		return document.layers[objectId];
	}else{
		return false;
	}
};

/* 플래시 써주기 - 점선현상 제거가 필요할때
function writeEmbed(url,wd,ht){
	var id		= isAgm(writeEmbed.arguments, 3, null);
	var n			= 0;
	while(getObject("writeValue_" + n)) n++;
	document.write("<textarea id=\"writeValue_" + n + "\" style=\"display:none;\" cols=\"0\" rows=\"0\">");
	document.write("	<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + wd + "\" height=\"" + ht + "\" id=\"fmedia_\"" + n + ">");
	document.write("	<param name=\"movie\" value=\"" + url + "\">");
	document.write("	<param name=\"menu\" value=\"false\">");
	document.write("	<param name=\"wmode\" value=\"transparent\" >");
	document.write("	<param name=\"quality\" value=\"high\">");
	document.write("	<param name=\"allowScriptAccess\" value=\"always\">");
	document.write("	<param name=\"FlashVars\" value=\"" + id + "\">");
	document.write("	<embed src=\"" + url + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + wd + "\" height=\"" + ht + "\" wmode=\"transparent\" allowScriptAccess=\"always\" name=\"ExtInterface\" FlashVars=\"" + id + "\"></embed>");
	document.write("	</object>");
	document.write("</textarea>")

	document.write(getObject("writeValue_" + n).value);
};*/

// 플래시 써주기
function writeEmbed(url,wd,ht){
	var id		= isAgm(writeEmbed.arguments, 3, null);
	var n			= 0;
	document.write("	<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + wd + "\" height=\"" + ht + "\" id=\"externalInterfaceExample\"" + n + ">");
	document.write("	<param name=\"movie\" value=\"" + url + "\">");
	document.write("	<param name=\"menu\" value=\"false\">");
	document.write("	<param name=\"wmode\" value=\"transparent\" >");
	document.write("	<param name=\"quality\" value=\"high\">");
	document.write("	<param name=\"allowScriptAccess\" value=\"always\">");
	document.write("	<embed src=\"" + url + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + wd + "\" height=\"" + ht + "\" wmode=\"transparent\" allowScriptAccess=\"always\" name=\"ExtInterface\" FlashVars=\"" + id + "\"></embed>");
	document.write("	</object>");
};

//popup(center)
function pop_center(fname,wth,hgt){
	var W = wth;
	var H = hgt;
	var X = screen.availWidth/2 - W/2;
	var Y = screen.availHeight/2 - H/2;
	var wname = fname.split(".")[0];
	while(wname.indexOf("/")!=-1){
		wname = wname.replace("/","_");
	}
	newWin = window.open(fname,wname,"width="+W+",height="+H+",left="+X+",top="+Y);
	newWin.focus();
}
//-->

// LNB
/*
jQuery(function(){
	jQuery.easing.def = 'easeOutExpo'; //모션효과
	
	var LNBSub = $('#lnb li.g2');
	LNBSub.hover(function() {
		$(this).stop().delay(0).animate({'height':'179px'}, 500);
		} , function() {
	});
	$('#lnb li.g2').mouseleave(function() {
		LNBSub.stop().delay(0).animate({'height':'35px'}, 500);
	});
	
	$('#lnb li span').animate({opacity:'0'}, 0);
	$('#lnb li').hover(function() {
		$(this).addClass('on');		
		$(this).find('span.over1').stop().animate({opacity:'1'}, 200);
		} , function() {
		$(this).removeClass('on');
		$(this).find('span.over1').stop().animate({opacity:'0'}, 500);
		} , function() {
	});
	$('#lnb li li').hover(function() {
		$(this).addClass('on');		
		$(this).find('span.over2').stop().animate({opacity:'1'}, 200);
		} , function() {
		$(this).removeClass('on');
		$(this).find('span.over2').stop().animate({opacity:'0'}, 0);
		} , function() {
	});
});
*/
// LNB
jQuery(function(){
	jQuery.easing.def = 'easeOutExpo'; //모션효과

	//사업분야//
	var busi_LNBSub1 = $('.business_wrapper #lnb li.g1');
	busi_LNBSub1.hover(	
		function() {$(this).stop().delay(0).animate({'height':'138px'}, 500);}, 
		function() {	}
	);
	$('.business_wrapper #lnb li.g1').mouseleave(
		function() {busi_LNBSub1.stop().delay(0).animate({'height':'22px'}, 500);}
	);
	
	var busi_LNBSub3 = $('.business_wrapper #lnb li.g3');
	busi_LNBSub3.hover(function() {$(this).stop().delay(0).animate({'height':'75px'}, 500);}, 	function() {	});
	$('.business_wrapper #lnb li.g3').mouseleave(
	function() {busi_LNBSub3.stop().delay(0).animate({'height':'22px'}, 500);});
	
	var busi_LNBSub4 = $('.business_wrapper #lnb li.g4');
	busi_LNBSub4.hover(function() {$(this).stop().delay(0).animate({'height':'90px'}, 500);}, 	function() {	});
	$('.business_wrapper #lnb li.g4').mouseleave(
	function() {busi_LNBSub4.stop().delay(0).animate({'height':'22px'}, 500);});
	
	//자료실//
	var libr_LNBSub1 = $('.library_wrapper #lnb li.g1');
	libr_LNBSub1.hover(function() {$(this).stop().delay(0).animate({'height':'138px'}, 500);}, 	function() {	});
	$('.library_wrapper #lnb li.g1').mouseleave(
	function() {libr_LNBSub1.stop().delay(0).animate({'height':'22px'}, 500);});
	
	var libr_LNBSub2 = $('.library_wrapper #lnb li.g2');
	libr_LNBSub2.hover(function() {$(this).stop().delay(0).animate({'height':'200px'}, 500);}, 	function() {	});
	$('.library_wrapper #lnb li.g2').mouseleave(
	function() {libr_LNBSub2.stop().delay(0).animate({'height':'22px'}, 500);});
	
	var libr_LNBSub3 = $('.library_wrapper #lnb li.g3');
	libr_LNBSub3.hover(function() {$(this).stop().delay(0).animate({'height':'83px'}, 500);}, 	function() {	});
	$('.library_wrapper #lnb li.g3').mouseleave(
	function() {libr_LNBSub3.stop().delay(0).animate({'height':'22px'}, 500);});
	

	$('#lnb li span').animate({opacity:'0'}, 0);
	$('#lnb li').hover(function() {
		$(this).addClass('on');		
		$(this).find('span.over1').stop().animate({opacity:'1'}, 200);		} , 
			function() {
			$(this).removeClass('on');
			$(this).find('span.over1').stop().animate({opacity:'0'}, 500);} , 
				function() {
			});
	$('#lnb li li').hover(function() {
		$(this).addClass('on');		
		$(this).find('span.over2').stop().animate({opacity:'1'}, 100);		} , 
			function() {
			$(this).removeClass('on');
			$(this).find('span.over2').stop().animate({opacity:'0'}, 0);		} , 
				function() {});
});

//document.getElementById("span.over2").style.zIndex="500"

//점프메뉴 - 패밀리사이트
function PopupOpen(strUrl) {
	if (strUrl.length > 0) { 
	window.open(strUrl, "", ""); 
	}
}


//링크시 점선 없애기
function bluring(){
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;


// png 이미지
function setPng24(obj) { 
    obj.width=obj.height=1; 
	obj.style.width = obj.width + "px"; 
    obj.style.height = obj.height + "px"; 
    obj.className=obj.className.replace(/\bpng24\b/i,''); 
    obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');" 
    obj.src='/images/blank.gif';  
    return ''; 
} 



