	
	//スライド　文字スライドイン　バージョン
	function moveImage(){
		
		var t= $("#sliderContent .count_on").val();
		var s = eval(t-(-1));
			
		//文字ウインドウを消す。動きがかぶらないようにコールバック関数を入れている。
		$("#sliderContent").find("li").eq(t).find("span").animate({bottom:"-100px"},1000,"easeInOutExpo",function(){
			$(this).hide(function(){
			
					if(t==2){
						s = 0
						
						//最後のパネルの動作を調整する。
						$("#sliderContent").find("li").eq(s).css({position:"absolute",marginLeft:"650px"});
						}
			
				$("#sliderContent").find("li").eq(s).find("span").show();
				$("#sliderContent").find("li").eq(t).animate({marginLeft:"660px"},1000,function(){$(this).css({marginLeft:"0px"}).hide()});
				$("#sliderContent").find("li").eq(s).find("span").css({bottom:"-100px"});
				$("#sliderContent").find("li").eq(s).show().css({position:"absolute",marginLeft:"-660px"}).animate({marginLeft:"0px"},1000,function(){
						//文字ウインドウをアニメーションさせる。
							$("#sliderContent").find("li").eq(s).find("span").css({bottom:"-100px"}).show().animate({bottom:"0px"},1000,"easeInOutExpo");
						//画像番号のカウント用数値を格納する。
							$("#sliderContent .count_on").val(s)
					});
			});
		});
		var timerID  = setTimeout("moveImage()",8000);
	}
	
	
		
	//フェイドインアウト　文字スライドイン　バージョン
	function fadeInImage_slide(){
		
		var t= $("#sliderContent .count_on").val();
		var s = eval(t-(-1));
			
		//文字ウインドウを消す。動きがかぶらないようにコールバック関数を入れている。
		$("#sliderContent").find("li").eq(t).find("span").animate({bottom:"-100px"},1000,"easeInOutExpo",function(){
			$(this).hide(function(){
			
					if(t==2){
						s = 0
						
						//最後のパネルの動作を調整する。
						$("#sliderContent").find("li").eq(s).css({position:"absolute",marginLeft:"650px"});
						}
			
				$("#sliderContent").find("li").eq(s).find("span").show();
				$("#sliderContent").find("li").eq(t).fadeOut(1050,function(){$(this).css({marginLeft:"0px"}).hide()});
				$("#sliderContent").find("li").eq(s).find("span").css({bottom:"-100px"});
				$("#sliderContent").find("li").eq(s).css({position:"absolute",marginLeft:"0px"}).fadeIn(1000,function(){
						//文字ウインドウをアニメーションさせる。
							$("#sliderContent").find("li").eq(s).find("span").css({bottom:"-100px"}).show().animate({bottom:"0px"},1000,"easeInOutExpo");
						//画像番号のカウント用数値を格納する。
							$("#sliderContent .count_on").val(s)
					});
			});
		});
		var timerID  = setTimeout("fadeInImage()",8000);
	}
	
	
	//フェイドインアウト　文字フェイドイン　バージョン
	function fadeInImage(){
		
		var t= $("#sliderContent .count_on").val();
		var s = eval(t-(-1));
		var timer_interval = 8000;
			
		//文字ウインドウを消す。動きがかぶらないようにコールバック関数を入れている。
		$("#sliderContent").find("li").eq(t).find("span").fadeOut(timer_interval/8,function(){
			$(this).hide(function(){
					if(t==2){
						s = 0
						}
				$("#sliderContent").find("li").eq(t).fadeOut(timer_interval/8,function(){$(this).css({marginLeft:"0px"}).hide()
				$("#sliderContent").find("li").eq(s).css({position:"absolute",marginLeft:"0px"}).fadeIn(timer_interval/8,function(){
						//文字ウインドウをアニメーションさせる。
							$("#sliderContent").find("li").eq(s).find("span").css({bottom:"0px"}).fadeIn(timer_interval/8);
						//画像番号のカウント用数値を格納する。
							$("#sliderContent .count_on").val(s)
					});
					
				});
			});
		});
		
		
		var timerID  = setTimeout("fadeInImage()",timer_interval);
	}
	
	//ラウンド　文字スライドイン　バージョン
	function roundImage(){
		
		$("#slider").css({overflow:"visible"});
		
		
		var t= $("#sliderContent .count_on").val();
		var s = eval(t-(-1));

			
		//文字ウインドウを消す。動きがかぶらないようにコールバック関数を入れている。
		$("#sliderContent").find("li").eq(t).find("span").animate({bottom:"-100px"},1000,"easeInOutExpo",function(){
			$(this).hide(function(){
			
					if(t==2){
						s = 0
						}
			
				$("#sliderContent").find("li").eq(s).find("span").show();
				//現在の画像
				$("#sliderContent").find("li").eq(t).animate({left:"180px",width:"500px",top:"20px",zIndex:"0",opacity:"0.8"},300,"easeInCubic",function(){
						$(this).animate({left:"80px",width:"320px",top:"30px",zIndex:"0",opacity:"0.6"},500,"easeOutCubic").css({marginLeft:"0px"}).hide()
					});
					
				$("#sliderContent").find("li").eq(s).find("span").css({bottom:"-100px"});
				
				//次の画像
				$("#sliderContent").find("li").eq(s).css({marginLeft:"0px",width:"320px",top:"30px",left:"20px",opacity:"0.95"}).show().stop(true,true).animate({
						left:"-120px",width:"600px",top:"20px",zIndex:"3"
					},300,"easeInCubic",function(){
							$(this).animate({left:"0px",width:"660px",top:"0px",zIndex:"3",opacity:"1"},500,"easeOutCubic",function(){
						//文字ウインドウをアニメーションさせる。
							$("#sliderContent").find("li").eq(s).find("span").css({bottom:"-100px"}).show().animate({bottom:"0px"},1000,"easeInOutExpo");
						//画像番号のカウント用数値を格納する。
							$("#sliderContent .count_on").val(s)
						});
					});
			});
		});
		var timerID  = setTimeout("roundImage()",8000);
	}
	
	
	
	
	//ロード時の動きを制御。これが無いと最初のスライドが飛ばされる形になる。
	function moveImage_load(){
		var movie_type = $("#sliderContent").attr("class");
		$("#sliderContent").find("li").eq(0).fadeIn(1000,function(){
//				$("#sliderContent").find("li").eq(0).find("span").show().css({bottom:"-100px"}).animate({bottom:"0px"},1000,"easeInOutExpo");//easeOutBounce
				$("#sliderContent").find("li").eq(0).find("span").css({bottom:"0px"}).fadeIn(2000);//easeOutBounce
			});
//		var timer2 = setTimeout("moveImage()",5000);
//		var timer2 = setTimeout("roundImage()",5000);
		var timer2 = setTimeout("fadeInImage()",5000);
//		var timer2 = setTimeout( movie_type  + "()",5000);
	}



