var Menu = {
    start: function () {
        var menu = $('menu');
		var menu_panels = menu.getFirst().getChildren();
        
        menu.getFirst().addEvents({
            'mouseenter': function () {
            },
            'mouseleave': function () {
            }
        });
    
        menu_panels.each(function (el) {
    	
            var second_list = el.getElement('ul');
            second_list.setStyles({
                'opacity': 0                
                
            });

            var fx = new Fx.Tween(second_list, {
                'wait': false,
                'duration': 200
            });
      
            el.addEvents({
                'mouseenter': function () {
					fx.cancel();
                    fx.start('opacity', 1);
                    this.addClass('hover');
                },
                'mouseleave': function () {
					fx.cancel();
                    fx.start('opacity', 0);
                    this.removeClass('hover');
                }
            });
        });
    }
};

window.addEvent('domready',function() {
  	Menu.start();

});
