$(document).ready(function() {


	/** BEGIN IDENTIFY CURRENT NAV LOCATION**/
	var url = "";
	for (i=3;i< document.location.href.split("/").length;i++) {url += "/" +  document.location.href.split("/")[i].split("?")[0].split("#")[0];} 		
	$(".nav-panel").find("a[href='"+url+"']").addClass("current");
	/** END IDENTIFY CURRENT NAV LOCATION **/


	//$("#sub-header-links a").fadeTo(0, 0.85); // make sub-header-links semi-transparent


	// intercept links and display appropriate content
	$("#show-about-link").click(function () {
		if ($("#sub-header-about").is(":visible")) {$("#sub-header-about").slideUp("slow");}
		else {
		  $(".sub-header:visible").slideUp("slow");
		  $("#sub-header-about").slideDown("slow");
	    }
		return false;
    });
	$("#show-donate-link").click(function () {
		if ($("#sub-header-donate").is(":visible")) {$("#sub-header-donate").slideUp("slow");}
		else {
		  $(".sub-header:visible").slideUp("slow");
		  $("#sub-header-donate").slideDown("slow");
	    }
		return false;	  
    });	
	/*$("#show-join-link").click(function () {
		if ($("#sub-header-join").is(":visible")) {$("#sub-header-join").slideUp("slow");}
		else {
		  $(".sub-header:visible").slideUp("slow");
		  $("#sub-header-join").slideDown("slow");
	    }
		return false;	  
    });	*/
	
});
