Added plain-JS version of jQuery's ".offset".