Abbreviated code please

Abbreviated code please

I need code please abbreviate:

Script 1:
  1. $(document).ready(function (){
  2. //cache nav
  3. var nav = $(".pre,.pro");
  4. //add indicator and hovers to submenu parents
  5. nav.find("li").each(function() {
  6. if ($(this).find("ul").length > 0) {
  7. $("").text("").appendTo($(this).children(":first"));
  8. //show subnav on hover
  9. $(this).mouseenter(function() {
  10. $(this).find("ul").stop(true, true).slideDown();
  11. });
  12. //hide submenus on exit
  13. $(this).mouseleave(function() {
  14. $(this).find("ul").stop(true, true).slideUp();
  15. });
  16. }
  17. });
  18. })(jQuery);

Script 2:

  1. $(document).ready(function (){
  2. //cache nav
  3. var nav = $(".form");
  4. //add indicator and hovers to submenu parents
  5. nav.find("li").each(function() {
  6. if ($(this).find("ul").length > 1) {
  7. $("").text("").appendTo($(this).children(":first"));
  8. //show subnav on hover
  9. $(this).mouseenter(function() {
  10. $(this).find("ul").stop(true, true).slideDown();
  11. });
  12. //hide submenus on exit
  13. $(this).mouseleave(function() {
  14. $(this).find("ul").stop(true, true).slideUp();
  15. });
  16. }
  17. });
  18. })(jQuery);