function MetinfoNav(m,p,type){
    m.hover(function(){ 
	    overnav($(this),p,type);
	},function(){
	    outnav($(this),p,type);
	});
}

function overnav(dom,p,type){
                var my = dom.find('dl');
		if(my.length > 0){
                var myli = my.find('dd');
                var my_w = dom.outerWidth(true) + p;
                var my_h = dom.outerHeight(true);
                var m_h = type==2?"0px":"auto";
                var m_d = type==3?"none":"block";	
	                my.css({
					    "display" : m_d,
					    "position" : "absolute",
						"height":m_h,
					    "left" : -(p/2),
					    "top" : my_h
					}); 
				var liy = myli.outerHeight(true)*myli.length;
					if(type==2){my.animate({ height:liy },200);}
					if(type==3){my.fadeIn("slow");}	
	            var tallest = 0;
	                myli.each(function() {
		                thisWdith = $(this).outerWidth(true);
		                if(thisWdith > tallest) {
			                tallest = thisWdith;
		                }
	                });
	            var Width = tallest > my_w?tallest:my_w;
				    my.css("width",Width);	
					
        }	
}

function outnav(dom,p,type){
    var my = dom.find('dl');
	if(my.length > 0){
       if(type==2){ my.animate({ height:'0px' },200,function(){ my.css("display","none");});}
	   if(type!=2){ my.removeAttr("style");}
		my.css("display","none");
	}
}
