$(document).ready(function() { 
		
		//PNG Fist Iteration
		// preload all rollovers
		$("#navWork img").each(function() {
			// Set the original src
			rollsrc = $(this).attr("src");
			rollON = rollsrc.replace(/.png$/ig,"-over.png");
			$("<img>").attr("src", rollON);
		});
		
		// navigation rollovers
		$("#navWork 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);
			}
			
		});
		
		$("#navWork a").mouseout(function(){
			$(this).children("img").attr("src", imgsrc);
		});
		
		$("#navWork a").click(function(){
			$(this).children("img").attr("src", imgsrc);
		});
		
		
		//PNG Second Interation
		// preload all rollovers
		$("#navWorkSecond img").each(function() {
			// Set the original src
			rollsrc = $(this).attr("src");
			rollON = rollsrc.replace(/.png$/ig,"-over.png");
			$("<img>").attr("src", rollON);
		});
		
		// navigation rollovers
		$("#navWorkSecond 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);
			}
			
		});
		
		$("#navWorkSecond a").mouseout(function(){
			$(this).children("img").attr("src", imgsrc);
		});
		
		$("#navWorkSecond a").click(function(){
			$(this).children("img").attr("src", imgsrc);
		});
		
		
		//JPEG
		// preload all rollovers
		$("#navWork2 img").each(function() {
			// Set the original src
			rollsrc = $(this).attr("src");
			rollON = rollsrc.replace(/.jpg$/ig,"-over.jpg");
			$("<img>").attr("src", rollON);
		});
		
		// navigation rollovers
		$("#navWork2 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(/.jpg$/ig,"-over.jpg"); // strip off extension
			$(this).children("img").attr("src", imgsrcON);
			}
			
		});
		
		$("#navWork2 a").mouseout(function(){
			$(this).children("img").attr("src", imgsrc);
		});
	
		
	});
