PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/elintscleaningservices.co.uk/wp-content/themes/porto/js/libs/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : /home/trave494/elintscleaningservices.co.uk/wp-content/themes/porto/js/libs/jquery.fancybox.min.js

!function(e,t,o,n){"use strict";var i=o("html"),a=o(e),r=o(t),s=o.fancybox=function(){s.open.apply(this,arguments)},l=navigator.userAgent.match(/msie/i),c=null,p=t.createTouch!==n,d=function(e){return e&&e.hasOwnProperty&&e instanceof o},h=function(e){return e&&"string"===o.type(e)},f=function(e){return h(e)&&e.indexOf("%")>0},u=function(e,t){var o=parseInt(e,10)||0;return t&&f(e)&&(o=s.getViewport()[t]/100*o),Math.ceil(o)},g=function(e,t){return u(e,t)+"px"};o.extend(s,{version:"2.1.5",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!p,fitToView:!0,aspectRatio:!1,topRatio:.5,leftRatio:.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3e3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+(l?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>',loading:'<div id="fancybox-loading"><div></div></div>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:o.noop,beforeLoad:o.noop,afterLoad:o.noop,beforeShow:o.noop,afterShow:o.noop,beforeChange:o.noop,beforeClose:o.noop,afterClose:o.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(e,t){if(e&&(o.isPlainObject(t)||(t={}),!1!==s.close(!0)))return Array.isArray(e)||(e=d(e)?o(e).get():[e]),o.each(e,(function(i,a){var r,l,c,p,f,u,g,m={};"object"===o.type(a)&&(a.nodeType&&(a=o(a)),d(a)?(m={href:a.data("fancybox-href")||a.attr("href"),title:o("<div/>").text(a.data("fancybox-title")||a.attr("title")||"").html(),isDom:!0,element:a},o.metadata&&o.extend(!0,m,a.metadata())):m=a),r=t.href||m.href||(h(a)?a:null),l=t.title!==n?t.title:m.title||"",!(p=(c=t.content||m.content)?"html":t.type||m.type)&&m.isDom&&((p=a.data("fancybox-type"))||(p=(f=a.prop("class").match(/fancybox\.(\w+)/))?f[1]:null)),h(r)&&(p||(s.isImage(r)?p="image":s.isSWF(r)?p="swf":"#"===r.charAt(0)?p="inline":h(a)&&(p="html",c=a)),"ajax"===p&&(u=r.split(/\s+/,2),r=u.shift(),g=u.shift())),c||("inline"===p?r?c=o(h(r)?r.replace(/.*(?=#[^\s]+$)/,""):r):m.isDom&&(c=a):"html"===p?c=r:p||r||!m.isDom||(p="inline",c=a)),o.extend(m,{href:r,type:p,content:c,title:l,selector:g}),e[i]=m})),s.opts=o.extend(!0,{},s.defaults,t),t.keys!==n&&(s.opts.keys=!!t.keys&&o.extend({},s.defaults.keys,t.keys)),s.group=e,s._start(s.opts.index)},cancel:function(){var e=s.coming;e&&!1===s.trigger("onCancel")||(s.hideLoading(),e&&(s.ajaxLoad&&s.ajaxLoad.abort(),s.ajaxLoad=null,s.imgPreload&&(s.imgPreload.onload=s.imgPreload.onerror=null),e.wrap&&e.wrap.stop(!0,!0).trigger("onReset").remove(),s.coming=null,s.current||s._afterZoomOut(e)))},close:function(e){s.cancel(),!1!==s.trigger("beforeClose")&&(s.unbindEvents(),s.isActive&&(s.isOpen&&!0!==e?(s.isOpen=s.isOpened=!1,s.isClosing=!0,o(".fancybox-item, .fancybox-nav").remove(),s.wrap.stop(!0,!0).removeClass("fancybox-opened"),s.transitions[s.current.closeMethod]()):(o(".fancybox-wrap").stop(!0).trigger("onReset").remove(),s._afterZoomOut())))},play:function(e){var t=function(){clearTimeout(s.player.timer)},o=function(){t(),s.current&&s.player.isActive&&(s.player.timer=setTimeout(s.next,s.current.playSpeed))},n=function(){t(),r.off(".player"),s.player.isActive=!1,s.trigger("onPlayEnd")};!0===e||!s.player.isActive&&!1!==e?s.current&&(s.current.loop||s.current.index<s.group.length-1)&&(s.player.isActive=!0,r.on({"onCancel.player beforeClose.player":n,"onUpdate.player":o,"beforeLoad.player":t}),o(),s.trigger("onPlayStart")):n()},next:function(e){var t=s.current;t&&(h(e)||(e=t.direction.next),s.jumpto(t.index+1,e,"next"))},prev:function(e){var t=s.current;t&&(h(e)||(e=t.direction.prev),s.jumpto(t.index-1,e,"prev"))},jumpto:function(e,t,o){var i=s.current;i&&(e=u(e),s.direction=t||i.direction[e>=i.index?"next":"prev"],s.router=o||"jumpto",i.loop&&(e<0&&(e=i.group.length+e%i.group.length),e%=i.group.length),i.group[e]!==n&&(s.cancel(),s._start(e)))},reposition:function(e,t){var n,i=s.current,a=i?i.wrap:null;a&&(n=s._getPosition(t),e&&"scroll"===e.type?(delete n.position,a.stop(!0,!0).animate(n,200)):(a.css(n),i.pos=o.extend({},i.dim,n)))},update:function(e){var t=e&&e.originalEvent&&e.originalEvent.type,o=!t||"orientationchange"===t;o&&(clearTimeout(c),c=null),s.isOpen&&!c&&(c=setTimeout((function(){var n=s.current;n&&!s.isClosing&&(s.wrap.removeClass("fancybox-tmp"),(o||"load"===t||"resize"===t&&n.autoResize)&&s._setDimension(),"scroll"===t&&n.canShrink||s.reposition(e),s.trigger("onUpdate"),c=null)}),o&&!p?0:300))},toggle:function(e){s.isOpen&&(s.current.fitToView="boolean"===o.type(e)?e:!s.current.fitToView,p&&(s.wrap.removeAttr("style").addClass("fancybox-tmp"),s.trigger("onUpdate")),s.update())},hideLoading:function(){r.off(".loading"),o("#fancybox-loading").remove()},showLoading:function(){var e,t;s.hideLoading(),e=o(s.opts.tpl.loading).click(s.cancel).appendTo("body"),r.on("keydown.loading",(function(e){27===(e.which||e.keyCode)&&(e.preventDefault(),s.cancel())})),s.defaults.fixed||(t=s.getViewport(),e.css({position:"absolute",top:.5*t.h+t.y,left:.5*t.w+t.x})),s.trigger("onLoading")},getViewport:function(){var t=s.current&&s.current.locked||!1,o={x:a.scrollLeft(),y:a.scrollTop()};return t&&t.length?(o.w=t[0].clientWidth,o.h=t[0].clientHeight):(o.w=p&&e.innerWidth?e.innerWidth:a.width(),o.h=p&&e.innerHeight?e.innerHeight:a.height()),o},unbindEvents:function(){s.wrap&&d(s.wrap)&&s.wrap.off(".fb"),r.off(".fb"),a.off(".fb")},bindEvents:function(){var e,t=s.current;t&&(a.on("orientationchange.fb"+(p?"":" resize.fb")+(t.autoCenter&&!t.locked?" scroll.fb":""),s.update),(e=t.keys)&&r.on("keydown.fb",(function(i){var a=i.which||i.keyCode,r=i.target||i.srcElement;if(27===a&&s.coming)return!1;i.ctrlKey||i.altKey||i.shiftKey||i.metaKey||r&&(r.type||o(r).is("[contenteditable]"))||o.each(e,(function(e,r){return t.group.length>1&&r[a]!==n?(s[e](r[a]),i.preventDefault(),!1):o.inArray(a,r)>-1?(s[e](),i.preventDefault(),!1):void 0}))})),o.fn.mousewheel&&t.mouseWheel&&s.wrap.on("mousewheel.fb",(function(e,n,i,a){for(var r,l=e.target||null,c=o(l),p=!1;c.length&&!(p||c.is(".fancybox-skin")||c.is(".fancybox-wrap"));)p=(r=c[0])&&!(r.style.overflow&&"hidden"===r.style.overflow)&&(r.clientWidth&&r.scrollWidth>r.clientWidth||r.clientHeight&&r.scrollHeight>r.clientHeight),c=o(c).parent();0===n||p||s.group.length>1&&!t.canShrink&&(a>0||i>0?s.prev(a>0?"down":"left"):(a<0||i<0)&&s.next(a<0?"up":"right"),e.preventDefault())})))},trigger:function(e,t){var n,i=t||s.coming||s.current;if(i){if("function"==typeof i[e]&&(n=i[e].apply(i,Array.prototype.slice.call(arguments,1))),!1===n)return!1;i.helpers&&o.each(i.helpers,(function(t,n){n&&s.helpers[t]&&"function"==typeof s.helpers[t][e]&&s.helpers[t][e](o.extend(!0,{},s.helpers[t].defaults,n),i)}))}r.trigger(e)},isImage:function(e){return h(e)&&e.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(e){return h(e)&&e.match(/\.(swf)((\?|#).*)?$/i)},_start:function(e){var t,n,i,a,r,l={};if(e=u(e),!(t=s.group[e]||null))return!1;if(a=(l=o.extend(!0,{},s.opts,t)).margin,r=l.padding,"number"===o.type(a)&&(l.margin=[a,a,a,a]),"number"===o.type(r)&&(l.padding=[r,r,r,r]),l.modal&&o.extend(!0,l,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}}),l.autoSize&&(l.autoWidth=l.autoHeight=!0),"auto"===l.width&&(l.autoWidth=!0),"auto"===l.height&&(l.autoHeight=!0),l.group=s.group,l.index=e,s.coming=l,!1!==s.trigger("beforeLoad")){if(i=l.type,n=l.href,!i)return s.coming=null,!(!s.current||!s.router||"jumpto"===s.router)&&(s.current.index=e,s[s.router](s.direction));if(s.isActive=!0,"image"!==i&&"swf"!==i||(l.autoHeight=l.autoWidth=!1,l.scrolling="visible"),"image"===i&&(l.aspectRatio=!0),"iframe"===i&&p&&(l.scrolling="scroll"),l.wrap=o(l.tpl.wrap).addClass("fancybox-"+(p?"mobile":"desktop")+" fancybox-type-"+i+" fancybox-tmp "+l.wrapCSS).appendTo(l.parent||"body"),o.extend(l,{skin:o(".fancybox-skin",l.wrap),outer:o(".fancybox-outer",l.wrap),inner:o(".fancybox-inner",l.wrap)}),o.each(["Top","Right","Bottom","Left"],(function(e,t){l.skin.css("padding"+t,g(l.padding[e]))})),s.trigger("onReady"),"inline"===i||"html"===i){if(!l.content||!l.content.length)return s._error("content")}else if(!n)return s._error("href");"image"===i?s._loadImage():"ajax"===i?s._loadAjax():"iframe"===i?s._loadIframe():s._afterLoad()}else s.coming=null},_error:function(e){o.extend(s.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:e,content:s.coming.tpl.error}),s._afterLoad()},_loadImage:function(){var e=s.imgPreload=new Image;e.onload=function(){this.onload=this.onerror=null,s.coming.width=this.width/s.opts.pixelRatio,s.coming.height=this.height/s.opts.pixelRatio,s._afterLoad()},e.onerror=function(){this.onload=this.onerror=null,s._error("image")},e.src=s.coming.href,!0!==e.complete&&s.showLoading()},_loadAjax:function(){var e=s.coming;s.showLoading(),s.ajaxLoad=o.ajax(o.extend({},e.ajax,{url:e.href,error:function(e,t){s.coming&&"abort"!==t?s._error("ajax",e):s.hideLoading()},success:function(t,o){"success"===o&&(e.content=t,s._afterLoad())}}))},_loadIframe:function(){var e=s.coming,t=o(e.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",p?"auto":e.iframe.scrolling).attr("src",e.href);o(e.wrap).on("onReset",(function(){try{o(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(e){}})),e.iframe.preload&&(s.showLoading(),t.one("load",(function(){o(this).data("ready",1),p||o(this).on("load.fb",s.update),o(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show(),s._afterLoad()}))),e.content=t.appendTo(e.inner),e.iframe.preload||s._afterLoad()},_preloadImages:function(){var e,t,o=s.group,n=s.current,i=o.length,a=n.preload?Math.min(n.preload,i-1):0;for(t=1;t<=a;t+=1)"image"===(e=o[(n.index+t)%i]).type&&e.href&&((new Image).src=e.href)},_afterLoad:function(){var e,t,n,i,a,r,l=s.coming,c=s.current,p="fancybox-placeholder";if(s.hideLoading(),l&&!1!==s.isActive){if(!1===s.trigger("afterLoad",l,c))return l.wrap.stop(!0).trigger("onReset").remove(),void(s.coming=null);switch(c&&(s.trigger("beforeChange",c),c.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()),s.unbindEvents(),e=l,t=l.content,n=l.type,i=l.scrolling,o.extend(s,{wrap:e.wrap,skin:e.skin,outer:e.outer,inner:e.inner,current:e,previous:c}),a=e.href,n){case"inline":case"ajax":case"html":e.selector?t=o("<div>").html(t).find(e.selector):d(t)&&(t.data(p)||t.data(p,o('<div class="'+p+'"></div>').insertAfter(t).hide()),t=t.show().detach(),e.wrap.on("onReset",(function(){o(this).find(t).length&&t.hide().replaceAll(t.data(p)).data(p,!1)})));break;case"image":t=e.tpl.image.replace(/\{href\}/g,a);break;case"swf":t='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+a+'"></param>',r="",o.each(e.swf,(function(e,o){t+='<param name="'+e+'" value="'+o+'"></param>',r+=" "+e+'="'+o+'"'})),t+='<embed src="'+a+'" type="application/x-shockwave-flash" width="100%" height="100%"'+r+"></embed></object>"}d(t)&&t.parent().is(e.inner)||e.inner.append(t),s.trigger("beforeShow"),e.inner.css("overflow","yes"===i?"scroll":"no"===i?"hidden":"hidden auto"),s._setDimension(),s.reposition(),s.isOpen=!1,s.coming=null,s.bindEvents(),s.isOpened?c.prevMethod&&s.transitions[c.prevMethod]():o(".fancybox-wrap").not(e.wrap).stop(!0).trigger("onReset").remove(),s.transitions[s.isOpened?e.nextMethod:e.openMethod](),s._preloadImages()}},_setDimension:function(){var e,t,n,i,a,r,l,c,p,d,h,m,y,x,v,w,b,k=s.getViewport(),C=0,O=s.wrap,W=s.skin,_=s.inner,S=s.current,T=S.width,E=S.height,L=S.minWidth,H=S.minHeight,j=S.maxWidth,P=S.maxHeight,R=S.scrolling,M=S.scrollOutside?S.scrollbarWidth:0,A=S.margin,I=u(A[1]+A[3]),D=u(A[0]+A[2]);if(O.add(W).add(_).width("auto").height("auto").removeClass("fancybox-tmp"),a=I+(n=u(W.outerWidth(!0)-W.width())),r=D+(i=u(W.outerHeight(!0)-W.height())),l=f(T)?(k.w-a)*u(T)/100:T,c=f(E)?(k.h-r)*u(E)/100:E,"iframe"===S.type){if(w=S.content,S.autoHeight&&w&&1===w.data("ready"))try{w[0].contentWindow.document.location&&(_.width(l).height(9999),b=w.contents().find("body"),M&&b.css("overflow-x","hidden"),c=b.outerHeight(!0))}catch(e){}}else(S.autoWidth||S.autoHeight)&&(_.addClass("fancybox-tmp"),S.autoWidth||_.width(l),S.autoHeight||_.height(c),S.autoWidth&&(l=_.width()),S.autoHeight&&(c=_.height()),_.removeClass("fancybox-tmp"));if(T=u(l),E=u(c),h=l/c,L=u(f(L)?u(L,"w")-a:L),j=u(f(j)?u(j,"w")-a:j),H=u(f(H)?u(H,"h")-r:H),p=j,d=P=u(f(P)?u(P,"h")-r:P),S.fitToView&&(j=Math.min(k.w-a,j),P=Math.min(k.h-r,P)),x=k.w-I,v=k.h-D,S.aspectRatio?(T>j&&(E=u((T=j)/h)),E>P&&(T=u((E=P)*h)),T<L&&(E=u((T=L)/h)),E<H&&(T=u((E=H)*h))):(T=Math.max(L,Math.min(T,j)),S.autoHeight&&"iframe"!==S.type&&(_.width(T),E=_.height()),E=Math.max(H,Math.min(E,P))),S.fitToView)if(_.width(T).height(E),O.width(T+n),m=O.width(),y=O.height(),S.aspectRatio)for(;(m>x||y>v)&&T>L&&E>H&&!(C++>19);)E=Math.max(H,Math.min(P,E-10)),(T=u(E*h))<L&&(E=u((T=L)/h)),T>j&&(E=u((T=j)/h)),_.width(T).height(E),O.width(T+n),m=O.width(),y=O.height();else T=Math.max(L,Math.min(T,T-(m-x))),E=Math.max(H,Math.min(E,E-(y-v)));M&&"auto"===R&&E<c&&T+n+M<x&&(T+=M),_.width(T).height(E),O.width(T+n),m=O.width(),y=O.height(),e=(m>x||y>v)&&T>L&&E>H,t=S.aspectRatio?T<p&&E<d&&T<l&&E<c:(T<p||E<d)&&(T<l||E<c),o.extend(S,{dim:{width:g(m),height:g(y)},origWidth:l,origHeight:c,canShrink:e,canExpand:t,wPadding:n,hPadding:i,wrapSpace:y-W.outerHeight(!0),skinSpace:W.height()-E}),!w&&S.autoHeight&&E>H&&E<P&&!t&&_.height("auto")},_getPosition:function(e){var t=s.current,o=s.getViewport(),n=t.margin,i=s.wrap.width()+n[1]+n[3],a=s.wrap.height()+n[0]+n[2],r={position:"absolute",top:n[0],left:n[3]};return t.autoCenter&&t.fixed&&!e&&a<=o.h&&i<=o.w?r.position="fixed":t.locked||(r.top+=o.y,r.left+=o.x),r.top=g(Math.max(r.top,r.top+(o.h-a)*t.topRatio)),r.left=g(Math.max(r.left,r.left+(o.w-i)*t.leftRatio)),r},_afterZoomIn:function(){var e=s.current;e&&(s.isOpen=s.isOpened=!0,s.wrap.css("overflow","visible").addClass("fancybox-opened").hide().show(0),s.update(),(e.closeClick||e.nextClick&&s.group.length>1)&&s.inner.css("cursor","pointer").on("click.fb",(function(t){o(t.target).is("a")||o(t.target).parent().is("a")||(t.preventDefault(),s[e.closeClick?"close":"next"]())})),e.closeBtn&&o(e.tpl.closeBtn).appendTo(s.skin).on("click.fb",(function(e){e.preventDefault(),s.close()})),e.arrows&&s.group.length>1&&((e.loop||e.index>0)&&o(e.tpl.prev).appendTo(s.outer).on("click.fb",s.prev),(e.loop||e.index<s.group.length-1)&&o(e.tpl.next).appendTo(s.outer).on("click.fb",s.next)),s.trigger("afterShow"),e.loop||e.index!==e.group.length-1?s.opts.autoPlay&&!s.player.isActive&&(s.opts.autoPlay=!1,s.play(!0)):s.play(!1))},_afterZoomOut:function(e){e=e||s.current,o(".fancybox-wrap").trigger("onReset").remove(),o.extend(s,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null}),s.trigger("afterClose",e)}}),s.transitions={getOrigPosition:function(){var e=s.current,t=e.element,o=e.orig,n={},i=50,a=50,r=e.hPadding,l=e.wPadding,c=s.getViewport();return!o&&e.isDom&&t.is(":visible")&&((o=t.find("img:first")).length||(o=t)),d(o)?(n=o.offset(),o.is("img")&&(i=o.outerWidth(),a=o.outerHeight())):(n.top=c.y+(c.h-a)*e.topRatio,n.left=c.x+(c.w-i)*e.leftRatio),("fixed"===s.wrap.css("position")||e.locked)&&(n.top-=c.y,n.left-=c.x),n={top:g(n.top-r*e.topRatio),left:g(n.left-l*e.leftRatio),width:g(i+l),height:g(a+r)}},step:function(e,t){var o,n,i=t.prop,a=s.current,r=a.wrapSpace,l=a.skinSpace;"width"!==i&&"height"!==i||(o=t.end===t.start?1:(e-t.start)/(t.end-t.start),s.isClosing&&(o=1-o),n=e-("width"===i?a.wPadding:a.hPadding),s.skin[i](u("width"===i?n:n-r*o)),s.inner[i](u("width"===i?n:n-r*o-l*o)))},zoomIn:function(){var e=s.current,t=e.pos,n=e.openEffect,i="elastic"===n,a=o.extend({opacity:1},t);delete a.position,i?(t=this.getOrigPosition(),e.openOpacity&&(t.opacity=.1)):"fade"===n&&(t.opacity=.1),s.wrap.css(t).animate(a,{duration:"none"===n?0:e.openSpeed,easing:e.openEasing,step:i?this.step:null,complete:s._afterZoomIn})},zoomOut:function(){var e=s.current,t=e.closeEffect,o="elastic"===t,n={opacity:.1};o&&(n=this.getOrigPosition(),e.closeOpacity&&(n.opacity=.1)),s.wrap.animate(n,{duration:"none"===t?0:e.closeSpeed,easing:e.closeEasing,step:o?this.step:null,complete:s._afterZoomOut})},changeIn:function(){var e,t=s.current,o=t.nextEffect,n=t.pos,i={opacity:1},a=s.direction,r=200;n.opacity=.1,"elastic"===o&&(e="down"===a||"up"===a?"top":"left","down"===a||"right"===a?(n[e]=g(u(n[e])-r),i[e]="+=200px"):(n[e]=g(u(n[e])+r),i[e]="-=200px")),"none"===o?s._afterZoomIn():s.wrap.css(n).animate(i,{duration:t.nextSpeed,easing:t.nextEasing,complete:s._afterZoomIn})},changeOut:function(){var e=s.previous,t=e.prevEffect,n={opacity:.1},i=s.direction;"elastic"===t&&(n["down"===i||"up"===i?"top":"left"]=("up"===i||"left"===i?"-":"+")+"=200px"),e.wrap.animate(n,{duration:"none"===t?0:e.prevSpeed,easing:e.prevEasing,complete:function(){o(this).trigger("onReset").remove()}})}},s.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!p,fixed:!0},overlay:null,fixed:!1,el:o("html"),create:function(e){var t;e=o.extend({},this.defaults,e),this.overlay&&this.close(),t=s.coming?s.coming.parent:e.parent,this.overlay=o('<div class="fancybox-overlay"></div>').appendTo(t&&t.length?t:"body"),this.fixed=!1,e.fixed&&s.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(e){var t=this;e=o.extend({},this.defaults,e),this.overlay?this.overlay.off(".overlay").width("auto").height("auto"):this.create(e),this.fixed||(a.on("resize.overlay",o.proxy(this.update,this)),this.update()),e.closeClick&&this.overlay.on("click.overlay",(function(e){if(o(e.target).hasClass("fancybox-overlay"))return s.isActive?s.close():t.close(),!1})),this.overlay.css(e.css).show()},close:function(){a.off("resize.overlay"),this.el.hasClass("fancybox-lock")&&(o(".fancybox-margin").removeClass("fancybox-margin"),this.el.removeClass("fancybox-lock"),a.scrollTop(this.scrollV).scrollLeft(this.scrollH)),o(".fancybox-overlay").remove().hide(),o.extend(this,{overlay:null,fixed:!1})},update:function(){var e,o="100%";this.overlay.width(o).height("100%"),l?(e=Math.max(t.documentElement.offsetWidth,t.body.offsetWidth),r.width()>e&&(o=r.width())):r.width()>a.width()&&(o=r.width()),this.overlay.width(o).height(r.height())},onReady:function(e,t){var n=this.overlay;o(".fancybox-overlay").stop(!0,!0),n||this.create(e),e.locked&&this.fixed&&t.fixed&&(t.locked=this.overlay.append(t.wrap),t.fixed=!1),!0===e.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(e,t){t.locked&&!this.el.hasClass("fancybox-lock")&&(!1!==this.fixPosition&&o("*:not(object)").filter((function(){return"fixed"===o(this).css("position")&&!o(this).hasClass("fancybox-overlay")&&!o(this).hasClass("fancybox-wrap")})).addClass("fancybox-margin"),this.el.addClass("fancybox-margin"),this.scrollV=a.scrollTop(),this.scrollH=a.scrollLeft(),this.el.addClass("fancybox-lock"),a.scrollTop(this.scrollV).scrollLeft(this.scrollH)),this.open(e)},onUpdate:function(){this.fixed||this.update()},afterClose:function(e){this.overlay&&!s.coming&&this.overlay.fadeOut(e.speedOut,o.proxy(this.close,this))}},s.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(e){var t,n,i=s.current,a=i.title,r=e.type;if("function"==typeof a&&(a=a.call(i.element,i)),h(a)&&""!==o.trim(a)){switch(t=o('<div class="fancybox-title fancybox-title-'+r+'-wrap">'+a+"</div>"),r){case"inside":n=s.skin;break;case"outside":n=s.wrap;break;case"over":n=s.inner;break;default:n=s.skin,t.appendTo("body"),l&&t.width(t.width()),t.wrapInner('<span class="child"></span>'),s.current.margin[2]+=Math.abs(u(t.css("margin-bottom")))}t["top"===e.position?"prependTo":"appendTo"](n)}}},o.fn.fancybox=function(e){var t,n=o(this),i=this.selector||"",a=function(a){var r,l,c=o(this).blur(),p=t;a.ctrlKey||a.altKey||a.shiftKey||a.metaKey||c.is(".fancybox-wrap")||(r=e.groupAttr||"data-fancybox-group",(l=c.attr(r))||(r="rel",l=c.get(0)[r]),l&&""!==l&&"nofollow"!==l&&(p=(c=(c=i.length?o(i):n).filter("["+r+'="'+l+'"]')).index(this)),e.index=p,!1!==s.open(c,e)&&a.preventDefault())};return t=(e=e||{}).index||0,i&&!1!==e.live?r.undelegate(i,"click.fb-start").delegate(i+":not('.fancybox-item, .fancybox-nav')","click.fb-start",a):n.off("click.fb-start").on("click.fb-start",a),this.filter("[data-fancybox-start=1]").trigger("click"),this},r.ready((function(){var t,a,r,l;o.scrollbarWidth===n&&(o.scrollbarWidth=function(){var e=o('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),t=e.children(),n=t.innerWidth()-t.height(99).innerWidth();return e.remove(),n}),o.support.fixedPosition===n&&(o.support.fixedPosition=(r=o('<div style="position:fixed;top:20px;"></div>').appendTo("body"),l=20===r[0].offsetTop||15===r[0].offsetTop,r.remove(),l)),o.extend(s.defaults,{scrollbarWidth:o.scrollbarWidth(),fixed:o.support.fixedPosition,parent:o("body")}),t=o(e).width(),i.addClass("fancybox-lock-test"),a=o(e).width(),i.removeClass("fancybox-lock-test"),o("<style type='text/css'>.fancybox-margin{margin-right:"+(a-t)+"px;}</style>").appendTo("head")}))}(window,document,jQuery);