$(document).ready(function() {
	$(".sf-menu").superfish({
		delay: 0
	});
	$("#textsizer a").textresizer({
		target: "#cntContent",
		type: "cssClass",
		sizes: [
			"content-klein",
			"content-middel",
			"content-groot"
		]
	});
	$("table.tbl_calendar td:gt(2)").each(function(i) {
		$(this).eq((i + 2) % 7 && (i + 1) % 7).addClass("weekend");
		$(this).hover(
			function() {
				$(this).addClass("hovert")
			},
			function() {
				$(this).removeClass("hovert")
			}
		);
	});
	$("#btn_stilte").click(function() {
		$("#stilte").fadeIn().show();
		return false;
	});

	$("#stilte").live("click", function() {
		$("#btn_stilte").hide();
		$(this).fadeOut();
		return false;
	});

	$("#cntHeader").live("click", function(e) {
		if($(e.target).attr("id") == "cntHeader" ) {
			window.location.href="/";
		}
	});

	$('a[href="/miniretraite"]').live("click", function() {
		$("#stilte").fadeIn().show();
		return false;
	});

	$('.galleryview').each(function(index) {

		$(this).attr("id", "photos_" + index);

		$("#photos_" + index).galleryView({
				gallery_width: 600,
				gallery_height: 300,
				frame_width: 100,
				frame_height: 100,
				pause_on_hover: true
		});

	});


});
