$(document).ready(function(){

	//Hide (Collapse) the toggle containers on load
	$(".menu_body").hide();
	// ignore line below it just sets an active class
	//$('.menu_body:first').addClass('active').next().show();
	
	// This shows the menu dropout when your in that section
	$('.news #nav-news .menu_body').show();
	$('.events #nav-events .menu_body').show();
	
	$('.offices #nav-properties-office .menu_body').show();
	$('.retail #nav-properties-retail .menu_body').show();
	$('.industrial #nav-properties-industrial .menu_body').show();
	$('.residential #nav-properties-residential .menu_body').show();
	$('.team #nav-team .menu_body').show();

	//Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
	$("#accordion-menu p.menu_head").click(function(){
		$(this).toggleClass("active").next("ul.menu_body").slideToggle(300).siblings("ul.menu_body").slideUp("slow");
		if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
		$('.menu_head').removeClass('active').next().slideUp(); //Remove all "active" state and slide up the immediate next container
		$(this).toggleClass('active').next().slideDown(); //Add "active" state to clicked trigger and slide down the immediate next container
	}
		
		return false; //Prevent the browser jump to the link anchor
	});

});




