wistia/wistia-labs — pull request #12 by bschwartz (2014-01-24 01:33:36+00:00)
Title: Dim The Lights: More accurate pageOffset method

This is to fix an issue with the pageOffset method that was causing it to misreport if there was a margin on the element.

The new code is modeled off of this (which I believe was originally taken from jQuery): http://stackoverflow.com/questions/8111094/cross-browser-javascript-function-to-find-actual-position-of-an-element-in-page

@MaxPower15 This is a bit outside my area of expertise. I tested locally in Chrome, Safari, Firefox. Anything look suspect to you?