var Intro = {
	
	data: null,
	selector: '.intro .image-item',
	
	initialize: function()
	{
		if( !$('adminbar') )
		{
			
			this.getImages();
		
		}
		
	},
	
	getImages: function()
	{
		this.data = $$(this.selector);
		
		
		this.data.each( function(image,index){ 
			
			image.id = 'image_' + index;
			
		});
		
		this.setRandomImage();
		
	},
	
	setRandomImage: function()
	{
		
		var randnum = Math.floor(Math.random()*(this.data.length));
		
		$('image_'+randnum).style.display = 'block';
		
	}
	
}


Event.observe(window, 'load', function() { Intro.initialize(); });
