OperativeWP = Class.create();
Object.extend(OperativeWP.prototype, 
{
	initialize: function(el) {
		this.container = $(el);
		if (this.container == undefined) return 0;
		this.elements = [];
		var u = this.container.down("ul");
		
		var ffll = u.select("div.op_menu_item");
		ffll.each((function(fl) {
			fl.observe("mouseover", this.overItem.bind(this), false);
			
			var sl = $(fl.id+"_content");
			sl.controller = fl;
			
			this.elements.push({fl:fl, sl:sl});
		}).bind(this));
	},
	overItem: function(e) {
		var div = e.element();
		div.addClassName("op_menu_item_sel");
		this.elements.each((function(e) {
			if (div.id+"_content" == e.sl.id) {
				if (e.sl.style.display == "none") {
					e.sl.setStyle({opacity:0});
					e.sl.show();
					e.sleffect = new Effect.Opacity(e.sl, {from: 0, to: 1.0, duration: 0.5});
				} else {
					e.sl.show();
					e.sl.setStyle({opacity:1.0});
				}
			} else {
				e.sl.controller.removeClassName("op_menu_item_sel");
				e.sl.hide();
			}
		}).bind(this));
	}
});
