// JavaScript Document FOR SITEMAP

$(document).ready(function() {

$("#faq li").addClass("c");  //add close class to all li's in #nav

/*
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}
*/


$("#faq li a").click(function() {
/* */

if ($(this).parent().is("li.c") ){	
	$(this).parent("li.c").removeClass("c");			
}
/* */	
else {
	$(this).parent().addClass("c");
	}

if ($(this).parent().children().is("ul")) {
return false;
}
	  
	});
//open & close tree
$("#opentree").click(function() {
/* */

$("#faq li").removeClass("c");
return false;

	  
	});

$("#closetree").click(function() {
/* */

$("#faq li").addClass("c");
return false;

	  
	});

//open & close tree
$("#opentree2").click(function() {
/* */

$("#faq li").removeClass("c");
return false;

	  
	});

$("#closetree2").click(function() {
/* */

$("#faq li").addClass("c");
return false;

	  
	});


$("#opengeneral").click(function() {
/* */
$("#general li").removeClass("c");
return false;
	});

$("#closegeneral").click(function() {
/* */
$("#general li").addClass("c");
return false;	  
	});

//reports
$("#openreports").click(function() {
/* */
$("#reports li").removeClass("c");
return false;
	});

$("#closereports").click(function() {
/* */
$("#reports li").addClass("c");
return false;	  
	});

//benefits
$("#openbenefits").click(function() {
/* */
$("#benefits li").removeClass("c");
return false;
	});

$("#closebenefits").click(function() {
/* */
$("#benefits li").addClass("c");
return false;	  
	});

//technical
$("#opentechnical").click(function() {
/* */
$("#technical li").removeClass("c");
return false;
	});

$("#closetechnical").click(function() {
/* */
$("#technical li").addClass("c");
return false;	  
	});

// JavaScript Document

$('#nav a[@href$="' + location.pathname.substring(1) + '"]').addClass("activeLink").parents().removeClass("c");
//This is for the code to choose a section to highlight in the main nav, if the page is not in the navigation.

if ($("#nav").children().is("a")) {
$("#nav a[@href=" + $("#contentleft a").attr("href") + "]").addClass("activeLink").parents().removeClass("c");
}

																														});

