// JavaScript Document

    /* ================================================================  
    This copyright notice must be untouched at all times. 
    Copyright (c) 2008 Stu Nicholls - stunicholls.com - all rights reserved. 
    =================================================================== */  
  
    $(function() {  
      closetimer = 0;  
      //if ($("#nav")) {  
        $("#nav b").mouseover(function() {  
          clearTimeout(closetimer);  
          if (this.className.indexOf("clicked") != -1) {  
            $(this).parent().next().fadeOut(300);  
            $(this).removeClass("clicked");  
			
			
          }  
          else {  
            $("#nav b").removeClass();  
            $(this).addClass("clicked");  
            $("#nav ul:visible").fadeOut(300);
			
			  $(this).parent().next().fadeIn(300);

			

          }  
		  


          return false;  
        });  
        $("#nav").mouseover(function() {  
          clearTimeout(closetimer);  
        });  
        $("#nav").mouseout(function() {  
          closetimer = window.setTimeout(function() {  
            $("#nav ul:visible").fadeOut(300);  
			$(this).parent().next().fadeIn(300);
            $("#nav b").removeClass("clicked");  
          }, 500);  
        });  
      //}  
    });  
