$(document).ready(function() {
	jQuery("#stania-presenation1").staniaSlider(
	{
		effect:"fade",
		prev:"",
		next:"",
		duration:14*100,
		delay:40*100,
		outWidth:983,
		outHeight:300,
		width:983,
		height:300,
		caption:true,
		controls:true,
		autoPlay:true,
		bullets:true,
		stopOnHover:false
	});
	
	$(".fb").fancybox({
		'hideOnContentClick': true
	});
	
	$(".btn-slide__").click(function(){
		$("#panel").slideToggle("slow");
	});
});

function herlaadAgenda(month, year) {
	
	$("#datepicker").empty();
	$(".dateBox").empty();
	
	// Ajax	
	$.ajax({
		type: "GET",
		url: "/img/php/agenda.edit-reload.php?maand=" + month,
		success: function(msg){
			$(".dateBox").append(msg);
			$("#datepicker").empty().datepicker({
				beforeShowDay: reloadedOdds,
				stepMonths: 1,
				async: true,
				setDate: new Date(year, month, 1),
				onChangeMonthYear: function(year, month, inst) { herlaadAgenda(month, year); },
				onSelect: function(dateText, inst) { }		
			});
		}
	});
		
}
