// DOM ready
	 $(function() {
	   
      // Create the dropdown base
      $("").appendTo("nav");
      
      // Create default option "Go to..."
      $("", {
         "selected": "selected",
         "value"   : "",
         "text"    : "Go to..."
      }).appendTo("nav select");
      
      // Populate dropdown with menu items
      $("nav.mainMenu a").filter(function() {
    	    return !$(this).siblings("ul").length
    	}).not(".current").each(function() {
       var el = $(this);
       $("", {
           "value"   : el.attr("href"),
           "text"    : el.text()
       }).appendTo("nav select");
      });
      
	   // To make dropdown actually work
      $("nav select").change(function() {
        window.location = $(this).find("option:selected").val();
      });
	 
	 });