update the masonry function for ajax effects