/**
 * Window logging function for pretty and safe logging calls
 *
 * usage: log('inside coolFunc', this, arguments);
 * paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
 */
window.log=function(){log.history=log.history||[];log.history.push(arguments);arguments.callee=arguments.callee.caller;if(this.console){console.log(Array.prototype.slice.call(arguments));}};

/**
 * Console object assurance to make any console.log calls safe in browsers
 * that do not support the console object
 */
(function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,timeStamp,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();){b[a]=b[a]||c}})((function(){try{console.log();return window.console;}catch(err){return window.console={};}})());


/**
 * shortcut for creating a script element and placing it within the DOM. It places it
 * above all other scripts (most commonly in the <head> although this method usually doesn't
 * get triggered until another loaded piece of javascript calls it so there shouldn't be
 * heirachial loading issues
 */
window.script_tag=function(a){(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;g.src=a;s.parentNode.insertBefore(g,s)}(document,'script'));};
