$(document).ready(function() { $("a[rel=group]").fancybox({ 'cyclic' : false, 'autoScale':true, 'titleShow':true, 'titlePosition' : 'over', 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) { return '' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' ' + title : '') + ''; } }); $("a[rel=group]").fancybox({ 'transitionIn' : 'elastic', 'transitionOut' : 'elastic', 'speedIn' : 300, 'speedOut' : 300, 'overlayShow' : false, 'centerOnScroll':true }); })