title: Jquery gallery next/previous buttons
body: <p>I made a jquery gallery a half year ago (SO community helped me alot cause I'm not familiar enough with js/jquery) and now I'd like to add next/previous buttons to this gallery. I tried combine it with other galleries but nothing worked properly. </p>
  
  <p>here is js:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function showPic (whichpic) {
  if (document.getElementById) {
  $('#actimg').fadeOut(170);
  setTimeout(function() {
  document.getElementById('actimg').src = whichpic.href; 
  $('#actimg').fadeIn(170);
  }, 170);
  return false; 
  } else {
  return true;
   } 
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>and html:</p>
  
  <pre><code>&lt;img id="actimg" src="" width="600" height="400" alt="main" /&gt;
  
  &lt;a onclick="return showPic(this)" href="example_1.jpg"&gt;
  &lt;img height="39px" width="58px" src="example_1.jpg" alt="thumbnail" /&gt;
  &lt;/a&gt;
  
  &lt;a onclick="return showPic(this)" href="example_2.jpg"&gt;
  &lt;img height="39px" width="58px" src="example_2.jpg" alt="thumbnail" /&gt;
  &lt;/a&gt;
  
  &lt;a onclick="return showPic(this)" href="example_3.jpg"&gt;
  &lt;img height="39px" width="58px" src="example_3.jpg" alt="thumbnail" /&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>gallery looks like <a href="http://www.rafsimons.com/collections/aw-11/" rel="nofollow">http://www.rafsimons.com/collections/aw-11/</a> but it's not flash and there are no next/prev buttons which I want to make now. Thanks in advance for help.</p>