var TPJ = {
	extend: function extend(destination, source) {
		for (var property in source)
			destination[property] = source[property];
		return destination;
	}
}

/*
if (! ("console" in window) || !("firebug" in console)) {
    var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group"
                 , "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
    window.console = {};
    for (var i = 0; i <names.length; ++i) window.console[names[i]] = function() {};
}
*/

if (window.Node && Node.prototype && !Node.prototype.contains) {
	Node.prototype.contains = function (arg) {
		return !!(this.compareDocumentPosition(arg) & 16)
	}
}

if (typeof Function.prototype.bind == 'undefined') {
	Function.prototype.bind = function(bind) {
		var self = this;
		return function(){
			var args = Array.prototype.slice.call(arguments);
			return self.apply(bind || null, args);
		};
	};
}

