A JS script for pre-loading images