/* jquery has this now; don't need this anymore
function stopEventBubbling(e) {
	if (!e) var e = window.event;
    if (e.stopPropogation) {
        e.stopPropogation();
    } else {
        e.cancelBubble = true;
    }
}
*/


function defaultValue(selector, defvalue) {
    $j(selector).each(function() {
        if ($j.trim(this.value) == "") {
            this.value = defvalue;
			$j(this).addClass("prompt");
        }
    });

    $j(selector).focus(function() {
        if (this.value == defvalue) {
            this.value = "";
			$j(this).removeClass("prompt");
        }
    });

    $j(selector).blur(function() {
        if ($j.trim(this.value) == "") {
            this.value = defvalue;			
			$j(this).addClass("prompt");
        }
    });
}



function cleanNumber(n) {
	return (String(n).replace(/\,/g,''));
}


String.prototype.pluralize = function(count, plural) {
  if (plural == null)
    plural = this + 's';

  return (count == 1 ? this : plural)
}
