jQuery(document).ready(function(){

  jQuery("div#nav ul>li").not("ul > li > ul > li").each(function () {
    jQuery(this).clone()
                .prependTo( jQuery(this).children("ul") )
                .children("ul")
                .remove();
  });
  
});
