/* Collapsable Menus. Written by Chris Aurelio. 2010. */

  function hideShow(obj, hard) {
  	  if(!hard) var hard = false;
  	  while($(obj).next().attr("class") != 'menu-bar') {
		if(hard) $(obj).next().show();
  	  	  else $(obj).next().slideToggle('normal');
		obj = $(obj).next();
	}
  }
  
function initMenu() {
	$('.menu-nav').hide();

	$('.menu-bar').mouseover(
		function() {
			if($(this).next().attr("class") == 'menu-nav'){
				$('.menu-nav').hide();
				hideShow(this, true);
			}
		});
}
$(document).ready(function() {initMenu();});

