    var rel=1;
	
	function animateImg(rel)
    {
		if (rel > $("#imageHome img").size()) {rel=1}        
		
		var anim1 = $("#imageHome img.on").animate(
						   {opacity: 0}
						   , 1000
						   ,function() {
							   $(this).removeClass("on");
							   $("#imageHome img[rel=" + rel + "]").addClass("on").css("opacity",0).animate({opacity: 1}, 1000);
								Loop = setTimeout(function() { animateImg(++rel) }, 5000);
								}
						   )
    }
	
$(function()
{	
    if ($("#imageHome img").size() > 1)
    {
		firstLoop = setTimeout(function() { animateImg(++rel) }, 5000);
    }
})
