// Constants
var boxWidth = 341; /* width of the mouseover boxes left and right */
var brake = 60; /* the bigger this number, the slower the movement */
var t;
	
window.onload=function () {
	var div = $('.galleryWrapper');
	var wrapperWidth = div.width();
	
	var numberOfItems = $(".galleryItems").children().length;
	var itemWidth = $(".galleryItems").children(":first-child").outerWidth();	
	if (itemWidth==0) itemWidth=300;
	var maxScrollLeft = (itemWidth*numberOfItems)-wrapperWidth+20;
	$(".galleryItems").css("width", (itemWidth*numberOfItems)+"px")
	$(".galleryItems").show();
	$(".loading_pic").hide();
	
}

