// Ensure there's no conflict with the $ function, and instead use $j.
if (jQuery && jQuery.noConflict) {
	jQuery.noConflict();
	var $j = jQuery;
}

$j(function () {
	additionalInformation();
});

function additionalInformation() {
	var tabs = $j('.searchResults_additionalInformationTab');
	var contentPanels = $j('.searchResults_additionalInformationContent');

	// When a tab is clicked...
	tabs.click(function (e) {

		// Hide previously selected tab and content.
		tabs.removeClass('current');
		contentPanels.removeClass('current');

		// Show newly selected tab and content.
		$j(this).addClass('current');
		contentPanels.eq(tabs.index(this)).addClass('current');

		// Prevent default click behaviour.
		e.preventDefault();
	});
}
