functions.js: modified to show cropped image overlay more clearly