$(document).ready(function(){
	$("#t01:hidden").show();
	$("#t02:visible").hide();
	$("#t03:visible").hide();
	$("#t04:visible").hide();
	$("#t05:visible").hide();	
	
	var myVar
	var i=2;
	function hid()
	{
		$("#img01").attr({ src: "images/index_r14_c3.jpg"});
		$("#img02").attr({ src: "images/index_r14_c7.jpg"});
		$("#img03").attr({ src: "images/index_r14_c5.jpg"});
		$("#img04").attr({ src: "images/index_r14_c9.jpg"});
		$("#img05").attr({ src: "images/index_r14_c11.jpg"});
		
		$("#t01:visible").hide();
		$("#t02:visible").hide();
		$("#t03:visible").hide();
		$("#t04:visible").hide();
		$("#t05:visible").hide();
	}
	
	function showhid()	
	{
		if(i>5) i=1;
		var showId="#img0"+i;
		var showT="#t0"+i+":hidden";
		hid();
		$(showId).attr({ src: "images/t"+i+".jpg"});
		$(showT).show();
		i+=1;		
	}
	myVar=setInterval(showhid,3000);
	//===============================================================================
	$("#img01").mouseover(function(){
		clearInterval(myVar);
		hid();
		$("#img01").attr({ src: "images/t1.jpg"});
		$("#t01:hidden").show();
	});
	
	$("#img01").mouseout(function(){
		i=2
		myVar=setInterval(showhid,3000);
	});
	
	//===============================================================================	
	$("#img02").mouseover(function(){
		clearInterval(myVar);
		hid();
		$("#img02").attr({ src: "images/t2.jpg"});
		$("#t02:hidden").show();
	});
	
	$("#img02").mouseout(function(){
		i=3;
		myVar=setInterval(showhid,3000);
	});
	
	//===============================================================================	
	$("#img03").mouseover(function(){
		clearInterval(myVar);
		hid();
		$("#img03").attr({ src: "images/t3.jpg"});
		$("#t03:hidden").show();
	});
	
	$("#img03").mouseout(function(){
		i=4;
		myVar=setInterval(showhid,3000);
	});
	
	//===============================================================================	
	$("#img04").mouseover(function(){
		clearInterval(myVar);
		hid();
		$("#img04").attr({ src: "images/t4.jpg"});
		$("#t04:hidden").show();
	});
	
	$("#img04").mouseout(function(){
		i=5;
		myVar=setInterval(showhid,3000);
	});
	
	//===============================================================================	
	$("#img05").mouseover(function(){
		clearInterval(myVar);
		hid();
		$("#img05").attr({ src: "images/t5.jpg"});
		$("#t05:hidden").show();
	});	
	
	$("#img05").mouseout(function(){
		i=1;
		myVar=setInterval(showhid,3000);
	});	
});