$(document).ready(function() {
	/*
	$("#year2008").click(function() {
		alert("Hello World!"); 	
	});
	*/
	
	// at page-load select "Alles anzeigen" as default
	$("#catAll").css("font-weight","bold");
});

//category: Category-ID that should be shown only
function showOnlyCategory(category) {
	//filter all items out except the one with the specified CategoryId
	$(".pubsItem").show().filter(function(){
		return $("DIV.category",this).text() != category
	}).hide();
	
	markCategoryAsActive(category);
}

// Show all items regardless their category
function showAllCategories() {
	// dont filter anything
	$(".pubsItem").show().filter(function(){
		return false;
	}).hide();
	
	markCategoryAsActive("All");
}

function markCategoryAsActive(category) {
	// Reset all "Anzeigen"-Labels
	$('a[@id^="cat"]').css("font-weight","normal");
	// Mark "Alles anzeigen" as active
	$("#cat" + category).css("font-weight","bold");
}