$(document).ready(function() {



	/*	TopSearch	*/
	$("#topSearchInput").click(function()	{
		this.value = "";
	})
	/*	Footer - ezine	*/
	$("#ftSearchInput").click(function()	{
		this.value = "";
	})


	/*	Recente uitgaven	*/
	$("#oneColumnCarouselLeft").click(function()	{
		pl = $("#carouselTable").position();		if(pl.left < 0)	{	return false;	}
		//alert(pl);
		$("#carouselTable").css("left", "-180px");
		$("#carouselTable tr:first td:last").prependTo("#carouselTable tr:first");

		$("#carouselTable").animate({left: '+=180'}, 250);
	})
	$("#oneColumnCarouselRight").click(function()	{
		pl = $("#carouselTable").position();		if(pl.left > 0)	{	alert(pl.left);	return false;	}
		$("#carouselTable").animate({
			left: '-=180'
		}, 250, function()	{
			$("#carouselTable tr:first td:first").appendTo("#carouselTable tr:first");
			$("#carouselTable").css("left", "0px");

		})
	})

	/**	experimentje met menu via jquery	*/
	var curHoverLiId = "";
	$("#mainMenu>ul>li").hover(function(){
		//mouse over
		$(".liContainer").css('backgroundPosition','center bottom');	//reset
		$(".liContainer").find(".mmRight").css('backgroundPosition', 'right bottom');
		$(".liContainer").find(".mmLeft").css('backgroundPosition', 'left bottom');

		$(this).children("div").css('backgroundPosition','center top');
		$(this).find(".mmRight").css('backgroundPosition', 'right top');
		$(this).find(".mmLeft").css('backgroundPosition', 'left top');
		if($(this).context.id != curHoverLiId)	{
			$("#mainMenu ul li ul").fadeOut('fast');
			$(this).children("ul").fadeIn('fast');
			curHoverLiId = $(this).context.id;
		}
	},function(){
		//mouse out
		/*
		$(this).css('background-position','bottom center');
		$(this).children(".mmRight").css('background-position', 'bottom right');
		$(this).children(".mmLeft").css('background-position', 'bottom left');

		setTimeout(function(){
			$("#mainMenu ul li ul").fadeOut('slow');
		}, 2000)
		*/
	})
})
