docs: function(objectType, pageNum) {
              var img = this.getImage(),
                  retries = Crocodoc.ASSET_REQUEST_RETRIES,
                  loaded = false,
                  url = this.getURL(pageNum),
                  $deferred = $.Deferred();
  
              function loadImage() {
                  img.setAttribute('src', url);
              }
  
              function abortImage() {
                  if (img) {
                      img.removeAttribute('src');
                  }
              }
  
              // add load and error handlers
              img.onload = function () {
                  loaded = true;
                  $deferred.resolve(img);
              };
  
              img.onerror = function () {
                  if (retries > 0) {
                      retries--;
                      abortImage();
                      loadImage();
                  } else {
                      img = null;
                      loaded = false;
                      $deferred.reject({
                          error: 'image failed to load',
                          resource: url
                      });
                  }
              };
  
              // load the image
              loadImage();
  
              return $deferred.promise({
                  abort: function () {
                      if (!loaded) {
                          abortImage();
                          $deferred.reject();
                      }
                  }
              });
          }