!function(n){window.NggPaginatedGallery=function(a,e){this.displayed_gallery_id=a,this.container=n(e),this.container_name=e,this.get_displayed_gallery_obj=function(){var n="gallery_"+this.displayed_gallery_id;return"undefined"!=typeof window.galleries[n]&&window.galleries[n]},this.enable_ajax_pagination=function(){var a=this;n("body").on("click","a.ngg-browser-prev, a.ngg-browser-next",function(i){var t=!0;n(this).parents(e).each(function(){return n(this).data("nextgen-gallery-id")!=a.displayed_gallery_id||void(t=!1)}),t||(i.preventDefault(),window.ngg_ajax_operaton_count++,n("body, a").css("cursor","wait"),n.get(n(this).attr("href"),function(e){if(window.ngg_ajax_operaton_count--,window.ngg_ajax_operaton_count<=0&&(window.ngg_ajax_operaton_count=0,n("body, a").css("cursor","auto")),e){var i=n(e),t=!1;i.find(a.container_name).each(function(){return!!t||(n(this).data("nextgen-gallery-id")!=a.displayed_gallery_id||void(t=n(this)))}),t&&(a.container.each(function(){return n(this).data("nextgen-gallery-id")!=a.displayed_gallery_id||(n(this).html(t.html()),!0)}),n(document).trigger("refreshed"))}}))})};var i=this.get_displayed_gallery_obj();i&&"undefined"!=typeof i.display_settings.ajax_pagination&&parseInt(i.display_settings.ajax_pagination)&&this.enable_ajax_pagination(),"undefined"==typeof window.ngg_ajax_operation_count&&(window.ngg_ajax_operaton_count=0)}}(jQuery);