/* Fotoslider script Copyright Simgroep.nl */
var slideimages = new Array();

function Slide(){
// Start animation
  tdiv = '';
  $("#imagescroller_first").animate({left: '-=275px'}, 800);
  $("#imagescroller_second").animate({left: '-=275px'}, 800);
  setTimeout("ChangeContent(tdiv)",1000);
  t=setTimeout("Slide()",3000);
}

function ChangeContent(wichdiv){
  //Change the picture and position
  tdiv = document.getElementById("imagescroller_first");
  tdiv2 = document.getElementById("imagescroller_second");
  if (i==slideimages.length-1){
      i=0;
  }
  else {
      i++;
  }
  if(tdiv.style.left == "-275px"){
    tdiv.style.left = 275 +"px";
    tdiv.innerHTML=slideimages[i];
  }
  if(tdiv2.style.left == "-275px"){
    tdiv2.style.left = 275 +"px";
    tdiv2.innerHTML=slideimages[i];
  }


}

$(document).ready(function(){
i = 0;
if (slideimages.length>1){
      i=2;
  } else {
      i=0;
  }
t=setTimeout("Slide()",3000);
  // Stop animation when mouse is over image
  $("#imagescroller_main").mouseover(function(){
    clearTimeout(t);
  }).bind("mouseleave",function(){
      t=setTimeout("Slide()",3000);
    });
});

