title: jQuery ui menu global scope
body: <p>I am using the jQuery ui menu and this function to keep track of what menu item is selected:</p>
  
  <pre><code>$(document).ready(function(){
      $( "#menu" ).menu({
          select: function(event, ui) {
              alert(ui.item.text());
          }
      });
  });
  </code></pre>
  
  <p>Is there a way to make their selection into a global scope variable? Currently doing everything in this function is getting messy.</p>
  
  <p>Thanks</p>