/* This is mostly a stopgap while I figure out what the class
   hierarchy looks like, and what calling conventions are. 
   These definitions would probably be established as a side-
   effect of loading the root namespace. */

var tools = tools || {};
tools.base = tools.base || {};

if (!window.$) {
  var $ = function $(id) {
    return document.getElementById(id);
  }
}

if (!Function.prototype.bind) Function.prototype.bind = function bind(subject, misc) {
	var _m = this, 
		_a = [], 
		_s = "for (var i=0;i< arguments.length;i++)_a.push(arguments[i])";
	eval(_s);
	_a.shift();
	return function() { eval(_s); return _m.apply(subject, _a) };
}
