/***
@url:
http://andreaslagerkvist.com/jquery/super-simple-tabs/

@modified:
MINISTRY.BBS (CE): selected is now attribute of li instead of a to allow better styling
***/
jQuery.fn.superSimpleTabs = function () {
	return this.each(function () {
		var ul = jQuery(this);

		// Go through all the in-page links in the ul
		ul.find('a[href^=#]').each(function (i) {
			var link = jQuery(this);

			// Hide all containers cept the first
			if (i) {
				jQuery(link.attr('href')).hide();
			}
			else {
				//link.addClass('selected');
				jQuery(link.parent().get(0)).addClass('selected');
			}

			// When clicking link
			link.click(function () {
				// Hide selected link's containers
				jQuery(
					ul.find('li.selected')
						.removeClass('selected')
						.find('a')
							.attr('href')
				).hide();

				// Show this one's
				jQuery(link.parent().get(0)).addClass('selected');
				jQuery(link.attr('href')).show();

				return false;
			});
		});
	});
};