if(typeof fjCatchImages == 'undefined'){
	var fjCatchImages = [];
}

$(function(){
	// HTMLドキュメントがロードされ次第、画像の読み込みを待たずに実行したいコードはここに書きます
	//alert("load!!!!!");

	var target1 = $("#catch1");
	var target2 = $("#catch2");

	var cm = new FJ.CatchImg(fjCatchImages, target1, target2);
	cm.init();
	
	var catchTimer = setTimeout(
							function(){
								
								target1.fadeOut("slow");
								target2.fadeIn("slow");
								//target2.style.visibility = "visible";
							},
							 3000
   					);

});

if(typeof FJ == 'undefined') var FJ = function(){};
//===============================================================
/**
 * 
 * @description  
 * @author       
 * @version      0.1 [2007/10/05]
 * @see          jquery.js
 */
//===============================================================
FJ.CatchImg = function(imgs, target1, target2){
	this.aImg = imgs;
	this.target1 = target1;
	this.target2 = target2;
	return this;
};

FJ.CatchImg.prototype.init = function(){
	var nImg = Math.round(Math.random()*(this.aImg.length-1));
	//this.target1.innerHTML = '<img src="'+this.aImg[nImg]+'" />';
	this.target1.html('<img src="'+this.aImg[nImg]+'" />');
	this.target1.show();
	this.target2.hide();
}

