/*プリロード*/
function preload(imgs){
 for(var i = 0; i < imgs.length; i++){
   var imgObj = new Image();
   imgObj.src = imgs[i];
 }
}
preload(["img/menu/audition_b2.jpg","img/menu/audition_b.jpg","img/flash/a1.jpg","img/flash/a2.jpg","img/flash/a3.jpg","img/flash/a4.jpg","img/flash/a5.jpg","img/flash/a6.jpg","img/flash/a7.jpg","img/flash/a8.jpg","img/flash/a9.jpg","img/flash/a10.jpg","img/flash/a11.jpg","img/flash/a12.jpg","img/flash/a13.jpg","img/flash/a14.jpg","img/flash/a15.jpg","img/flash/a16.jpg","img/flash/a17.jpg","img/flash/a18.jpg","img/flash/a19.jpg","img/flash/a20.jpg","img/flash/a21.jpg","img/flash/a22.jpg","img/flash/a23.jpg","img/flash/a24.jpg","img/flash/a25.jpg","img/flash/a26.jpg","img/flash/a27.jpg","img/flash/a28.jpg"]);


/*上部ナビ*/
$(function(){
     $('a img').hover(function(){
        $(this).attr('src', $(this).attr('src').replace('_off', '_o'));
          }, function(){
             if (!$(this).hasClass('currentPage')) {
             $(this).attr('src', $(this).attr('src').replace('_o', '_off'));
        }
   });
});

$(function(){
     $("#dd a").hover(function() {
        $(this).next("div").animate({opacity: "show"}, "fast");}, function() {
               $(this).next("div").animate({opacity: "hide"}, "fast");
     });
});

/*画像クロスオーバー*/
over = 400;
over2 = 10;
$(function(){
		$("#img1").animate({opacity : 1}, over2).animate({opacity:0}, over,
		function(){
		$("#img2").animate({opacity : 1}, over2).animate({opacity:0}, over, 
		function(){
		$("#img3").animate({opacity : 1}, over2).animate({opacity:0}, over, 
		function(){
		$("#img4").animate({opacity : 1}, over2).animate({opacity:0}, over, 
		function(){
		$("#img5").animate({opacity : 1}, over2).animate({opacity:0}, over, 
		function(){
		$("#img6").animate({opacity : 1}, over2).animate({opacity:0}, over, 
		function(){
		$("#img7").animate({opacity : 1}, over2).animate({opacity:0}, over, 
		function(){
		$("#img8").animate({opacity : 1}, over2).animate({opacity:0}, over, 
		function(){
		$("#img9").animate({opacity : 1}, over2).animate({opacity:0}, over, 
		function(){
		$("#img10").animate({opacity : 1}, over2).animate({opacity:0}, over, 
		function(){
		$("#img11").animate({opacity : 1}, over2).animate({opacity:0}, over, 
		function(){
		$("#img12").animate({opacity : 1}, over2).animate({opacity:0}, over, 
		function(){
		$("#img13").animate({opacity : 1}, over2).animate({opacity:0}, over, 
		function(){
		$("#img14").animate({opacity : 1}, over2).animate({opacity:0}, over);
		}
		);
		}
		);
		}
		);
		}
		);
		}
		);
		}
		);
		}
		);
		}
		);
		}
		);
		}
		);
		}
		);
		}
		);
		}
	);
});
$(function(){
		$("#img16").animate({opacity : 1}, over2).animate({opacity : 0}, over,
		function(){
		$("#img17").animate({opacity : 1}, over2).animate({opacity : 0}, over, 
		function(){
		$("#img18").animate({opacity : 1}, over2).animate({opacity : 0}, over, 
		function(){
		$("#img19").animate({opacity : 1}, over2).animate({opacity : 0}, over, 
		function(){
		$("#img20").animate({opacity : 1}, over2).animate({opacity : 0}, over, 
		function(){
		$("#img21").animate({opacity : 1}, over2).animate({opacity : 0}, over, 
		function(){
		$("#img22").animate({opacity : 1}, over2).animate({opacity : 0}, over, 
		function(){
		$("#img23").animate({opacity : 1}, over2).animate({opacity : 0}, over, 
		function(){
		$("#img24").animate({opacity : 1}, over2).animate({opacity : 0}, over, 
		function(){
		$("#img25").animate({opacity : 1}, over2).animate({opacity : 0}, over, 
		function(){
		$("#img26").animate({opacity : 1}, over2).animate({opacity : 0}, over, 
		function(){
		$("#img27").animate({opacity : 1}, over2).animate({opacity : 0}, over, 
		function(){
		$("#img28").animate({opacity : 1}, over2).animate({opacity : 0}, over, 
		function(){
		$("#img29").animate({opacity : 1}, over2).animate({opacity : 0}, over);
		}
		);
		}
		);
		}
		);
		}
		);
		}
		);
		}
		);
		}
		);
		}
		);
		}
		);
		}
		);
		}
		);
		}
		);
		}
	);
});

/*画像スクロール*/
$(document).ready(function() { 
	setTimeout("animation1()", 500);
});


$(document).ready(function() { 
	setTimeout("animation2()", 12000);
});

	function animation1(){
		caster1();
		narrator2();
	}

	function animation2(){
		reporter1();
		announcer1();
	}


	function caster1(){
     $("#caster1").animate({left:"+=1500px"},18000).animate({left:"-605px"}, 0)
     setTimeout("caster1()",15000);
	}
	function announcer1(){
     $("#announcer1").animate({left:"+=1800px"},12000).animate({left:"-900px"}, 0)
     setTimeout("announcer1()",5000);
	}
	function reporter1(){
     $("#reporter1").animate({left:"+=1700px"},15000).animate({left:"-800px"}, 0)
     setTimeout("reporter1()",18000);
	}
	function narrator2(){
     $("#narrator2").animate({left:"+=2500px"},20000).animate({left:"-1500px"}, 0)
     setTimeout("narrator2()",8000);
	}
	function narrator1(){
     $("#narrator1").animate({left:"+=2200px"},15000).animate({left:"-830px"}, 0)
     setTimeout("narrator1()",16000);
	}




