window.addEvent('domready',function() {
	var slideDuration = 8000;
	var theDiv = $('headerImageSlideShow');
	var imgs = theDiv.getElements('img').setStyle('top',0);;
	var thisIndex = 0;
	var interval;
	imgs.shuffle();
	imgs.each(function(img,i){ 
		if(i > 0) {
			img.setStyle('opacity',0);
		}
	});
	var show = function() {
		imgs[thisIndex].fade('out');
		imgs[thisIndex = thisIndex < imgs.length - 1 ? thisIndex+1 : 0].fade('in');
	};
	window.addEvent('load',function(){
		interval = show.periodical(slideDuration);
	});
});
