Drop down menu not sliding back up

Drop down menu not sliding back up

I have a drop down menu that works as long as you click the links left to right and don't try to go back. I have realized the the sub-menus are sliding down but are not sliding back up if you click an item to the left.

You can see a current example here Click on Studio Collections.

I know the problem is somewhere in this code, I just can't figure it out.

$('span.expand').toggle(
         /*if it's clicked once, find all child lists and expand*/
            function(){
            /*var aar =
            $("p").append("<strong>Hello</strong>");*/
            $(this).toggleClass('nav_selected');
                if ( $(this).parent().siblings().children().hasClass('contract')){
               $(this).parent().siblings().children().removeClass('nav_selected')
               $(this).parent().siblings().children().removeClass('contract').nextAll('ul').slideUp();                                    
               }
            $(this).toggleClass('contract').nextAll('ul').slideDown();
            
         },
         /*if it's clicked again, find all child lists and contract*/
            function(){
              $(this).toggleClass('nav_selected');
            $(this).toggleClass('contract').nextAll('ul').slideUp();
            
            
            }
        );



Thank you for your help.