A simple JavaScript solution for preload images on demand