javascript only loads images needed for screen size