/*
 * jQuery Core Functions 
 *
 * Copyright (c) 2006, 2007, 2008 Thomas Garrood
 * 
 * Depends:
 *
 */


(function($) { // hide the namespace

// Hack for Prototype bind function
$.extend(Function.prototype, {
	scope: function() {
		var _func = this;
		var _obj = arguments[0];
		var _args = $.grep(arguments, function(v, i) {
		        return i > 1;
		});
		
		return function() {
		        return _func.apply(_obj, arguments);
		};
	}
})

})(jQuery);


// trace a message to the browser console (must be enabled in firebug
function c(msg) {
	if(typeof console != 'undefined') console.log(msg);
};

String.prototype.repeat = function(l)
{
	return new Array(l+1).join(this);
};

String.prototype.ucWord = function () 
{
    var newVal = '';
    var val = this.split(' ');
    for(var i=0; i < val.length; i++) {
            newVal += val[i].substring(0,1).toUpperCase() + val[i].substring(1,val[i].length) + ' ';
    }
    return newVal;
};
