Added document.ready for image load waiting on the gallery page type initial load