This script IS necessary for page load IF there is an image-modal in the unit that is being loaded.