Jquery Problem Sort of Auto Slideshow
<p>I'm having some problems, I'd like to have a sort of slideshow where users have 4 buttons, and when they click one div appears and the others disappear. The div's are all in the same place with the same size. I'd also like to put this automatic</p>

<pre><code>var Idx = 1; 
var IntervalKey = setInterval = (auto, 5000);

var auto = function() {
  $("#MainImage").eq(Idx).fadeIn(1000);
  while(Idx &lt;3)  { 
    Idx++;
    $("#MainImage").eq(Idx).hide();
  }
  Idx++;
  if(Idx&gt;3) {
    Idx = 0;
  }
};

$(".botao-imagem").click(function(){
  Idx = $(".botao-imagem").index(this);
  auto();
}); 
</code></pre>
