title: Can these two jQuery functions be combined into one that is more efficient?
body: <p>I have two functions in jQuery to hide and then show a header, and also swap the buttons out so that when the header is hidden, the "show header" button appears, and vice versa.  They are as follows:</p>
  
  <pre><code>$('#close_header').click(function() {
      $('#header').animate({ top: '-=150px' }, 500);
      $(this).toggle();
      $('#open_header').toggle();
  });
  
  $('#open_header').click(function() {
      $('#header').animate({ top: '+=150px' }, 500);
      $(this).toggle();
      $('#close_header').toggle();
  });
  </code></pre>
  
  <p>The markup to go along with is as follows:</p>
  
  <pre><code>&lt;img src="images/close.png" id="close_header" class="header_control fadein button"&gt;
  &lt;img src="images/open.png" id="open_header" class="header_control fadein button"&gt;
  &lt;div id="header"&gt;
      *Header content.*
  &lt;/div&gt;
  </code></pre>
  
  <p>Is there any way to combine those two functions into one for neatness and efficiencies' sake?</p>