$(document).ready(function(){

	$('#navigation ul li').hover(function()
		{
		$(this).addClass('currentMainNav');
		$(this).children("ul").css({ "display" : "block", "opacity" : "0" });
		$(this).children("ul").animate({ opacity: "1" }, 150 );
		if ($(this).hasClass('page-item-766')) // do not the display the sublist for this page
				{
				$(this).children("ul").css({ "display" : "none" });
				}
		if ($(this).hasClass('page-item-757')) // do not the display the sublist for this page
				{
				$(this).children("ul").css({ "display" : "none" });
				}
		if ($(this).hasClass('page-item-126')) // do not the display the sublist for this page
				{
				$(this).children("ul").css({ "display" : "none" });
				}
		if ($(this).hasClass('page-item-115')) // do not the display the sublist for this page
				{
				$(this).children("ul").css({ "display" : "none" });
				}
		},function()
		{
		$(this).children("ul").animate({ opacity: "0" }, 150 );
		$(this).children("ul").fadeOut(10);
		$(this).removeClass('currentMainNav');
		}
	);

	$('#navigation ul ul a').hover(function()
		{
		$(this).animate({ paddingLeft: "15px" }, 150 );
		},function()
		{
		$(this).animate({ paddingLeft: "10px" }, 150 );
		}
	);






//////////////////////////////////////////////////////////////////////////////////////////




	$('table#activiteitenAgenda tbody tr:odd').addClass('oddTableFill');
	$('table#activiteitenAgenda tbody tr:even').addClass('evenTableFill');




//////////////////////////////////////////////////////////////////////////////////////////




	function blockLink(name) 
		{
		$(name).hover(function()
			{
			$(this).css("cursor", "pointer");
			$(this).find("a").addClass("hover");
			$(this).addClass("hover");
			window.status = $(this).find('a').attr('href');
			},
			function() {
			$(this).removeClass("hover");
			$(this).find("a").removeClass("hover");
			window.status = "";
			}
		).click(function()
			{
			window.location = $(this).find('a').attr('href');
			}
		);
		}


	blockLink('.activity');




//////////////////////////////////////////////////////////////////////////////////////////
// Footer login visibility switcher

	$('#loginSwitch').cycle(
		{ 
		fx:     'fade', 
		speed:   300, 
		timeout: 0, 
		next:   '.loginSwitchButton', 
		pause:   1 
		}
	);







//////////////////////////////////////////////////////////////////////////////////////////
// toggle visibility of the default text in the text field of the search box

	$('.rmv-dft-val').click(function()
		{
		if (this.value == this.defaultValue)
			{
			this.value = '';
			$(this).addClass("textColor");
			}
		}
	);
	$('.rmv-dft-val').blur(function()
		{
		if (this.value == '')
			{
			this.value = this.defaultValue;
			$(this).removeClass("textColor");
			}
		}
	);


	$('.searchField').click(function()
		{
		if (this.value == this.defaultValue)
			{
			$(this).addClass("textColor");
			}
		}
	);




//////////////////////////////////////////////////////////////////////////////////////////



	$("#whoContainer div:nth-child(3n)").addClass('thirdWho');




//////////////////////////////////////////////////////////////////////////////////////////




    $('.activitiesFormBttn').click(function () 
		{
      //$("div#formContent").slideToggle("slow");
	    }
	);








});
