consistent coding: do not execute costly jquery calls such as `.offset()` and jQuery selectors too often but keep their result in a local variable and re-use the data.