	jQuery.noConflict();
	jQuery(document).ready(function () {
		//Homepage
		jQuery("img#home").hover(function () {showOver(this.id);}, function () {showNormal();});
		jQuery("img#aboutus").hover(function () {showOver(this.id);}, function () {showNormal();});
		jQuery("img#ourhomes").hover(function () {showOver(this.id);}, function () {showNormal();});
		jQuery("img#memberships").hover(function () {showOver(this.id);}, function () {showNormal();});
		jQuery("img#contactus").hover(function () {showOver(this.id);}, function () {showNormal();});
		//On
		jQuery("img#homeon").hover(function () {showOver(this.id);}, function () {showNormal();});
		jQuery("img#aboutuson").hover(function () {showOver(this.id);}, function () {showNormal();});
		jQuery("img#ourhomeson").hover(function () {showOver(this.id);}, function () {showNormal();});
		jQuery("img#membershipson").hover(function () {showOver(this.id);}, function () {showNormal();});
		jQuery("img#contactuson").hover(function () {showOver(this.id);}, function () {showNormal();});
		setHeight();
		jQuery(window).resize(function(){
			setHeight();
		});		
		jQuery( 'a.new-window' ).click ( function()
		{
		    window.open ( this.href );
		    return false;
		});
		
		jQuery("img.ken_burns").each(
			function(e){
				width = jQuery(this).width();
				height = jQuery(this).height();
				src = jQuery(this).attr("src");
				style = "style=\"display: block;width:"+width+";height:"+height+";background: url("+src+");\"";
				jQuery(this).replaceWith("<div id=\"ken_burns_"+e+"\" "+style+" ></div>");	
				jQuery("#ken_burns_"+e).width(width);	
				jQuery("#ken_burns_"+e).height(height);
				var fo = new SWFObject("flash/ken_burns.swf", "homepage", width, height, "8", "#454442");
				fo.addVariable( "_imageurl", src );
				fo.addVariable( "_scaleto", 110 );
				fo.addVariable( "_scaletime", 20 );		
				fo.addParam("wmode", "transparent"); 
				fo.write("ken_burns_"+e);				
			}
		)
		
	});
	
	function showOver (id) {
		//Homepage
		if (id == "home") {
			jQuery("img#home").attr("src","images/navigation/homeon.gif");
		}
		if (id == "aboutus") {
			jQuery("img#aboutus").attr("src","images/navigation/aboutuson.gif");
		}
		if (id == "ourhomes") {
			jQuery("img#ourhomes").attr("src","images/navigation/ourhomeson.gif");
		}
		if (id == "memberships") {
			jQuery("img#memberships").attr("src","images/navigation/membershipson.gif");
		}
		if (id == "contactus") {
			jQuery("img#contactus").attr("src","images/navigation/contactuson.gif");
		}
		//Internal
		if (id == "homeon") {
			jQuery("img#homeon").attr("src","images/navigation/homeon.gif");
		}
		if (id == "aboutuson") {
			jQuery("img#aboutuson").attr("src","images/navigation/aboutuson.gif");
		}
		if (id == "ourhomeson") {
			jQuery("img#ourhomeson").attr("src","images/navigation/ourhomeson.gif");
		}
		if (id == "membershipson") {
			jQuery("img#membershipson").attr("src","images/navigation/membershipson.gif");
		}
		if (id == "contactuson") {
			jQuery("img#contactuson").attr("src","images/navigation/contactuson.gif");
		}
	}	
									
	function showNormal () {
		//Homepage
		jQuery("img#home").attr("src","images/navigation/home.gif"); //This is for the class "selected" state. These items must be edited to correspond with the selected state.
		jQuery("img#aboutus").attr("src","images/navigation/aboutus.gif");
		jQuery("img#ourhomes").attr("src","images/navigation/ourhomes.gif");
		jQuery("img#memberships").attr("src","images/navigation/memberships.gif");
		jQuery("img#contactus").attr("src","images/navigation/contactus.gif");
		//Internal
		jQuery("img#homeon.menuitem").attr("src","images/navigation/homeon.gif"); 
		jQuery("img#aboutus.menuitem").attr("src","images/navigation/aboutuson.gif");
		jQuery("img#ourhomes.menuitem").attr("src","images/navigation/ourhomeson.gif");
		jQuery("img#memberships.menuitem").attr("src","images/navigation/membershipson.gif");
		jQuery("img#contactus.menuitem").attr("src","images/navigation/contactuson.gif");
	}