//Onderstaande is de oplossing tegen de hinderlijke flikkering van de slideUp-functie van JQuery
jQuery.fx.prototype.originalCustom = jQuery.fx.prototype.custom; 
jQuery.fx.prototype.custom = function(from,to,unit)
{ 
	if (this.prop=='height')
	{ 
		to = to || 1; 
		from = from || 1; 
  } 
  this.originalCustom(from,to,unit); 
}


//Sluit alle submenus en open er eentje
$(document).ready(function() 
{	
	//slides the element with class "menu_body" when mouse is over the paragraph
	/*$("div.menu_show img.menuitem").mouseover(function()
	{   		
		$("div.menu_show div:visible").slideUp(500);
		$(this).next("div.menu_body").slideDown(500);//.siblings("div.menu_body").slideUp("slow").hide();
	});*/
	
	//slides the element with class "menu_body" when menuitem is clicked
	$("div.menu_show img.menuitem").click(function()
	{ 
		var blnVisible = $(this).next("div.menu_body").is(":visible");
		$("div.menu_show div:visible").slideUp(500);
		if(!blnVisible)
		{
			$(this).next("div.menu_body").slideDown(500);//.siblings("div.menu_body").slideUp("slow").hide();
		}
	});
});
