$(document).ready(function()
{
	$(".menu_head .button").mouseover(function(){
	if($(this).prev("a"))
	{
		$(this).prev("a").css("background-color","#04A");
	}																							
});
	$(".menu_head .button").mouseout(function(){
	if($(this).prev("a"))
	{
		$(this).prev("a").css("background-color","");
	}																							
});
 $(".menu_head .button").click(function()
    {
		var Mhead= $(this).parent(".menu_head");
		var Mbody=Mhead.next(".menu_body");
	if(Mbody.hasClass('selected')){
		Mhead.css("background-color","#27C").next(".menu_body").slideUp("slow").removeClass('selected');
		$(this).css("background-position","25px 0px");
	}
	else{
  Mhead.next(".menu_body").slideToggle(300);
  $(".menu_body[class*='selected']").prev(".menu_head").css("background-color","#27C");
   $(".menu_body[class*='selected']").prev(".menu_head").children(".button").css("background-position","25px 0px");
 $(".menu_body[class*='selected']").slideUp("slow").removeClass('selected');
 
  Mhead.css("background-color","#04A").next(".menu_body").addClass('selected');
  $(this).css("background-position","25px -20px");
  }
 });
 	$(".menu_head2 .button").mouseover(function(){
	if($(this).prev("a"))
	{
		$(this).prev("a").css("background-color","#016");
	}																							
});
	$(".menu_head2 .button").mouseout(function(){
	if($(this).prev("a"))
	{
		$(this).prev("a").css("background-color","");
	}																							
});
 $(".menu_head2 .button").click(function()
    {
		 var Mhead2= $(this).parent(".menu_head2");
		var Mbody2=Mhead2.next(".menu_body2");
	if(Mbody2.hasClass('selected')){
		Mhead2.css("background-color","#26A").next(".menu_body2").slideUp("slow").removeClass('selected');
		$(this).css("background-position","25px 0px");
	}
	else{
  Mhead2.next(".menu_body2").slideToggle(300);
  $(".menu_body2[class*='selected']").prev(".menu_head2").css("background-color","#26A");
   $(".menu_body2[class*='selected']").prev(".menu_head2").children(".button").css("background-position","25px 0px");
 $(".menu_body2[class*='selected']").slideUp("slow").removeClass('selected');
 
  Mhead2.css("background-color","#016").next(".menu_body2").addClass('selected');
  $(this).css("background-position","25px -20px");
	}
 }); 
});