//Caption Tool
CaptionWidget = Class.create();
CaptionWidget.prototype = {
   initialize: function(element){
      this.timeout=null;
      this.hovering = false;
      this.element = $(element);
      this.cap = $(element).down('.infopop');
      this.mouseoverwindowListener = function(){this.hovering = true;clearTimeout(this.timeout);}.bindAsEventListener(this);
      this.mouseoutwindowListener = function(){this.hovering = false;
         this.timeout=setTimeout(function(){Element.hide(this.cap);}.bind(this), 150);}.bindAsEventListener(this);
      //Event.observe(this.cap, 'mouseover', this.mouseoverwindowListener);
      //Event.observe(this.cap, 'mouseout', this.mouseoutwindowListener);

      this.mouseoverListener = function(){Element.show(this.cap);clearTimeout(this.timeout);}.bindAsEventListener(this);
      this.mouseoutListener = function(){
            if(!this.hovering){this.timeout=setTimeout(function(){Element.hide(this.cap);}.bind(this), 250);}
      }.bindAsEventListener(this);
      Event.observe(this.element, 'mouseover', this.mouseoverListener);
      Event.observe(this.element, 'mouseout', this.mouseoutListener);
   }
}



navHover = function() {
       
	var lis = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<lis.length; i++) {
                
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);

Event.onDOMReady(function(){
	$('cwrap').getElementsBySelector('ul.dir li').each(function(el,i){
		new CaptionWidget(el);
	});
}
);