jQuery(function($){
	$('a.archive').click(function(event) { event.preventDefault(); }); // the 'a'-element is used only for styling here, don't follow the link

	$('li.subnavYear > a').click(function(event) { 
		event.preventDefault(); // ditto above
		$('ul.subnavMonths').parent().removeClass('selected'); // hide all (so previous opened years will be closed)
		$(this).parent().addClass('selected'); // show the months for the year we clicked
	});

	$(document).ready(function() {
		if (!$('#subnavigation ul li ul li.selected').html()) {
			$('ul.subnavMonths:first').parent().addClass('selected');
		}
	}); // open first year by default
});
