  $(document).ready(function(){
    
    $("div.reference_tab").next().css('display', 'none').end().click(function () {
      $("div.reference_pane").slideToggle("slow");
    });
	
	$("div.credit_tab").next().css('display', 'none').end().click(function () {
      $("div.credit_pane").slideToggle("slow");
    });

	$("a.superscript").click(function () {
      $("div.reference_pane").show();
	});
	



  });
  

	// Highlight References
  $(document).ready(function(){

  });
  function foo(id) {

	var color = document.getElementById(id).style.backgroundColor;
	

	if (typeof foo.lastId == 'undefined') {
		foo.lastColor = "";
		foo.lastId = "";
	} else {
		document.getElementById(foo.lastId).style.backgroundColor = foo.lastColor;
        }

	// Set to highlighted
	document.getElementById(id).style.backgroundColor = "#e8f1e5";

	// Save the last color and id
	foo.lastColor = color;	
	foo.lastId = id;
	
  
  }