// Initialize.
function init_tabs() {

	// Does element exist?
	if (!$j('ul.tabs').length) {

		// If not, exit.
		return;
	}

	// Reveal initial content area(s).
	$j('div.tab_content_wrap').each(function() {
		$j(this).find('div.tab_content:first').show();
	});

	// Listen for click on tabs.
	$j('ul.tabs a').click(function() {

		// If not current tab.
		if (!$j(this).hasClass('current')) {

			// Change the current indicator.
			$j(this).addClass('current').parent('li').siblings('li').find('a.current').removeClass('current');

			// Show target, hide others.
			$j($j(this).attr('href')).show().siblings('div.tab_content').hide();
		}

		// Nofollow.
		this.blur();
		return false;
	});
}
