$(document).ready(function() {
  $("a[rel*=lightbox]").fancybox({
    'cyclic'          : true,
    'type'            : 'image',
    'overlayColor'    : '#333',
    'transitionIn'    : 'elastic',
    'transitionOut'		: 'elastic',
    'titlePosition' 	: 'over',
    'titleFormat'		  : function(title, currentArray, currentIndex, currentOpts) {
      return '<span id="fancybox-title-over">'+ (title.length ? title + '<br/>' : '') +'Obrázek ' + (currentIndex + 1) + ' / ' + currentArray.length  + '</span>';
    }
  });
});
