jQuery(document).ready(function($){
	
	$(".TabbedPanelsTab:not(:first-child)").css("margin", "0px 2px");
	
	$("#meldingen_legend").toggle(function(){
		$("#meldingen_tbl").slideUp();
	}, function(){
		$("#meldingen_tbl").slideDown();		
	});
	
	$("#meldingen_legend").hover(function(){
		$("#meldingen_legend").css("text-decoration", "underline");
		$("#meldingen_legend").css("cursor", "pointer");
	}, function(){
		$("#meldingen_legend").css("text-decoration", "none");
		$("#meldingen_legend").css("cursor", "default");
	});
	
	$("input[type='text'], textarea").focus(function(){
		$(this).css("background-color", "#EEE");
		$(this).css("color", "#000");
	});
	$("input[type='text'], textarea").blur(function(){
		$(this).css("background-color", "#FFF");
		$(this).css("color", "#000");
	});
	
  $('.slideshow').cycle({
		fx: 'fade'
	});

	$(".sub_menu").mouseenter(function(){
		$(this).parents('.menu_item').filter(':first').css("background", "url(images/link_hover.png) no-repeat left center");
	});
	$(".sub_menu").mouseleave(function(){
		$(this).parents('.menu_item').filter(':first').css("background-image", "none");		
	});

	$(".sub_menu li:last-child a").css("-moz-border-radius-bottomleft","7px");
	$(".sub_menu li:last-child a").css("-webkit-border-bottom-left-radius","7px");
	$(".sub_menu li:last-child a").css("-moz-border-radius-bottomright","7px");
	$(".sub_menu li:last-child a").css("-webkit-border-bottom-right-radius","7px");
	$(".sub_menu li:last-child a").css("padding-bottom","3px");
	
	$("#menu #dropdown_menu .menu_item").hoverIntent(function(){
		$(this).find(".sub_menu").show();
	}, function(){
		$(this).find(".sub_menu").hide();	
	});
	
	//Login styles//
	
	$("#login_klik").toggle(function(){
		$(this).css("background", "url(images/link_hover.png) no-repeat left center");
		$("#login").slideDown();
		$("#login_tekst").css("background","url(images/arrow_up.png) no-repeat right center");
	},function(){
		$(this).css("background", "");
		$("#login").slideUp();
		$("#login_tekst").css("background","url(images/arrow_down.png) no-repeat right center");
	});
	
	//Logout styles//
	
	$("#logout_klik").click(function(){
		$("#logout").show(1,function(){
			$("#logout_confirm").animate({width:300}, function(){
				$("#logout_confirm").animate({height:150}, function(){});
			});
		});	
	});
	
	function sluit_logout(){
		$("#logout").hide();
		$("#logout_confirm").hide(function(){
			$(this).css("width", "0px");
			$(this).css("height", "10px");
		});
	}
	
	$("#sluit_logout_confirm").click(sluit_logout);
	
	$(".bottom #nee").click(sluit_logout);

});
