function debug(content) {
	document.getElementById("debug").innerHTML += content + "<br />";
}

$(document).ready(function() {

    $("ul.headerMenu > li > a").attr("class", "headerMenuInitial");
    $("ul.headerMenu ul a").attr("class", "headerMenuItemInitial");

    $("ul.headerMenu > li").hover(function() {
		$(this).children("a").stop().animate({backgroundColor: "#f8872f"}, 400);
        $(this).children("ul").css("display", "block");

    }, function() {
		$(this).children("a").stop().animate({backgroundColor: "#636363"}, 400);
        $(this).children("ul").css("display", "none");
    });

    $("ul.headerMenu ul a").hover(function() {
        $(this).stop().animate({backgroundColor: '#7f7f7f'}, 600);
    }, function() {
        $(this).stop().animate({backgroundColor: '#b7b7b7'}, 600);
    });

	$(".embeddedButton").click(function() {
	    var $content = $(".granteeContent");
		if ($content.css("display") == "none") {
			$content.css("display", "block");
		} else {
			$content.css("display", "none");
		}
	});
	
	$(".embeddedButton").hover(function() { 
		$(this).css("text-decoration", "underline");
	}, function() {
		$(this).css("text-decoration", "none");	
	});
	
	$(".categoryMenu > li").hover(function() {
		$(this).css("backgroundImage", 'url("images/white_flash.png")');
		$(this).children("a").css("color", "black");
	}, function() {
		$(this).css("backgroundImage", 'none');
		$(this).children("a").css("color", "white");
	});
	
});

