$(document).ready(function(){
  var t = $('#navBar table');
	var textW = 0;
	var tw = t.width(); // table width
	var spans = t.find('span');
	spanCount = spans.length; // nr of links
	spans.each(function() {
		textW = textW + $(this).width(); // total amount of text width (that is, table minus padding)
	});
	var slack = Math.round((tw - textW)/spanCount); //
  
	spans.each(function() {
		var sw = $(this).width();
		$(this).closest('td').css('width', sw+slack+'px');
	});
});

