swfobject.registerObject("flash", "9.0.0");

$(document).ready(function(){

	$('#image_gallery img').hide();

	var position = [];

	for(var i = 0; i < 10; i++) {
	var found = true;
	while(found){
		var num = Math.round(Math.random() * 9);
		found = false;
		for(var j = 0; j < i; j++){
		    if(position[j] == num) found = true;
		    }
		    }
		    position.push(num);
	}

	i=0;

	var int = setInterval(revealThumbs,500);

	function revealThumbs() {

	if (i==10){
	clearInterval(int);
	}
			$('#image_gallery img').eq(position[i++]).fadeIn(1200);
	}


});


function showSuccessStory(location){
    document.location.href = location;
}