$('#Menu').ready(function() {
	el = $('#Menu ul');
	width = el.width();
	curWidth = 0;
	
	widths = new Array();
	i = 0;
	el = el.children('ul>li').not('li ul li').each(function () {
		w = $(this).width();
		widths[i++] = w;
		curWidth += w;
	});
	ratio = width/(curWidth + .1);
	
	i = 0;
	el.each(function () {
		$(this).width(widths[i++] * ratio);
	});
	
	if ($('#Menu ul ul:visible').size() == 0) {
		$('#Main').css('margin-top', '40px');
	}
});