jQuery(document).ready(function($){
	$('.calendar .my-calendar-nav a').live('click', function(e){
		e.preventDefault();
		var link = $(this).attr('href');
		$('#jd-calendar.calendar').html('Loading...');
		$('#jd-calendar.calendar').load(link+' #jd-calendar.calendar > *', function() {
			$('.calendar-event').children().not('h3').hide();
		});
	});	
	$('.mini .my-calendar-nav a').live('click', function(e){
		e.preventDefault();
		var link = $(this).attr('href');
		$('#jd-calendar.mini').html('Loading...');
		$('#jd-calendar.mini').load(link+' #jd-calendar.mini > *', function() {
			$('.mini .has-events').children().not('.trigger').hide();
		});
	});	
	$('.list .my-calendar-nav a').live('click', function(e){
		e.preventDefault();
		var link = $(this).attr('href');
		$('#jd-calendar.list').html('Loading...');
		$('#jd-calendar.list').load(link+' #jd-calendar.list > *', function() {
			$('#calendar-list li.mc-events').children().not('.event-date').hide();
			$('#calendar-list li.current-day').children().show();
		});
	});	
});