$(document).ready(function() {
		
		// Preload all rollovers
		/*$("#nav #menulink_1 img").each(function() {
			// Set the original src
			rollsrc = $(this).attr("src");
			rollON = rollsrc.replace(/.gif$/ig,"_over.gif");
			$("<img>").attr("src", rollON);
		});*/
		
		
		if ($("#nav ul li").hasClass("mainlevel_current") && !$("#nav ul li a#menulink_1")) {
			imgsrc = $("#nav ul li.mainlevel_current a").children("img").attr("src");
			imgsrcON = imgsrc.replace(/.gif$/ig,"_over.gif"); // strip off extension
			$("#nav ul li.mainlevel_current a").children("img").attr("src", imgsrcON);
		};
		
		// About Dream Communities
		$("#nav a#menulink_2").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(/.gif$/ig,"_over.gif"); // strip off extension
			$(this).children("img").attr("src", imgsrcON);
			}
			
		});
		
		$("#nav a#menulink_2").mouseout(function(){
			$(this).children("img").attr("src", imgsrc);
		});
		
		// How We Work
		$("#nav a#menulink_3").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(/.gif$/ig,"_over.gif"); // strip off extension
			$(this).children("img").attr("src", imgsrcON);
			}
			
		});
		$("#nav a#menulink_3").mouseout(function(){
			$(this).children("img").attr("src", imgsrc);
		});
		
		// Discover Your Dream Community
		$("#nav a#menulink_4").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(/.gif$/ig,"_over.gif"); // strip off extension
			$(this).children("img").attr("src", imgsrcON);
			}
			
		});
		$("#nav a#menulink_4").mouseout(function(){
			$(this).children("img").attr("src", imgsrc);
		});
		
		// Contact Us
		$("#nav a#menulink_5").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(/.gif$/ig,"_over.gif"); // strip off extension
			$(this).children("img").attr("src", imgsrcON);
			}
			
		});
		$("#nav a#menulink_5").mouseout(function(){
			$(this).children("img").attr("src", imgsrc);
		});
		
	
	});