HEX
Server: Apache
System: Linux p3plzcpnl489499.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: dwauav0tm6jp (6177017)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/dwauav0tm6jp/www/wp-content/themes/photographer-wp/js/jquery.fluidbox/jquery.fluidbox.min.js
// Fluidbox
// Description: Replicating the seamless lightbox transition effect seen on Medium.com, with some improvements
// Version: 1.4.4
// Author: Terry Mun
// Author URI: http://terrymun.com

// -------------------------------------------------------- //
//  Dependency: Paul Irish's jQuery debounced resize event  //
// -------------------------------------------------------- //

function whichTransitionEvent(){var a,b=document.createElement("fakeelement"),c={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(a in c)if(void 0!==b.style[a])return c[a]}!function(a,b){var c=function(a,b,c){var d;return function(){function g(){c||a.apply(e,f),d=null}var e=this,f=arguments;d?clearTimeout(d):c&&a.apply(e,f),d=setTimeout(g,b||100)}};jQuery.fn[b]=function(a){return a?this.bind("resize",c(a)):this.trigger(b)}}(jQuery,"smartresize");var customTransitionEnd=whichTransitionEvent();!function(a){var b=0;a.fn.fluidbox=function(c){var d=a.extend(!0,{viewportFill:.95,debounceResize:!0,stackIndex:1e3,stackIndexDelta:10,closeTrigger:[{selector:".fluidbox-overlay",event:"click"},{selector:"document",event:"keyup",keyCode:27}],immediateOpen:!1,loadingEle:!0},c),e=["keyup","keydown","keypress"];d.stackIndex<d.stackIndexDelta&&(d.stackIndexDelta=d.stackIndex),$fbOverlay=a("<div />",{"class":"fluidbox-overlay",css:{"z-index":d.stackIndex}});var h,f=this,g=a(window),i=function(b){a(b+".fluidbox-opened").trigger("click")},j=function(b,c){var e=b.find("img").first(),f=b.find(".fluidbox-ghost"),i=b.find(".fluidbox-loader"),j=b.find(".fluidbox-wrap"),k=b.data(),l=0,m=0;e.data().imgRatio=k.natWidth/k.natHeight,h>e.data().imgRatio?(l=k.natHeight<g.height()*d.viewportFill?k.natHeight:g.height()*d.viewportFill,k.imgScale=l/e.height(),k.imgScaleY=k.imgScale,k.imgScaleX=k.natWidth*(e.height()*k.imgScaleY/k.natHeight)/e.width()):(m=k.natWidth<g.width()*d.viewportFill?k.natWidth:g.width()*d.viewportFill,k.imgScale=m/e.width(),k.imgScaleX=k.imgScale,k.imgScaleY=k.natHeight*(e.width()*k.imgScaleX/k.natWidth)/e.height());var n=g.scrollTop()-e.offset().top+.5*e.data("imgHeight")*(e.data("imgScale")-1)+.5*(g.height()-e.data("imgHeight")*e.data("imgScale")),o=.5*e.data("imgWidth")*(e.data("imgScale")-1)+.5*(g.width()-e.data("imgWidth")*e.data("imgScale"))-e.offset().left,p=parseInt(1e3*k.imgScaleX)/1e3+","+parseInt(1e3*k.imgScaleY)/1e3;f.add(i).css({transform:"translate("+parseInt(10*o)/10+"px,"+parseInt(10*n)/10+"px) scale("+p+")",top:e.offset().top-j.offset().top,left:e.offset().left-j.offset().left}),f.one(customTransitionEnd,function(){a.each(c,function(a,c){b.trigger(c)})})},k=function(a){function j(){i.imgWidth=b.width(),i.imgHeight=b.height(),i.imgRatio=b.width()/b.height(),c.add(e).css({width:b.width(),height:b.height(),top:b.offset().top-f.offset().top+parseInt(b.css("borderTopWidth"))+parseInt(b.css("paddingTop")),left:b.offset().left-f.offset().left+parseInt(b.css("borderLeftWidth"))+parseInt(b.css("paddingLeft"))}),i.imgScale=h>i.imgRatio?g.height()*d.viewportFill/b.height():g.width()*d.viewportFill/b.width()}if(h=g.width()/g.height(),a.hasClass("fluidbox")){var b=a.find("img").first(),c=a.find(".fluidbox-ghost"),e=a.find(".fluidbox-loader"),f=a.find(".fluidbox-wrap"),i=b.data();j(),b.load(j)}},l=function(b){if(a(this).hasClass("fluidbox")){var c=a(this),e=a(this).find("img").first(),f=a(this).find(".fluidbox-ghost"),g=a(this).find(".fluidbox-loader"),h=a(this).find(".fluidbox-wrap"),i=encodeURI(c.attr("href")),k={},l=function(){c.trigger("openstart"),c.append($fbOverlay).data("fluidbox-state",1).removeClass("fluidbox-closed").addClass("fluidbox-opened"),k.close&&window.clearTimeout(k.close),k.open=window.setTimeout(function(){a(".fluidbox-overlay").css({opacity:1})},10),a(".fluidbox-wrap").css({zIndex:d.stackIndex-d.stackIndexDelta-1}),h.css({"z-index":d.stackIndex+d.stackIndexDelta})},m=function(){c.trigger("closestart"),c.data("fluidbox-state",0).removeClass("fluidbox-opened fluidbox-loaded fluidbox-loading").addClass("fluidbox-closed"),k.open&&window.clearTimeout(k.open),k.close=window.setTimeout(function(){a(".fluidbox-overlay").remove(),h.css({"z-index":d.stackIndex-d.stackIndexDelta})},10),a(".fluidbox-overlay").css({opacity:0}),f.add(g).css({transform:"translate(0,0) scale(1,1)",opacity:0,top:e.offset().top-h.offset().top+parseInt(e.css("borderTopWidth"))+parseInt(e.css("paddingTop")),left:e.offset().left-h.offset().left+parseInt(e.css("borderLeftWidth"))+parseInt(e.css("paddingLeft"))}),f.one(customTransitionEnd,function(){c.trigger("closeend")}),e.css({opacity:1})};0!==a(this).data("fluidbox-state")&&a(this).data("fluidbox-state")?m():(c.addClass("fluidbox-loading"),e.css({opacity:0}),f.css({"background-image":"url("+e.attr("src")+")",opacity:1}),d.immediateOpen?(c.data("natWidth",e[0].naturalWidth).data("natHeight",e[0].naturalHeight),l(),j(c,["openend"]),a("<img />",{src:i}).load(function(){c.trigger("imageloaddone").trigger("delayedloaddone").removeClass("fluidbox-loading").addClass("fluidbox-loaded").data("natWidth",a(this)[0].naturalWidth).data("natHeight",a(this)[0].naturalHeight),f.css({"background-image":"url("+i+")"}),j(c,["delayedreposdone"])}).error(function(){c.trigger("imageloadfail"),m()})):a("<img />",{src:i}).load(function(){c.trigger("imageloaddone").removeClass("fluidbox-loading").addClass("fluidbox-loaded").data("natWidth",a(this)[0].naturalWidth).data("natHeight",a(this)[0].naturalHeight),d.immediateOpen=!0,f.css({"background-image":"url("+i+")"}),l(),j(c,["openend"])}).error(function(){c.trigger("imageloadfail"),m()})),b.preventDefault()}},m=function(b){b?k(b):f.each(function(){k(a(this))});var c=a("a.fluidbox.fluidbox-opened");c.length>0&&j(c,["resizeend"])};return d.debounceResize?a(window).smartresize(function(){m()}):a(window).resize(function(){m()}),f.each(function(){if(a(this).is("a")&&1===a(this).children().length&&a(this).children().is("img")&&"none"!==a(this).css("display")&&"none"!==a(this).parents().css("display")){var f=a("<div />",{"class":"fluidbox-wrap",css:{"z-index":d.stackIndex-d.stackIndexDelta}}),h=a("<div />",{"class":"fluidbox-loader"});b+=1;var j=a(this);j.addClass("fluidbox fluidbox-closed").attr("id","fluidbox-"+b).wrapInner(f).find("img").first().css({opacity:1}).after('<div class="fluidbox-ghost" />').each(function(){var b=a(this);b.width()>0&&b.height()>0?(k(j),j.click(l)):b.load(function(){k(j),j.click(l),j.trigger("thumbloaddone")}).error(function(){j.trigger("thumbloadfail")})}),d.loadingEle&&j.find(".fluidbox-ghost").after(h),a(this).on("recompute",function(){m(a(this)),a(this).trigger("recomputeend")});var n="#fluidbox-"+b;d.closeTrigger&&a.each(d.closeTrigger,function(b){var c=d.closeTrigger[b];"window"!=c.selector?"document"==c.selector&&(c.keyCode&&e.indexOf(c.event)>-1?a(document).on(c.event,function(a){a.keyCode==c.keyCode&&i(n)}):a(document).on(c.event,n,function(){i(n)})):g.on(c.event,function(){i(n)})})}}),f}}(jQuery);