Adding a jquery active state to an accordian
<p>for the life of me I can not figure out how to add an acitve state to this accordian I have. I feel like im close, but I have to click the bars twice so that the arrow states change. Any ideas on what Im doing wrong?</p>

<pre><code>    $('ul.expand').each(function(){
    $('li.md', this).filter(':first').addClass('top').end().filter(':not(.open)').next().hide();
    $('li.md', this).click(function(){
        if($(this).hasClass('open')) {
            $(this).find('.arrow').addClass('active');
            return false;
        } else {
            $(this).find('.arrow').removeClass('active');
            $(this).parent().find('li.md').removeClass('open').next().filter(':visible').slideUp();
            $(this).addClass('open').next().slideDown();
            $(this).find('.arrow').addClass('active');
        }
    });
});
</code></pre>

<p>and here is the HTML:</p>

<p><a href="http://www.lastyearsloss.com/mav/mobile/" rel="nofollow">http://www.lastyearsloss.com/mav/mobile/</a></p>
