(function ($) {
	$.fn.fabtabulous = function () {
		return this.each(function () {
			var $t = $(this);

			$t.find('a').click(function (e) {
				e.preventDefault();
				var _id = $(this).attr('href').substring(1);
				var _ul = $(this).parent().parent();

				_ul.find('.active-tab').removeClass('active-tab');
				$(this).addClass('active-tab');
				_ul.parent().find('.active-tab-body').removeClass('active-tab-body').hide().end().parent().find('#'+_id).show().addClass('active-tab-body');
			});

			$t.find('a:eq(0)').click();
		});
	};
})(jQuery);
