code: function( element ) {
              var result = new $.Point(),
                  isFixed,
                  offsetParent;
  
              element      = $.getElement( element );
              isFixed      = $.getElementStyle( element ).position == "fixed";
              offsetParent = getOffsetParent( element, isFixed );
  
              while ( offsetParent ) {
  
                  result.x += element.offsetLeft;
                  result.y += element.offsetTop;
  
                  if ( isFixed ) {
                      result = result.plus( $.getPageScroll() );
                  }
  
                  element = offsetParent;
                  isFixed = $.getElementStyle( element ).position == "fixed";
                  offsetParent = getOffsetParent( element, isFixed );
              }
  
              return result;
          }
docs: Determines the position of the upper-left corner of the element.
  @function
  @param {Element|String} element - the element we want the position for.
  @returns {OpenSeadragon.Point} - the position of the upper left corner of the element.