var menu=function(){
	var t=20,os=5,z=50,a;
	function dd(n){this.n=n; this.h=[]; this.c=[]}
	dd.prototype.init=function(pMenu,mHover){
		a=mHover; var w=document.getElementById(pMenu), s=w.getElementsByTagName('ul'), l=s.length, i=0;
		for(i;i<l;i++){
			var h=s[i].parentNode; this.h[i]=h; this.c[i]=s[i];
			h.onmouseover=new Function(this.n+'.st('+i+',true)');
			h.onmouseout=new Function(this.n+'.st('+i+')');
		}
	}
	dd.prototype.st=function(x,f){
		var c=this.c[x], h=this.h[x], p=h.getElementsByTagName('a')[0];
		clearInterval(c.t);
		c.style.overflow='hidden';
		if(f){
			p.className+=' '+a;
			c.style.zIndex=z; z++;
			c.style.overflow = 'visible';
			c.style.display = 'block';
			c.o = 100;
			c.style.opacity = 1;
			c.style.filter = '';
		} else {
			p.className=p.className.replace(a,'');
			c.t=setInterval(function(){sl(c)}, t);
		}
	}
	
	function sl(c){
		if (c.o > 0) {
			c.o-= os;
			c.style.opacity = c.o / 100;
			c.style.filter = 'alpha(opacity='+c.o+')';
		} else {
			c.style.display = 'none';
			c.style.overflow = 'none';
			clearInterval(c.t);
		}
	}
	
	return{dd:dd}
}
();
