window.addEvent('domready',function(){
	var dropdownElement = $('mainMenu');
	var DropDownMenu = new DropDown({
		'element': dropdownElement
	});
	
});
var DropDown = new Class({
	initialize: function(options){
		
		this.setOptions(options);
		var firstItems = this.options.element.getChildren();
		
		
		firstItems.each(function(firstItem){
			
			
			var subItem = firstItem.getElement('ul');
			if(subItem !== null){
				
				firstItem.addEvents({
					'mouseover': function(){
						subItem.setStyle('display','block');
					},
					'mouseout': function(){
						subItem.setStyle('display','none');
					}
				});
			}
		});
	}
});
DropDown.implement(new Options());
DropDown.implement(new Events());