title: jQuery reversing animation on second click
body: <p>I have a div element, that on click event, a link slides in. This works great, except I am now trying to get it so that if the link is clicked a second time, the animation reverses to its original state.</p>
  
  <p>I have tried to add a class to the link, but when the animation runs it ends up doing the same animation but backwards.</p>
  
  <pre><code>    $('a.contact').click(function() {
          $('#contact').animate({marginLeft:'500px'}, {queue:false, duration:'7000'});
          $('#contact').animate({width:'500px'}, {duration:'7000'});
          $('a.contact').css()
          $('a.contact').animate({marginLeft:'-500px'}, '250');
          $('a.contact')addClass('open');
      return false;
  });
  </code></pre>