function laadFancy(){
	$("a.openfoto").fancybox({
		'padding'			:	1, 
		'speedIn'			:	300, 
		'speedOut'			:	300, 
		'titleShow'			:	true, 
		'titlePosition'		:	'over',
		'overlayOpacity'	:	0.0, 
		'hideOnContentClick':	true, 
		'overlayShow'		:	true,
		'onComplete'		: function() {
			    					pauzeerAnimatie();
								},
		'onClosed'			: function() {
			    					startAnimatie();
								}
	});
	
	
	
	
	
	
	$("a.openfotometitel").fancybox({
		'padding'			:	1, 
		'transitionIn'		:	'elastic',
		'transitionOut'		:	'elastic',
		'speedIn'			:	300, 
		'speedOut'			:	300, 
		'titleShow'			:	true, 
		'overlayOpacity'	:	0.0, 
		'hideOnContentClick':	true, 
		'overlayShow'		:	true
	});
}


function pauzeerAnimatie(){	
	g_animatiedraaien = false;
}
function startAnimatie(){
	g_animatiedraaien = true;
}


function volgende() {
	if(g_animatiedraaien == true){
		$('.next').click();
	}
}

g_animatiedraaien = true;

$(document).ready(function() {	

	var timer = setInterval( volgende, 3000);
	
	$(".msg_body").hide();
 
	$(".msg_body").hide();
	//toggle the componenet with class msg_body
	$(".msg_head").click(function(){
		$(this).next(".msg_body").slideToggle(300);
		
	});
	
						
	// voor de popups in de foto carrousel
	laadFancy();
	
	
	$(".leesmeerKnop").click(function() {	
		$(".leesmeer").slideToggle();
	});
	
	
	// initialise plugins
		jQuery(function(){
			jQuery('ul.sf-menu').superfish({
			autoArrows:  false                           // disable generation of arrow mark-up 
			});
		});


	$('.iframe-delta-0').attr({
	  allowtransparency: 'true'
	});
	
	
	
	$(".jCarouselLite").jCarouselLite({
        btnNext: ".scroller .next",
        btnPrev: ".scroller .prev",
        auto: 0,
        speed: 700,
        afterEnd: function() {
							    laadFancy();
							}
    });
    
    
    
    $(".printKnop").click(function(){
		//$(".printContentContainer").printElement();
		$(".printContentContainer").jqprint();
	});
    
 
 });
 
