implemented image caching and lightbox