$(document).ready(function() {
	
	// Preload any image ending in _over.gif
	$("img").each(function() {
		rollsrc = $(this).attr("src");
		rollON = rollsrc.replace(/.gif$/ig,"_over.gif");
		$("<img>").attr("src", rollON);
	});
	
	$("a.o").mouseover(function(){
		imgsrc = $(this).children("img").attr("src");
		matches = imgsrc.match(/_over/);
		if (!matches) {
		imgsrcON = imgsrc.replace(/.gif$/ig,"_over.gif");
		$(this).children("img").attr("src", imgsrcON);
		}
	});	
	
	$("a.o").mouseout(function(){
		$(this).children("img").attr("src", imgsrc);
	});
	
});
