
var fw = {};

fw.Menu = new Class({

  Implements: [Events, Options],

  options: {
    baseSize: 100,
    extendedSize: 200,
    buttonSelectors: 'li',
    listSelectors: 'div',
    defaultEvent: 'mouseover'
  },

  initialize: function(container, options) {

    this.setOptions(options);

    this.container = container;
    this.buttons   = container.getElements(this.options.buttonSelectors);

    this.buttons.each(function(item) {
      var list = item.getElement(this.options.listSelectors);

      if (list) {
        item.addEvent(this.options.defaultEvent, this.showEventHandler.bind(this));
        list.set('slide', {mode: 'horizontal', wrapper: list.getParent('li')});
        list.slide('hide');
      }
      
    }.bind(this));

  },

  showEventHandler: function(event) {

    var list = event.target.getParent().getElement(this.options.listSelectors);
    list.set('slide', {mode: 'horizontal', wrapper: list.getParent('li')});
    list.slide();
  }

  



});
