Event.observe(window, 'load', navOvers, false);

function navOvers() {
	$A($$('table.navigation img.button')).each(
		function(button) { hoverState(button); }
	);
}

function hoverState(thing) {

	/*
	mouseover-creating utility
	____________________________________________*/
	
	// get default button image
	var src = thing.src;
	var dirs = src.split('/');
	var img = dirs.pop(); 

	// add -over to filename and reconstruct filepath
	var over = dirs.join('/') + '/' + img.replace(/([.][^.]*$)/, '-over$1');

	// add mouseover and mouseout events
	Event.observe(thing, 'mouseover', function(){ this.src = over; }, false);
	Event.observe(thing, 'mouseout', function(){ this.src = src; }, false);
}

