toggle function
<p>my question is two functions are passed to toggle why.. and out side another function is there that is also confusing plz tell me</p>

<pre><code> $('#login a').toggle(function() {
    $(this)
      .addClass('active')
      .next('form')
      .animate({'height':'show'}, {
        duration:'slow',
        easing: 'easeOutBounce'
      });
  }, function() {
    $(this)
      .removeClass('active')
      .next('form')
      .slideUp();
  });
  $('#login form :submit').click(function() {
    $(this)
      .parent()
      .prev('a')
      .click();
  });
</code></pre>
