var NavigationToggle = {
  reset:function() {
    //fpttw-block
    //jttc-block
    //rtgr-block
    //wstsc-block
    Element.hide($('fpttw-block'));
    Element.hide($('jttc-block'));
    Element.hide($('rtgr-block'));
    Element.hide($('wstsc-block'));
  },
  
  init:function() {
    $$('.toggle-nav').each(function(item) {
        Event.observe(item, 'mouseover', function() {
            
            NavigationToggle.reset();
            if (item.id == 'toggle-nav-jttc') {
              Element.show('jttc-block');
            } else if (item.id == 'toggle-nav-fpttw') {
              Element.show('fpttw-block');
            } else if (item.id == 'toggle-nav-rtgr') {
              Element.show('rtgr-block');
            } else if (item.id == 'toggle-nav-wstsc') {
              Element.show('wstsc-block');
            }
            
            
        });
    });
  }
  
};


Event.observe(window, 'load', function(e) {
    
  sfHover = function() {
    
    
    
    var sfEls = $$("#topnav li.main");
    
    
    
    for (var i=0; i<sfEls.length; i++) {
      var div = sfEls[i];
      
      // hide
      //var sub = Element.select(div, 'ul.sub li')[0];
      
      
      div.onmouseover=function() {
        this.className+=" sfhover";
        var mysub = Element.select(this, 'ul.sub')[0];
        mysub.className += " subhover";
        
        
        
      }
      div.onmouseout=function() {
        this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
        
        var mysub = Element.select(this, 'ul.sub')[0];
        mysub.className=mysub.className.replace(new RegExp(" subhover\\b"), "")
        
      }
    }
    
    
  }
  
  sfHover();
  
  // additional navigation hints
  
  NavigationToggle.init();
});
