// JavaScript Document

$(document).ready(function(){
	$("a[rel=fancyimage]").fancybox({		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Afb. ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		},
			'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic'
	});
	$("a[rel=fancytableimage]").each(function(i){
		if ($(this).children().attr("alt")!=''){
			$(this).attr({'title': $(this).children().attr("alt")});
		}
	});
	$("a[rel=fancytableimage]").fancybox({		'titlePosition' 	: 'over',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over">Afb. ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		},
			'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic'
	});
	$(".iframe").fancybox({
		'width' : '90%',
		'height' : '95%',
		'autoScale' : false,
		'transitionIn' : 'none',
		'transitionOut' : 'none',
		'type' : 'iframe'
    });
});

