$(document).ready(function(){
  var num_of_lis = $("#nav>ul>li").length;
  var lis = $("#nav>ul>li").each(function(index){
    if (index < num_of_lis){
      // all but the last one
      var me = $(this)
      ,   myWidth = me.width();
      if (myWidth < 200){
        me.children("ul").css("width", myWidth - 4);  
      }
    }
  });
});

