New Menu Widget : Api to close/collapse menu

New Menu Widget : Api to close/collapse menu

Hi,

I'm currently using the newly release widget and I have hard time to figure it out on how can I achieve my simple goal. I wan't to close the current active submenu after clicking it.
<ul id="nav">
      <li><a href="home">Home</a></li>
      <li><a href="entry">Entry</a>
            <ul class="subnav">
                  <li><a href="entry/product">Product</a></li>
                  <li><a href="entry/other">Other</a></li>
            </ul>
     <li><a href="document">Document</a></li>
</ul>

var menu = $("#nav").menu({
        select: function( event, ui ) {
            var link = ui.item.children( "a:first" );
            loadContent(link.attr( "href" ));          
            event.preventDefault();
        }
    });

On my understanding the select function is the event being triggered after clicking the menu item.
I'm using loadContent() to call pages via ajax. But my problem is, how can I close the currently active submenu after clicking/selecting the menu item?

Thank you!