// JavaScript Document

$(document).ready(function(){
	$("#btn_gotomyblog").hover(
							 function(){
								 $(this).attr("src","templates/images/btn_gotomyblog_hover.gif");
								 },
							 function(){
								 $(this).attr("src","templates/images/btn_gotomyblog_normal.gif");
								 } 
							 );			   
						   
	$("#btn_postanewblog").hover(
							 function(){
								 $(this).attr("src","templates/images/btn_postanewblog_hover.gif");
								 },
							 function(){
								 $(this).attr("src","templates/images/btn_postanewblog_normal.gif");
								 } 
							 );	
	$("#btn_gotoallblog").hover(
							 function(){
								 $(this).attr("src","templates/images/btn_gotoallblog_hover.gif");
								 },
							 function(){
								 $(this).attr("src","templates/images/btn_gotoallblog_normal.gif");
								 } 
							 );	
	$(".blog_list_table tr").hover(
								function(){
									$(this).css("background","#efefef");
									},
								function(){
									$(this).css("background","#fff");
									}
								);
	$("input[@name='add']").hover(
								function(){
									$(this).attr("src","templates/images/btn_add_hover.gif");
									},
								function(){
									$(this).attr("src","templates/images/btn_add_normal.gif");
									}
								);
						   
	$(".btn_last").hover(
								function(){
									$(this).attr("src","templates/images/btn_last_hover.gif");
									},
								function(){
									$(this).attr("src","templates/images/btn_last_normal.gif");
									}
								);						   
	$("#btn_seelist").hover(
								function(){
									$(this).attr("src","templates/images/btn_seelist_hover.gif");
									},
								function(){
									$(this).attr("src","templates/images/btn_seelist_normal.gif");
									}
								);					   
						   
	$(".temp_submit").hover(
								function(){
									$(this).attr("src","templates/images/temp_submit_hover.gif");
									},
								function(){
									$(this).attr("src","templates/images/temp_submit.gif");
									}
								);	
	$(".temp_cancel").val("").css({
							border: "none", background: "url(templates/images/temp_cancel.gif)", width: "86px", height: "26px",
							cursor:"pointer"
						  });
	$(".temp_cancel").hover(
								function(){
									$(this).css({
												border: "none", background: "url(templates/images/temp_cancel_hover.gif)"
												
												});
									},
								function(){
									$(this).css({
												border: "none", background: "url(templates/images/temp_cancel.gif)"
												
												});
									}
								);
						   
	$("li.game").hover(
								function(){
									$(".footer_sub_nav").css({
												
												display: "block"
												
												});
									},
								function(){
									$(".footer_sub_nav").css({
												display: "none"
												
												});
									}
								);	
	$("li.gameCurrent").hover(
								function(){
									$(".footer_sub_nav").css({
												
												display: "block"
												
												});
									},
								function(){
									$(".footer_sub_nav").css({
												display: "none"
												
												});
									}
								);
	$(".footer_sub_nav").hover(
								function(){
									$(".footer_sub_nav").css({
												
												display: "block"
												
												});
									},
								function(){
									$(".footer_sub_nav").css({
												
												display:"none"
												});
									}
								);					   
						   
						   
	$("#player").css({display: "block"});	
	
	$("#closer").css({cursor: "pointer"}).click(
								 function(){
									 	$("#ad").fadeOut();$("#flash_box").css({opacity:"1.0",filter:"alpha(opacity=100)"});
									 }
								 );
						   
	$(function(){
			   $("#flash_box").css({opacity:"0.3",filter:"alpha(opacity=30)"});});
						   
						   
						   
						   
						   
						   
						   
						   
						   
						   
						   
						   
						   
});
function swap(){$("#ad").fadeOut();$("#flash_box").css({opacity:"1.0",filter:"alpha(opacity=100)"});}
	window.setTimeout(swap,15000);
	

//¸¡³öPNGÍ¼Æ¬Ð§¹û
$(document).ready(
function(){
	// broswer deteminer
	var bMs=navigator.appVersion.split("MSIE");     
	var bBw=parseFloat(bMs[1]);
	if ((bBw>=5.5)&&(bBw<7)&&(document.body.filters))
	{
		// unsupportable
	}else{
		// fnGetPosition
		function fnGetPosition(obj)
		{
			if(typeof(obj)!="object") var obj=document.getElementById(obj);
			var position=new Object();
			position.x=obj.offsetLeft;
			position.y=obj.offsetTop;
			while(obj=obj.offsetParent)
			{
				position.x+=obj.offsetLeft;
				position.y+=obj.offsetTop;
			}
			return position;
		}
		// object binding
		$("img.frame_77").bind("mouseenter",function()
		{
			var sX=fnGetPosition($(this).get(0)).x;
			var sY=fnGetPosition($(this).get(0)).y;
			$('img.focus').remove();
			$("<img src='templates/images/frame.png' class='focus' style='position:absolute;display:none' onmouseout='$(this).remove()'/>").insertAfter(this);
			$("img.focus").css({'left':sX + 'px', 'top':sY + 'px'}).fadeIn(200);
		});
		
		$("img.frame_296").bind("mouseenter",function()
		{
			var sX=fnGetPosition($(this).get(0)).x;
			var sY=fnGetPosition($(this).get(0)).y;
			$('img.focus').remove();
			$("<img src='templates/images/frame2.png' class='focus' style='position:absolute;display:none' onmouseout='$(this).remove()'/>").insertAfter(this);
			$("img.focus").css({'left':sX + 'px', 'top':sY + 'px'}).fadeIn(200);
		});
	}
});




