// JavaScript Document

$(document).ready(function() {

$("#sitemap li").addClass("c");  //add close class to all li's in #sitemap

/*
This menu script requires the jQuery library.  It will turn a standard html list (using ul/li tags) into a basic accordion menu. It has been altered to work with the above script which target the link to the active page.  This will open the menu to the link to the current page, in addition to adding a class to it.

To use:
1. Add the id "nav" to the containing ul tag of the entire menu.
2. add the following style to a linked stylesheet.
.c ul {display: none}
*/


$("#sitemap a").click(function() {
/* */

if ($(this).parent().is("li.c") ){	
	$(this).parent("li.c").removeClass("c");	
	
	/* changed from this to allow others to open at the same time : $(this).parent("li.c").removeClass("c").siblings().not(".c").addClass("c"); */
}
/* */	
else {
	$(this).parent().addClass("c");
	}

if ($(this).parent().children().is("ul")) {
return false;
}
});

$("#opentree").click(function() {
/* */

$("#sitemap li").removeClass("c");
return false;

	  
	});

$("#closetree").click(function() {
/* */

$("#sitemap li").addClass("c");
return false;

	  
	});
});
