// JavaScript Document
$(document).ready(function(){	homeHeroFader('#header');	});
var homeHeroFader = function(eleStr){
	var el=$(eleStr), i=1, total=6;
	for (var q=2;q<=total;q++) {
		el.children('#hd'+q).hide();
	}
	homeHeroInt(el,i,total);
}

var homeHeroInt = function(el,i,total){
	el.stopTime();
	el.oneTime(7500, "fadeThrough"+i, function() { // This was using everyTime, but it would degrade after time. (Probably due to the fadeTo delays)
		j=i;	i++;	if(i>total){i=1}
		el.children('#hd'+i).fadeIn(500,function(){el.children('#hd'+j).fadeOut(500)});
		homeHeroInt(el,i,total);
	});
}

