$(document).ready(function() {	
		
	$("a.openfoto").fancybox({
		'padding'			:	1, 
		'transitionIn'		:	'elastic',
		'transitionOut'		:	'elastic',
		'speedIn'			:	300, 
		'speedOut'			:	300, 
		'titleShow'			:	false, 
		'overlayOpacity'	:	0.0, 
		'hideOnContentClick':	true, 
		'overlayShow'		:	true
	});
	$("a.openfotometitel").fancybox({
		'padding'			:	1, 
		'transitionIn'		:	'elastic',
		'transitionOut'		:	'elastic',
		'speedIn'			:	300, 
		'speedOut'			:	300, 
		'titleShow'			:	true, 
		'overlayOpacity'	:	0.0, 
		'hideOnContentClick':	true, 
		'overlayShow'		:	true
	});
	
	
	$("a.opennieuws").fancybox({
		'padding'			:	10, 
		'transitionIn'		:	'elastic',
		'transitionOut'		:	'elastic',
		'speedIn'			:	300, 
		'speedOut'			:	300,
		'width'         	: 	450,
		'height'        	:   'auto',
		'titleShow'			:	false, 
		'overlayOpacity'	:	0.0, 
		'hideOnContentClick':	true, 
		'overlayShow'		:	true,
		'overlayOpacity'    :  0.8, 
		'overlayColor'      : '#CC0E23' 
	});
	
	$("a.openwieiswie").fancybox({
		'padding'			:	0,
		'transitionIn'		:	'elastic',
		'transitionOut'		:	'elastic',
		'speedIn'			:	300, 
		'speedOut'			:	300,
		'width'         	: 	450,
		'height'        	:   'auto',
		'titleShow'			:	false, 
		'overlayOpacity'	:	0.0, 
		'hideOnContentClick':	true, 
		'overlayShow'		:	true,
		'overlayOpacity'    :  0.8, 
		'overlayColor'      : '#FFFFFF' 
	});
	
	// initialise plugins
	$('ul.sf-menu').superfish({ 
       delay:       1000,                            // one second delay on mouseout 
       animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
       speed:       'fast',                          // faster animation speed 
       autoArrows:  false,                           // disable generation of arrow mark-up 
       dropShadows: true                            // disable drop shadows 
    }); 


	$('.iframe-delta-0').attr({
	  allowtransparency: 'true'
	});
	
 });
 
// Youtube afbeelding binnen halen
function getScreen( url, size )
{
  if(url === null){ return ""; }

  size = (size === null) ? "big" : size;
  var vid;
  var results;

  results = url.match("[\\?&]v=([^&#]*)");

  vid = ( results === null ) ? url : results[1];

  if(size == "small"){
    return "http://img.youtube.com/vi/"+vid+"/2.jpg";
  }else {
    return "http://img.youtube.com/vi/"+vid+"/0.jpg";
  }
  
  
}

