text: !function(t,e){var i=function(t,e,i){var a;return function(){function s(){i||t.apply(o,n),a=null}var o=this,n=arguments;a?clearTimeout(a):i&&t.apply(o,n),a=setTimeout(s,e||100)}};jQuery.fn[e]=function(t){return t?this.bind("resize",i(t)):this.trigger(e)}}(jQuery,"smartresize"),function(t){t.fn.fluidbox=function(e){var i=t.extend(!0,{viewportFill:.95,debounceResize:!0,stackIndex:1e3,stackIndexDelta:10,closeTrigger:[{selector:".fluidbox-overlay",event:"click"},{selector:"document",event:"keyup",keyCode:27}]},e);i.stackIndex<i.stackIndexDelta&&(i.stackIndexDelta=i.stackIndex),$fbOverlay=t("<div />",{"class":"fluidbox-overlay",css:{"z-index":i.stackIndex}});var a,s=this,o=t(window),n=function(){t(".fluidbox-opened").trigger("click")},d=function(t){var e=t.find("img"),s=t.find(".fluidbox-ghost"),n=t.find(".fluidbox-wrap"),d=t.data(),l=0,c=0;a>e.data().imgRatio?(l=d.natHeight<o.height()*i.viewportFill?d.natHeight:o.height()*i.viewportFill,d.imgScale=l/e.height()):(c=d.natWidth<o.width()*i.viewportFill?d.natWidth:o.width()*i.viewportFill,d.imgScale=c/e.width());var r=o.scrollTop()-e.offset().top+.5*e.data("imgHeight")*(e.data("imgScale")-1)+.5*(o.height()-e.data("imgHeight")*e.data("imgScale")),f=.5*e.data("imgWidth")*(e.data("imgScale")-1)+.5*(o.width()-e.data("imgWidth")*e.data("imgScale"))-e.offset().left,h=d.imgScale;s.css({transform:"translate("+parseInt(10*f)/10+"px,"+parseInt(10*r)/10+"px) scale("+parseInt(1e3*h)/1e3+")",top:e.offset().top-n.offset().top,left:e.offset().left-n.offset().left})},l=function(){s.each(function(){c(t(this))})},c=function(t){function e(){l.imgWidth=s.width(),l.imgHeight=s.height(),l.imgRatio=s.width()/s.height(),n.css({width:s.width(),height:s.height(),top:s.offset().top-d.offset().top+parseInt(s.css("borderTopWidth"))+parseInt(s.css("paddingTop")),left:s.offset().left-d.offset().left+parseInt(s.css("borderLeftWidth"))+parseInt(s.css("paddingLeft"))}),l.imgScale=a>l.imgRatio?o.height()*i.viewportFill/s.height():o.width()*i.viewportFill/s.width()}if(a=o.width()/o.height(),t.hasClass("fluidbox")){var s=t.find("img"),n=t.find(".fluidbox-ghost"),d=t.find(".fluidbox-wrap"),l=s.data();e(),s.load(e)}},r=function(e){if(t(this).hasClass("fluidbox")){var a=t(this),s=t(this).find("img"),o=t(this).find(".fluidbox-ghost"),n=t(this).find(".fluidbox-wrap"),l={};0!==t(this).data("fluidbox-state")&&t(this).data("fluidbox-state")?(a.data("fluidbox-state",0).removeClass("fluidbox-opened").addClass("fluidbox-closed"),l.open&&window.clearTimeout(l.open),l.close=window.setTimeout(function(){t(".fluidbox-overlay").remove(),n.css({"z-index":i.stackIndex-i.stackIndexDelta})},10),t(".fluidbox-overlay").css({opacity:0}),o.css({transform:"translate(0,0) scale(1)",opacity:0,top:s.offset().top-n.offset().top+parseInt(s.css("borderTopWidth"))+parseInt(s.css("paddingTop")),left:s.offset().left-n.offset().left+parseInt(s.css("borderLeftWidth"))+parseInt(s.css("paddingLeft"))}),s.css({opacity:1})):t("<img />",{src:s.attr("src")}).load(function(){t("<img />",{src:a.attr("href")}).load(function(){a.data("natWidth",t(this)[0].naturalWidth).data("natHeight",t(this)[0].naturalHeight),a.append($fbOverlay).data("fluidbox-state",1).removeClass("fluidbox-closed").addClass("fluidbox-opened"),l.close&&window.clearTimeout(l.close),l.open=window.setTimeout(function(){t(".fluidbox-overlay").css({opacity:1})},10),t(".fluidbox-wrap").css({zIndex:i.stackIndex-i.stackIndexDelta-1}),n.css({"z-index":i.stackIndex+i.stackIndexDelta}),o.css({"background-image":"url("+s.attr("src")+")",opacity:1}),s.css({opacity:0}),o.css({"background-image":"url("+a.attr("href")+")"}),d(a)})}),e.preventDefault()}};i.closeTrigger&&t.each(i.closeTrigger,function(e){var a=i.closeTrigger[e];"window"!=a.selector?"document"==a.selector?a.keyCode?t(document).on(a.event,function(t){t.keyCode==a.keyCode&&n()}):t(document).on(a.event,n):t(document).on(a.event,i.closeTrigger[e].selector,n):o.on(a.event,n)}),s.each(function(){if(t(this).is("a")&&1===t(this).children().length&&t(this).children().is("img")&&"none"!==t(this).css("display")&&"none"!==t(this).parents().css("display")){var e=t("<div />",{"class":"fluidbox-wrap",css:{"z-index":i.stackIndex-i.stackIndexDelta}}),a=t(this);a.addClass("fluidbox").wrapInner(e).find("img").css({opacity:1}).after('<div class="fluidbox-ghost" />').each(function(){var e=t(this);e.width()>0&&e.height()>0?(c(a),a.click(r)):e.load(function(){c(a),a.click(r)})})}});var f=function(){l();var e=t("a.fluidbox.fluidbox-opened");e.length>0&&d(e)};return i.debounceResize?t(window).smartresize(f):t(window).resize(f),s}}(jQuery);