function closeAll( speed ) {
	$("h2.switchMenu").next('ul').hide( speed );
}

$(document).ready(function() {
	// Sluit alle menu's bij laden van de pagina
	closeAll( 0 );
	
	// Open menu's weer die open moeten adhv class "open"
	$("h2.open").next('ul').show( 500 );
	
	$("h2.switchMenu").click(function(){
		status = $(this).next("ul").css("display");
		
		// Sluit alle menu's
		$("h2.switchMenu").next("ul").each( function() {
			if( $(this).css("display") == 'block' )
				$("h2.switchMenu").next("ul").hide( 500 );
		});
		
		if( status == 'block' )
			$(this).next('ul').hide( 500 );
		else
			$(this).next('ul').show( 500 );
	});
});

function openMenu( id ) {
	closeAll( 500 );
	
	$("#"+id+"").next('ul').show( 500 );
}
