
//nav
$(function(){
	$(".contents").hide();
	//$("#news").show();
	//$("h2.news a").css("color","#4dac26");
	$("nav#main h2 a").click(function(){
		var nameId = $(this).attr("href");
		var cssValue = $(nameId).css("display");
		$("#main_image").fadeOut();
		if( cssValue == "block"){
		$("nav#main .contents").slideUp("normal","easeOutExpo");
		$(this).removeAttr("style");
		$("#main_image").fadeIn();
		$(this).parent().stop().animate({width: "230px"});
		}else{
			$(".contents").slideUp("normal","easeOutExpo");
			$("nav#main h2").stop().animate({width: "230px"});
			$(nameId).slideDown("normal","easeOutExpo");
			$("nav#main h2 a").removeAttr("style");
			$(this).parent().stop().animate({width: "1020px"});
		}
		this.blur();
		return false;
	});
	
});

//showcase caption
$(function(){
	$("#loopslider ul li").hover(function(){
		$("a.caption",this).stop().animate({top : "1px"},"normal","easeOutExpo");
	},function(){
		$("a.caption",this).stop().animate({top : "-202px"},"normal","easeOutExpo");
	});
});




/*------------------------------------------------------------------------------------
	common
------------------------------------------------------------------------------------*/

//rollover
$(function(){
	$("img.ro").hover(function(){
			$(this).attr("src",$(this).attr("src").replace(".png", "_o.png"));
	},function(){
			$(this).attr("src",$(this).attr("src").replace("_o.png", ".png"));
	});
});



//mouseover
$(function(){
	$("img.mo").hover(function(){
		$(this).fadeTo(100,0.7);
	},function(){
		$(this).fadeTo(100,1);
	});
});


//popup
function popwin(url,w,h){
	p = "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no" + ",width=" +w+ ",height=" +h;
	win = window.open(url,"popwin",p);
	win.focus();
}












