/* ColorBox v1.5.8, (c) 2011 Jack Moore - jacklmoore.com, MIT license */
(function(e,t,n){function Q(n,r,i){var o=t.createElement(n);return r&&(o.id=s+r),i&&(o.style.cssText=i),e(o)}function G(){return n.innerHeight?n.innerHeight:e(n).height()}function Y(t,n){n!==Object(n)&&(n={}),this.cache={},this.el=t,this.value=function(t){var i;return this.cache[t]===undefined&&(i=e(this.el).attr("data-cbox-"+t),i!==undefined?this.cache[t]=i:n[t]!==undefined?this.cache[t]=n[t]:r[t]!==undefined&&(this.cache[t]=r[t])),this.cache[t]},this.get=function(t){var n=this.value(t);return e.isFunction(n)?n.call(this.el,this):n}}function Z(e){var t=E.length,n=(I+e)%t;return n<0?t+n:n}function et(e,t){return Math.round((/%/.test(e)?(t==="x"?S.width():G())/100:1)*parseInt(e,10))}function tt(e,t){return e.get("photo")||e.get("photoRegex").test(t)}function nt(e,t){return e.get("retinaUrl")&&n.devicePixelRatio>1?t.replace(e.get("photoRegex"),e.get("retinaSuffix")):t}function rt(e){"contains"in d[0]&&!d[0].contains(e.target)&&e.target!==p[0]&&(e.stopPropagation(),d.focus())}function it(e){it.str!==e&&(d.add(p).removeClass(it.str).addClass(e),it.str=e)}function st(t){I=0,t&&t!==!1?(E=e("."+o).filter(function(){var n=e.data(this,i),r=new Y(this,n);return r.get("rel")===t}),I=E.index(P.el),I===-1&&(E=E.add(P.el),I=E.length-1)):E=e(P.el)}function ot(n){e(t).trigger(n),D.triggerHandler(n)}function at(n){var r;if(!z){r=e(n).data("colorbox"),P=new Y(n,r),st(P.get("rel"));if(!R){R=U=!0,it(P.get("className")),d.css({visibility:"hidden",display:"block",opacity:""}),x=Q(V,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),m.css({width:"",height:""}).append(x),H=g.height()+w.height()+m.outerHeight(!0)-m.height(),B=y.width()+b.width()+m.outerWidth(!0)-m.width(),j=x.outerHeight(!0),F=x.outerWidth(!0);var i=et(P.get("initialWidth"),"x"),s=et(P.get("initialHeight"),"y"),o=P.get("maxWidth"),a=P.get("maxHeight");P.w=(o!==!1?Math.min(i,et(o,"x")):i)-F-B,P.h=(a!==!1?Math.min(s,et(a,"y")):s)-j-H,x.css({width:"",height:P.h}),X.position(),ot(u),P.get("onOpen"),_.add(C).hide(),d.focus(),P.get("trapFocus")&&t.addEventListener&&(t.addEventListener("focus",rt,!0),D.one(c,function(){t.removeEventListener("focus",rt,!0)})),P.get("returnFocus")&&D.one(c,function(){e(P.el).focus()})}p.css({opacity:parseFloat(P.get("opacity"))||"",cursor:P.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),P.get("closeButton")?M.html(P.get("close")).appendTo(m):M.appendTo("
"),ct()}}function ft(){!d&&t.body&&(K=!1,S=e(n),d=Q(V).attr({id:i,"class":e.support.opacity===!1?s+"IE":"",role:"dialog",tabindex:"-1"}).hide(),p=Q(V,"Overlay").hide(),N=e([Q(V,"LoadingOverlay")[0],Q(V,"LoadingGraphic")[0]]),v=Q(V,"Wrapper"),m=Q(V,"Content").append(C=Q(V,"Title"),k=Q(V,"Current"),O=e('').attr({id:s+"Previous"}),A=e('').attr({id:s+"Next"}),L=Q("button","Slideshow"),N),M=e('').attr({id:s+"Close"}),v.append(Q(V).append(Q(V,"TopLeft"),g=Q(V,"TopCenter"),Q(V,"TopRight")),Q(V,!1,"clear:left").append(y=Q(V,"MiddleLeft"),m,b=Q(V,"MiddleRight")),Q(V,!1,"clear:left").append(Q(V,"BottomLeft"),w=Q(V,"BottomCenter"),Q(V,"BottomRight"))).find("div div").css({"float":"left"}),T=Q(V,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),_=A.add(O).add(k).add(L),e(t.body).append(p,d.append(v,T)))}function lt(){function n(e){e.which>1||e.shiftKey||e.altKey||e.metaKey||e.ctrlKey||(e.preventDefault(),at(this))}return d?(K||(K=!0,A.click(function(){X.next()}),O.click(function(){X.prev()}),M.click(function(){X.close()}),p.click(function(){P.get("overlayClose")&&X.close()}),e(t).bind("keydown."+s,function(e){var t=e.keyCode;R&&P.get("escKey")&&t===27&&(e.preventDefault(),X.close()),R&&P.get("arrowKey")&&E[1]&&!e.altKey&&(t===37?(e.preventDefault(),O.click()):t===39&&(e.preventDefault(),A.click()))}),e.isFunction(e.fn.on)?e(t).on("click."+s,"."+o,n):e("."+o).live("click."+s,n)),!0):!1}function ct(){var t,r,i=X.prep,o,u=++$;U=!0,q=!1,ot(h),ot(a),P.get("onLoad"),P.h=P.get("height")?et(P.get("height"),"y")-j-H:P.get("innerHeight")&&et(P.get("innerHeight"),"y"),P.w=P.get("width")?et(P.get("width"),"x")-F-B:P.get("innerWidth")&&et(P.get("innerWidth"),"x"),P.mw=P.w,P.mh=P.h,P.get("maxWidth")&&(P.mw=et(P.get("maxWidth"),"x")-F-B,P.mw=P.w&&P.w1&&(q.height=q.height/n.devicePixelRatio,q.width=q.width/n.devicePixelRatio),P.get("scalePhotos")&&(r=function(){q.height-=q.height*t,q.width-=q.width*t},P.mw&&q.width>P.mw&&(t=(q.width-P.mw)/q.width,r()),P.mh&&q.height>P.mh&&(t=(q.height-P.mh)/q.height,r())),P.h&&(q.style.marginTop=Math.max(P.mh-q.height,0)/2+"px"),E[1]&&(P.get("loop")||E[I+1])&&(q.style.cursor="pointer",q.onclick=function(){X.next()}),q.style.width=q.width+"px",q.style.height=q.height+"px",i(q)},1)}),q.src=t):t&&T.load(t,P.get("data"),function(t,n){u===$&&i(n==="error"?Q(V,"Error").html(P.get("xhrError")):e(this).contents())})}var r={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:undefined,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 e(this).attr("href")},title:function(){return this.title}},i="colorbox",s="cbox",o=s+"Element",u=s+"_open",a=s+"_load",f=s+"_complete",l=s+"_cleanup",c=s+"_closed",h=s+"_purge",p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D=e(""),P,H,B,j,F,I,q,R,U,z,W,X,V="div",$=0,J={},K,ut=function(){function i(){clearTimeout(r)}function o(){if(P.get("loop")||E[I+1])i(),r=setTimeout(X.next,P.get("slideshowSpeed"))}function u(){L.html(P.get("slideshowStop")).unbind(n).one(n,c),D.bind(f,o).bind(a,i),d.removeClass(t+"off").addClass(t+"on")}function c(){i(),D.unbind(f,o).unbind(a,i),L.html(P.get("slideshowStart")).unbind(n).one(n,function(){X.next(),u()}),d.removeClass(t+"on").addClass(t+"off")}function h(){e=!1,L.hide(),i(),D.unbind(f,o).unbind(a,i),d.removeClass(t+"off "+t+"on")}var e,t=s+"Slideshow_",n="click."+s,r;return function(){e?P.get("slideshow")||(D.unbind(l,h),h()):P.get("slideshow")&&E[1]&&(e=!0,D.one(l,h),P.get("slideshowAuto")?u():c(),L.show())}}();if(e.colorbox)return;e(ft),X=e.fn[i]=e[i]=function(t,n){var r,s=this;t=t||{};if(e.isFunction(s))s=e(""),t.open=!0;else if(!s[0])return s;return s[0]?(ft(),lt()&&(n&&(t.onComplete=n),s.each(function(){var n=e.data(this,i)||{};e.data(this,i,e.extend(n,t))}).addClass(o),r=new Y(s[0],t),r.get("open")&&at(s[0])),s):s},X.position=function(t,n){function l(){g[0].style.width=w[0].style.width=m[0].style.width=parseInt(d[0].style.width,10)-B+"px",m[0].style.height=y[0].style.height=b[0].style.height=parseInt(d[0].style.height,10)-H+"px"}var r,i=0,o=0,u=d.offset(),a,f;S.unbind("resize."+s),d.css({top:-9e4,left:-9e4}),a=S.scrollTop(),f=S.scrollLeft(),P.get("fixed")?(u.top-=a,u.left-=f,d.css({position:"fixed"})):(i=a,o=f,d.css({position:"absolute"})),P.get("right")!==!1?o+=Math.max(S.width()-P.w-F-B-et(P.get("right"),"x"),0):P.get("left")!==!1?o+=et(P.get("left"),"x"):o+=Math.round(Math.max(S.width()-P.w-F-B,0)/2),P.get("bottom")!==!1?i+=Math.max(G()-P.h-j-H-et(P.get("bottom"),"y"),0):P.get("top")!==!1?i+=et(P.get("top"),"y"):i+=Math.round(Math.max(G()-P.h-j-H,0)/2),d.css({top:u.top,left:u.left,visibility:"visible"}),v[0].style.width=v[0].style.height="9999px",r={width:P.w+F+B,height:P.h+j+H,top:i,left:o};if(t){var c=0;e.each(r,function(e){if(r[e]!==J[e]){c=t;return}}),t=c}J=r,t||d.css(r),d.dequeue().animate(r,{duration:t||0,complete:function(){l(),U=!1,v[0].style.width=P.w+F+B+"px",v[0].style.height=P.h+j+H+"px",P.get("reposition")&&setTimeout(function(){S.bind("resize."+s,X.position)},1),n&&n()},step:l})},X.resize=function(e){var t;R&&(e=e||{},e.width&&(P.w=et(e.width,"x")-F-B),e.innerWidth&&(P.w=et(e.innerWidth,"x")),x.css({width:P.w}),e.height&&(P.h=et(e.height,"y")-j-H),e.innerHeight&&(P.h=et(e.innerHeight,"y")),!e.innerHeight&&!e.height&&(t=x.scrollTop(),x.css({height:"auto"}),P.h=x.height()),x.css({height:P.h}),t&&x.scrollTop(t),X.position(P.get("transition")==="none"?0:P.get("speed")))},X.prep=function(n){function u(){return P.w=P.w||x.width(),P.w=P.mw&&P.mw1?(typeof P.get("current")=="string"&&k.html(P.get("current").replace("{current}",I+1).replace("{total}",n)).show(),A[P.get("loop")||I