	$(document).ready(function() {

		// SET CURRENT NAV
		$(function(){
			var path = location.pathname.substring(1);
			if ( path )
				{
				if ($('#nav a[href$="' + path + '"]').length)
                           {
					$('#nav a[href$="' + path + '"]').addClass('nav_current');
	

				   }
			      else {
					$('#nav a[href$="Sites/Presidio/austin-tx-1-2-3-bdr-apts.aspx"]').addClass('nav_current');

			         }	
				}
			});

		// MAIN NAV		
		$("#nav a").not('.nav_current').mouseover(function() {
			$(this).addClass('nav_on');
		});
		$("#nav a").not('.nav_current').mouseout(function() {
			if($(this).attr("id") != 'nav_floorplan' && $(this).attr("id") != 'nav_reserve')
				{
				$(this).removeClass('nav_on');
				}
			});
		
		// FLOORPLAN SUBNAV
		$("#nav_floorplan").mouseover(function() {
			flgInNav_floorplan = true;
			var x = $("#nav_floorplan").offset().left + ($("#nav_floorplan").outerWidth() / 2) - ($("#subnav_floorplan").outerWidth() / 2);
			$("#subnav_floorplan").css("left",x + "px");
			$("#subnav_floorplan").fadeIn(300);
	    		});
		$("#nav_floorplan").mouseout(function() {
			flgInNav_floorplan = false;
			window.setTimeout(function() {
				if(!flgInNav_floorplan)
					{
					$("#nav_floorplan").removeClass('nav_on');
					$("#subnav_floorplan").css("display","none");
					}
			}, 200);
			});
		$("#subnav_floorplan").mouseover(function() {
			flgInNav_floorplan = true;
			});
		$("#subnav_floorplan").mouseout(function() {
			flgInNav_floorplan = false;
			window.setTimeout(function() {
				if(!flgInNav_floorplan)
					{
					$("#nav_floorplan").removeClass('nav_on');
					$("#subnav_floorplan").css("display","none");
					}
			}, 200);
			});

		// RESERVE SUBNAV
		$("#nav_reserve").mouseover(function() {
			flgInNav_reserve = true;
			var x = $("#nav_reserve").offset().left + ($("#nav_reserve").outerWidth() / 2) - ($("#subnav_reserve").outerWidth() / 2);
			$("#subnav_reserve").css("left",x + "px");
			$("#subnav_reserve").fadeIn(300);
	    		});
		$("#nav_reserve").mouseout(function() {
			flgInNav_reserve = false;
			window.setTimeout(function() {
				if(!flgInNav_reserve)
					{
					$("#nav_reserve").removeClass('nav_on');
					$("#subnav_reserve").css("display","none");
					}
			}, 150);
			});
		$("#subnav_reserve").mouseover(function() {
			flgInNav_reserve = true;
			});
		$("#subnav_reserve").mouseout(function() {
			flgInNav_reserve = false;
			window.setTimeout(function() {
				if(!flgInNav_reserve)
					{
					$("#nav_reserve").removeClass('nav_on');
					$("#subnav_reserve").css("display","none");
					}
			}, 150);
			});

	});


