code: function(href) {
          var format, regex;
          for(var key in this.graphicFormats) {
              if(this.graphicFormats[key].test(href)) {
                  format = key;
                  break;
              }
          }
          return format || this.defaultGraphicFormat;
      }
docs: Method: getGraphicFormat
  Given a href for an external graphic, try to determine the mime-type.
  This method doesn't try too hard, and will fall back to
  <defaultGraphicFormat> if one of the known <graphicFormats> is not
  the file extension of the provided href.
  
  Parameters:
  href - {String}
  
  Returns:
  {String} The graphic format.