/*! * fancyBox - jQuery Plugin * version: 2.1.7 (Tue, 28 Feb 2017) * requires jQuery v1.6 or later * * Examples at http://fancyapps.com/fancybox/ * License: www.fancyapps.com/fancybox/#license * * Copyright 2017 fancyapps.com * */ !function(o,i,R,h){"use strict";function f(e){return e&&e.hasOwnProperty&&e instanceof R}function u(e){return e&&"string"===R.type(e)}function M(e){return u(e)&&0
',image:'',iframe:'",error:'

The requested content cannot be loaded.
Please try again later.

',closeBtn:'',next:'',prev:'',loading:'
'},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:R.noop,beforeLoad:R.noop,afterLoad:R.noop,beforeShow:R.noop,afterShow:R.noop,beforeChange:R.noop,beforeClose:R.noop,afterClose:R.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(d,p){if(d&&(R.isPlainObject(p)||(p={}),!1!==D.close(!0)))return R.isArray(d)||(d=f(d)?R(d).get():[d]),R.each(d,function(e,t){var i,n,o,a,r,s,l,c={};"object"===R.type(t)&&(t.nodeType&&(t=R(t)),f(t)?(c={href:t.data("fancybox-href")||t.attr("href"),title:R("
").text(t.data("fancybox-title")||t.attr("title")||"").html(),isDom:!0,element:t},R.metadata&&R.extend(!0,c,t.metadata())):c=t),i=p.href||c.href||(u(t)?t:null),n=p.title!==h?p.title:c.title||"",!(a=(o=p.content||c.content)?"html":p.type||c.type)&&c.isDom&&(a=(a=t.data("fancybox-type"))||((r=t.prop("class").match(/fancybox\.(\w+)/))?r[1]:null)),u(i)&&(a||(D.isImage(i)?a="image":D.isSWF(i)?a="swf":"#"===i.charAt(0)?a="inline":u(t)&&(a="html",o=t)),"ajax"===a&&(i=(s=i.split(/\s+/,2)).shift(),l=s.shift())),o||("inline"===a?i?o=R(u(i)?i.replace(/.*(?=#[^\s]+$)/,""):i):c.isDom&&(o=t):"html"===a?o=i:a||i||!c.isDom||(a="inline",o=t)),R.extend(c,{href:i,type:a,content:o,title:n,selector:l}),d[e]=c}),D.opts=R.extend(!0,{},D.defaults,p),p.keys!==h&&(D.opts.keys=!!p.keys&&R.extend({},D.defaults.keys,p.keys)),D.group=d,D._start(D.opts.index)},cancel:function(){var e=D.coming;e&&!1===D.trigger("onCancel")||(D.hideLoading(),e&&(D.ajaxLoad&&D.ajaxLoad.abort(),D.ajaxLoad=null,D.imgPreload&&(D.imgPreload.onload=D.imgPreload.onerror=null),e.wrap&&e.wrap.stop(!0,!0).trigger("onReset").remove(),D.coming=null,D.current||D._afterZoomOut(e)))},close:function(e){D.cancel(),!1!==D.trigger("beforeClose")&&(D.unbindEvents(),D.isActive&&(D.isOpen&&!0!==e?(D.isOpen=D.isOpened=!1,D.isClosing=!0,R(".fancybox-item, .fancybox-nav").remove(),D.wrap.stop(!0,!0).removeClass("fancybox-opened"),D.transitions[D.current.closeMethod]()):(R(".fancybox-wrap").stop(!0).trigger("onReset").remove(),D._afterZoomOut())))},play:function(e){function t(){clearTimeout(D.player.timer)}function i(){t(),D.current&&D.player.isActive&&(D.player.timer=setTimeout(D.next,D.current.playSpeed))}function n(){t(),c.unbind(".player"),D.player.isActive=!1,D.trigger("onPlayEnd")}!0===e||!D.player.isActive&&!1!==e?D.current&&(D.current.loop||D.current.index=n.index?"next":"prev"],D.router=i||"jumpto",n.loop&&(e<0&&(e=n.group.length+e%n.group.length),e%=n.group.length),n.group[e]!==h&&(D.cancel(),D._start(e)))},reposition:function(e,t){var i,n=D.current,o=n?n.wrap:null;o&&(i=D._getPosition(t),e&&"scroll"===e.type?(delete i.position,o.stop(!0,!0).animate(i,200)):(o.css(i),n.pos=R.extend({},n.dim,i)))},update:function(t){var i=t&&t.originalEvent&&t.originalEvent.type,n=!i||"orientationchange"===i;n&&(clearTimeout(s),s=null),D.isOpen&&!s&&(s=setTimeout(function(){var e=D.current;e&&!D.isClosing&&(D.wrap.removeClass("fancybox-tmp"),(n||"load"===i||"resize"===i&&e.autoResize)&&D._setDimension(),"scroll"===i&&e.canShrink||D.reposition(t),D.trigger("onUpdate"),s=null)},n&&!d?0:300))},toggle:function(e){D.isOpen&&(D.current.fitToView="boolean"===R.type(e)?e:!D.current.fitToView,d&&(D.wrap.removeAttr("style").addClass("fancybox-tmp"),D.trigger("onUpdate")),D.update())},hideLoading:function(){c.unbind(".loading"),R("#fancybox-loading").remove()},showLoading:function(){var e,t;D.hideLoading(),e=R(D.opts.tpl.loading).click(D.cancel).appendTo("body"),c.bind("keydown.loading",function(e){27===(e.which||e.keyCode)&&(e.preventDefault(),D.cancel())}),D.defaults.fixed||(t=D.getViewport(),e.css({position:"absolute",top:.5*t.h+t.y,left:.5*t.w+t.x})),D.trigger("onLoading")},getViewport:function(){var e=D.current&&D.current.locked||!1,t={x:n.scrollLeft(),y:n.scrollTop()};return e&&e.length?(t.w=e[0].clientWidth,t.h=e[0].clientHeight):(t.w=d&&o.innerWidth?o.innerWidth:n.width(),t.h=d&&o.innerHeight?o.innerHeight:n.height()),t},unbindEvents:function(){D.wrap&&f(D.wrap)&&D.wrap.unbind(".fb"),c.unbind(".fb"),n.unbind(".fb")},bindEvents:function(){var t,l=D.current;l&&(n.bind("orientationchange.fb"+(d?"":" resize.fb")+(l.autoCenter&&!l.locked?" scroll.fb":""),D.update),(t=l.keys)&&c.bind("keydown.fb",function(i){var n=i.which||i.keyCode,e=i.target||i.srcElement;if(27===n&&D.coming)return!1;i.ctrlKey||i.altKey||i.shiftKey||i.metaKey||e&&(e.type||R(e).is("[contenteditable]"))||R.each(t,function(e,t){return 1o.clientWidth||o.clientHeight&&o.scrollHeight>o.clientHeight),r=R(r).parent();0===t||s||1").html(i).find(e.selector):f(i)&&(i.data(l)||i.data(l,R('
').insertAfter(i).hide()),i=i.show().detach(),e.wrap.bind("onReset",function(){R(this).find(i).length&&i.hide().replaceAll(i.data(l)).data(l,!1)}));break;case"image":i=e.tpl.image.replace(/\{href\}/g,o);break;case"swf":i='',a="",R.each(e.swf,function(e,t){i+='',a+=" "+e+'="'+t+'"'}),i+='"}f(i)&&i.parent().is(e.inner)||e.inner.append(i),D.trigger("beforeShow"),e.inner.css("overflow","yes"===n?"scroll":"no"===n?"hidden":n),D._setDimension(),D.reposition(),D.isOpen=!1,D.coming=null,D.bindEvents(),D.isOpened?s.prevMethod&&D.transitions[s.prevMethod]():R(".fancybox-wrap").not(e.wrap).stop(!0).trigger("onReset").remove(),D.transitions[D.isOpened?e.nextMethod:e.openMethod](),D._preloadImages()}},_setDimension:function(){var e,t,i,n,o,a,r,s,l,c,d,p,h,f,u,g,m,y=D.getViewport(),x=0,v=D.wrap,w=D.skin,b=D.inner,k=D.current,C=k.width,O=k.height,W=k.minWidth,_=k.minHeight,S=k.maxWidth,T=k.maxHeight,E=k.scrolling,L=k.scrollOutside?k.scrollbarWidth:0,H=k.margin,j=A(H[1]+H[3]),P=A(H[0]+H[2]);if(v.add(w).add(b).width("auto").height("auto").removeClass("fancybox-tmp"),o=j+(i=A(w.outerWidth(!0)-w.width())),a=P+(n=A(w.outerHeight(!0)-w.height())),r=M(C)?(y.w-o)*A(C)/100:C,s=M(O)?(y.h-a)*A(O)/100:O,"iframe"===k.type){if(g=k.content,k.autoHeight&&g&&1===g.data("ready"))try{g[0].contentWindow.document.location&&(b.width(r).height(9999),m=g.contents().find("body"),L&&m.css("overflow-x","hidden"),s=m.outerHeight(!0))}catch(e){}}else(k.autoWidth||k.autoHeight)&&(b.addClass("fancybox-tmp"),k.autoWidth||b.width(r),k.autoHeight||b.height(s),k.autoWidth&&(r=b.width()),k.autoHeight&&(s=b.height()),b.removeClass("fancybox-tmp"));if(C=A(r),O=A(s),d=r/s,W=A(M(W)?A(W,"w")-o:W),S=A(M(S)?A(S,"w")-o:S),_=A(M(_)?A(_,"h")-a:_),l=S,c=T=A(M(T)?A(T,"h")-a:T),k.fitToView&&(S=Math.min(y.w-o,S),T=Math.min(y.h-a,T)),f=y.w-j,u=y.h-P,k.aspectRatio?(S
').appendTo(t&&t.length?t:"body"),this.fixed=!1,e.fixed&&D.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(e){var t=this;e=R.extend({},this.defaults,e),this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(e),this.fixed||(n.bind("resize.overlay",R.proxy(this.update,this)),this.update()),e.closeClick&&this.overlay.bind("click.overlay",function(e){if(R(e.target).hasClass("fancybox-overlay"))return D.isActive?D.close():t.close(),!1}),this.overlay.css(e.css).show()},close:function(){n.unbind("resize.overlay"),this.el.hasClass("fancybox-lock")&&(R(".fancybox-margin").removeClass("fancybox-margin"),this.el.removeClass("fancybox-lock"),n.scrollTop(this.scrollV).scrollLeft(this.scrollH)),R(".fancybox-overlay").remove().hide(),R.extend(this,{overlay:null,fixed:!1})},update:function(){var e,t="100%";this.overlay.width(t).height("100%"),r?(e=Math.max(i.documentElement.offsetWidth,i.body.offsetWidth),c.width()>e&&(t=c.width())):c.width()>n.width()&&(t=c.width()),this.overlay.width(t).height(c.height())},onReady:function(e,t){var i=this.overlay;R(".fancybox-overlay").stop(!0,!0),i||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&&R("*:not(object)").filter(function(){return"fixed"===R(this).css("position")&&!R(this).hasClass("fancybox-overlay")&&!R(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin"),this.scrollV=n.scrollTop(),this.scrollH=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(this.scrollV).scrollLeft(this.scrollH)),this.open(e)},onUpdate:function(){this.fixed||this.update()},afterClose:function(e){this.overlay&&!D.coming&&this.overlay.fadeOut(e.speedOut,R.proxy(this.close,this))}},D.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(e){var t,i,n=D.current,o=n.title,a=e.type;if(R.isFunction(o)&&(o=o.call(n.element,n)),u(o)&&""!==R.trim(o)){switch(t=R('
'+o+"
"),a){case"inside":i=D.skin;break;case"outside":i=D.wrap;break;case"over":i=D.inner;break;default:i=D.skin,t.appendTo("body"),r&&t.width(t.width()),t.wrapInner(''),D.current.margin[2]+=Math.abs(A(t.css("margin-bottom")))}t["top"===e.position?"prependTo":"appendTo"](i)}}},R.fn.fancybox=function(a){function e(e){var t,i,n=R(this).blur(),o=r;e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||n.is(".fancybox-wrap")||(t=a.groupAttr||"data-fancybox-group",(i=n.attr(t))||(t="rel",i=n.get(0)[t]),i&&""!==i&&"nofollow"!==i&&(o=(n=(n=l.length?R(l):s).filter("["+t+'="'+i+'"]')).index(this)),a.index=o,!1!==D.open(n,a)&&e.preventDefault())}var r,s=R(this),l=this.selector||"";return r=(a=a||{}).index||0,l&&!1!==a.live?c.undelegate(l,"click.fb-start").delegate(l+":not('.fancybox-item, .fancybox-nav')","click.fb-start",e):s.unbind("click.fb-start").bind("click.fb-start",e),this.filter("[data-fancybox-start=1]").trigger("click"),this},c.ready(function(){var e,t,i,n;R.scrollbarWidth===h&&(R.scrollbarWidth=function(){var e=R('
').appendTo("body"),t=e.children(),i=t.innerWidth()-t.height(99).innerWidth();return e.remove(),i}),R.support.fixedPosition===h&&(R.support.fixedPosition=(i=R('
').appendTo("body"),n=20===i[0].offsetTop||15===i[0].offsetTop,i.remove(),n)),R.extend(D.defaults,{scrollbarWidth:R.scrollbarWidth(),fixed:R.support.fixedPosition,parent:R("body")}),e=R(o).width(),a.addClass("fancybox-lock-test"),t=R(o).width(),a.removeClass("fancybox-lock-test"),R("").appendTo("head")})}(window,document,jQuery);