// JavaScript Document
$(document).ready(function(){
						   						   
// this section opens and shuts the navigation lists
// first, hide the lower level navigation lists
	$("ul#siteNav ul.sublist").hide();	
// then, open the section that matches the body id
	$("body#home li#homeLink ul").show();
	$("body#era li#eraLink ul").show();
	$("body#funding li#fundingLink ul").show();
	$("body#glossary li#glossaryLink ul").show();
	$("body#idr li#idrLink ul").show();	
	$("body#research li#researchLink ul").show();	
	$("body#reports li#reportsLink ul").show();
	$("body#researchfaculty li#researchfacultyLink ul").show();
	$("body#reports li#reportsLink ul").show();
	$("body#integrity li#integrityLink ul").show();
	$("body#researchpolicies li#researchpoliciesLink ul").show();
	$("body#training li#trainingLink ul").show();
	$("body#aboutus li#aboutusLink ul").show();
	
	/*THIS BOUNCES THE SIDE NAV UP AND DOWN!
	$("ul#siteNav li").hover(
	    function(){ $(this).children("ul.sublist").show("slow")},
		function(){ $(this).children("ul.sublist").hide("slow")}
		);
	*/
	
	/*
	$("ul#siteNav li a").hover(
	    function(){ $(this).css({'background-color' : 'white'})},
		function(){ $(this).css({'background-color' : ''})}
		);
	*/
	
	$("ul#siteNav a").each(function(){
		if ($(this).attr("href") == location.pathname) {
			$(this).addClass("current");
		};
	});
	
	

	
	
});	


