modifies getOffsets to take scroll offsets into account

the offsets must be relative to the browser window, so anything beyond
the top or left edge of the viewing area of scrolling elements is taken
off.