/**
 * CanoeUtils
 * Contains a variety of useful utility functions for common JavaScript tasks.
 * Should be implemented as a standard JavaScript include on all websites, applications, etc. 
 * 
 * REQUIRES: jQuery 1.3.2+  
 * 
 * @version		1
 * @since 		November 11th, 2009; rarkwright
 */
 
if(CanoeUtils==null){var CanoeUtils=new(function(){this.DOMHasLoaded=false;jQuery(document).ready(function(){CanoeUtils.DOMHasLoaded=true;});this.asap=function(selector,fn){var jq=jQuery(selector);if(jq.length>0){fn(jq);}else{if(!this.DOMHasLoaded){setTimeout(function(){CanoeUtils.asap(selector,fn);},100);}}};this.scope=function(context,func,args){return function(){if(args!=null&&args!==false){return func.apply(context,args);}else{return func.apply(context,arguments);}};};})();}