$(function() {
	//ロールオーバー
	$.fadeRollover();

	$(".fadeImg").hover(function(){
		$(this).queue([]);
		$(this).fadeTo("fast", 0.4);
	},function(){
		$(this).queue([]);
		$(this).fadeTo("normal", 1.0); 
	}); 

	//スクロール
	$("a[href*='#']").slideScroll({
		interval:20,
		easing:1.5
	});
	
	//ライトボックス
  $("a[rel^='prettyPhoto']").prettyPhoto({
		showTitle:false
	});

	$('img.bgmaximage').maxImage({
		isBackground: true,
		overflow: 'auto',
		verticalAlign:'top',
		onImageShow: function(){
			fullBg();
		},
		minImgWidth: "950"
 	});

	$(window).resize(function(){
		fullBg();
	});

	function fullBg()
	{
		var h = $('img.bgmaximage').height()
		var w = $('img.bgmaximage').width()
		var x , y , j , t
		if(h != null && w != null)
		{
			h = $("#content").height();
			j = $("#main p");
			y = ($("#content").height() - 350) / 2;
			j.css({top: y +"px"});
		}
	}
});



