var DropDownMenu = Class.create();

DropDownMenu.prototype = {

 initialize: function(menuElement) {
	menuElement.childElements().each(function(node){
		// if there is a submenu
		var submenu = $A(node.getElementsByTagName("ul")).first();
		if(submenu != null){
			// make sub-menu invisible
			Element.extend(submenu).setStyle({display: 'none'});
			// toggle the visibility of the submenu
			node.onmouseover = node.onmouseout = function(e){
				
				 Element.toggle(submenu);
                
                if($(submenu).visible()) {
                    if(!this.iefix) {
                        //this.iefix = new UI.IframeShim().positionUnder(submenu);
                        //this.iefix.show();
                    } else {
                        //this.iefix.positionUnder(submenu);
                        //this.iefix.show();
                    }
                   
                } else if(this.iefix) {
                	
                	var hide = function() {
	                    //this.iefix.hide();
	                    Element.show(submenu);
                	};
                }
                
			}
		}
	});
}

};