$(document).ready(function() {

$('#navCompany').mouseover(function(){
	$('#subnav').html("<a href=\"AboutHersha.asp\">Hersha Overview</a> <a href=\"HershaFacts.asp\">Hersha Facts</a> <a href=\"Management.asp\">Management</a> <a href=\"CoreValues.asp\">Core Values</a>");
	//clearnav();
	$('#navdivbar').attr({'src' : 'images/NavDividerBar-full.gif'});
	$('#topnavbar #subnav').css({'padding-left' : '0px'});
});	
$('#navInvestor').mouseover(function(){
	$('#subnav').html("<a name=\"subnav\">&nbsp;</a>");
	//clearnav();
	$('#navdivbar').attr({'src' : 'images/NavDividerBar-blank.gif'});
	//$('#navInvestor').css({'color' : '#c5d5dd'});
});	
$('#navProperty').mouseover(function(){
	$('#subnav').html("<a href=\"PropertiesByRegion.asp\">By Region</a> <a href=\"PropertiesByMetroArea.asp\">By Metro Area</a> <a href=\"PropertiesByBrand.asp\">By Brand</a>");
	//clearnav();
	$('#navdivbar').attr({'src' : 'images/NavDividerBar-full.gif'});
	$('#topnavbar #subnav').css({'padding-left' : '205px'});
});	
$('#navTours').mouseover(function(){
	$('#subnav').html("<a href=\"Earthview.asp\">EarthView</a>");
	//clearnav();
	$('#navdivbar').attr({'src' : 'images/NavDividerBar-full.gif'});
	$('#topnavbar #subnav').css({'padding-left' : '500px'});
});	

$('#topnavbar').mouseleave(function() {
  $('#subnav').html("<a name=\"subnav\">&nbsp;</a>");
  $('#navdivbar').attr({'src' : 'images/NavDividerBar-blank.gif'});
});

function clearnav(){
$('#navCompany').css({'color' : '#ffffff'});
$('#navInvestor').css({'color' : '#ffffff'});
$('#navProperty').css({'color' : '#ffffff'});
$('#navPortfolio').css({'color' : '#ffffff'});
}

/*
	var img = new Image();
	$("#img").one("load",function(){
		alert("Loaded");
	}).each(function(){
		if(this.complete || (jQuery.browser.msie && parseInt(jQuery.browser.version) == 6))
		$(this).trigger("load");
	}).error(function () {
		// notify the user that the image could not be loaded
	}).attr('src', 'images/Image1.jpg'); 


	$(img).load(function () {
		//$(this).hide();
		//$('#loader').removeClass('loading').append(this);
		//$(this).fadeIn();
		//alert("Loaded");
		$('#thetest').append(this);
	}).error(function () {
		// notify the user that the image could not be loaded
	}).attr('src', 'images/Image1.jpg').attr('height', '100').attr('width', '200');
*/
});
