JQuery Accordian Menu Operation
<p>I'm building a really simple JQuery Accordian menu and having issues with the next command being allowed to run before the previous has finished?</p>

<p>Any ideas how I can restrict any further operations until previous has finished?</p>

<p>Thanks</p>

<p>Jake</p>

<pre><code>$(function(){
$("ul#prjcats li ul").hide(); 
$("ul#prjcats&gt;li&gt;a").click(function() {
$(this).addClass("current");
var $subnav = $(this).next();
    if($subnav.is(":visible")) {

// CLOSE ON CLICK
    $subnav.animate({height: "toggle"}, 600,      "easeInOutSine").prev().removeClass("current");
    }

// TRANSITION
    if(!$subnav.is(":visible")) {
    $("ul#prjcats li ul:visible").animate({height: "toggle"}, 600, "easeInOutSine").prev().removeClass("current");

// OPEN     
    $subnav.animate({height: "toggle"}, 600, "easeInOutSine");
    }
    return false;
});
});
</code></pre>
