if (jQuery) {
	$(function() {
		$(".menu").hover(function() {
			$("ul[id$='Sub']").css({
				display: "none",
				visibility: "hidden"
			});

			$("ul#" + this.id + "Sub").css({
				display: "block",
				visibility: "visible"
			});

			return false;
		});


		$("a[id$='Menu'").each(function() {
			this.parent().attr("onclick", "href.location=" + this.href);
		});

		$("ul[id$='Sub']").css({
			display: "none",
			visibility: "hidden"
		});

		//if ie8 put a container around everything
		//if (jQuery.browser == "msie") {
		//	if (jQuery.browser.version == "8.0") {
				$("#header").prepend("<div id='ie'>");
				$("body").append("</div>");
		//	}
		//}

	});

	$(function() {
		$(".hiddenSub").css("display", "none");

		$("span[class^='show']").click(function() {
			$id = $(this).attr("id");

			$display = $("#" + $id + "Expand").css("display");

			if ($display == "block") {
				$("#" + $id + "Expand").css("display", "none");
			} else {
				$("#" + $id + "Expand").css("display", "block");
			}
		}).css("cursor", "pointer");
	});
}
