/**
 * Main.
 */
 
if (typeof(Behavior) == 'undefined') var Behavior = {};
Behavior.IE = 
	{
		FixNavigation: new Class.create({
			initialize: function() {
				// importante: no hacer bind, porque utiliza el this del propio
				// objeto del dom
				this.event_mouseover = this.mouseover;
				this.event_mouseout = this.mouseout;
				var menus = $$('.nav');
				for (var i = 0; i < menus.length; i++) {
					var lis = menus[i].select('li');
					for (var j = 0; j < lis.length; j++) {
						// no funciona bien con el observe de prototype
						// dejar asi
						lis[j].onmouseover = this.event_mouseover;
						lis[j].onmouseout = this.event_mouseout;
					}
				}
			},
			mouseover: function(event) {
				this.className+=" iehover";
			},
			mouseout: function(event) {
				this.className=this.className.replace(new RegExp(" iehover\\b"), "");
			}
		})
	}

function main() 
{
	if (Prototype.Browser.IE) {
		new Behavior.IE.FixNavigation();
	}
}

Event.observe(window, "load", main, false);


