function MetinfoNav(m,p){
    m.hover(function(){overnav($(this),p)},function(){outnav($(this),p)});
}


function overnav(dom,p){
                var my = dom.find('ul');
		if(my.length>0){
                var myli = my.find('li');
                var my_w = dom.outerWidth(true) + p;
                var my_h = dom.outerHeight(true);
				
	                my.css({
					    "position" : "absolute",
					    "display" : "block",
					    "height" : "auto",
					    "left" : -(p/2),
					    "top" : my_h
					}); 	
                    if( myli.outerWidth(true) <= my_w ){
		                my.width(my_w);
		            }else{ 
		                myliWdith(myli,my);
		            }
					
        }	
}

function outnav(dom){
    var my = dom.find('ul');
	    my.css({
			"display" : "none"
		});
}

function myliWdith(group,groul) {
	tallest = 0;
	group.each(function() {
		thisWdith = $(this).width();
		if(thisWdith > tallest) {
			tallest = thisWdith;
		}
	});
	group.width(tallest);
}
