//do the tabbing (once the dom has loaded!)
$(document).ready(function(){
	//	tab switching
	$("ul#production-info-tabs li").click(function(){
		if (!$(this).hasClass("selected"))
		{
			$("ul#production-info-tabs li").removeClass("selected");
			$(this).addClass("selected");
		
			$("div.tab-panel").removeClass("selected");
			//work out the tab to show
			$(".tab-panel." + $(this).attr("id")).addClass("selected");
			
		}
		return false;
	});
	// Get the tab from the url if it exists
	if(window.location.hash) {
		var clickurl = window.location.search + window.location.hash;
		$('a[href=' + clickurl + ']').trigger('click');
	}
});
