updated updatePositions(). moved document.body.scrollTop lookup out of the for loop to avoid forced synchronous layout