if (typeof(whispercast) == 'undefined') {
  whispercast  = {};
}
whispercast.uuid = whispercast.uuid ? whispercast.uuid : {};

/**
 * The character set from which the UUID will be built
 *
 * @access public
 **/
whispercast.uuid.chars = '0123456789ABCDEF'.split('');

/**
 * Creates a new UUID.
 *
 * @access public
 *
 * @return string The UUID.
 **/
whispercast.uuid.generate = function() {
  var uuid = [];
  for (var i = 0; i < 16; i++) {
    uuid[i] = whispercast.uuid.chars[0 | Math.random()*16];
  }
  return uuid.join('');
}

