google.setOnLoadCallback(function() {
	$(".img").css({ opacity: 0 });
	$(".img, blockquote, cite").show();
	$('ul#quotes').quote_rotator({
		rotation_speed: 7000,
		pause_on_hover: true
	});
	InitiateBackgroundImage("#shortstoryimg", "20px", "0px", 1000);
	InitiateBackgroundImage("#callingimg", "-10px", "10px", 1500);
	InitiateBackgroundImage("#environmentimg", "30px", "-50px", 2500);
	InitiateBackgroundImage("#contactimg", "0px", "0px", 3500);
});

function InitiateBackgroundImage(elm, x, y, timeout) {
	if(!timeout) { var timeout = 500; }
	else { timeout = 500+timeout; }

	setTimeout("AnimateImage('#"+$(elm).attr("id")+"', '"+x+"', '"+y+"');", timeout);
}

function AnimateImage(elm, posleft, postop) {
	$(elm).ready(function() {
		$(elm).animate({ opacity: 1, left: "+="+posleft, top: "+="+postop }, 500);
	});
}