$(document).ready(function() {

	// Preload all rollovers
	$("#arrows img").each(function() {
		// Set the original src
		rollsrc = $(this).attr("src");
		rollON = rollsrc.replace(/.gif$/ig,"_on.gif");
		$("<img>").attr("src", rollON);
	});

	// Navigation rollovers
	$("#arrows img").mouseover(function(){
		imgsrc = $(this).attr("src");
		matches = imgsrc.match(/_on.gif/);

		// don't do the rollover if state is already ON
		if (!matches) {
		imgsrcON = imgsrc.replace(/.gif$/ig,"_on.gif"); // strip off extension
		$(this).attr("src", imgsrcON);
		}

	});
	$("#arrows img").mouseout(function(){
		$(this).attr("src", imgsrc);
	});
});



