<\/div><\/div>').click(u.cancel).appendTo("body"),e.bind("keydown.loading",function(n){27===(n.which||n.keyCode)&&(n.preventDefault(),u.cancel())}),u.defaults.fixed||(n=u.getViewport(),t.css({position:"absolute",top:.5*n.h+n.y,left:.5*n.w+n.x})),u.trigger("onLoading")},getViewport:function(){var i=u.current&&u.current.locked||!1,t={x:o.scrollLeft(),y:o.scrollTop()};return i&&i.length?(t.w=i[0].clientWidth,t.h=i[0].clientHeight):(t.w=s&&n.innerWidth?n.innerWidth:o.width(),t.h=s&&n.innerHeight?n.innerHeight:o.height()),t},unbindEvents:function(){u.wrap&&a(u.wrap)&&u.wrap.unbind(".fb"),e.unbind(".fb"),o.unbind(".fb")},bindEvents:function(){var n=u.current,t;n&&(o.bind("orientationchange.fb"+(s?"":" resize.fb")+(n.autoCenter&&!n.locked?" scroll.fb":""),u.update),(t=n.keys)&&e.bind("keydown.fb",function(f){var e=f.which||f.keyCode,o=f.target||f.srcElement;if(27===e&&u.coming)return!1;f.ctrlKey||f.altKey||f.shiftKey||f.metaKey||o&&(o.type||i(o).is("[contenteditable]"))||i.each(t,function(t,o){return 1
o[0].clientWidth||o[0].clientHeight&&o[0].scrollHeight>o[0].clientHeight),o=i(o).parent();0!==r&&!s&&1e||0>f)&&u.next(0>e?"up":"right"),t.preventDefault())}))},trigger:function(n,t){var f,r=t||u.coming||u.current;if(r){if(i.isFunction(r[n])&&(f=r[n].apply(r,Array.prototype.slice.call(arguments,1))),!1===f)return!1;r.helpers&&i.each(r.helpers,function(t,f){f&&u.helpers[t]&&i.isFunction(u.helpers[t][n])&&u.helpers[t][n](i.extend(!0,{},u.helpers[t].defaults,f),r)})}e.trigger(n)},isImage:function(n){return c(n)&&n.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(n){return c(n)&&n.match(/\.(swf)((\?|#).*)?$/i)},_start:function(n){var t={},e,r;if(n=f(n),e=u.group[n]||null,!e)return!1;if(t=i.extend(!0,{},u.opts,e),e=t.margin,r=t.padding,"number"===i.type(e)&&(t.margin=[e,e,e,e]),"number"===i.type(r)&&(t.padding=[r,r,r,r]),t.modal&&i.extend(!0,t,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}}),t.autoSize&&(t.autoWidth=t.autoHeight=!0),"auto"===t.width&&(t.autoWidth=!0),"auto"===t.height&&(t.autoHeight=!0),t.group=u.group,t.index=n,u.coming=t,!1===u.trigger("beforeLoad"))u.coming=null;else{if(r=t.type,e=t.href,!r)return u.coming=null,u.current&&u.router&&"jumpto"!==u.router?(u.current.index=n,u[u.router](u.direction)):!1;if(u.isActive=!0,("image"===r||"swf"===r)&&(t.autoHeight=t.autoWidth=!1,t.scrolling="visible"),"image"===r&&(t.aspectRatio=!0),"iframe"===r&&s&&(t.scrolling="scroll"),t.wrap=i(t.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+r+" fancybox-tmp "+t.wrapCSS).appendTo(t.parent||"body"),i.extend(t,{skin:i(".fancybox-skin",t.wrap),outer:i(".fancybox-outer",t.wrap),inner:i(".fancybox-inner",t.wrap)}),i.each(["Top","Right","Bottom","Left"],function(n,i){t.skin.css("padding"+i,h(t.padding[n]))}),u.trigger("onReady"),"inline"===r||"html"===r){if(!t.content||!t.content.length)return u._error("content")}else if(!e)return u._error("href");"image"===r?u._loadImage():"ajax"===r?u._loadAjax():"iframe"===r?u._loadIframe():u._afterLoad()}},_error:function(n){i.extend(u.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:n,content:u.coming.tpl.error}),u._afterLoad()},_loadImage:function(){var n=u.imgPreload=new Image;n.onload=function(){this.onload=this.onerror=null,u.coming.width=this.width/u.opts.pixelRatio,u.coming.height=this.height/u.opts.pixelRatio,u._afterLoad()},n.onerror=function(){this.onload=this.onerror=null,u._error("image")},n.src=u.coming.href,!0!==n.complete&&u.showLoading()},_loadAjax:function(){var n=u.coming;u.showLoading(),u.ajaxLoad=i.ajax(i.extend({},n.ajax,{url:n.href,error:function(n,t){u.coming&&"abort"!==t?u._error("ajax",n):u.hideLoading()},success:function(t,i){"success"===i&&(n.content=t,u._afterLoad())}}))},_loadIframe:function(){var n=u.coming,t=i(n.tpl.iframe.replace(/\{rnd\}/g,+new Date)).attr("scrolling",s?"auto":n.iframe.scrolling).attr("src",n.href);i(n.wrap).bind("onReset",function(){try{i(this).find("iframe").hide().attr("src","http://about:blank").end().empty()}catch(n){}}),n.iframe.preload&&(u.showLoading(),t.one("load",function(){i(this).data("ready",1),s||i(this).bind("load.fb",u.update),i(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show(),u._afterLoad()})),n.content=t.appendTo(n.inner),n.iframe.preload||u._afterLoad()},_preloadImages:function(){for(var r=u.group,i=u.current,f=r.length,e=i.preload?Math.min(i.preload,f-1):0,n,t=1;t<=e;t+=1)n=r[(i.index+t)%f],"image"===n.type&&n.href&&((new Image).src=n.href)},_afterLoad:function(){var n=u.coming,r=u.current,t,s,f,e,o;if(u.hideLoading(),n&&!1!==u.isActive)if(!1===u.trigger("afterLoad",n,r))n.wrap.stop(!0).trigger("onReset").remove(),u.coming=null;else{r&&(u.trigger("beforeChange",r),r.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()),u.unbindEvents(),t=n.content,s=n.type,f=n.scrolling,i.extend(u,{wrap:n.wrap,skin:n.skin,outer:n.outer,inner:n.inner,current:n,previous:r}),e=n.href;switch(s){case"inline":case"ajax":case"html":n.selector?t=i("").html(t).find(n.selector):a(t)&&(t.data("fancybox-placeholder")||t.data("fancybox-placeholder",i('
<\/div>').insertAfter(t).hide()),t=t.show().detach(),n.wrap.bind("onReset",function(){i(this).find(t).length&&t.hide().replaceAll(t.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case"image":t=n.tpl.image.replace(/\{href\}/g,e);break;case"swf":t='