/* functie om hele blokken klikbaar te maken, en hover toevoegen */
$.fn.hoverClick = function()
{
	this.each(function()
	{
		$(this).hover(
			function() { $(this).addClass("hover").css("cursor", "pointer"); },
			function() { $(this).removeClass("hover").css("cursor", "pointer"); }
		);
		
		$(this).attr("title", $("a:first", this).attr("title"));
		
		$(this).click(function(){
			window.location = $("a:first", this).attr("href");
		});
	});
	
	return this;
};

$(function()
{
	
	/* --------------------------------	*/
	/* menu						 		*/
	/* --------------------------------	*/
	$("#menu-links li").hover(
		function() { $(this).addClass("hover"); },
		function() { $(this).removeClass("hover"); }
	);

	
	// Formulier focus op velden
	$("#content input, #content textarea").focus(function() { $(this).addClass("veldfocus"); });
	$("#content input, #content textarea").blur(function() { $(this).removeClass("veldfocus"); });

	// Zoek formulier
	$("#frm_zoeken input#q").inputDefaultText({ default_txt:"Zoek op trefwoord" });
	$("#frm_zoeken").submit( function()
	{
		 if ( $("#q", this).val() == "" )
		 {
			 $("#q", this).focus();
			 alert("U heeft geen zoekwoorden ingevoerd.");
			 return false;
		 }
	});

	// top 10 carousel
	jQuery('#top-tien').jcarousel({
        vertical: true,
        scroll: 5,
		auto: 5,
		size: 10,
		animation  :1200,
		auto : 6,
        itemFallbackDimension:300
    });
});
