jQuery(document).ready(function() {

	var width = (Math.ceil($(window).width() / 250))*250;
	
	$('#Sparks').css({
		'width' : width
	});
	

	$('#Sparks').masonry({ singleMode: true , itemSelector: '.spark' });	
	
	var marginleft = width/2,
		margintop = $('#Sparks').height()/2;
		
	$('#Sparks').css({
		'margin-left' 	: "-"+marginleft+"px",
		'margin-top' 	: "-"+margintop+"px",
		'top'			: "50%",
		'left'			: "50%"
	});

});

window.onload = function()
{
	(function hidenext(jq){
	    jq.eq(0).animate({opacity : '1.0'},150, function(){
	        (jq=jq.slice(1)).length && hidenext(jq);
	    });
	})($('#Sparks div.spark'))
}
