(function($) {
	Sammy = Sammy || {};
	Sammy.GoogleAnalytics = function(app, splat) {
		shouldTrack = true;
		this.helpers({
			noTrack: function() { disableTracking(); },
			trackEvent: function() {
				if ( _gaq && shouldTrack) {
					var location = this.path.replace(splat, '');
					// this.log('tracking event: ' + location);
				}	
			}	
		});
		this.bind('event-context-after', function() {
			if ( _gaq && shouldTrack) {
				var location = this.path.replace(splat, '');
				_gaq.push(['_trackPageview', location]);
				// this.log('tracking pageview: ' + location);
			}
		});
		function disableTracking() { shouldTrack = false; }
		function enableTracking() { shouldTrack = true; }
	};
})(jQuery);

