//Regular Javscrip Fucntions

//Makes DropDowns for IE6 work
startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");

	}
}
window.onload=startList;



//JQuery Functions for TDA
$(document).ready(function(){

	$(".levelThree a ").prepend("&bull; ");					   
	$(".levelTwo").hide();
	$(".levelThree").hide();
	$(".levelTwoPublic").hide();
	$(".levelThreePublic").hide();
	
	
	$("#sideMenu .arrow").mouseover(function () {
		//Change the Classna slide dowm
		$(this).removeClass().addClass("arrowDown");
		$(this).next("ul").slideDown(500)
		
		//Set up boolean for the siblings that have the class .arrowDown
		var Open = $(this).parent().siblings().children("a").hasClass("arrowDown");
		
		//Set up if Statement to return arrowdown to arrow and slide the ul up on the siblings that are open.
		if (Open) {
			$(this).parent().siblings().children(".arrowDown").removeClass().addClass("arrow");	
			$(this).parent().siblings().children("ul").slideUp("slow");
		}
		
	});
	
	
	$("#sideMenu .arrowPublic").mouseover(function () {
		//Change the Classna slide dowm
		$(this).removeClass().addClass("arrowDownPublic");
		$(this).next("ul").slideDown(500)
		
		//Set up boolean for the siblings that have the class .arrowDown
		var Open = $(this).parent().siblings().children("a").hasClass("arrowDownPublic");
		
		//Set up if Statement to return arrowdown to arrow and slide the ul up on the siblings that are open.
		if (Open) {
			$(this).parent().siblings().children(".arrowDownPublic").removeClass().addClass("arrowPublic");	
			$(this).parent().siblings().children("ul").slideUp("slow");
		}
		
	});
	

	
	$("#mainNav li").hover(function () {
		$(this).addClass("active");							 
	}, function () {
		$(this).removeClass("active");							 
	});
				
});

