$(document).ready(function() { 						   		// preload all rollovers		$("#nav img, #mainContent img, #footer img").each(function() {			// Set the original src			rollsrc = $(this).attr("src");			rollON = rollsrc.replace(/.png$/ig,"-over.png");			$("<img>").attr("src", rollON);		});				// navigation rollovers		$("#nav a, #mainContent a, #footer 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);			}					});				$("#nav a, #mainContent a, #footer a").mouseout(function(){			$(this).children("img").attr("src", imgsrc);		});						// photo fade in fade out		$('#mainPhoto').cycle({    			 fx:     'fade',     		 random:  1 ,			 timeout:4000		});				$("a.zoom2").fancybox({				'zoomSpeedIn'		:	500,				'zoomSpeedOut'		:	500,				'overlayShow'		:	true			});			});