$(document).ready(function() { $("a[rel=lightbox]").fancybox({ 'transitionIn' : 'fade', 'transitionOut' : 'none', 'titlePosition' : 'over', 'opacity' : 'true', 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) { return 'Obr├ízek ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? '   ' + title : '') + ''; } }); });