$(document).ready(function() {
	$("a[rel=reference]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'padding'			: '0',
		'cyclic'			: 'true',
		'overlayOpacity'	: '0.9',
		'overlayColor'		: '#201e1e',
		'transitionIn'		: 'fade',
		'transitionOut'		: 'fade',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over"> ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
	$("a[rel=download]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'padding'			: '0',
		'cyclic'			: 'true',
		'overlayOpacity'	: '0.9',
		'overlayColor'		: '#201e1e',
		'transitionIn'		: 'fade',
		'transitionOut'		: 'fade',
		'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
			return '<span id="fancybox-title-over"> ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		}
	});
});

