// JavaScript Document

$(document).ready(function(){
	// Hide all records except the first
	$(".entry").not(':first').hide();

	// Setup handler to fade in each record when the recordlink is clicked.
	$(".recordlink").click(
		function(e){
			var idField = $(this).attr('id');
			var idNum = 0;
			if (idField.match(/(\d+)$/))
			{
				idNum = RegExp.$1;
			}
				
			$('.entry').hide();
			$('#record_'+idNum).fadeIn("slow");
			e.stopPropagation();
			return false;
		}
	);

	$(".printme").click(function () {
		window.print();
		return false;
	});
	
	$(".closeme").click(function () {
		window.close();
		return false;
	});
});
