if/else statement
<p>I am trying to write an if/else statement that will hide my <code>.thumb</code> <code>&lt;div&gt;</code>s whenever the "about" or "contact" links are clicked. I want all of the <code>.thumb</code> <code>&lt;div&gt;</code>s to slide up. </p>

<p><a href="http://dl.dropbox.com/u/14080718/Final/UITabs15.html" rel="nofollow">http://dl.dropbox.com/u/14080718/Final/UITabs15.html</a></p>

<p>I don't have much experience writing if/else statementsI cant seem to figure out the right syntax any help you can give would be much appreciated. </p>

<pre><code>        $(function(){
    $('.thumb').hide();

    $('.subnav').click(function(){
        var $menuelement = $('.thumb').eq($(this).closest("li").index());//find the matching nth element in the menu
        if($menuelement.hasClass('active')){//if clicked element is already expanded

            $menuelement.removeClass('active').slideUp();//remove the active class and hide it

        } else {//otherwise,clicked element is not already expanded...

        if ($('.active').length&gt;0) {//...but another element is expanded
            $('.active').removeClass('active').slideUp( function(){
                $menuelement.addClass('active').slideDown();//add the active class and show it
            });

            } else {//another element is not expanded

            $menuelement.addClass('active').slideDown();//add the active class and show it

            }
        }
    });

    });
</code></pre>
