!function(d,s,l){var c,g,u,f,p,m,w,v,y,x,b,C,T,E,r,H,a,h,k,S,W,I,M,L,_,F,P,R,K,B,O,G,n,o={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return d(this).attr("href")},title:function(){return this.title},createImg:function(){var i=new Image,t=d(this).data("cbox-img-attrs");return"object"==typeof t&&d.each(t,function(t,e){i[t]=e}),i},createIframe:function(){var i=s.createElement("iframe"),t=d(this).data("cbox-iframe-attrs");return"object"==typeof t&&d.each(t,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},j="colorbox",D="cbox",N=D+"Element",z=D+"_open",A=D+"_load",$=D+"_complete",q=D+"_cleanup",U=D+"_closed",Q=D+"_purge",J=d("<a/>"),V="div",X=0,Y={};function Z(t,e,i){var n=s.createElement(t);return e&&(n.id=D+e),i&&(n.style.cssText=i),d(n)}function tt(){return l.innerHeight?l.innerHeight:d(l).height()}function et(t,i){i!==Object(i)&&(i={}),this.cache={},this.el=t,this.value=function(t){var e;return void 0===this.cache[t]&&(void 0!==(e=d(this.el).attr("data-cbox-"+t))?this.cache[t]=e:void 0!==i[t]?this.cache[t]=i[t]:void 0!==o[t]&&(this.cache[t]=o[t])),this.cache[t]},this.get=function(t){var e=this.value(t);return d.isFunction(e)?e.call(this.el,this):e}}function it(t){var e=y.length,i=(F+t)%e;return i<0?e+i:i}function nt(t,e){return Math.round((/%/.test(t)?("x"===e?x.width():tt())/100:1)*parseInt(t,10))}function ot(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function rt(t,e){return t.get("retinaUrl")&&1<l.devicePixelRatio?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function at(t){"contains"in g[0]&&!g[0].contains(t.target)&&t.target!==c[0]&&(t.stopPropagation(),g.focus())}function ht(t){ht.str!==t&&(g.add(c).removeClass(ht.str).addClass(t),ht.str=t)}function st(t){d(s).trigger(t),J.triggerHandler(t)}var lt=function(){var t,e,i=D+"Slideshow_",n="click."+D;function o(){clearTimeout(e)}function r(){(W.get("loop")||y[F+1])&&(o(),e=setTimeout(G.next,W.get("slideshowSpeed")))}function a(){H.html(W.get("slideshowStop")).unbind(n).one(n,h),J.bind($,r).bind(A,o),g.removeClass(i+"off").addClass(i+"on")}function h(){o(),J.unbind($,r).unbind(A,o),H.html(W.get("slideshowStart")).unbind(n).one(n,function(){G.next(),a()}),g.removeClass(i+"on").addClass(i+"off")}function s(){t=!1,H.hide(),o(),J.unbind($,r).unbind(A,o),g.removeClass(i+"off "+i+"on")}return function(){t?W.get("slideshow")||(J.unbind(q,s),s()):W.get("slideshow")&&y[1]&&(t=!0,J.one(q,s),W.get("slideshowAuto")?a():h(),H.show())}}();function dt(t){var e,i;if(!B){if(e=d(t).data(j),W=new et(t,e),i=W.get("rel"),F=0,i&&!1!==i&&"nofollow"!==i?(y=d("."+N).filter(function(){return new et(this,d.data(this,j)).get("rel")===i}),-1===(F=y.index(W.el))&&(y=y.add(W.el),F=y.length-1)):y=d(W.el),!R){R=K=!0,ht(W.get("className")),g.css({visibility:"hidden",display:"block",opacity:""}),b=Z(V,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),f.css({width:"",height:""}).append(b),I=p.height()+v.height()+f.outerHeight(!0)-f.height(),M=m.width()+w.width()+f.outerWidth(!0)-f.width(),L=b.outerHeight(!0),_=b.outerWidth(!0);var n=nt(W.get("initialWidth"),"x"),o=nt(W.get("initialHeight"),"y"),r=W.get("maxWidth"),a=W.get("maxHeight");W.w=Math.max((!1!==r?Math.min(n,nt(r,"x")):n)-_-M,0),W.h=Math.max((!1!==a?Math.min(o,nt(a,"y")):o)-L-I,0),b.css({width:"",height:W.h}),G.position(),st(z),W.get("onOpen"),S.add(E).hide(),g.focus(),W.get("trapFocus")&&s.addEventListener&&(s.addEventListener("focus",at,!0),J.one(U,function(){s.removeEventListener("focus",at,!0)})),W.get("returnFocus")&&J.one(U,function(){d(W.el).focus()})}var h=parseFloat(W.get("opacity"));c.css({opacity:h==h?h:"",cursor:W.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),W.get("closeButton")?k.html(W.get("close")).appendTo(f):k.appendTo("<div/>"),function(){var t,e,i,n=G.prep,o=++X;P=!(K=!0),st(Q),st(A),W.get("onLoad"),W.h=W.get("height")?nt(W.get("height"),"y")-L-I:W.get("innerHeight")&&nt(W.get("innerHeight"),"y"),W.w=W.get("width")?nt(W.get("width"),"x")-_-M:W.get("innerWidth")&&nt(W.get("innerWidth"),"x"),W.mw=W.w,W.mh=W.h,W.get("maxWidth")&&(W.mw=nt(W.get("maxWidth"),"x")-_-M,W.mw=W.w&&W.w<W.mw?W.w:W.mw);W.get("maxHeight")&&(W.mh=nt(W.get("maxHeight"),"y")-L-I,W.mh=W.h&&W.h<W.mh?W.h:W.mh);if(t=W.get("href"),O=setTimeout(function(){T.show()},100),W.get("inline")){var r=d(t).eq(0);i=d("<div>").hide().insertBefore(r),J.one(Q,function(){i.replaceWith(r)}),n(r)}else W.get("iframe")?n(" "):W.get("html")?n(W.get("html")):ot(W,t)?(t=rt(W,t),P=W.get("createImg"),d(P).addClass(D+"Photo").bind("error."+D,function(){n(Z(V,"Error").html(W.get("imgError")))}).one("load",function(){o===X&&setTimeout(function(){var t;W.get("retinaImage")&&1<l.devicePixelRatio&&(P.height=P.height/l.devicePixelRatio,P.width=P.width/l.devicePixelRatio),W.get("scalePhotos")&&(e=function(){P.height-=P.height*t,P.width-=P.width*t},W.mw&&P.width>W.mw&&(t=(P.width-W.mw)/P.width,e()),W.mh&&P.height>W.mh&&(t=(P.height-W.mh)/P.height,e())),W.h&&(P.style.marginTop=Math.max(W.mh-P.height,0)/2+"px"),y[1]&&(W.get("loop")||y[F+1])&&(P.style.cursor="pointer",d(P).bind("click."+D,function(){G.next()})),P.style.width=P.width+"px",P.style.height=P.height+"px",n(P)},1)}),P.src=t):t&&C.load(t,W.get("data"),function(t,e){o===X&&n("error"===e?Z(V,"Error").html(W.get("xhrError")):d(this).contents())})}()}}function ct(){g||(n=!1,x=d(l),g=Z(V).attr({id:j,class:!1===d.support.opacity?D+"IE":"",role:"dialog",tabindex:"-1"}).hide(),c=Z(V,"Overlay").hide(),T=d([Z(V,"LoadingOverlay")[0],Z(V,"LoadingGraphic")[0]]),u=Z(V,"Wrapper"),f=Z(V,"Content").append(E=Z(V,"Title"),r=Z(V,"Current"),h=d('<button type="button"/>').attr({id:D+"Previous"}),a=d('<button type="button"/>').attr({id:D+"Next"}),H=d('<button type="button"/>').attr({id:D+"Slideshow"}),T),k=d('<button type="button"/>').attr({id:D+"Close"}),u.append(Z(V).append(Z(V,"TopLeft"),p=Z(V,"TopCenter"),Z(V,"TopRight")),Z(V,!1,"clear:left").append(m=Z(V,"MiddleLeft"),f,w=Z(V,"MiddleRight")),Z(V,!1,"clear:left").append(Z(V,"BottomLeft"),v=Z(V,"BottomCenter"),Z(V,"BottomRight"))).find("div div").css({float:"left"}),C=Z(V,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),S=a.add(h).add(r).add(H)),s.body&&!g.parent().length&&d(s.body).append(c,g.append(u,C))}d[j]||(d(ct),(G=d.fn[j]=d[j]=function(e,t){var i=this;return e=e||{},d.isFunction(i)&&(i=d("<a/>"),e.open=!0),i[0]&&(ct(),function(){function t(t){1<t.which||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),dt(this))}return!!g&&(n||(n=!0,a.click(function(){G.next()}),h.click(function(){G.prev()}),k.click(function(){G.close()}),c.click(function(){W.get("overlayClose")&&G.close()}),d(s).bind("keydown."+D,function(t){var e=t.keyCode;R&&W.get("escKey")&&27===e&&(t.preventDefault(),G.close()),R&&W.get("arrowKey")&&y[1]&&!t.altKey&&(37===e?(t.preventDefault(),h.click()):39===e&&(t.preventDefault(),a.click()))}),d.isFunction(d.fn.on)?d(s).on("click."+D,"."+N,t):d("."+N).live("click."+D,t)),!0)}()&&(t&&(e.onComplete=t),i.each(function(){var t=d.data(this,j)||{};d.data(this,j,d.extend(t,e))}).addClass(N),new et(i[0],e).get("open")&&dt(i[0]))),i}).position=function(e,t){var i,n,o,r=0,a=0,h=g.offset();function s(){p[0].style.width=v[0].style.width=f[0].style.width=parseInt(g[0].style.width,10)-M+"px",f[0].style.height=m[0].style.height=w[0].style.height=parseInt(g[0].style.height,10)-I+"px"}if(x.unbind("resize."+D),g.css({top:-9e4,left:-9e4}),n=x.scrollTop(),o=x.scrollLeft(),W.get("fixed")?(h.top-=n,h.left-=o,g.css({position:"fixed"})):(r=n,a=o,g.css({position:"absolute"})),!1!==W.get("right")?a+=Math.max(x.width()-W.w-_-M-nt(W.get("right"),"x"),0):!1!==W.get("left")?a+=nt(W.get("left"),"x"):a+=Math.round(Math.max(x.width()-W.w-_-M,0)/2),!1!==W.get("bottom")?r+=Math.max(tt()-W.h-L-I-nt(W.get("bottom"),"y"),0):!1!==W.get("top")?r+=nt(W.get("top"),"y"):r+=Math.round(Math.max(tt()-W.h-L-I,0)/2),g.css({top:h.top,left:h.left,visibility:"visible"}),u[0].style.width=u[0].style.height="9999px",i={width:W.w+_+M,height:W.h+L+I,top:r,left:a},e){var l=0;d.each(i,function(t){i[t]===Y[t]||(l=e)}),e=l}Y=i,e||g.css(i),g.dequeue().animate(i,{duration:e||0,complete:function(){s(),K=!1,u[0].style.width=W.w+_+M+"px",u[0].style.height=W.h+L+I+"px",W.get("reposition")&&setTimeout(function(){x.bind("resize."+D,G.position)},1),d.isFunction(t)&&t()},step:s})},G.resize=function(t){var e;R&&((t=t||{}).width&&(W.w=nt(t.width,"x")-_-M),t.innerWidth&&(W.w=nt(t.innerWidth,"x")),b.css({width:W.w}),t.height&&(W.h=nt(t.height,"y")-L-I),t.innerHeight&&(W.h=nt(t.innerHeight,"y")),t.innerHeight||t.height||(e=b.scrollTop(),b.css({height:"auto"}),W.h=b.height()),b.css({height:W.h}),e&&b.scrollTop(e),G.position("none"===W.get("transition")?0:W.get("speed")))},G.prep=function(t){if(R){var e,o="none"===W.get("transition")?0:W.get("speed");b.remove(),(b=Z(V,"LoadedContent").append(t)).hide().appendTo(C.show()).css({width:(W.w=W.w||b.width(),W.w=W.mw&&W.mw<W.w?W.mw:W.w,W.w),overflow:W.get("scrolling")?"auto":"hidden"}).css({height:(W.h=W.h||b.height(),W.h=W.mh&&W.mh<W.h?W.mh:W.h,W.h)}).prependTo(f),C.hide(),d(P).css({float:"none"}),ht(W.get("className")),e=function(){var t,e,i=y.length;function n(){!1===d.support.opacity&&g[0].style.removeAttribute("filter")}R&&(e=function(){clearTimeout(O),T.hide(),st($),W.get("onComplete")},E.html(W.get("title")).show(),b.show(),1<i?("string"==typeof W.get("current")&&r.html(W.get("current").replace("{current}",F+1).replace("{total}",i)).show(),a[W.get("loop")||F<i-1?"show":"hide"]().html(W.get("next")),h[W.get("loop")||F?"show":"hide"]().html(W.get("previous")),lt(),W.get("preloading")&&d.each([it(-1),it(1)],function(){var t=y[this],e=new et(t,d.data(t,j)),i=e.get("href");i&&ot(e,i)&&(i=rt(e,i),s.createElement("img").src=i)})):S.hide(),W.get("iframe")?(t=W.get("createIframe"),W.get("scrolling")||(t.scrolling="no"),d(t).attr({src:W.get("href"),class:D+"Iframe"}).one("load",e).appendTo(b),J.one(Q,function(){t.src="//about:blank"}),W.get("fastIframe")&&d(t).trigger("load")):e(),"fade"===W.get("transition")?g.fadeTo(o,1,n):n())},"fade"===W.get("transition")?g.fadeTo(o,0,function(){G.position(0,e)}):G.position(o,e)}},G.next=function(){!K&&y[1]&&(W.get("loop")||y[F+1])&&(F=it(1),dt(y[F]))},G.prev=function(){!K&&y[1]&&(W.get("loop")||F)&&(F=it(-1),dt(y[F]))},G.close=function(){R&&!B&&(R=!(B=!0),st(q),W.get("onCleanup"),x.unbind("."+D),c.fadeTo(W.get("fadeOut")||0,0),g.stop().fadeTo(W.get("fadeOut")||0,0,function(){g.hide(),c.hide(),st(Q),b.remove(),setTimeout(function(){B=!1,st(U),W.get("onClosed")},1)}))},G.remove=function(){g&&(g.stop(),d[j].close(),g.stop(!1,!0).remove(),c.remove(),B=!1,g=null,d("."+N).removeData(j).removeClass(N),d(s).unbind("click."+D).unbind("keydown."+D))},G.element=function(){return d(W.el)},G.settings=o)}(jQuery,document,window),$("a.gallery-img").colorbox({rel:"gallery",maxWidth:"85%",maxHeight:"85%",current:Strings.Gallery_Current,previous:Strings.Gallery_Previous,next:Strings.Gallery_Next,close:Strings.Gallery_Close,xhrError:Strings.Gallery_xhrError,imgError:Strings.Gallery_imgError});