Array.implement({ 
	shuffle: function() { 
		//destination array 
		for(var j, x, i = this.length; i; j = parseInt(Math.random() * i), x = this[--i], this[i] = this[j], this[j] = x); 
		
		return this; 
	} 
});

window.addEvent('domready',function(){
	var h1 = $('hd').getElement('h1');
	
	header_images.shuffle().each(function(header_image,i,header_images){
		new Element('span', {
			'styles': {
				'background-image': 'url(img/head/'+header_image+')'
			}
		}).inject(h1);
	});

	var mySlideShow = new SlideShow(h1,{ 
		delay: 5000, 
		transition: 'crossFade', 
		duration: 1000, 
		autoplay: true 
	});

	var mySmoothScroll = new Fx.SmoothScroll({
		links: 'a',
		wheelStops: false
	});
});
