$(function(){
	$('.releases').css( 'display', 'none');
	$('.releases:first').show();
	$('#currentLink').html( $('.yearsLink:first').html());
	$('.yearsLink:first').parent().hide();
	
	$('.yearsLink').click( function(){
		var selectedYear = $(this).html();
		var currentLink = $('#currentLink');
		$('#year_'+currentLink.html()).css('display', 'none');
		$('#year_'+selectedYear).css('display', 'block');
		$(currentLink).html(selectedYear);
		$('.yearsList').slideToggle(250);
		$('.yearsLink').parent().css( 'display', 'block');
		$(this).parent().css( 'display', 'none');
		return false;
	});
	
	$('#currentLink').click( function(){
		$('.yearsList').slideToggle(250);
		return false;
	});
	
});
