/*! Heartbeat - v0.1.0 - 2012-05-24 * https://github.com/jnelson/heartbeat * Copyright (c) 2012 johnymonster; Licensed MIT, GPL */ var HeartBeat={};(function(a,b){var c=!1,d=0,e={},f={};HeartBeat=function(c){f=this,this.options=a.extend(!0,{},this._options,c),this.options.type==="ga"&&(b._gaq=b._gaq||[]),this._init(),this.options.autostart===!0&&this.start()},HeartBeat.prototype={_options:{autostart:!1,interval:1e4,type:"ga"},types:{ga:function(a){b._gaq.push(a)}},_init:function(){this._isFunction(this.types[this.options.type])&&typeof this.options.event=="undefined"&&(this.options.event=this.types[this.options.type])},_event:function(){if(this._isFunction(this.options.event))this.options.event.apply(this,[this.options.eventArgs]),d++;else return this.stop(),!1},_isFunction:function(a){return e.toString.call(a)==="[object Function]"},start:function(){this._event()!==!1&&(c=b.setInterval(function(){f._event.apply(f,null)},this.options.interval))},stop:function(){c&&(b.clearInterval(c),c=!1)},running:function(){return c!==!1},beats:function(){return d}}})(jQuery,window);