$(document).ready(function(){
    var lightBoxSettings = {
	overlayBgColor: '#7F0017',
	overlayOpacity: 0.8,
	containerResizeSpeed: 350,
	txtImage: 'Zdjęcie',
	txtOf: 'z'
   };
    $('a[rel=lightbox]').lightBox(lightBoxSettings);
    $('a.lightbox').lightBox(lightBoxSettings);
});

(function( $ ){

  $.fn.maxWidth = function() {

    var max = 0;

    this.each(function() {
      max = Math.max( max, $(this).width() );
    });

    return max;
  };
})( jQuery );

(function( $ ){

  $.fn.maxHeight = function() {

    var max = 0;

    this.each(function() {
      max = Math.max( max, $(this).height() );
    });

    return max;
  };
})( jQuery );
