 $(document).ready(function(){

	////////////////////////////////////////////////////////////////////////////
	//IE6 hover bug fix
	//allow function to only add mouse events if browser is IE
	if (document.all&&document.getElementById) {
		//get navigation menu parent
		navRoot = document.getElementById("nav");
		//get all list items
		if (navRoot != null) {
			liList = navRoot.getElementsByTagName("li");
			//add onmounseover and onmouseout events to each <li>
			//that change the class of the element top .over
			for (i = 0; i < liList.length; i++) {
				node = liList[i];
				if (node.nodeName == "LI") {
					node.onmouseover = function(){
						this.className += " over";
					}
					node.onmouseout = function(){
						this.className = this.className.replace(" over", "");
		}	}	}	}

		navRoot = document.getElementById("secondary_nav");
		if (navRoot != null) {
			liList = navRoot.getElementsByTagName("li");
			for (i = 0; i < liList.length; i++) {
				node = liList[i];
				if (node.nodeName == "LI") {
					node.onmouseover = function(){
						this.className += " over";
					}
					node.onmouseout = function(){
						this.className = this.className.replace(" over", "");
		}}}}
	}



   /////////////////////////////////////////////////////////////////////////////////////////////
   //collapse all expandable areas in secondary nav
   //$('div#secondary_nav ul ul').show();
   //alert('Testing');

   //add img link and image for expanding
   $('div#secondary_nav ul li.has_children > a').after("<span class=\'expand\'><a>+</a></span>");

   //add functionality to expand and collapse hidden sub nav ul
   $('div#secondary_nav ul li.has_children span a').toggle(function(){
   		$(this).parent().parent().children( 'ul' ).show('slow');
   		$(this).text('-');

   },function(){
		$(this).parent().parent().children( 'ul' ).hide('slow');
		$(this).text('+');
   });

   //show current subnav ul
   $('div#secondary_nav ul li.current > span.expand a').click();

 });  //End of $(document).ready
