title: fading images simple slideshow javascript/html
body: <p>I am extremely new to javascript and im trying to use fade out/fade in photo slide show and i am trying to use a code i have seen else where but it just doesnt seem to be working can someone have a look and just point out where i might be going wrong.</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;div id="media" &gt;
      &lt;img src="test1.jpg" /&gt;
      &lt;img src="test2.jpg"/&gt;
      &lt;img src="test3.jpg" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>css</p>
  
  <pre><code>#media
  {
      border-style:groove;
      border-width:5px;
      border-color:green;
      background-color:purple;
      height:34%;
      width:30%;
      margin-top:40px;
      margin-right:5%;
      margin-bottom:50px;
      margin-left:5%;
      float:left;
  }
   #media img
  {
      width:100%;
      height:100%;
  }
  </code></pre>
  
  <p>script
      </p>
  
  <pre><code>     $('#media img:gt(0)').hide();
          setInterval(function () {
              $('#media :first-child').fadeOut(4000)
                                   .next('img')
                           .fadeIn(10)
                           .end()
                           .appendTo('#media');
          }, 4000); // 4 seconds
      &lt;/script&gt;
  </code></pre>
  
  <p>any help would be great.</p>
  
  <p>thank you for any help.</p>