$(document).ready(function()
{ 
	$(".clearinput").click( function() 
	{
		$(this).val("");
	});


	$.get("opmaak/agenda.asp", function(data){
	  
		$("#agenda").append(data);

	 });

	 $('.box .top').hover (
		function() {
			$(this).find('.arrowdown').show();
		},
		function() {
			$(this).find('.arrowdown').hide();
		});
		$('.box .top .arrowdown').click (function() {
			$(this).closest('.box').find('.content').toggle();
		});
		$(".close").click(function () {$(".popup-bg, .popup").fadeOut("fast");});    
		$(".popopen").click(function () {$(".popup-bg, .popup-wrap, .popup").fadeIn("fast");});  
		$(".back-top").click(function() {
			$("html, body").animate({ scrollTop:0 });
			return false;
		 });
});

function getMonth( maand, jaar )
{
	 $.ajax({
	   type: "POST",
	   url: "opmaak/agenda.asp",
	   data: "maand=" + maand + "&jaar=" + jaar + "",
	   success: function(msg){
		   $("#agenda").empty();
		   $("#agenda").append(msg);
	   }
	 });

}

function hover( variable ) 
{

	var omschrijving	=	$(variable).children(".agenda_omschrijving").text();
	
	//Empty Div
	$(variable).children(".tooltip").empty();
	//Fill Div With Value
	$(variable).children(".tooltip").append(omschrijving);
	//Show Div
	$(variable).children(".tooltip").show();
}

function hoverout( variable )
{
	//Hide Div
	$(variable).children(".tooltip").hide();
	//Empty Div
	$(variable).children(".tooltip").empty();
}
