/*
 * jQuery.urchin - A Google-analytics helper jQuery plugin
 * - ported from dojox.analytics.Urchin http://www.dojotoolkit.org/
 * Author: Jens Arps http://jensarps.de/
 * Licensed under the MIT License: http://en.wikipedia.org/wiki/MIT_License
 */
;(function($){$.urchin={defaultArgs:{acct:"",loadInterval:42,decay:0.5,timeout:4200,waitForDOM:true},args:{},load:function(_1){this.tracker=null;this.args=$.extend(this.defaultArgs,_1);if(this.args.waitForDOM){var _2=this;$(document).ready(function(){_2._loadGA();});}else{this._loadGA();}},_loadGA:function(){var _3=("https:"==document.location.protocol)?"https://ssl.":"http://www.";$.ajax({type:"GET",url:_3+"google-analytics.com/ga.js",success:function(){},dataType:"script",cache:true});var _4=this;setTimeout(function(){_4._checkGA();},this.args.loadInterval);},_checkGA:function(){console.log(this);if(this.args.loadInterval>this.args.timeout){return;}var _5=this;setTimeout(function(){!window["_gat"]?_5._checkGA():_5._gotGA();},this.args.loadInterval);this.args.loadInterval*=(this.args.decay+1);},_gotGA:function(){this.tracker=_gat._getTracker(this.args.acct);this.tracker._initData();this.GAonLoad.apply(this,arguments);},GAonLoad:function(){this.trackPageView();},trackPageView:function(_6){this.tracker._trackPageview.apply(this,arguments);}};})(jQuery);
