$(document).ready(function() {
		setTimeout(scrollTo, 0, 0, 1);
    // GlobalNavigation
    	$("#topmenu_nav ul li").mouseenter(function(){
        	$("#header #s_submenu").stop(true, true).fadeIn(200);	
    		$("#header .smenu01").stop(true, true).fadeIn(500);
    		$("#header .smenu02").stop(true, true).fadeIn(500);
    		$("#header .smenu03").stop(true, true).fadeIn(500);
    		$("#header .smenu04").stop(true, true).fadeIn(500);
    		$("#header .smenu05").stop(true, true).fadeIn(500);
		});
	$(".m_location").mouseleave(function(){
		$("#header .smenu01").stop(true, true).fadeOut(100);
		$("#header .smenu02").stop(true, true).fadeOut(100);
		$("#header .smenu03").stop(true, true).fadeOut(100);
		$("#header .smenu04").stop(true, true).fadeOut(100);
		$("#header .smenu05").stop(true, true).fadeOut(100);
		$("#header #s_submenu").stop(true, true).fadeOut(400);	
		});
	// submenu mouserollover
	 $(".m_location li ul li a").each(function(){
		  
		  var image = $(this).children("img");
		  var imgsrc = $(image).attr("src");     //attr 속성의 값을 가져온다.
		  
		  //add mouseOver
		  $(this).mouseover(function(){
		   var on = imgsrc.replace(/_off.gif/,"_on.gif");   //앞에 문자열을 뒤에 문자열로 변환
		   $(image).attr("src",on);                 //attr 속성의 값을 변경
		  });
		  
		    //add mouseOut
		  $(this).mouseout(function(){
		   var off = imgsrc.replace(/_on.gif/,"_off.gif");
		   $(image).attr("src",off);
		  });
		  
		  //add mouseDown
		  //$(this).mousedown(function(){
		  // var dn = imgsrc.replace(/_off.gif/,"_b.gif");
		  // $(image).attr("src",dn);
		  //});

		 });
	// submenu mouserollover
	 $(".leftmenu_over ul li a").each(function(){
		  
		  var image = $(this).children("img");
		  var imgsrc = $(image).attr("src");     //attr 속성의 값을 가져온다.
		  
		  //add mouseOver
		  $(this).mouseover(function(){
		   var on = imgsrc.replace(/_off.gif/,"_on.gif");   //앞에 문자열을 뒤에 문자열로 변환
		   $(image).attr("src",on);           
		  });
		  
		    //add mouseOut
		  $(this).mouseout(function(){
		   var off = imgsrc.replace(/_on.gif/,"_off.gif");
		   $(image).attr("src",off);
		  });
		  
		  //add mouseDown
		  //$(this).mousedown(function(){
		  // var dn = imgsrc.replace(/_off.gif/,"_b.gif");
		  // $(image).attr("src",dn);
		  //});

		 });
	 
	 $("#newsletter_div img").click(function(){
		 $("#regist_letter").css("cursor", "pointer"); 
			$("#regist_letter").show(500);
			 $("#regist_letter").css("display", "block"); 
			});
	 
	 $("#news_close").click(function(){
		 $("#regist_letter").css("cursor", "pointer"); 
			$("#regist_letter").hide(500);
			 $("#regist_letter").css("display", "none"); 
			}); 
	 /*
	 	$("#tab_btm a").each(function(){
		  
			  var image = $(this).children("img");
			  var imgsrc = $(image).attr("src");     //attr 속성의 값을 가져온다.
			  
			  //add mouseOver
			  $(this).mouseover(function(){
			   var on = imgsrc.replace(/_off.gif/,"_over.gif");   //앞에 문자열을 뒤에 문자열로 변환
			   $(image).attr("src",on);           
			  });
			  
			    //add mouseOut
			  $(this).mouseout(function(){
			   var off = imgsrc.replace(/_on.gif/,"_over.gif");
			   $(image).attr("src",off);
			  });
			  

		 });
	 */
	 
});

