var menux=function(){
	var t=15,z=50,s=4,a;
	function dd(n){this.n=n; this.h=[]; this.c=[]}
	dd.prototype.init=function(p,c){
		a=c; var w=document.getElementById(p), 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;
			if(!c.mh){c.style.display='block'; c.style.height=''; c.mh=c.offsetHeight; c.style.height=0}
			if(c.mh==c.offsetHeight){c.style.overflow='visible'}
			else{c.style.zIndex=z; z++; c.t=setInterval(function(){sl(c,1)},t)}
		}else{p.className=p.className.replace(a,''); c.t=setInterval(function(){sl(c,-1)},t)}
	}
	function sl(c,f){
		var h=c.offsetHeight;
		if((h<=0&&f!=1)||(h>=c.mh&&f==1)){
			if(f==1){c.style.filter=''; c.style.opacity=1; c.style.overflow='visible'}
			clearInterval(c.t); return
		}
		var d=(f==1)?Math.ceil((c.mh-h)/s):Math.ceil(h/s), o=h/c.mh;
		c.style.opacity=o; c.style.filter='alpha(opacity='+(o*81.5)+')';
		c.style.height=h+(d*f)+'px'
	}
	return{dd:dd}
}();


function prepareImageSwap(elem, mouseOver, mouseOutRestore, mouseDown, mouseUpRestore, mouseOut, mouseUp) {
    //Do not delete these comments. 
    //Non-Obtrusive Image Swap Script V1.1 by Hesido.com 
    //Attribution required on all accounts 
    if (typeof (elem) == 'string') elem = document.getElementById(elem);
    if (elem == null) return;
    var regg = /(.*)(-1\.)([^\.]{3,4})$/
    var prel = new Array(), img, imgList, imgsrc, mtchd;
    imgList = elem.getElementsByTagName('img');
    for (var i = 0; img = imgList[i]; i++) {
        if (!img.rolloverSet && img.src.match(regg)) {
            mtchd = img.src.match(regg);
            img.hoverSRC = mtchd[1] + '-2.' + mtchd[3];
            img.outSRC = img.src;
            if (typeof (mouseOver) != 'undefined') {
                img.hoverSRC = (mouseOver) ? mtchd[1] + '-2.' + mtchd[3] : false;
                img.outSRC = (mouseOut) ? mtchd[1] + '_ou.' + mtchd[3] : (mouseOver && mouseOutRestore) ? img.src : false;
                img.mdownSRC = (mouseDown) ? mtchd[1] + '_md.' + mtchd[3] : false;
                img.mupSRC = (mouseUp) ? mtchd[1] + '_mu.' + mtchd[3] : (mouseOver && mouseDown && mouseUpRestore) ? img.hoverSRC : (mouseDown && mouseUpRestore) ? img.src : false;
            }
            if (img.hoverSRC) { preLoadImg(img.hoverSRC); img.onmouseover = imgHoverSwap; }
            if (img.outSRC) { preLoadImg(img.outSRC); img.onmouseout = imgOutSwap; }
            if (img.mdownSRC) { preLoadImg(img.mdownSRC); img.onmousedown = imgMouseDownSwap; }
            if (img.mupSRC) { preLoadImg(img.mupSRC); img.onmouseup = imgMouseUpSwap; }
            img.rolloverSet = true;
        }
    }
    function preLoadImg(imgSrc) {
        prel[prel.length] = new Image(); prel[prel.length - 1].src = imgSrc;
    }
}
function imgHoverSwap() { this.src = this.hoverSRC; }
function imgOutSwap() { this.src = this.outSRC; }
function imgMouseDownSwap() { this.src = this.mdownSRC; }
function imgMouseUpSwap() { this.src = this.mupSRC; }

//If the browser is W3 DOM compliant, execute setImageSwaps function
if (document.getElementsByTagName && document.getElementById) {
    if (window.addEventListener) window.addEventListener('load', setImageSwaps, false);
    else if (window.attachEvent) window.attachEvent('onload', setImageSwaps);
}

//When document loads, apply the prepareImageSwap function to various images with our desired settings
function setImageSwaps() {
    //Hover with restore, most basic usage - for any image in document.body that are not yet processed (function accepts elements,too)
    prepareImageSwap(document.body);
    //Note that once an image is processed, it won't be processed again, so you should set more specific images first, e.g. document.body, as it is the grand
    //container, has to be processed last.
}
