jQuery(function($)
{
	Cufon.replace('.interstate, #agenda .daynames td, #agenda .number, #agenda .top span, #agenda .bottom span', {fontFamily: 'Interstate-Regular', hover: true});
	Cufon.replace('.interstate-bold, #video_text', {fontFamily: 'Interstate-Bold', hover: true});
	

	$('#slides').cycle(
	{
		slideExpr:	'img',
		fx:			'scrollLeft',
		timeout:	5000,
		speed:		750
	});	
	
	$('#video a').click(function(e){
		
		videourl = $(this).attr('href');
		console.log(videourl);
		
		$.ajax({
			type: 'POST',
			url: "/cmsfiles/operators/get_video.php",
			data: ({url : videourl}),
			success: function(html){
				$("#video").html(html);
			}
		});
		
		e.preventDefault();
	});
	
/*	$(".gallery_item.popup").live('click', function(e)
	{
		$.ajax({
			type: 'GET',
			url: "/cmsfiles/operators/gallery.php",
			data: ({item : $(this).attr("id")}),
			success: function(htmlData){
				$("#shadowbox_content_gallery").html(htmlData);
				$("#shadowbox_content_gallery").css("width",($(".big_inner_gallery_image").attr("width")));
				$("#shadowbox_content_gallery").css("height",'auto');
				
								
				//console.log("Hoogte Tekstvlak:    "+$("#gallery_txt").css("height"));
				//console.log("Hoogte Afbeelding:   "+$(".big_inner_gallery_image").css("height"));
				//console.log("Hoogte gallery_item: "+$("#gallery_item").css("height"));
						
				 Shadowbox.open({ 
                         content:  		$("#shadowbox_content_gallery").html(), 
                         player:  		"html", 
                         height:		$("#gallery_item").css("height"),
                         width:			($(".big_inner_gallery_image").width()+20),
						 initialWidth:	100,
						 initialHeight:	100,
						 gallery:		'meuk'
                 }); 
			}
		}); 
		
		e.preventDefault();
	});
*/
});

Shadowbox.init({
	handleOversize:     'drag',
	resizeDuration:		0.10,
	fadeDuration:		0.10,
	overlayOpacity:		0.6,
	language:  	 		"nl",
	players:			["img", "swf", "html", "iframe"]
});


/*AGENDA*/

function agendaRefresh()
{
	Cufon.replace('#agenda .daynames td, #agenda .number, #agenda .top span, #agenda .bottom span', {fontFamily: 'Interstate-Regular', hover: true});
}

function agendaClick()
{
	Cufon.replace('#event_block .title', {fontFamily: 'Interstate-Bold', hover: true});
}


