$(function(){
	
	//#######トップページ用######
	(function(){
		//マウスオーバー
		$(".navigation")
			.find("a")
				.hover(function(){
					$(this)
					.animate({
						backgroundColor:"#231815"
					},120)
					.css({color:"#ffffff"});;
				},function(){
					$(this)
					.animate({
						backgroundColor:"#ffffff"
					},120)
					.css({color:"#2a292a"});
				})
			.end()
			.animate({
				opacity:1
			},1000);
			
		/*$("#right-logo img").attr("src","/images/big_logo.jpg").load(function(){
			$(this).animate({
				marginLeft:0+"px"
			},{
				easing:"easeOutBounce",
				duration:1000
			});
		});*/
		
		$("<img>")
			.attr("src","/images/big_logo.jpg")
			.appendTo("#right-logo")
			.load(function(){
				$(this).animate({
					marginLeft:0+"px"
				},{
					easing:"easeOutBounce",
					duration:1000
				});
			});
	})();
	
	
	//#######リリース情報用######
	(function(){
		var flag=1;
		var h=$("#archive ul").height();
		var l=$("#archive ul li").length;
		var H=(l*h)+l;
		
		$("#archive ul").click(function(){
			if(flag==1){
				$(this).animate({
					height:H+"px"
				},{
					easing:"easeOutBounce",
					duration:700
				});
				flag=-flag;
			}else{
				$(this).animate({
					height:h+"px"
				},{
					easing:"easeOutBounce",
					duration:300
				});
				flag=-flag;
			}
		});
	})();
});

window.onload = function(){
	var contents = $("#right-side-inner").height();
	var logo = $("#right-logo").height();

	if(copyright_flag==0){
		$("#copyright").css("position","static");
	}else{
		if(contents>logo){
			$("#left-side-inner").css("height",contents+"px");
		}else{
			$("#left-side-inner").css("height",logo-50+"px");
		}
	}
}
