// JavaScript Document

var total_divs=0; //do not change this. it will be calculated automatically
var className='fadeThis'; //name of your class assigned to the divs you would like to rotate. Need to change it
$(document).ready(function(){
	$("."+className).attr("id", function (arr) {
		total_divs++;
		return "fade" + (arr+1);
	})
	fadeEngine(0);
});

function fadeEngine(x) {
	var y=x;
	if(x==total_divs) y=1; else y++;
	$("#fade"+x).fadeOut(2000);
	$("#fade"+y).fadeIn(2000);
	setTimeout('fadeEngine('+y+')',7000);
}
