$(document).ready( function () { 
	if(typeof(animate_ind)!="undefined"){
		$(".rotateImg").not("#cntImg"+animate_ind).css("display", "none");
		animate_count = $(".rotateImg").length;
		setTimeout(rotateImages, animate_period);
	}
});

function rotateImages()
{
	curent = $("#cntImg"+animate_ind);
	animate_ind++;

	if (animate_ind > animate_count)
	{
		animate_ind = 1;
	};
	next = $("#cntImg"+animate_ind);
	curent.fadeOut(animate_speed);
	next.fadeIn(animate_speed);

	setTimeout(rotateImages, animate_period);
}
