
function formatTitle(title, currentArray, currentIndex, currentOpts) {
    return "<b style='color:#2e7fc0;'>" + title + "</b>";
}
$(document).ready(function(){ 
    $("a.fancybox_image").attr( 'rel', 'group' );
	$("a.fancybox_image").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'fade',
		'padding'		:	4, 
		'speedIn'		:	300, 
		'speedOut'		:	150, 
		'overlayShow'	:	true,
        'centerOnScroll': true,
		'titlePosition'	:	'over',
		'overlayColor'	:	'#333',
		'autoDimensions'	:	'false',
        'titleFormat'	: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
                    }
	});	
	$("a[rel=group2]").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'fade',
		'padding'		:	4,
		'speedIn'		:	300, 
		'speedOut'		:	150, 
		'overlayShow'	:	true,
		'titlePosition'	:	'over',
		'overlayColor'	:	'#333',
		'autoDimensions'	:	'false',
        'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
                    }
	});
    $("a.fancybox_window").fancybox({
		'width'				: '75%',
		'height'			: '90%',
        'autoScale'     	: false,
        'centerOnScroll'    : true,
        'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});    
});


