$(function() {

	$("#event-table").delegate("tr:not('.month-header')", "click", function(){
		var detaillink = $(this).find("a").attr("href");
		window.location.href = detaillink;
	});

	$(".event-filters input").click(function(){
		var all = $("#all"),
		myval = $(this).val(),
		etable = $("#event-table tbody tr").not(".month-header");

		etable.show();

		if( myval !== "all"){
			
			etable.filter( function(index){
				var catclass = $(this).attr("class").slice(0, $(this).attr("class").indexOf(" ") );
				return catclass != myval;
			}).hide();
					
		}

	});

});
