.click function -

.click function -

Hi all, here are my intentions.
1) display defaulted 'tertiarynav' for first subnav item and hide rest
2) when a different subnav is clicked, display it's 'tertirary nav'
3) when the selected / active dropdown is clicked, hide it's contents.

My problem with following script, when clicking the selected / active dropdown, it slides up and back down again.

  1. $(document).ready(function(){
  2.         $('ul#sidebar li.subnav ul.childnav:not(:first)').hide();
  3.        
  4.         //select anchors in 'subnav' li, but NOT children
  5.         $('.subnav a:not(.childnav a)').click(function(){
  6.             $('.childnav:visible').slideUp('slow');
  7.             $(this).next().slideDown('fast');
  8.             return false; //cancel click through       
  9.         });
  10.     });

  1. <ul id="sidebar">
  2.         <li>Video Library
  3.         <ul>
  4.         <li class="subnav"><a href="#nogo" title="Getting Started">Getting Started</a>
  5.                 <ul class="childnav" style="margin-left:20px;padding-right:20px;">
  6.                 <li><a href="#nogo" title="How The Referral Program Works">
  7.                 How The Referral Program Works</a></li>
  8.        
  9.                 <li><a href="#nogo" title="&ldquo;May I Make a Recommendation?&rdquo; - How to Ask For a Referral">
  10.                 &ldquo;May I Make a Recommendation?&rdquo; - How to Ask For a Referral</a></li>
  11.                
  12.                 <li><a href="#nogo" title="Talking Points - How To Start the Conversation">
  13.                 Talking Points - How To Start the Conversation.</a></li>
  14.                
  15.                 <li><a href="#nogo" title="Who We Are - Laughlin Associates">
  16.                 Who We Are - Laughlin Associates, <abbr title="Incorporation">inc.</abbr></a></li>
  17.                 </ul><!--3-->
  18.         </li><!--2-->
  19.        
  20.         <li class="subnav"><a href="#nogo" title="Understanding Business Entities">Understanding Business Entities</a>
  21.                 <ul class="childnav" style="margin-left:20px;padding-right:20px;">
  22.                 <li><a href="#nogo">business entities 1</a></li>
  23.                 <li><a href="#nogo">business entities 2</a></li>
  24.                 <li><a href="#nogo">business entities 3</a></li>
  25.                 <li><a href="#nogo">business entities 4</a></li>
  26.                 </ul><!--3-->
  27.         </li><!--2-->
  28.        
  29.         <li class="subnav"><a href="#nogo" title="The Corporate Veil Protection Service">The Corporate Veil Protection Service</a></li>
  30.         </ul>
  31.         </li><!--1-->
  32.     </ul><!--End sidebar-->

Any suggestions?
Thanks in advance!