/* -------------------------------------------------------------------
	Kunstmaan - LIJN
	FDC
------------------------------------------------------------------- */

	$(function() {
		$("#datepicker").datepicker();
	});

$(document).ready(function(){
// nav & subnav
	var active = "#" + $("li.in").attr('id');
	$("ul.nav li").hover(function() {
		$(active).removeClass("in");
		$(active).children("ul").hide(); 
		$(this).children("ul").show();
		$(this).addClass("hover");
	}, function() {		
		$(this).children("ul").hide();
		$(this).removeClass("hover");
		$(active).addClass("in");
		$(active).children("ul").show();
	});
	
// acts
	$("div.act_tle a").hover(function() {
		var id = "#" + $(this).parent().parent().attr("id");
		$(id + " div.act_tle a span").slideToggle("fast");
		$(id + " div.on").slideToggle("slow");
	}, function () {
		var id = "#" + $(this).parent().parent().attr("id");
		$(id + " div.on").slideToggle( function () {
			$(id + " div.act_tle a span").slideToggle("slow");
			});
	});

// youtube movie
	$('.youtube').flash(
		{ width: 600, height: 368 },
		{ version: 8 },
		function(htmlOptions) {
			$this = $(this);
			htmlOptions.src = $this.attr('href');
			$this.before($.fn.flash.transform(htmlOptions));						
		}
	);
	
// selectbox @ portal	
	$("#region").change(function() {
		var str = "";
		$("select option:selected").each(function () {
                str += $(this).val();
              });
		if (str) {
			$("#box_activity").slideDown();
		}
		else {
			$("#box_activity").slideUp();
		}
    })

	
});





