code: function (element) {
        var docDomEl = $document[0];
        var offsetParent = element.offsetParent || docDomEl;
        while (offsetParent && offsetParent !== docDomEl && isStaticPositioned(offsetParent) ) {
          offsetParent = offsetParent.offsetParent;
        }
        return offsetParent || docDomEl;
      }
docs: returns the closest, non-statically positioned parentOffset of a given element
  @param element