title: jQuery + If Statement
body: <p>I'm trying to teach myself some basic jquery and am having trouble with an if statement I'm trying to use. My code is as follows:</p>
  
  <pre><code>var animate = 0;
  
  $('a').click(function () {
  if (animate == 0) {
  $('#shadow').fadeOut(500);
  var animate = 1;
  }
  });
  </code></pre>
  
  <p>I'm hoping to use some else statements further down the line, so that depending on the value of "animate" it will perform a different jquery action when clicked.  I'm sure I've overlooked something obvious, but I'm banging my head against a wall trying to figure out what it is.</p>
  
  <p>Any help would be most appreciated!</p>