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