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