jQuery(document).ready(function() {

	jQuery("a.rollover img").each(function() {
		// Set the original src
		rollsrc = jQuery(this).attr("src");
		rollON = rollsrc.replace(/.png$/ig,"_over.png");
		jQuery("<img>").attr("src", rollON);
	});
	
	// Navigation rollovers
	jQuery("a.rollover").mouseover(function(){
		imgsrc = jQuery(this).children("img").attr("src");
		matches = imgsrc.match(/_over/);
		
		// don't do the rollover if state is already ON
		if (!matches) {
		imgsrcON = imgsrc.replace(/.png$/ig,"_over.png"); // strip off extension
		jQuery(this).children("img").attr("src", imgsrcON);
		}
		
	});
	
	jQuery("a.rollover").mouseout(function(){
		jQuery(this).children("img").attr("src", imgsrc);
	});
			

});

