// create jQuery plugin called "analytics"
$.fn.analytics = function(tracker) {

	// loop through each tab and enable analytics
	return this.each(function() {

		// get handle to tabs API.
		var api = $(this).data("tabs");

		// setup onClick listener for tabs
		api.onClick(function(event, index)  {
			tracker.trackEvent("tabs", "foo", index);
		});

	});
};