/***************************************************************************************/
//自作ムービー処理スタート
/***************************************************************************************/	
$(function(){
			
		//　とりあえずはJSで処理するが後でHTMLに書き直す
		
		//$("li.fixed_menu_sub").eq(4).prepend('<a id="movie_type_change">ムービータイプチェンジ</a>');
		
		//$("#movie_type_change").click(function(){
		//	$("#sliderContent").removeClass().addClass("fadeInImage");
		//	moveImage_load();
		//});
		
		$("#sliderContent").addClass("fadeInImage");
		$("#sliderContent li").css({overflow:"hidden"});
		
		var count_box = '<input id="count_box" class="count_on" style="position:absolute;display:none" type="text" value="0">';
		
		$("#sliderContent li").css({display:"none"});
		
		$("#sliderContent").find("li").css({position:'absolute'});
		$("#sliderContent").find("li").slice(1).css({marginLeft:"-650px"});
		$("#sliderContent").prepend(count_box);
		$("#sliderContent").find("li").find("span").css({opacity:'0.8',bottom:"-100px"});
		//$("#count_box").removeClass();
		//$("#count_box").addClass("count_on");
			//ムービー関数の呼び出し
			moveImage_load();
		
		//ムービーをとめる
		$("#sliderContent").find("li").hover(function(){
			$("#count_box").removeClass();
		},function(){
			$("#count_box").addClass("count_on");
		});
});//jquery

