/**
 * IF THIS FILE IS CONCATENATED WITH method.js: "use strict" must be removed from 
 * method.js as this doesn't jive with strict mode.
 * 
 * Courtesy HTML5 Boilerplate.
 */


/**
 * Prevent rogue console.log calls from failing on browsers that don't support it
 */

// usage: log('inside coolFunc', this, arguments);
window.log = function(){
  log.history = log.history || [];   // store logs to an array for reference
  log.history.push(arguments);
  if(this.console) {
      arguments.callee = arguments.callee.caller;
      console.log( Array.prototype.slice.call(arguments) );
  }
};
// prevent console.* calls from breaking in browsers that don't support it
(function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();)b[a]=b[a]||c})(window.console=window.console||{});


/**
 * Hit Google Analytics with all ajax calls
 */
if (typeof _gaq !== "undefined" && _gaq !== null) {
  $(document).ajaxSend(function(event, xhr, settings){
    _gaq.push(['_trackPageview', settings.url]);
  });
}
