This is where the problem comes in (the one I was talking about).

`.offsetTop` only tells you the vertical offset of `box` *from its closest parent* that is either the `<body>` or has `position: relative`. Hence you need a loop here and accumulate the `.offsetTop`s of its `.offsetParent`s all the way up until you reach the `<body>`.

Moreover, if you encounter something that has `display: table` on the way up, things get even more messy.

I think the safest thing to do here is to just copy `jQuery`'s `.offset()`. I think I have a CoffeeScript copy somewhere around, I remember doing this a few months ago.

I'll look it up on Monday.