Function.prototype.bind = Function.prototype.bind || function(context) {
var me = this;
var args = Array.prototype.slice(arguments,1);
var F = function () {};
F.prototype = this.prototype;
var bound = function() {
var innerArgs = Array.prototype.slice(arguments);
var finalArgs = args.concat(innerArgs);
return me.apply(this instanceof F ? this : context || this, finalArgs)
}
bound.prototype = new F();
return bound;
}