//use jQuery via $j for no conflict with prototype 
var $j = jQuery.noConflict();

$j(document).ready(function() {
	//credits - script by www.sohtanaka.com
	//When page loads...
	$j(".tab_content").hide(); //Hide all content
if(location.hash != "") {
var target = location.hash.split("#")[1]
$j(location.hash).show(); //Show first tab content
$j("ul.tabs li:has(a[rel="+target+"])").addClass("active").show();
} else {
$j("ul.tabs li:first").addClass("active").show(); //Activate first tab
$j(".tab_content:first").show(); //Show first tab content
}
	
	//On Click Event
	$j("ul.tabs li").click(function() {

		$j("ul.tabs li").removeClass("active"); //Remove any "active" class
		$j(this).addClass("active"); //Add "active" class to selected tab
		$j(".tab_content").hide(); //Hide all tab content

		var activeTab = $j(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
if ($j.browser.msie)
{$j(activeTab).show();}
else
{$j(activeTab).fadeIn();}
		return false;
	});
	//On Click Inside Link Page
		$j("a.pointer").click(function() {
	
		var target = $j("a.pointer").hash.split("#")[1]
		//$j(location.hash).show(); //Show first tab content
		$j("ul.tabs li:has(a[rel="+target+"])").addClass("active").show();
		
		});
});
