title: Show div on image click then hide it after x seconds
body: <p>I'm trying to show a div when an image is clicked and then hide it after a given number of seconds. I've found two separate code samples that match my needs but I don't have the knowledge to put them together.</p>
  <p><strong>the code which makes content disappear after x seconds:</strong></p>
  <pre><code>&lt;script&gt;
      window.setTimeout(function() {
          $('#fadeout').hide(2000);
      }, 4000);
  &lt;/script&gt;
  </code></pre>
  <p><strong>The code which makes the div appear on imageclick:</strong></p>
  <pre><code>&lt;SCRIPT&gt;
  function fade(div_id, button) {
  
      if(button.value == 'FadeOut') {
          $('#'+div_id).fadeOut('slow');
          button.value = 'FadeIn';
      }
      else {
          $('#'+div_id).fadeIn('slow');
          button.value = 'FadeOut';
      }
  }
  
  $('#sometext').fadeOut(2);
  &lt;/script&gt;
  </code></pre>