$(function() {
//各種スイッチ
var g = 0;
var r = 0;
var o = 0;
$('#AllG').click(function(){if(g==0){
	$("#TopColumns .BoxG,#TopColumns .BoxAG,#TopColumns .BoxMG,#TopColumns .BoxMG2").animate({backgroundColor:"#1f3225"}, 500);
    $("#TopColumns .BoxG .BoxIn a,#TopColumns .BoxAG .BoxIn a,#TopColumns .BoxMG .BoxIn a,#TopColumns .BoxMG2 .BoxIn a").animate({color: "#ffffff"}, 300);
	g = 1;
	}else{
	$("#TopColumns .BoxG,#TopColumns .BoxAG,#TopColumns .BoxMG,#TopColumns .BoxMG2").animate({backgroundColor:"#ffffff"}, 500);
    $("#TopColumns .BoxG .BoxIn a,#TopColumns .BoxAG .BoxIn a,#TopColumns .BoxMG .BoxIn a,#TopColumns .BoxMG2 .BoxIn a").animate({color: "#555555"}, 300);
	g = 0;
	}
	});

$('#AllR').click(function(){if(r==0){
	$("#TopColumns .BoxR,#TopColumns .BoxMR").animate({backgroundColor:"#a40000"}, 500);
    $("#TopColumns .BoxR .BoxIn a,#TopColumns .BoxMR .BoxIn a").animate({color: "#ffffff"}, 300);
	r = 1;
	}else{
	$("#TopColumns .BoxR,#TopColumns .BoxMR").animate({backgroundColor:"#ffffff"}, 500);
    $("#TopColumns .BoxR .BoxIn a,#TopColumns .BoxMR .BoxIn a").animate({color: "#555555"}, 300);
	r = 0;
	}
	});

$('#AllO').click(function(){if(o==0){
	$("#TopColumns .BoxAO").animate({backgroundColor:"#eb6100"}, 500);
    $("#TopColumns .BoxAO .BoxIn a").animate({color: "#ffffff"}, 300);
	o = 1;
	}else{
	$("#TopColumns .BoxAO").animate({backgroundColor:"#ffffff"}, 500);
    $("#TopColumns .BoxAO .BoxIn a").animate({color: "#555555"}, 300);
	o = 0;
	}
	});

//カラム内テキストロールオーバー
$('#TopColumns .BoxIn a').hover(function() {
	$(this).stop().css({'color':'#000000','width':'100%','backgroundColor':'#eeeeee'})},function() {
	$(this).css({'color':'#ffffff','width':'100%','backgroundColor':'transparent'})
});

//カラム内テキストロールオーバー
$('#TxtContentNavi a').hover(function() {
	$(this).stop().animate({'backgroundPosition':'0'},100)},function() {
	$(this).stop().animate({'backgroundPosition':'-200px'},150)
});

//背景色のみ変更パターン
$('#TopColumns .BoxG').hover(function() {
                $(this).stop().animate({backgroundColor:"#1f3225"}, 500);
                $($(this).find(".BoxIn a")).stop().animate({color: "#ffffff"}, 300);
                },function() {
                $(this).stop().animate({backgroundColor:"#ffffff" }, 500);
                $($(this).find(".BoxIn a")).stop().animate({color: "#555555"}, 300);
                });

$('#TopColumns .BoxR').hover(function() {
                $(this).stop().animate({backgroundColor:"#a40000"}, 500);
                $($(this).find(".BoxIn a")).stop().animate({color: "#ffffff"}, 300);
                },function() {
                $(this).stop().animate({backgroundColor:"#ffffff" }, 500);
                $($(this).find(".BoxIn a")).stop().animate({color: "#555555"}, 300);
                });

//背景色と写真png重ねパターン
$('#TopColumns .BoxAG').hover(function() {
                $(this).stop().animate({backgroundColor:"#1f3225"}, 500);
                $($(this).find(".BoxIn a")).stop().animate({color: "#ffffff"}, 300);			
                $($(this).find("img.vidual")).stop().animate({height:"265px"}, 500,"easeOutBounce");
                },function() {
                $(this).stop().animate({backgroundColor:"#ffffff" }, 500);
                $($(this).find(".BoxIn a")).stop().animate({color: "#555555"}, 300);			
                $($(this).find("img.vidual")).stop().animate({height:"1px"}, 300);
                });


$('#TopColumns .BoxAO').hover(function() {
                $(this).stop().animate({backgroundColor:"#eb6100"}, 500);
                $($(this).find(".BoxIn a")).stop().animate({color: "#ffffff"}, 300);			
                $($(this).find("img.vidual")).stop().animate({height:"265px"}, 500,"easeOutBounce");
                },function() {
                $(this).stop().animate({backgroundColor:"#ffffff" }, 500);
                $($(this).find(".BoxIn a")).stop().animate({color: "#555555"}, 300);			
                $($(this).find("img.vidual")).stop().animate({height:"1px"}, 300);
				o = 0;
                });

//背景色と写真移動パターン
$('#TopColumns .BoxMG').hover(function() {
				$(this).stop().animate({backgroundColor:"#1f3225"}, 500);
                $($(this).find(".BoxIn a")).stop().animate({color: "#ffffff"}, 300);			
                for(var i=0; i<50; i++){$($(this).find(".backv"))
				.animate({"left":"-198px"},1000).delay(1000)
				.animate({"left":"-396px"},1000).delay(1000)
				.animate({"left":"0px"},0)
				}
                },function() {
                $(this).stop().animate({backgroundColor:"#ffffff" }, 500);
                $($(this).find(".BoxIn a")).stop().animate({color: "#555555"}, 300);			
                $("#TopColumns .MovArea .backv").queue([]).stop().animate({"left":"0"}, 300);
                });
				
$('#TopColumns .BoxMG2').hover(function() {
				$(this).stop().animate({backgroundColor:"#1f3225"}, 500);
                $($(this).find(".BoxIn a")).stop().animate({color: "#ffffff"}, 300);			
                for(var i=0; i<50; i++){$($(this).find(".backv"))
				.animate({"left":"-198px"},1000).delay(1000)
				.animate({"left":"-396px"},1000).delay(1000)
				.animate({"left":"-594px"},1000).delay(1000)
				.animate({"left":"0px"},0)
				}
                },function() {
                $(this).stop().animate({backgroundColor:"#ffffff" }, 500);
                $($(this).find(".BoxIn a")).stop().animate({color: "#555555"}, 300);			
                $("#TopColumns .MovArea .backv").queue([]).stop().animate({"left":"0"}, 300);
                });
				
$('#TopColumns .BoxMR').hover(function() {
				$(this).stop().animate({color: "#ffffff",backgroundColor:"#a40000"}, 500);
                $($(this).find(".BoxIn a")).stop().animate({color: "#ffffff"}, 300);			
                for(var i=0; i<50; i++){$($(this).find(".backv"))
				.animate({"left":"-198px"},1000).delay(1000)
				.animate({"left":"-396px"},1000).delay(1000)
				.animate({"left":"-594px"},1000).delay(1000)
				.animate({"left":"-792px"},1000).delay(1000)
				.animate({"left":"0px"},0)
				}
                },function() {
                $(this).stop().animate({backgroundColor:"#ffffff" }, 500);
                $($(this).find(".BoxIn a")).stop().animate({color: "#555555"}, 300);			
                $("#TopColumns .MovArea .backv").queue([]).stop().animate({"left":"0"}, 300);
                });



});

