//BODY MASS CALCULATOR
	function calcEnglish(form, feet, inches, pounds) {
		if ((! inches) || isNaN(inches)) inches = 0;
		TotalInches = eval(feet*12) + eval(inches);
		//form.calcval.value = Math.round( (pounds * 703) / (TotalInches*TotalInches) );
		form.calcval.value = Math.round(pounds*703*10/(TotalInches*TotalInches))/10;
	}

	function calcMetric(form, meters, kilograms) {
	   form.calcval.value = Math.round(kilograms*10 /(meters*meters))/10;
	}


function init(){
  // add .js class to body, indicating javascript is enabled
  $('body').addClass('js');

  // Recreate $.post with 'error' callback
  $.post = function( url, data, callback, type ) {
		if ( jQuery.isFunction( data ) || (data != null && (jQuery.isFunction( data.success ) || jQuery.isFunction( data.error ))) ) {
			type = type || callback;
      callback = data;
			data = {};
		}
    settings = {
			type: "POST",
			url: url,
			data: data,
			dataType: type
		};
    if ( jQuery.isFunction( callback ) ) {
      settings.success = callback;
    } else {
      if ( jQuery.isFunction( callback.success ) ) {
        settings.success = callback.success;
      }
      if ( jQuery.isFunction( callback.error ) ) {
        settings.error = callback.error;
      }
    }

		return jQuery.ajax(settings);
	}
  // Recreate $.get with 'error' callback
  $.get = function( url, data, callback, type ) {
		if ( jQuery.isFunction( data ) || (data != null && (jQuery.isFunction( data.success ) || jQuery.isFunction( data.error ))) ) {
			type = type || callback;
      callback = data;
			data = null;
		}
    settings = {
			type: "GET",
			url: url,
			data: data,
			dataType: type
		};
    if ( jQuery.isFunction( callback ) ) {
      settings.success = callback;
    } else {
      if ( jQuery.isFunction( callback.success ) ) {
        settings.success = callback.success;
      }
      if ( jQuery.isFunction( callback.error ) ) {
        settings.error = callback.error;
      }
    }

		return jQuery.ajax(settings);
  };

  // Create missing postJSON function
  $.postJSON = function(url, data, callback) {

    // Force disable jQuery cache setting
    var cache = jQuery.ajaxSettings.cache; jQuery.ajaxSettings.cache = false;

    $.post(url, data, callback, "json");

    // Restore jQuery caching setting
    jQuery.ajaxSettings.cache = cache;
  };

  // IE/IE6 Specific jQuery
  if ($.browser.msie) {
    // Replace built-in fade functions in IE to disable cleartype bug
    jQuery.fn.fadeIn = function(speed, callback) {
      return this.animate({opacity: 'show'}, speed, function() {
        if (jQuery.browser.msie)
          this.style.removeAttribute('filter');
        if (jQuery.isFunction(callback))
          callback();
      });
    };

    jQuery.fn.fadeOut = function(speed, callback) {
      return this.animate({opacity: 'hide'}, speed, function() {
        if (jQuery.browser.msie)
          this.style.removeAttribute('filter');
        if (jQuery.isFunction(callback))
          callback();
      });
    };

    jQuery.fn.fadeTo = function(speed,to,callback) {
      return this.animate({opacity: to}, speed, function() {
        if (to == 1 && jQuery.browser.msie)
          this.style.removeAttribute('filter');
        if (jQuery.isFunction(callback))
          callback();
      });
    };

    if ($.browser.version < '7.0') {
    }
  }
}
