// JavaScript Document
$(function() {
	// Add the navigation to ie
	if ($.browser.msie) {
		$(".nav li").hover(function() {
			$(this).children("ul").show();
			$(this).addClass("sfhover");
		},
		function() {
			$(this).children("ul").hide();
			$(this).removeClass("sfhover");
		});
	}
	
	// Round if not ie
	if (!$.browser.msie) {
		$(".nav li ul, #footer").corners("bottom");
		$("#header").corners("top");
		$("#faux-menu img, #sideBar img").corners();
	}
	
	$("#faux-menu").appendTo("#sideBar");
	
	// Make sure that the side bar is equal length to the text box
	var containerHeight = $("#mainBody").height();
	var sideHeight = $("#sideBar").height();
	
	if (containerHeight > sideHeight) {
		$("#sideBar").css("height",containerHeight + "px");
	}
	else {
		$("#mainBody").css("height",sideHeight + "px");
	}
	
	$("ul.nav li a").click(function() {
		var linkURL = $(this).attr("href");
		if (linkURL.search("#") > 0) {
			return false;	
		}
	});
});