$(document).ready(function() {

	//Hide menus to support those without Javascript on
	$("div.menu").css("display", "none");

	$("button.menus").click(function () {
		//Get Button "name" attribute value
      	var name = $(this).attr("name");
      	
      	//Test if user clicked the same button
      	//Hide menu if its clicked while open
      	if($("div[title="+name+"]").hasClass("on")){
      		$("div.on").slideUp("slow").removeClass("on")
      	}else{
      		//Find previously opened div
      		$("div.on").hide().removeClass("on");
      		
      		//Find div by variable "title" and show div and add "class"="no"
      		$("div[title="+name+"]").slideDown("slow").addClass("on");
      	}
      	
   	});

});