$(function () {
	$('div.imgcol img').hide();//hide all the images on the page
	$('div.imgcol').css("width","750px").css("height","500px").css("background", "url(/images/ajax-loader.gif) 50% 50% no-repeat");
	//$('div.imgcol').css("background-color", "#f00");
});

var i = 0;//initialize
var int=0;//Internet Explorer Fix
$(window).bind("load", function() {//The load event will only fire if the entire page or document is fully loaded
	var int = setInterval("doThis(i)",500);//500 is the fade in speed in milliseconds
    $('div.imgcol').css("height","");
	//alert("Klart!");
});

function doThis() {
	var imgs = $('div.imgcol img').length;//count the number of images on the page
	//alert("imgs: " + imgs + ":: int: " + int);
	if (i >= imgs) {// Loop the images
		//alert(i + "/" + imgs);
		clearInterval(int);//When it reaches the last image the loop ends
	}
	$('.imgcol img:hidden').eq(0).fadeIn(300);//fades in the hidden images one by one
	i++;//add 1 to the count
}
