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)
		}
	}

