$(document).ready(function(){
	$("div.svw").prepend("<img src='http://www.rsanti.com.ar/images/svwloader.gif' class='ldrgif' alt='loading...'/ >");
});
$(window).load(function(){
  autoSlide = function(){
		imageViewer.find("li:first-child").animate({opacity: 0}, 1500, "swing");
		imageViewer.find("li:first-child").next().animate({opacity: 1}, 1500, "swing", function(){
      imageViewer.find("li:first-child").clone().appendTo(imageViewer);
			imageViewer.find("li:first-child").remove();
		});
	}
  var container = jQuery("#image");
	container.find("img.ldrgif").remove(); // removes the preloader gif
	container.removeClass("svw").addClass("stripViewer");
	pictWidth = container.find("img").width();
	pictHeight = container.find("img").height();
	pictEls = container.find("li").size();
	z = pictEls;
  container.find("li").each(function(){
		$(this).css("z-index", z);
		z--;
	});
	imageViewer = container.find("ul");
	imageViewer.css("width", pictWidth);
	imageViewer.css("height" , pictHeight);
	setInterval("autoSlide()", 5000);
});
