
// remap jQuery to $
(function($){

 





 



})(window.jQuery);



// usage: log('inside coolFunc',this,arguments);
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
window.log = function(){
  log.history = log.history || [];   // store logs to an array for reference
  log.history.push(arguments);
  if(this.console){
    console.log( Array.prototype.slice.call(arguments) );
  }
};



// catch all document.write() calls
(function(doc){
  var write = doc.write;
  doc.write = function(q){ 
    log('document.write(): ',arguments); 
    if (/docwriteregexwhitelist/.test(q)) write.apply(doc,arguments);  
  };
})(document);


// SOURCE: http://www.codesmell.org/blog/2009/08/jquery-equals/
$.fn.equals = function(compareTo) {
  if (!compareTo || !compareTo.length || this.length!=compareTo.length)
  {
    return false;
  }

  for (var i=0; i<this .length; i++) {
    if (this[i]!==compareTo[i]) {
      return false;
    }
  }
  return true;
}

jQuery.fn.log = function (msg) {
  console.log("%s: %o", msg, this);
  return this;
};

//
