jQuery(document).ready(function($){

	var $wall = $('#wall');
	var $box = $('.hentry')
	
	$wall.masonry({
  	singleMode: true,
  	columnWidth: 240, 
 	itemSelector: '.box',
	});
	
	$wall.infinitescroll({
  	navSelector  : 'div.navigation',  // selector for the paged navigation 
  	nextSelector : 'div.navigation a:first',  // selector for the NEXT link (to page 2)
  	itemSelector : '#content div.post',     // selector for all items you'll retrieve
  	loadingText  : '',   
  	donetext  : '',
  	debug: false,
  	
  	errorCallback: function() { 
    	// fade out the error message after 2 seconds
    	$('#infscr-loading').animate({opacity: .8},3000).fadeOut('slow');   
  	}},
  		// call masonry as a callback
  		function( newElements ) { 
    	$(this).masonry({ appendedContent: $( newElements ) }); 
  	});	
	
});
