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