//Preload function for carrousel images
jQuery.preloadImages = function(images) {
  images.each(function(i) {
  	jQuery("<img>").attr("src", this.src);
  });
}

//When page ready, preload the images and start the carrousel
$(document).ready(function()
{
  //Preload the fotos
  $.preloadImages($("img.carrouselfoto"));

  //Cycle the fotos
  $('#carrousel').cycle({
    fx:       'fade',
    pause:    1,
    timeout:  5000,
    speed:    1000
  });

});
