jQuery(function($) {

	// ロールオーバー (透明度変え版)
	$('.fadeover').fadeOver();
	
	// ロールオーバー
	$('.rollover').rollOver();
	
	// ナビゲーション
	$('.navigation li').navigation({
		imgPostfixIn:"_on"
	});
		
	// スムーズスクロール
	$('#pagetop a').smoothLink();

	// 高さを揃える
	$('.alignHeights').alignHeights();

    // スライド
	$('#itemSlide').flipSlide({
		bodies	: '#itemList li',
		nextButton		: '#slideR',
		prevButton		: '#slideL',
		speed			: 1500,
		interval		: 5000
	});
	// boxTarget
	$('table.boxTarget tr').boxTarget();

	//imageover
	if(! jQuery.support.opacity){
		$(".imageover").find("span").css("display","none");
		$(".imageover").hover(function(){
			$(this).find("span").css("display","block");
			$(this).find("span").stop().animate({
				//opacity:1,
				marginTop:-30,
				marginLeft:-30
			},500, 'easeOutBack');
		},function(){
			$(this).find("span").css("display","none");
			$(this).find("span").stop().animate({
					marginTop:0,
					marginLeft:0
			});
		});
	}else{
		$(".imageover").find("span").css({opacity:0}).show();
		$(".imageover").hover(function(){
			$(this).find("span").stop().animate({
				opacity:1,
				marginTop:-30,
				marginLeft:-30
			},500, 'easeOutBack');
		},function(){
			$(this).find("span").stop().animate({
				opacity:0
			},300,"linear",function(){
				$(this).animate({
					marginTop:0,
					marginLeft:0
				});
			});
		});
	}

	//imageover nav
	if(! jQuery.support.opacity){
		$(".navover").find("span").css("display","none");
		$(".navover").hover(function(){
			$(this).find("span").css("display","block");
			$(this).find("span").stop().animate({
				//opacity:1,
				marginBottom:-5,
				//marginLeft:-5
			},500, 'easeOutBack');
		},function(){
			$(this).find("span").css("display","none");
			$(this).find("span").stop().animate({
					marginBottom:0,
					//marginLeft:0
			});
		});
	}else{
		$(".navover").find("span").css({opacity:0}).show();
		$(".navover").hover(function(){
			$(this).find("span").stop().animate({
				opacity:1,
				marginBottom:-5,
				//marginLeft:-5
			},500, 'easeOutBack');
		},function(){
			$(this).find("span").stop().animate({
				opacity:0
			},300,"linear",function(){
				$(this).animate({
					marginBottom:0,
					//marginLeft:0
				});
			});
		});
	}
});

