// JavaScript Document

//$(document).ready(function() {
$(function() {

 // hides the slickbox as soon as the DOM is ready
 // (a little sooner than page load)
	$('#submenu').hide();
	$('#aboutnzgbcsub').hide();
	$('#membershipsub').hide();
	$('#trainingeventssub').hide();
	$('#resourcessub').hide();

 // Close menu when mouse moved away from submenu Saturday 25 April 2009 12:56 pm
  $('#menu-system').hover(
  	 function(){
  	 },
 	 function() {
  		$('#aboutnzgbcsub').hide('slow');
  		$('#submenu').hide('slow');
		$('#aboutnzgbcsub').hide('slow');
		$('#membershipsub').hide('slow');
		$('#trainingeventssub').hide('slow');
		$('#resourcessub').hide('slow');
  });

 // shows the slickbox on clicking the noted link  
  $('a#aboutnzgbc').click(function() {
	$('#submenu').show('slow');
	$('#aboutnzgbcsub').show('slow');
	$('#membershipsub').hide();
	$('#trainingeventssub').hide();
	$('#resourcessub').hide();

    return false;
  });

  $('a#membership').click(function() {
	$('#submenu').show('slow');
	$('#aboutnzgbcsub').hide();
	$('#membershipsub').show('slow');
	$('#trainingeventssub').hide();
	$('#resourcessub').hide();

    return false;
  });

  $('a#trainingevents').click(function() {
	$('#submenu').show('slow');
	$('#aboutnzgbcsub').hide();
	$('#membershipsub').hide();
	$('#trainingeventssub').show('slow');
	$('#resourcessub').hide();

    return false;
  });

  $('a#resources').click(function() {
	$('#submenu').show('slow');
	$('#aboutnzgbcsub').hide();
	$('#membershipsub').hide();
	$('#trainingeventssub').hide();
	$('#resourcessub').show('slow');
    return false;
  });

  $('a#home').click(function() {
	$('#submenu').hide();
    //return false;
  });

  $('a#greenstar').click(function() {
	$('#submenu').hide();
    //return false;
  });

});
