/**
 * Base RunTrackr JavaScript.
 *
 * Defines constants and other global variables used throughout the site.
 *
 * @namespace runtrackr
 * @requires jQuery >= 1.2.2
 */

if (typeof(runtrackr) == 'undefined')
  runtrackr = {};

/**
 * Default timeout for Ajax operations, in milliseconds.
 *
 * @type Number
 */
runtrackr.AJAX_TIMEOUT = 50000;
// TODO: Set global jQuery timeout using `jQuery.ajaxSetup( options )`.

/**
 * Allowed distance units.
 */
runtrackr.DISTANCE_UNITS =
{
  miles: 1,
  km:   0
};
runtrackr.DISTANCE_UNITS.CONVERSIONS =
{
  MILES_TO_KMS: 1.609344
};

/**
 * Allowed weight units.
 */
runtrackr.WEIGHT_UNITS =
{
  lbs: 0,
  kg: 1
};
runtrackr.WEIGHT_UNITS.CONVERSIONS =
{
  LBS_TO_KGS: 0.45359237
};

// TODO: Define and use other precision values here, like for calories, weight, etc.
