var gallery_app = function()
{
	if(typeof $("a.gallery").fancybox == 'function') 
	{
		$("a.gallery").fancybox({
			cyclic:true,
			'titlePosition' 	: 'over',
			'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
				return '<span id="fancybox-title-over">Image ' +  (currentIndex + 1) + ' / ' + currentArray.length + ' ' + title + '</span>';
			}
		});
	}

}


$(document).ready(gallery_app);
