
$(document).ready(function() { 
	
	
	//PNG Fist Main Nav
		// 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);
		});
		
		
		//GIF
		// preload all rollovers
		$("#navWork2 img").each(function() {
			// Set the original src
			rollsrc = $(this).attr("src");
			rollON = rollsrc.replace(/.gif$/ig,"-over.gif");
			$("<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(/.gif$/ig,"-over.gif"); // strip off extension
			$(this).children("img").attr("src", imgsrcON);
			}
			
		});
		
		$("#navWork2 a").mouseout(function(){
			$(this).children("img").attr("src", imgsrc);
		});

		

});


		
