/* fancyBox - License: www.fancyapps.com/fancybox/#license (c) 2012 Janis Skarnelis */(function(h,r,c,f){var l=c("html"),n=c(h),k=c(r),a=c.fancybox=function(){a.open.apply(this,arguments)},E=navigator.userAgent.match(/msie/i),z=null,x=r.createTouch!==f,A=function(a){return a&&a.hasOwnProperty&&a instanceof c},t=function(a){return a&&"string"===c.type(a)},y=function(a){return t(a)&&0<a.indexOf("%")},u=function(b,e){var c=parseInt(b,10)||0;e&&y(b)&&(c*=a.getViewport()[e]/100);return Math.ceil(c)},B=function(a,e){return u(a,e)+"px"};c.extend(a,{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:!x,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'+
(E?' 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>'},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:c.noop,beforeLoad:c.noop,afterLoad:c.noop,beforeShow:c.noop,afterShow:c.noop,beforeChange:c.noop,beforeClose:c.noop,afterClose:c.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(b,e){if(b&&(c.isPlainObject(e)||(e={}),!1!==a.close(!0)))return c.isArray(b)||(b=A(b)?c(b).get():[b]),c.each(b,function(g,d){var m={},v,p,q,w,h;"object"===c.type(d)&&(d.nodeType&&(d=c(d)),A(d)?(m={href:d.data("fancybox-href")||d.attr("href"),title:c("<div/>").text(d.data("fancybox-title")||d.attr("title")).html(),isDom:!0,element:d},
c.metadata&&c.extend(!0,m,d.metadata())):m=d);v=e.href||m.href||(t(d)?d:null);p=e.title!==f?e.title:m.title||"";w=(q=e.content||m.content)?"html":e.type||m.type;!w&&m.isDom&&(w=d.data("fancybox-type"),w||(w=(w=d.prop("class").match(/fancybox\.(\w+)/))?w[1]:null));t(v)&&(w||(a.isImage(v)?w="image":a.isSWF(v)?w="swf":"#"===v.charAt(0)?w="inline":t(d)&&(w="html",q=d)),"ajax"===w&&(h=v.split(/\s+/,2),v=h.shift(),h=h.shift()));q||("inline"===w?v?q=c(t(v)?v.replace(/.*(?=#[^\s]+$)/,""):v):m.isDom&&(q=d):
"html"===w?q=v:w||v||!m.isDom||(w="inline",q=d));c.extend(m,{href:v,type:w,content:q,title:p,selector:h});b[g]=m}),a.opts=c.extend(!0,{},a.defaults,e),e.keys!==f&&(a.opts.keys=e.keys?c.extend({},a.defaults.keys,e.keys):!1),a.group=b,a._start(a.opts.index)},cancel:function(){var b=a.coming;b&&!1===a.trigger("onCancel")||(a.hideLoading(),b&&(a.ajaxLoad&&a.ajaxLoad.abort(),a.ajaxLoad=null,a.imgPreload&&(a.imgPreload.onload=a.imgPreload.onerror=null),b.wrap&&b.wrap.stop(!0,!0).trigger("onReset").remove(),
a.coming=null,a.current||a._afterZoomOut(b)))},close:function(b){a.cancel();!1!==a.trigger("beforeClose")&&(a.unbindEvents(),a.isActive&&(a.isOpen&&!0!==b?(a.isOpen=a.isOpened=!1,a.isClosing=!0,c(".fancybox-item, .fancybox-nav").remove(),a.wrap.stop(!0,!0).removeClass("fancybox-opened"),a.transitions[a.current.closeMethod]()):(c(".fancybox-wrap").stop(!0).trigger("onReset").remove(),a._afterZoomOut())))},play:function(b){var e=function(){clearTimeout(a.player.timer)},c=function(){e();a.current&&a.player.isActive&&
(a.player.timer=setTimeout(a.next,a.current.playSpeed))},d=function(){e();k.unbind(".player");a.player.isActive=!1;a.trigger("onPlayEnd")};!0===b||!a.player.isActive&&!1!==b?a.current&&(a.current.loop||a.current.index<a.group.length-1)&&(a.player.isActive=!0,k.bind({"onCancel.player beforeClose.player":d,"onUpdate.player":c,"beforeLoad.player":e}),c(),a.trigger("onPlayStart")):d()},next:function(b){var e=a.current;e&&(t(b)||(b=e.direction.next),a.jumpto(e.index+1,b,"next"))},prev:function(b){var e=
a.current;e&&(t(b)||(b=e.direction.prev),a.jumpto(e.index-1,b,"prev"))},jumpto:function(b,e,c){var d=a.current;d&&(b=u(b),a.direction=e||d.direction[b>=d.index?"next":"prev"],a.router=c||"jumpto",d.loop&&(0>b&&(b=d.group.length+b%d.group.length),b%=d.group.length),d.group[b]!==f&&(a.cancel(),a._start(b)))},reposition:function(b,e){var g=a.current,d=g?g.wrap:null,m;d&&(m=a._getPosition(e),b&&"scroll"===b.type?(delete m.position,d.stop(!0,!0).animate(m,200)):(d.css(m),g.pos=c.extend({},g.dim,m)))},
update:function(b){var e=b&&b.originalEvent&&b.originalEvent.type,c=!e||"orientationchange"===e;c&&(clearTimeout(z),z=null);a.isOpen&&!z&&(z=setTimeout(function(){var d=a.current;d&&!a.isClosing&&(a.wrap.removeClass("fancybox-tmp"),(c||"load"===e||"resize"===e&&d.autoResize)&&a._setDimension(),"scroll"===e&&d.canShrink||a.reposition(b),a.trigger("onUpdate"),z=null)},c&&!x?0:300))},toggle:function(b){a.isOpen&&(a.current.fitToView="boolean"===c.type(b)?b:!a.current.fitToView,x&&(a.wrap.removeAttr("style").addClass("fancybox-tmp"),
a.trigger("onUpdate")),a.update())},hideLoading:function(){k.unbind(".loading");c("#fancybox-loading").remove()},showLoading:function(){var b,e;a.hideLoading();b=c('<div id="fancybox-loading"><div></div></div>').click(a.cancel).appendTo("body");k.bind("keydown.loading",function(b){27===(b.which||b.keyCode)&&(b.preventDefault(),a.cancel())});a.defaults.fixed||(e=a.getViewport(),b.css({position:"absolute",top:.5*e.h+e.y,left:.5*e.w+e.x}));a.trigger("onLoading")},getViewport:function(){var b=a.current&&
a.current.locked||!1,e={x:n.scrollLeft(),y:n.scrollTop()};b&&b.length?(e.w=b[0].clientWidth,e.h=b[0].clientHeight):(e.w=x&&h.innerWidth?h.innerWidth:n.width(),e.h=x&&h.innerHeight?h.innerHeight:n.height());return e},unbindEvents:function(){a.wrap&&A(a.wrap)&&a.wrap.unbind(".fb");k.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var b=a.current,e;b&&(n.bind("orientationchange.fb"+(x?"":" resize.fb")+(b.autoCenter&&!b.locked?" scroll.fb":""),a.update),(e=b.keys)&&k.bind("keydown.fb",function(g){var d=
g.which||g.keyCode,m=g.target||g.srcElement;if(27===d&&a.coming)return!1;g.ctrlKey||g.altKey||g.shiftKey||g.metaKey||m&&(m.type||c(m).is("[contenteditable]"))||c.each(e,function(e,m){if(1<b.group.length&&m[d]!==f)return a[e](m[d]),g.preventDefault(),!1;if(-1<c.inArray(d,m))return a[e](),g.preventDefault(),!1})}),c.fn.mousewheel&&b.mouseWheel&&a.wrap.bind("mousewheel.fb",function(e,d,m,v){for(var p=c(e.target||null),f=!1;p.length&&!(f||p.is(".fancybox-skin")||p.is(".fancybox-wrap"));)f=p[0]&&!(p[0].style.overflow&&
"hidden"===p[0].style.overflow)&&(p[0].clientWidth&&p[0].scrollWidth>p[0].clientWidth||p[0].clientHeight&&p[0].scrollHeight>p[0].clientHeight),p=c(p).parent();0!==d&&!f&&1<a.group.length&&!b.canShrink&&(0<v||0<m?a.prev(0<v?"down":"left"):(0>v||0>m)&&a.next(0>v?"up":"right"),e.preventDefault())}))},trigger:function(b,e){var g,d=e||a.coming||a.current;if(d){c.isFunction(d[b])&&(g=d[b].apply(d,Array.prototype.slice.call(arguments,1)));if(!1===g)return!1;d.helpers&&c.each(d.helpers,function(e,g){if(g&&
a.helpers[e]&&c.isFunction(a.helpers[e][b]))a.helpers[e][b](c.extend(!0,{},a.helpers[e].defaults,g),d)})}k.trigger(b)},isImage:function(a){return t(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return t(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(b){var e={},g,d;b=u(b);g=a.group[b]||null;if(!g)return!1;e=c.extend(!0,{},a.opts,g);g=e.margin;d=e.padding;"number"===c.type(g)&&(e.margin=[g,g,g,g]);"number"===c.type(d)&&(e.padding=[d,d,
d,d]);e.modal&&c.extend(!0,e,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});e.autoSize&&(e.autoWidth=e.autoHeight=!0);"auto"===e.width&&(e.autoWidth=!0);"auto"===e.height&&(e.autoHeight=!0);e.group=a.group;e.index=b;a.coming=e;if(!1===a.trigger("beforeLoad"))a.coming=null;else{d=e.type;g=e.href;if(!d)return a.coming=null,a.current&&a.router&&"jumpto"!==a.router?(a.current.index=b,a[a.router](a.direction)):!1;a.isActive=!0;if("image"===
d||"swf"===d)e.autoHeight=e.autoWidth=!1,e.scrolling="visible";"image"===d&&(e.aspectRatio=!0);"iframe"===d&&x&&(e.scrolling="scroll");e.wrap=c(e.tpl.wrap).addClass("fancybox-"+(x?"mobile":"desktop")+" fancybox-type-"+d+" fancybox-tmp "+e.wrapCSS).appendTo(e.parent||"body");c.extend(e,{skin:c(".fancybox-skin",e.wrap),outer:c(".fancybox-outer",e.wrap),inner:c(".fancybox-inner",e.wrap)});c.each(["Top","Right","Bottom","Left"],function(a,b){e.skin.css("padding"+b,B(e.padding[a]))});a.trigger("onReady");
if("inline"===d||"html"===d){if(!e.content||!e.content.length)return a._error("content")}else if(!g)return a._error("href");"image"===d?a._loadImage():"ajax"===d?a._loadAjax():"iframe"===d?a._loadIframe():a._afterLoad()}},_error:function(b){c.extend(a.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:b,content:a.coming.tpl.error});a._afterLoad()},_loadImage:function(){var b=a.imgPreload=new Image;b.onload=function(){this.onload=this.onerror=null;a.coming.width=
this.width/a.opts.pixelRatio;a.coming.height=this.height/a.opts.pixelRatio;a._afterLoad()};b.onerror=function(){this.onload=this.onerror=null;a._error("image")};b.src=a.coming.href;!0!==b.complete&&a.showLoading()},_loadAjax:function(){var b=a.coming;a.showLoading();a.ajaxLoad=c.ajax(c.extend({},b.ajax,{url:b.href,error:function(b,c){a.coming&&"abort"!==c?a._error("ajax",b):a.hideLoading()},success:function(e,c){"success"===c&&(b.content=e,a._afterLoad())}}))},_loadIframe:function(){var b=a.coming,
e=c(b.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",x?"auto":b.iframe.scrolling).attr("src",b.href);c(b.wrap).bind("onReset",function(){try{c(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});b.iframe.preload&&(a.showLoading(),e.one("load",function(){c(this).data("ready",1);x||c(this).bind("load.fb",a.update);c(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();a._afterLoad()}));b.content=e.appendTo(b.inner);b.iframe.preload||
a._afterLoad()},_preloadImages:function(){var b=a.group,e=a.current,c=b.length,d=e.preload?Math.min(e.preload,c-1):0,m,v;for(v=1;v<=d;v+=1)m=b[(e.index+v)%c],"image"===m.type&&m.href&&((new Image).src=m.href)},_afterLoad:function(){var b=a.coming,e=a.current,g,d,m,v,f;a.hideLoading();if(b&&!1!==a.isActive)if(!1===a.trigger("afterLoad",b,e))b.wrap.stop(!0).trigger("onReset").remove(),a.coming=null;else{e&&(a.trigger("beforeChange",e),e.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());
a.unbindEvents();g=b.content;d=b.type;m=b.scrolling;c.extend(a,{wrap:b.wrap,skin:b.skin,outer:b.outer,inner:b.inner,current:b,previous:e});v=b.href;switch(d){case "inline":case "ajax":case "html":b.selector?g=c("<div>").html(g).find(b.selector):A(g)&&(g.data("fancybox-placeholder")||g.data("fancybox-placeholder",c('<div class="fancybox-placeholder"></div>').insertAfter(g).hide()),g=g.show().detach(),b.wrap.bind("onReset",function(){c(this).find(g).length&&g.hide().replaceAll(g.data("fancybox-placeholder")).data("fancybox-placeholder",
!1)}));break;case "image":g=b.tpl.image.replace(/\{href\}/g,v);break;case "swf":g='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+v+'"></param>',f="",c.each(b.swf,function(a,b){g+='<param name="'+a+'" value="'+b+'"></param>';f+=" "+a+'="'+b+'"'}),g+='<embed src="'+v+'" type="application/x-shockwave-flash" width="100%" height="100%"'+f+"></embed></object>"}A(g)&&g.parent().is(b.inner)||b.inner.append(g);a.trigger("beforeShow");
b.inner.css("overflow","yes"===m?"scroll":"no"===m?"hidden":m);a._setDimension();a.reposition();a.isOpen=!1;a.coming=null;a.bindEvents();if(!a.isOpened)c(".fancybox-wrap").not(b.wrap).stop(!0).trigger("onReset").remove();else if(e.prevMethod)a.transitions[e.prevMethod]();a.transitions[a.isOpened?b.nextMethod:b.openMethod]();a._preloadImages()}},_setDimension:function(){var b=a.getViewport(),e=0,g=!1,d=!1,g=a.wrap,m=a.skin,f=a.inner,p=a.current,d=p.width,q=p.height,h=p.minWidth,l=p.minHeight,k=p.maxWidth,
n=p.maxHeight,E=p.scrolling,x=p.scrollOutside?p.scrollbarWidth:0,t=p.margin,r=u(t[1]+t[3]),A=u(t[0]+t[2]),z,C,I,F,D,H,K,G,J;g.add(m).add(f).width("auto").height("auto").removeClass("fancybox-tmp");t=u(m.outerWidth(!0)-m.width());z=u(m.outerHeight(!0)-m.height());C=r+t;I=A+z;F=y(d)?(b.w-C)*u(d)/100:d;D=y(q)?(b.h-I)*u(q)/100:q;if("iframe"===p.type){if(J=p.content,p.autoHeight&&1===J.data("ready"))try{J[0].contentWindow.document.location&&(f.width(F).height(9999),H=J.contents().find("body"),x&&H.css("overflow-x",
"hidden"),D=H.outerHeight(!0))}catch(L){}}else if(p.autoWidth||p.autoHeight)f.addClass("fancybox-tmp"),p.autoWidth||f.width(F),p.autoHeight||f.height(D),p.autoWidth&&(F=f.width()),p.autoHeight&&(D=f.height()),f.removeClass("fancybox-tmp");d=u(F);q=u(D);G=F/D;h=u(y(h)?u(h,"w")-C:h);k=u(y(k)?u(k,"w")-C:k);l=u(y(l)?u(l,"h")-I:l);n=u(y(n)?u(n,"h")-I:n);H=k;K=n;p.fitToView&&(k=Math.min(b.w-C,k),n=Math.min(b.h-I,n));C=b.w-r;A=b.h-A;p.aspectRatio?(d>k&&(d=k,q=u(d/G)),q>n&&(q=n,d=u(q*G)),d<h&&(d=h,q=u(d/
G)),q<l&&(q=l,d=u(q*G))):(d=Math.max(h,Math.min(d,k)),p.autoHeight&&"iframe"!==p.type&&(f.width(d),q=f.height()),q=Math.max(l,Math.min(q,n)));if(p.fitToView)if(f.width(d).height(q),g.width(d+t),b=g.width(),r=g.height(),p.aspectRatio)for(;(b>C||r>A)&&d>h&&q>l&&!(19<e++);)q=Math.max(l,Math.min(n,q-10)),d=u(q*G),d<h&&(d=h,q=u(d/G)),d>k&&(d=k,q=u(d/G)),f.width(d).height(q),g.width(d+t),b=g.width(),r=g.height();else d=Math.max(h,Math.min(d,d-(b-C))),q=Math.max(l,Math.min(q,q-(r-A)));x&&"auto"===E&&q<D&&
d+t+x<C&&(d+=x);f.width(d).height(q);g.width(d+t);b=g.width();r=g.height();g=(b>C||r>A)&&d>h&&q>l;d=p.aspectRatio?d<H&&q<K&&d<F&&q<D:(d<H||q<K)&&(d<F||q<D);c.extend(p,{dim:{width:B(b),height:B(r)},origWidth:F,origHeight:D,canShrink:g,canExpand:d,wPadding:t,hPadding:z,wrapSpace:r-m.outerHeight(!0),skinSpace:m.height()-q});!J&&p.autoHeight&&q>l&&q<n&&!d&&f.height("auto")},_getPosition:function(b){var e=a.current,c=a.getViewport(),d=e.margin,f=a.wrap.width()+d[1]+d[3],h=a.wrap.height()+d[0]+d[2],d={position:"absolute",
top:d[0],left:d[3]};e.autoCenter&&e.fixed&&!b&&h<=c.h&&f<=c.w?d.position="fixed":e.locked||(d.top+=c.y,d.left+=c.x);d.top=B(Math.max(d.top,d.top+(c.h-h)*e.topRatio));d.left=B(Math.max(d.left,d.left+(c.w-f)*e.leftRatio));return d},_afterZoomIn:function(){var b=a.current;b&&((a.isOpen=a.isOpened=!0,a.wrap.css("overflow","visible").addClass("fancybox-opened"),a.update(),(b.closeClick||b.nextClick&&1<a.group.length)&&a.inner.css("cursor","pointer").bind("click.fb",function(e){c(e.target).is("a")||c(e.target).parent().is("a")||
(e.preventDefault(),a[b.closeClick?"close":"next"]())}),b.closeBtn&&c(b.tpl.closeBtn).appendTo(a.skin).bind("click.fb",function(b){b.preventDefault();a.close()}),b.arrows&&1<a.group.length&&((b.loop||0<b.index)&&c(b.tpl.prev).appendTo(a.outer).bind("click.fb",a.prev),(b.loop||b.index<a.group.length-1)&&c(b.tpl.next).appendTo(a.outer).bind("click.fb",a.next)),a.trigger("afterShow"),b.loop||b.index!==b.group.length-1)?a.opts.autoPlay&&!a.player.isActive&&(a.opts.autoPlay=!1,a.play(!0)):a.play(!1))},
_afterZoomOut:function(b){b=b||a.current;c(".fancybox-wrap").trigger("onReset").remove();c.extend(a,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});a.trigger("afterClose",b)}});a.transitions={getOrigPosition:function(){var b=a.current,e=b.element,c=b.orig,d={},f=50,h=50,p=b.hPadding,l=b.wPadding,k=a.getViewport();!c&&b.isDom&&e.is(":visible")&&(c=e.find("img:first"),c.length||(c=e));A(c)?(d=c.offset(),c.is("img")&&
(f=c.outerWidth(),h=c.outerHeight())):(d.top=k.y+(k.h-h)*b.topRatio,d.left=k.x+(k.w-f)*b.leftRatio);if("fixed"===a.wrap.css("position")||b.locked)d.top-=k.y,d.left-=k.x;return{top:B(d.top-p*b.topRatio),left:B(d.left-l*b.leftRatio),width:B(f+l),height:B(h+p)}},step:function(b,c){var g,d,f=c.prop;d=a.current;var h=d.wrapSpace,p=d.skinSpace;if("width"===f||"height"===f)g=c.end===c.start?1:(b-c.start)/(c.end-c.start),a.isClosing&&(g=1-g),d="width"===f?d.wPadding:d.hPadding,d=b-d,a.skin[f](u("width"===
f?d:d-h*g)),a.inner[f](u("width"===f?d:d-h*g-p*g))},zoomIn:function(){var b=a.current,e=b.pos,g=b.openEffect,d="elastic"===g,f=c.extend({opacity:1},e);delete f.position;d?(e=this.getOrigPosition(),b.openOpacity&&(e.opacity=.1)):"fade"===g&&(e.opacity=.1);a.wrap.css(e).animate(f,{duration:"none"===g?0:b.openSpeed,easing:b.openEasing,step:d?this.step:null,complete:a._afterZoomIn})},zoomOut:function(){var b=a.current,c=b.closeEffect,g="elastic"===c,d={opacity:.1};g&&(d=this.getOrigPosition(),b.closeOpacity&&
(d.opacity=.1));a.wrap.animate(d,{duration:"none"===c?0:b.closeSpeed,easing:b.closeEasing,step:g?this.step:null,complete:a._afterZoomOut})},changeIn:function(){var b=a.current,c=b.nextEffect,g=b.pos,d={opacity:1},f=a.direction,h;g.opacity=.1;"elastic"===c&&(h="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(g[h]=B(u(g[h])-200),d[h]="+=200px"):(g[h]=B(u(g[h])+200),d[h]="-=200px"));"none"===c?a._afterZoomIn():a.wrap.css(g).animate(d,{duration:b.nextSpeed,easing:b.nextEasing,complete:a._afterZoomIn})},
changeOut:function(){var b=a.previous,e=b.prevEffect,g={opacity:.1},d=a.direction;"elastic"===e&&(g["down"===d||"up"===d?"top":"left"]=("up"===d||"left"===d?"-":"+")+"=200px");b.wrap.animate(g,{duration:"none"===e?0:b.prevSpeed,easing:b.prevEasing,complete:function(){c(this).trigger("onReset").remove()}})}};a.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!x,fixed:!0},overlay:null,fixed:!1,el:c("html"),create:function(b){var e;b=c.extend({},this.defaults,b);this.overlay&&
this.close();e=a.coming?a.coming.parent:b.parent;this.overlay=c('<div class="fancybox-overlay"></div>').appendTo(e&&e.lenth?e:"body");this.fixed=!1;b.fixed&&a.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(b){var e=this;b=c.extend({},this.defaults,b);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(b);this.fixed||(n.bind("resize.overlay",c.proxy(this.update,this)),this.update());b.closeClick&&this.overlay.bind("click.overlay",
function(b){if(c(b.target).hasClass("fancybox-overlay"))return a.isActive?a.close():e.close(),!1});this.overlay.css(b.css).show()},close:function(){n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(c(".fancybox-margin").removeClass("fancybox-margin"),this.el.removeClass("fancybox-lock"),n.scrollTop(this.scrollV).scrollLeft(this.scrollH));c(".fancybox-overlay").remove().hide();c.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",c;this.overlay.width(a).height("100%");
E?(c=Math.max(r.documentElement.offsetWidth,r.body.offsetWidth),k.width()>c&&(a=k.width())):k.width()>n.width()&&(a=k.width());this.overlay.width(a).height(k.height())},onReady:function(a,e){var g=this.overlay;c(".fancybox-overlay").stop(!0,!0);g||this.create(a);a.locked&&this.fixed&&e.fixed&&(e.locked=this.overlay.append(e.wrap),e.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,e){e.locked&&!this.el.hasClass("fancybox-lock")&&(!1!==this.fixPosition&&c("*").filter(function(){return"fixed"===
c(this).css("position")&&!c(this).hasClass("fancybox-overlay")&&!c(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(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(b){this.overlay&&!a.coming&&this.overlay.fadeOut(b.speedOut,c.proxy(this.close,this))}};a.helpers.title={defaults:{type:"float",
position:"bottom"},beforeShow:function(b){var e=a.current,g=e.title,d=b.type;c.isFunction(g)&&(g=g.call(e.element,e));if(t(g)&&""!==c.trim(g)){e=c('<div class="fancybox-title fancybox-title-'+d+'-wrap">'+g+"</div>");switch(d){case "inside":d=a.skin;break;case "outside":d=a.wrap;break;case "over":d=a.inner;break;default:d=a.skin,e.appendTo("body"),E&&e.width(e.width()),e.wrapInner('<span class="child"></span>'),a.current.margin[2]+=Math.abs(u(e.css("margin-bottom")))}e["top"===b.position?"prependTo":
"appendTo"](d)}}};c.fn.fancybox=function(b){var e,g=c(this),d=this.selector||"",f=function(f){var h=c(this).blur(),l=e,k,m;f.ctrlKey||f.altKey||f.shiftKey||f.metaKey||h.is(".fancybox-wrap")||(k=b.groupAttr||"data-fancybox-group",m=h.attr(k),m||(k="rel",m=h.get(0)[k]),m&&""!==m&&"nofollow"!==m&&(h=d.length?c(d):g,h=h.filter("["+k+'="'+m+'"]'),l=h.index(this)),b.index=l,!1!==a.open(h,b)&&f.preventDefault())};b=b||{};e=b.index||0;d&&!1!==b.live?k.undelegate(d,"click.fb-start").delegate(d+":not('.fancybox-item, .fancybox-nav')",
"click.fb-start",f):g.unbind("click.fb-start").bind("click.fb-start",f);this.filter("[data-fancybox-start=1]").trigger("click");return this};k.ready(function(){var b,e;c.scrollbarWidth===f&&(c.scrollbarWidth=function(){var a=c('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});c.support.fixedPosition===f&&(c.support.fixedPosition=function(){var a=c('<div style="position:fixed;top:20px;"></div>').appendTo("body"),
b=20===a[0].offsetTop||15===a[0].offsetTop;a.remove();return b}());c.extend(a.defaults,{scrollbarWidth:c.scrollbarWidth(),fixed:c.support.fixedPosition,parent:c("body")});b=c(h).width();l.addClass("fancybox-lock-test");e=c(h).width();l.removeClass("fancybox-lock-test");c("<style type='text/css'>.fancybox-margin{margin-right:"+(e-b)+"px;}</style>").appendTo("head")})})(window,document,jQuery);
(function(h){"function"===typeof define&&define.amd?define(["jquery"],h):"object"===typeof exports?module.exports=h:h(jQuery)})(function(h){function r(a){var c=a||window.event,f=[].slice.call(arguments,1),k=0,r=0,t=0,y=0;a=h.event.fix(c);a.type="mousewheel";c.wheelDelta&&(k=c.wheelDelta);c.detail&&(k=-1*c.detail);c.deltaY&&(k=t=-1*c.deltaY);c.deltaX&&(r=c.deltaX,k=-1*r);void 0!==c.wheelDeltaY&&(t=c.wheelDeltaY);void 0!==c.wheelDeltaX&&(r=-1*c.wheelDeltaX);y=Math.abs(k);if(!l||y<l)l=y;y=Math.max(Math.abs(t),
Math.abs(r));if(!n||y<n)n=y;c=0<k?"floor":"ceil";k=Math[c](k/l);r=Math[c](r/n);t=Math[c](t/n);try{a.originalEvent.hasOwnProperty("wheelDelta")}catch(u){t=k}f.unshift(a,k,r,t);return(h.event.dispatch||h.event.handle).apply(this,f)}var c=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],f="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l,n;if(h.event.fixHooks)for(var k=c.length;k;)h.event.fixHooks[c[--k]]=h.event.mouseHooks;
h.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=f.length;a;)this.addEventListener(f[--a],r,!1);else this.onmousewheel=r},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],r,!1);else this.onmousewheel=null}};h.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
(function(h){var r=function(c,f,l){l=l||"";"object"===h.type(l)&&(l=h.param(l,!0));h.each(f,function(f,h){c=c.replace("$"+f,h||"")});l.length&&(c+=(0<c.indexOf("?")?"&":"?")+l);return c};h.fancybox.helpers.media={defaults:{youtube:{matcher:/(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"opaque",enablejsapi:1},type:"iframe",url:"//www.youtube.com/embed/$3"},
vimeo:{matcher:/(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},type:"iframe",url:"//player.vimeo.com/video/$1"},metacafe:{matcher:/metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/,params:{autoPlay:"yes"},type:"swf",url:function(c,f,l){l.swf.flashVars="playerVars="+h.param(f,!0);return"//www.metacafe.com/fplayer/"+c[1]+"/.swf"}},dailymotion:{matcher:/dailymotion.com\/video\/(.*)\/?(.*)/,params:{additionalInfos:0,autoStart:1},
type:"swf",url:"//www.dailymotion.com/swf/video/$1"},twitvid:{matcher:/twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i,params:{autoplay:0},type:"iframe",url:"//www.twitvid.com/embed.php?guid=$1"},twitpic:{matcher:/twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i,type:"image",url:"//twitpic.com/show/full/$1/"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},google_maps:{matcher:/maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i,
type:"iframe",url:function(c){return"//maps.google."+c[1]+"/"+c[3]+""+c[4]+"&output="+(0<c[4].indexOf("layer=c")?"svembed":"embed")}}},beforeLoad:function(c,f){var l=f.href||"",n=!1,k,a,E;for(k in c)if(c.hasOwnProperty(k)&&(a=c[k],E=l.match(a.matcher))){n=a.type;l=h.extend(!0,{},a.params,f[k]||(h.isPlainObject(c[k])?c[k].params:null));l="function"===h.type(a.url)?a.url.call(this,E,l,f):r(a.url,E,l);break}n&&(f.href=l,f.type=n,f.autoHeight=!1)}}})(jQuery);
(function(h){var r=h.fancybox;r.helpers.buttons={defaults:{skipSingle:!1,position:"top",tpl:'<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"></a></li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"></a></li><li><a class="btnNext" title="Next" href="javascript:;"></a></li><li><a class="btnToggle" title="Toggle size" href="javascript:;"></a></li><li><a class="btnClose" title="Close" href="javascript:;"></a></li></ul></div>'},list:null,buttons:null,
beforeLoad:function(c,f){c.skipSingle&&2>f.group.length?(f.helpers.buttons=!1,f.closeBtn=!0):f.margin["bottom"===c.position?2:0]+=30},onPlayStart:function(){this.buttons&&this.buttons.play.attr("title","Pause slideshow").addClass("btnPlayOn")},onPlayEnd:function(){this.buttons&&this.buttons.play.attr("title","Start slideshow").removeClass("btnPlayOn")},afterShow:function(c,f){var l=this.buttons;l||(this.list=h(c.tpl).addClass(c.position).appendTo("body"),l={prev:this.list.find(".btnPrev").click(r.prev),
next:this.list.find(".btnNext").click(r.next),play:this.list.find(".btnPlay").click(r.play),toggle:this.list.find(".btnToggle").click(r.toggle),close:this.list.find(".btnClose").click(r.close)});0<f.index||f.loop?l.prev.removeClass("btnDisabled"):l.prev.addClass("btnDisabled");f.loop||f.index<f.group.length-1?(l.next.removeClass("btnDisabled"),l.play.removeClass("btnDisabled")):(l.next.addClass("btnDisabled"),l.play.addClass("btnDisabled"));this.buttons=l;this.onUpdate(c,f)},onUpdate:function(c,f){var h;
this.buttons&&(h=this.buttons.toggle.removeClass("btnDisabled btnToggleOn"),f.canShrink?h.addClass("btnToggleOn"):f.canExpand||h.addClass("btnDisabled"))},beforeClose:function(){this.list&&this.list.remove();this.buttons=this.list=null}};r.helpers.thumbs={defaults:{width:50,height:50,position:"bottom",source:function(c){var f;c.element&&(f=h(c.element).find("img").attr("src"));!f&&"image"===c.type&&c.href&&(f=c.href);return f}},wrap:null,list:null,width:0,init:function(c,f){var l=this,n,k=c.width,
a=c.height,r=c.source;n="";for(var z=0;z<f.group.length;z++)n+='<li><a style="width:'+k+"px;height:"+a+'px;" href="javascript:jQuery.fancybox.jumpto('+z+');"></a></li>';this.wrap=h('<div id="fancybox-thumbs"></div>').addClass(c.position).appendTo("body");this.list=h("<ul>"+n+"</ul>").appendTo(this.wrap);h.each(f.group,function(c){var n=f.group[c],t=r(n);t&&h("<img />").load(function(){var f=this.width,n=this.height,r,b,e;l.list&&f&&n&&(r=f/k,b=n/a,e=l.list.children().eq(c).find("a"),1<=r&&1<=b&&(r>
b?(f=Math.floor(f/b),n=a):(f=k,n=Math.floor(n/r))),h(this).css({width:f,height:n,top:Math.floor(a/2-n/2),left:Math.floor(k/2-f/2)}),e.width(k).height(a),h(this).hide().appendTo(e).fadeIn(300))}).attr("src",t).attr("title",n.title)});this.width=this.list.children().eq(0).outerWidth(!0);this.list.width(this.width*(f.group.length+1)).css("left",Math.floor(.5*h(window).width()-(f.index*this.width+.5*this.width)))},beforeLoad:function(c,f){2>f.group.length?f.helpers.thumbs=!1:f.margin["top"===c.position?
0:2]+=c.height+15},afterShow:function(c,f){if(this.list)this.onUpdate(c,f);else this.init(c,f);this.list.children().removeClass("active").eq(f.index).addClass("active")},onUpdate:function(c,f){this.list&&this.list.stop(!0).animate({left:Math.floor(.5*h(window).width()-(f.index*this.width+.5*this.width))},150)},beforeClose:function(){this.wrap&&this.wrap.remove();this.list=this.wrap=null;this.width=0}}})(jQuery);