$(document).ready(function(){
	var onmenu = false;
	var onlink = false;
	
  // remove focus outline on all links when clicked
  $("a").focus(function(){
    $(this).blur();
  });
  
  
  // Members drop down menus 
  $(".submenu").hover(function(){ // When you hover over a top menu link
	  onlink = true;
	  $(".submenu").removeClass("currentmenu"); // Remove highlight from all top menu links
	  $(this).addClass("currentmenu"); // Apply highlight to top menu link
	  $(this).siblings("ul").addClass("showmenu"); // Display submenu by adding class
	  
	  $(this).siblings("ul").hover(function(){
		  onmenu = true;
		  onlink = false;
		  $(this).siblings("a").stopTime("hide");
	  }, function(){
		  $(this).closest('ul').removeClass('showmenu');
		  $(this).removeClass("currentmenu");
		  onmenu = false;
	  });
  },function(){
	  onlink = false;
	  $(this).oneTime(1, "hide", function(){
		  if (onmenu == false){
			  $(this).removeClass("currentmenu");
			  $(this).siblings("ul").removeClass("showmenu");
		  }
	  });
  });
  
  $(".subsubmenu").hover(function(){
	 $(this).children("ul").show(); 
  },function(){
	 $(this).children("ul").hide(); 
  });
  
  
});