SubMenu = Class.create({
  initialize: function(menu) {
    this.menu = menu;
    this.initEvents();
  },
  initEvents: function() {
    this.menu.select('a.head').each(function(link) {
      var sub_el = link.next();
      sub_el.setStyle('display:none');
      link.observe('mouseover', function(e) {
        
        // show me the selected menu
        this.showSub(sub_el);
        
      }.bind(this));
    }.bind(this));
  },
  showSub: function(sub_el) {
    // hide all menu's
    this.menu.select('a.head').each(function(link) {
      this.hideSub(link.next());
    }.bind(this));
    
    new Element.show(sub_el);
  },
  hideSub: function(sub_el) {
    new Element.hide(sub_el);
  }
});
