Fixed gallery masonry and added loading gif and ajax error message.