JavaScript implementation of the iOS shimmer effect