// JavaScript Document - rollover.js
var hype_rollover ={
	img_loc:'.hypepicture ul li a img',
	rollOn: function(){
		this.src = this.src.replace('.jpg', '_active.jpg');
	},
	rollOff:function(){
		this.src = this.src.replace('_active', '');
	},

	init: function(){
		imageObj = new Image();

		$$(hype_rollover.img_loc).each(function(e,key){
			var src = e.get('src');

			imageObj.src= src.replace('.jpg', '_active.jpg');
			
			if( !e.src.contains('_active') )
			{
				e.addEvent('mouseover', hype_rollover.rollOn);
				e.addEvent('mouseout', hype_rollover.rollOff);
			}
		});
	}
}
window.addEvent('domready', hype_rollover.init);		
