code: function(type, callback, context) {
        if (callbacks[type]  === undefined) {
          return;
        }
        var cb = root[callback] || callback;
        if (typeof cb !== 'function') {
          return;
        }
        callbacks[type].push({callback: cb, context: context || this});
      }
docs: Add a callback function to be called in case one of the following events happens:
  
  start, error, end, result, resultMatch, resultNoMatch, errorNetwork, errorPermissionBlocked, errorPermissionDenied.
  
  ### Examples:
  
  annyang.addCallback('error', function () {
  $('.myErrorText').text('There was an error!');
  });
  
  // pass local context to a global function called notConnected
  annyang.addCallback('errorNetwork', notConnected, this);
  
  @param {String} type - Name of event that will trigger this callback
  @param {Function} callback - The function to call when event is triggered
  @param {Object} [context] - Optional context for the callback function
  @method addCallback