offsetTop cross-browser compatibility fix

Just changed the offsetTop function to prevent unexpected results in different browsers.
Merge pull request #7 from ehsan89/patch-1

offsetTop cross-browser compatibility fix