!function(t,a,e){"use strict";var n=a(document.body);function r(t,e){return/(.png|.jpg|.jpeg|.gif|.tiff|.bmp)$/.test(a(e).attr("href").toLowerCase().split("?")[0].split("#")[0])}function i(t,e){var n=a(e).find("a[data-featherlight]");n.attr("data-featherlight")&&n.featherlightGallery({previousIcon:"",nextIcon:""})}function f(){var t;a.featherlight.defaults.closeIcon="",n.find("a[href]").filter(r).attr("data-featherlight","image"),0!==(t=n.find('[class*="gallery"]')).length&&a.each(t,i),n.hasClass("wp-featherlight-captions")&&(a.featherlight.prototype.afterContent=function(){var t=this.$instance,e=function(t){var e=t.parent().find(".wp-caption-text");if(0!==e.length)return e;var n=t.parent().find("figcaption");if(0!==n.length)return n;var a=t.parents(".gallery-item");if(0!==a.length)return a.find(".wp-caption-text");var r=t.parents(".blocks-gallery-item");if(0!==r.length)return r.find("figcaption");var i=t.parents(".tiled-gallery-item");return 0!==i.length?i.find(".tiled-gallery-caption"):""}(this.$currentTarget);t.find(".caption").remove(),0!==e.length&&(a('<div class="caption">').appendTo(t.find(".featherlight-content"))[0].innerHTML=e.html())})}a(document).ready(function(){f()})}(0,jQuery);