//Panels jQuery based on the accordion

$(document).ready(function(){
	
	$("tr.panels").hide();

	$("tr.trigger span").click(function(){
		if ($(this).parent("td").parent("tr").prev("tr.panels").is(":hidden")) {
			$(this).parent("td").parent("tr").prev("tr.panels").toggle();
			$(this).html("Details &laquo;");
			$(this).parent("td").parent("tr").prev("tr.panels").siblings(".panels:visible").hide();}
			
		else {
			$(this).html("Details &raquo;");
			$(this).parent("td").parent("tr").prev("tr.panels").toggle();
			$(this).parent("td").parent("tr").prev("tr.panels").siblings(".panels:visible").hide();}
		
	//$("tr.trigger a").click(function(){
		//$(this).parent("td").parent("tr").prev("tr.panels").toggle();
			//$(this).parent("td").parent("tr").prev("tr.panels").siblings(".panels:visible").hide();
			
	});
	
});

