var DropDownMenu = {
  init: function(event, element) {
    this.element = $(element);
    this.element.select('li.main').invoke('observe', 'mouseover', this.handleMouseOver);
    this.element.select('li.main').invoke('observe', 'mouseout', this.handleMouseOut);
  },
  handleMouseOver: function(event) {
    this.addClassName('over');
  },
  handleMouseOut: function(event) {
    this.removeClassName('over');
  }  
}

document.observe('dom:loaded', DropDownMenu.init.bindAsEventListener(DropDownMenu, 'navigation'));