(function($) {
	$.fn.asUnformattedCurrency = function() {
			return this.each(function() {
				var value = $(this).val();
				var decimalLocation = value.indexOf('.');
				if(value.length > 1 && decimalLocation != -1) {
					var dollars = value.substring(0, decimalLocation).replace(/\D/g, '');
					var cents = value.substring(decimalLocation, Math.min(decimalLocation + 3, value.length)).replace(/\D/g, '');
					$(this).val(dollars + '.' + cents);
				} else{
					$(this).val(value.replace(/\D/g, ''));
				}
				return this;
			});
		}
})(jQuery);

