Get element's offset relative to the document. Source: http://stackoverflow.com/questions/5598743/finding-elements-position-relative-to-the-document/5598797#5598797