//Modify the values to reflect the number of images in each folder
var numImages = Array();
numImages["bottom_left"] = 15;
numImages["top_right"] = 15;
numImages["bottom_center_column"] = 6;

function randomImage(folder,prefix,container) {
	var randomNum = Math.floor(Math.random()*numImages[folder]+1);
	if(randomNum < 10) randomNum = "0" + randomNum;
	container.html('<img src="images/random/'+folder+'/'+prefix+randomNum+'.jpg" alt="Random Image" />');
}

$(document).ready(function(){
	$(".rotateLeft").each(function(){
		randomImage("bottom_left","b",$(this));
	});
	$(".rotateRight").each(function(){
		randomImage("top_right","t",$(this));
	});
	$(".rotateMiddle").each(function(){
		randomImage("bottom_center_column","c",$(this));
	});

	$('.scrollDiv').jScrollPane({showArrows:true, scrollbarWidth:14,scrollbarMargin:10});
});
