// JavaScript Document

$(function(){
	Cufon.replace('.obelixpro');
	Cufon.replace('.kletsnav a');

	$("a.fancybox-img-gallery").fancybox({	transitionIn:'elastic',
	 										titlePosition:'over', 
											titleFormat:fotoboekCommentaren,
											onComplete: loadComments
										 });	
})

function hideYoutube(){
	$(".youtube-clip").hide();
}


function unhideYoutube(){
	$(".youtube-clip").show();
}


function fotoboekCommentaren(title, currentArray, currentIndex, currentOpts, href){
	return '<input type="hidden" id="foto-url" value="'+currentArray[currentIndex]+'" /><div id="foto-comments"><img src="images/miniloader.gif" title="loading" /> De commentaren worden geladen...</div>';	
}

function loadComments(){
	var fotourl = $("#foto-url").val();
	$("#foto-comments").html('<img src="images/miniloader.gif" title="loading" /> De commentaren worden geladen...');
	$("#foto-comments").load("ajax.fb_comments.php?a="+timestamp(), {foto:fotourl});
}

function plaatsCommentaar(){
		
}

function timestamp(){
	var time = new Date();
	return time.getTime();
}
