String.prototype.trim = function() {
    a = this.replace(/^\s+/, '');
    return a.replace(/\s+$/, '');
}


//if (!Array.prototype.every)
//{
//  Array.prototype.every = function(fun /*, thisp*/)
//  {
//    var len = this.length >>> 0;
//    if (typeof fun != "function")
//      throw new TypeError();
//
//    var thisp = arguments[1];
//    for (var i = 0; i < len; i++)
//    {
//      if (i in this &&
//          !fun.call(thisp, this[i], i, this))
//        return false;
//    }
//
//    return true;
//  };
//}

//tell the page javascript is ok
$(document).ready(function() {
	$("body").removeClass("nojs");
});

// So IE doesn't throw error
if (typeof (console) == 'undefined') {
	var console = {
		log : function() {
		},
		dir : function() {
		}
	}
}