",z+='
'+J.labels.close+"",z+='
",J.$body.append(z),J.$overlay=a("#boxer-overlay"),J.$boxer=a("#boxer"),J.$container=J.$boxer.find(".boxer-container"),J.$content=J.$boxer.find(".boxer-content"),J.$meta=J.$boxer.find(".boxer-meta"),J.$position=J.$boxer.find(".boxer-position"),J.$caption=J.$boxer.find(".boxer-caption"),J.$controls=J.$boxer.find(".boxer-control"),J.paddingVertical=parseInt(J.$boxer.css("paddingTop"),10)+parseInt(J.$boxer.css("paddingBottom"),10),J.paddingHorizontal=parseInt(J.$boxer.css("paddingLeft"),10)+parseInt(J.$boxer.css("paddingRight"),10),h(),J.gallery.active&&r(),J.$window.on("resize.boxer",M.resize).on("keydown.boxer",s),J.$body.on("touchstart.boxer click.boxer","#boxer-overlay, #boxer .boxer-close",e).on("touchmove.boxer",C),J.gallery.active&&J.$boxer.on("touchstart.boxer click.boxer",".boxer-control",q),J.$boxer.on(G,function(b){C(b),a(b.target).is(J.$boxer)&&(J.$boxer.off(G),m?k(g):o?n(g):p?u(g):w?t(g):x?v(J.$object):a.error("BOXER: '"+g+"' is not valid."))}),I.addClass("boxer-open"),H||J.$boxer.trigger(G),x?J.$boxer:void 0}}function e(b){C(b),"undefined"!=typeof J.$boxer&&(J.$boxer.on(G,function(b){C(b),a(b.target).is(J.$boxer)&&(J.$boxer.off(G),J.$overlay.remove(),J.$boxer.remove(),J={})}).addClass("animating"),I.removeClass("boxer-open"),H||J.$boxer.trigger(G),E(J.resizeTimer),J.$window.off("resize.boxer").off("keydown.boxer"),J.$body.off(".boxer").removeClass("boxer-open"),J.gallery.active&&J.$boxer.off(".boxer"),J.isMobile&&"image"===J.type&&J.gallery.active&&J.$container.off(".boxer"),J.$window.trigger("close.boxer"))}function f(){{var b=i(),c=0;J.isMobile?0:J.duration}J.isMobile||(c=J.$controls.outerHeight(),J.$controls.css({marginTop:(J.contentHeight-c)/2})),!J.visible&&J.isMobile&&J.gallery.active&&J.$content.on("touchstart.boxer",".boxer-image",y),(J.isMobile||J.fixed)&&J.$body.addClass("boxer-open"),J.$boxer.css({left:b.left,top:b.top}),J.$container.on(G,function(b){C(b),a(b.target).is(J.$container)&&(J.$container.off(G),J.$content.on(G,function(b){C(b),a(b.target).is(J.$content)&&(J.$content.off(G),J.$boxer.removeClass("animating"),J.isAnimating=!1)}),J.$boxer.removeClass("loading"),H||J.$content.trigger(G),J.visible=!0,J.callback.apply(J.$boxer),J.$window.trigger("open.boxer"),J.gallery.active&&p())}).css({height:J.containerHeight,width:J.containerWidth});var d=J.oldContentHeight!==J.contentHeight||J.oldContentWidth!==J.contentWidth;!J.isMobile&&H&&d||J.$container.trigger(G),J.oldContentHeight=J.contentHeight,J.oldContentWidth=J.contentWidth}function g(a){if(a=a||!1,J.visible){var b=i(),c=0;J.isMobile||(c=J.$controls.outerHeight(),J.$controls.css({marginTop:(J.contentHeight-c)/2})),J.$boxer.css({left:b.left,top:b.top}),J.$container.css({height:J.containerHeight,width:J.containerWidth})}}function h(){var a=i();J.$boxer.css({left:a.left,top:a.top})}function i(){if(J.isMobile)return{left:0,top:0};var a={left:(J.$window.width()-J.containerWidth-J.paddingHorizontal)/2,top:J.top<=0?(J.$window.height()-J.containerHeight-J.paddingVertical)/2:J.top};return J.fixed!==!0&&(a.top+=J.$window.scrollTop()),a}function j(a){var b=a.attr("title");return""!==b&&void 0!==b?'
'+b+"
":""}function k(b){J.$image=a("
"),J.$image.one("load.boxer",function(){var a=B(J.$image);J.naturalHeight=a.naturalHeight,J.naturalWidth=a.naturalWidth,J.retina&&(J.naturalHeight/=2,J.naturalWidth/=2),J.$content.prepend(J.$image),""===J.$caption.html()?J.$caption.hide():J.$caption.show(),l(),f()}).attr("src",b).addClass("boxer-image"),(J.$image[0].complete||4===J.$image[0].readyState)&&J.$image.trigger("load")}function l(){var a=0;for(J.windowHeight=J.viewportHeight=J.$window.height(),J.windowWidth=J.viewportWidth=J.$window.width(),J.containerHeight=1/0,J.contentHeight=0,J.containerWidth=1/0,J.contentWidth=0,J.imageMarginTop=0,J.imageMarginLeft=0;J.containerHeight>J.viewportHeight&&2>a;)J.imageHeight=0===a?J.naturalHeight:J.$image.outerHeight(),J.imageWidth=0===a?J.naturalWidth:J.$image.outerWidth(),J.metaHeight=0===a?0:J.metaHeight,0===a&&(J.ratioHorizontal=J.imageHeight/J.imageWidth,J.ratioVertical=J.imageWidth/J.imageHeight,J.isWide=J.imageWidth>J.imageHeight),J.imageHeight
a&&(J.targetImageHeight=a,J.targetImageWidth=J.targetImageHeight*J.ratioVertical)):(J.targetImageHeight=a,J.targetImageWidth=J.targetImageHeight*J.ratioVertical,J.targetImageWidth>b&&(J.targetImageWidth=b,J.targetImageHeight=J.targetImageWidth*J.ratioHorizontal)),(J.targetImageWidth>J.imageWidth||J.targetImageHeight>J.imageHeight)&&(J.targetImageHeight=J.imageHeight,J.targetImageWidth=J.imageWidth),(J.targetImageWidth'),J.$video=a(''),J.$video.attr("src",b).addClass("boxer-video").prependTo(J.$videoWrapper),J.$content.prepend(J.$videoWrapper),o(),f()}function o(){J.windowHeight=J.viewportHeight=J.contentHeight=J.$window.height()-J.paddingVertical,J.windowWidth=J.viewportWidth=J.contentWidth=J.$window.width()-J.paddingHorizontal,J.videoMarginTop=0,J.videoMarginLeft=0,J.isMobile?(J.$meta.css({width:J.windowWidth}),J.metaHeight=J.$meta.outerHeight(!0),J.viewportHeight-=J.metaHeight,J.targetVideoWidth=J.viewportWidth,J.targetVideoHeight=J.targetVideoWidth*J.videoRatio,J.targetVideoHeight>J.viewportHeight&&(J.targetVideoHeight=J.viewportHeight,J.targetVideoWidth=J.targetVideoHeight/J.videoRatio),J.videoMarginTop=(J.viewportHeight-J.targetVideoHeight)/2,J.videoMarginLeft=(J.viewportWidth-J.targetVideoWidth)/2):(J.viewportHeight=J.windowHeight-J.margin,J.viewportWidth=J.windowWidth-J.margin,J.targetVideoWidth=J.videoWidth>J.viewportWidth?J.viewportWidth:J.videoWidth,J.targetVideoWidth0&&(b=J.gallery.$items.eq(J.gallery.index-1).attr("href"),b.indexOf("youtube.com/embed")<0&&b.indexOf("player.vimeo.com/video")<0&&a('')),J.gallery.index'))}function q(b){C(b);var c=a(this);J.isAnimating||c.hasClass("disabled")||(J.isAnimating=!0,J.gallery.index+=c.hasClass("next")?1:-1,J.gallery.index>J.gallery.total&&(J.gallery.index=J.gallery.total),J.gallery.index<0&&(J.gallery.index=0),J.$content.on(G,function(b){if(C(b),a(b.target).is(J.$content)){J.$content.off(G),"undefined"!=typeof J.$image&&J.$image.remove(),"undefined"!=typeof J.$videoWrapper&&J.$videoWrapper.remove(),J.$target=J.gallery.$items.eq(J.gallery.index),J.$caption.html(J.formatter.apply(J.$body,[J.$target])),J.$position.find(".current").html(J.gallery.index+1);var c=J.$target.attr("href"),d=c.indexOf("youtube.com/embed")>-1||c.indexOf("player.vimeo.com/video")>-1;d?n(c):k(c),r()}}),J.$boxer.addClass("loading animating"),H||J.$content.trigger(G))}function r(){J.$controls.removeClass("disabled"),0===J.gallery.index&&J.$controls.filter(".previous").addClass("disabled"),J.gallery.index===J.gallery.total&&J.$controls.filter(".next").addClass("disabled")}function s(a){!J.gallery.active||37!==a.keyCode&&39!==a.keyCode?27===a.keyCode&&J.$boxer.find(".boxer-close").trigger("click"):(C(a),J.$controls.filter(37===a.keyCode?".previous":".next").trigger("click"))}function t(b){var c=a(b).find(">:first-child").clone();v(c)}function u(b){b+=b.indexOf("?")>-1?"&"+L.requestKey+"=true":"?"+L.requestKey+"=true";var c=a('');v(c)}function v(a){J.$content.append(a),w(a),f()}function w(a){J.windowHeight=J.$window.height()-J.paddingVertical,J.windowWidth=J.$window.width()-J.paddingHorizontal,J.objectHeight=a.outerHeight(!0),J.objectWidth=a.outerWidth(!0),J.targetHeight=J.targetHeight||J.$target.data("boxer-height"),J.targetWidth=J.targetWidth||J.$target.data("boxer-width"),J.maxHeight=J.windowHeight<0?L.minHeight:J.windowHeight,J.isIframe=a.is("iframe"),J.objectMarginTop=0,J.objectMarginLeft=0,J.isMobile||(J.windowHeight-=J.margin,J.windowWidth-=J.margin),J.contentHeight=void 0!==J.targetHeight?J.targetHeight:J.isIframe||J.isMobile?J.windowHeight:J.objectHeight,J.contentWidth=void 0!==J.targetWidth?J.targetWidth:J.isIframe||J.isMobile?J.windowWidth:J.objectWidth,J.isIframe&&J.isMobile&&(J.contentHeight=J.windowHeight,J.contentWidth=J.windowWidth),x(J)}function x(a){a.containerHeight=a.contentHeight,a.containerWidth=a.contentWidth,a.$content.css({height:a.contentHeight,width:a.contentWidth})}function y(a){if(C(a),E(J.touchTimer),!J.isAnimating){var b="undefined"!=typeof a.originalEvent.targetTouches?a.originalEvent.targetTouches[0]:null;J.xStart=b?b.pageX:a.clientX,J.leftPosition=0,J.touchMax=1/0,J.touchMin=-1/0,J.edge=.25*J.contentWidth,0===J.gallery.index&&(J.touchMax=0),J.gallery.index===J.gallery.total&&(J.touchMin=0),J.$boxer.on("touchmove.boxer",z).one("touchend.boxer",A)}}function z(a){var b="undefined"!=typeof a.originalEvent.targetTouches?a.originalEvent.targetTouches[0]:null;J.delta=J.xStart-(b?b.pageX:a.clientX),J.delta>20&&C(a),J.canSwipe=!0;var c=-J.delta;cJ.touchMax&&(c=J.touchMax,J.canSwipe=!1),J.$image.css({transform:"translate3D("+c+"px,0,0)"}),J.touchTimer=D(J.touchTimer,300,function(){A(a)})}function A(a){C(a),E(J.touchTimer),J.$boxer.off("touchmove.boxer touchend.boxer"),J.delta&&(J.$boxer.addClass("animated"),J.swipe=!1,J.canSwipe&&(J.delta>J.edge||J.delta<-J.edge)?(J.swipe=!0,J.delta<=J.leftPosition?J.$image.css({transform:"translate3D("+J.contentWidth+"px,0,0)"}):J.$image.css({transform:"translate3D("+-J.contentWidth+"px,0,0)"})):J.$image.css({transform:"translate3D(0,0,0)"}),J.swipe&&J.$controls.filter(J.delta<=J.leftPosition?".previous":".next").trigger("click"),D(J.resetTimer,J.duration,function(){J.$boxer.removeClass("animated")}))}function B(a){var b=a[0],c=new Image;return"undefined"!=typeof b.naturalHeight?{naturalHeight:b.naturalHeight,naturalWidth:b.naturalWidth}:"img"===b.tagName.toLowerCase()?(c.src=b.src,{naturalHeight:c.height,naturalWidth:c.width}):!1}function C(a){a.preventDefault&&(a.stopPropagation(),a.preventDefault())}function D(a,b,c){return E(a),setTimeout(c,b)}function E(a){a&&(clearTimeout(a),a=null)}function F(){var a={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},b=document.createElement("div");for(var c in a)if(a.hasOwnProperty(c)&&c in b.style)return a[c];return!1}var G,H,I=null,J={},K=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(b.navigator.userAgent||b.navigator.vendor||b.opera),L={callback:a.noop,customClass:"",extensions:["jpg","sjpg","jpeg","png","gif"],fixed:!1,formatter:a.noop,height:100,labels:{close:"Close",count:"of",next:"Next",previous:"Previous"},margin:50,minHeight:100,minWidth:100,mobile:!1,opacity:.75,retina:!1,requestKey:"boxer",top:0,videoRatio:.5625,videoWidth:600,width:100},M={close:function(){"undefined"!=typeof J.$boxer&&(J.$boxer.off(".boxer"),J.$overlay.trigger("click"))},defaults:function(b){return L=a.extend(L,b||{}),a(this)},destroy:function(){return a(this).off(".boxer")},resize:function(b){return"undefined"!=typeof J.$boxer&&("object"!=typeof b&&(J.targetHeight=arguments[0],J.targetWidth=arguments[1]),"element"===J.type?w(J.$content.find(">:first-child")):"image"===J.type?l():"video"===J.type&&o(),g()),a(this)}};a.fn.boxer=function(a){return M[a]?M[a].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof a&&a?this:c.apply(this,arguments)},a.boxer=function(c,e){return M[c]?M[c].apply(b,Array.prototype.slice.call(arguments,1)):c instanceof a?d.apply(b,[{data:a.extend({$object:c},L,e||{})}]):void 0}}(jQuery,window);
var Formstone=window.Formstone=function(a,b,c,d){"use strict";function e(a){n.Plugins[a].initialized||(n.Plugins[a].methods._setup.call(c),n.Plugins[a].initialized=!0)}function f(a,b,c,d){var e,f={raw:{}};d=d||{};for(e in d)d.hasOwnProperty(e)&&("classes"===a?(f.raw[d[e]]=b+"-"+d[e],f[d[e]]="."+b+"-"+d[e]):(f.raw[e]=d[e],f[e]=d[e]+"."+b));for(e in c)c.hasOwnProperty(e)&&("classes"===a?(f.raw[e]=c[e].replace(/{ns}/g,b),f[e]=c[e].replace(/{ns}/g,"."+b)):(f.raw[e]=c[e].replace(/.{ns}/g,""),f[e]=c[e].replace(/{ns}/g,b)));return f}function g(){var a,b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"},d=["transition","-webkit-transition"],e={transform:"transform",MozTransform:"-moz-transform",OTransform:"-o-transform",msTransform:"-ms-transform",webkitTransform:"-webkit-transform"},f="transitionend",g="",h="",i=c.createElement("div");for(a in b)if(b.hasOwnProperty(a)&&a in i.style){f=b[a],n.support.transition=!0;break}q.transitionEnd=f+".{ns}";for(a in d)if(d.hasOwnProperty(a)&&d[a]in i.style){g=d[a];break}n.transition=g;for(a in e)if(e.hasOwnProperty(a)&&e[a]in i.style){n.support.transform=!0,h=e[a];break}n.transform=h}function h(){n.windowWidth=n.$window.width(),n.windowHeight=n.$window.height(),r=m.startTimer(r,s,i)}function i(){for(var a in n.ResizeHandlers)n.ResizeHandlers.hasOwnProperty(a)&&n.ResizeHandlers[a].callback.call(b,n.windowWidth,n.windowHeight)}function j(){if(n.support.raf){n.window.requestAnimationFrame(j);for(var a in n.RAFHandlers)n.RAFHandlers.hasOwnProperty(a)&&n.RAFHandlers[a].callback.call(b)}}function k(a,b){return parseInt(a.priority)-parseInt(b.priority)}var l=function(){this.Version="0.8.40",this.Plugins={},this.DontConflict=!1,this.Conflicts={fn:{}},this.ResizeHandlers=[],this.RAFHandlers=[],this.window=b,this.$window=a(b),this.document=c,this.$document=a(c),this.$body=null,this.windowWidth=0,this.windowHeight=0,this.fallbackWidth=1024,this.fallbackHeight=768,this.userAgent=b.navigator.userAgent||b.navigator.vendor||b.opera,this.isFirefox=/Firefox/i.test(this.userAgent),this.isChrome=/Chrome/i.test(this.userAgent),this.isSafari=/Safari/i.test(this.userAgent)&&!this.isChrome,this.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(this.userAgent),this.isIEMobile=/IEMobile/i.test(this.userAgent),this.isFirefoxMobile=this.isFirefox&&this.isMobile,this.transform=null,this.transition=null,this.support={file:!!(b.File&&b.FileList&&b.FileReader),history:!!(b.history&&b.history.pushState&&b.history.replaceState),matchMedia:!(!b.matchMedia&&!b.msMatchMedia),pointer:!!b.PointerEvent,raf:!(!b.requestAnimationFrame||!b.cancelAnimationFrame),touch:!!("ontouchstart"in b||b.DocumentTouch&&c instanceof b.DocumentTouch),transition:!1,transform:!1}},m={killEvent:function(a,b){try{a.preventDefault(),a.stopPropagation(),b&&a.stopImmediatePropagation()}catch(c){}},startTimer:function(a,b,c,d){return m.clearTimer(a),d?setInterval(c,b):setTimeout(c,b)},clearTimer:function(a,b){a&&(b?clearInterval(a):clearTimeout(a),a=null)},sortAsc:function(a,b){return parseInt(a,10)-parseInt(b,10)},sortDesc:function(a,b){return parseInt(b,10)-parseInt(a,10)},decodeEntities:function(a){var b=n.document.createElement("textarea");return b.innerHTML=a,b.value},parseQueryString:function(a){for(var b={},c=a.slice(a.indexOf("?")+1).split("&"),d=0;df;f++)if(e=j.eq(f),!h(e)){var l="__"+d.guid++,m=d.classes.raw.base+l,n=e.data(c+"-options"),o=a.extend(!0,{$el:e,guid:l,rawGuid:m,dotGuid:"."+m},b,"object"===a.type(n)?n:{});e.addClass(d.classes.raw.element).data(s,o),d.methods._construct.apply(e,[o].concat(Array.prototype.slice.call(arguments,i?1:0))),k=k.add(e)}for(f=0,g=k.length;g>f;f++)e=k.eq(f),d.methods._postConstruct.apply(e,[h(e)]);return j}function g(a){d.functions.iterate.apply(this,[d.methods._destruct].concat(Array.prototype.slice.call(arguments,1))),this.removeClass(d.classes.raw.element).removeData(s)}function h(a){return a.data(s)}function i(b){if(this instanceof a){var c=d.methods[b];return"object"!==a.type(b)&&b?c&&0!==b.indexOf("_")?d.functions.iterate.apply(this,[c].concat(Array.prototype.slice.call(arguments,1))):this:e.apply(this,arguments)}}function j(c){var e=d.utilities[c]||d.utilities._initialize||!1;return e?e.apply(b,Array.prototype.slice.call(arguments,"object"===a.type(c)?0:1)):void 0}function l(b){d.defaults=a.extend(!0,d.defaults,b||{})}function o(b){for(var c=this,d=0,e=c.length;e>d;d++){var f=c.eq(d),g=h(f)||{};"undefined"!==a.type(g.$el)&&b.apply(f,[g].concat(Array.prototype.slice.call(arguments,1)))}return c}var r="fs-"+c,s="fs"+c.replace(/(^|\s)([a-z])/g,function(a,b,c){return b+c.toUpperCase()});return d.initialized=!1,d.priority=d.priority||10,d.classes=f("classes",r,p,d.classes),d.events=f("events",c,q,d.events),d.functions=a.extend({getData:h,iterate:o},m,d.functions),d.methods=a.extend(!0,{_setup:a.noop,_construct:a.noop,_postConstruct:a.noop,_destruct:a.noop,_resize:!1,destroy:g},d.methods),d.utilities=a.extend(!0,{_initialize:!1,_delegate:!1,defaults:l},d.utilities),d.widget&&(n.Conflicts.fn[c]=a.fn[c],a.fn[s]=i,n.DontConflict||(a.fn[c]=a.fn[s])),n.Conflicts[c]=a[c],a[s]=d.utilities._delegate||j,n.DontConflict||(a[c]=a[s]),d.namespace=c,d.namespaceClean=s,d.guid=0,d.methods._resize&&(n.ResizeHandlers.push({namespace:c,priority:d.priority,callback:d.methods._resize}),n.ResizeHandlers.sort(k)),d.methods._raf&&(n.RAFHandlers.push({namespace:c,priority:d.priority,callback:d.methods._raf}),n.RAFHandlers.sort(k)),d}(c,d),o.then(function(){e(c)}),n.Plugins[c]};var r=null,s=20;return n.$window.on("resize.fs",h),h(),j(),a(function(){n.$body=a("body"),o.resolve(),n.support.nativeMatchMedia=n.support.matchMedia&&!a("html").hasClass("no-matchmedia")}),q.clickTouchStart=q.click+" "+q.touchStart,g(),n}(jQuery,window,document);
!function(a,b,c){"use strict";function d(a){a.touches=[],a.touching=!1,this.on(r.dragStart,s.killEvent),a.swipe&&(a.pan=!0),a.scale&&(a.axis=!1),a.axisX="x"===a.axis,a.axisY="y"===a.axis,b.support.pointer?(o(this,"none"),this.on(r.pointerDown,a,f)):this.on(r.touchStart,a,f).on(r.mouseDown,a,g)}function e(a){this.off(r.namespace),o(this,"")}function f(a){a.preventManipulation&&a.preventManipulation();var b=a.data,c=a.originalEvent;if(c.type.match(/(up|end|cancel)$/i))return void k(a);if(c.pointerId){var d=!1;for(var e in b.touches)b.touches[e].id===c.pointerId&&(d=!0,b.touches[e].pageX=c.pageX,b.touches[e].pageY=c.pageY);d||b.touches.push({id:c.pointerId,pageX:c.pageX,pageY:c.pageY})}else b.touches=c.touches;c.type.match(/(down|start)$/i)?g(a):c.type.match(/move$/i)&&h(a)}function g(c){var d=c.data,e="undefined"!==a.type(d.touches)?d.touches[0]:null;d.touching||(d.startE=c.originalEvent,d.startX=e?e.pageX:c.pageX,d.startY=e?e.pageY:c.pageY,d.startT=(new Date).getTime(),d.scaleD=1,d.passed=!1),d.$links&&d.$links.off(r.click);var g=l(d.scale?r.scaleStart:r.panStart,c,d.startX,d.startY,d.scaleD,0,0,"","");if(d.scale&&d.touches&&d.touches.length>=2){var i=d.touches;d.pinch={startX:m(i[0].pageX,i[1].pageX),startY:m(i[0].pageY,i[1].pageY),startD:n(i[1].pageX-i[0].pageX,i[1].pageY-i[0].pageY)},g.pageX=d.startX=d.pinch.startX,g.pageY=d.startY=d.pinch.startY}d.touching||(d.touching=!0,d.pan&&t.on(r.mouseMove,d,h).on(r.mouseUp,d,k),b.support.pointer?t.on([r.pointerMove,r.pointerUp,r.pointerCancel].join(" "),d,f):t.on([r.touchMove,r.touchEnd,r.touchCancel].join(" "),d,f),d.$el.trigger(g))}function h(b){var c=b.data,d="undefined"!==a.type(c.touches)?c.touches[0]:null,e=d?d.pageX:b.pageX,f=d?d.pageY:b.pageY,g=e-c.startX,h=f-c.startY,i=g>0?"right":"left",j=h>0?"down":"up",o=Math.abs(g)>u,p=Math.abs(h)>u;if(!c.passed&&c.axis&&(c.axisX&&p||c.axisY&&o))k(b);else{!c.passed&&(!c.axis||c.axis&&c.axisX&&o||c.axisY&&p)&&(c.passed=!0),c.passed&&(s.killEvent(b),s.killEvent(c.startE));var q=!0,t=l(c.scale?r.scale:r.pan,b,e,f,c.scaleD,g,h,i,j);if(c.scale)if(c.touches&&c.touches.length>=2){var v=c.touches;c.pinch.endX=m(v[0].pageX,v[1].pageX),c.pinch.endY=m(v[0].pageY,v[1].pageY),c.pinch.endD=n(v[1].pageX-v[0].pageX,v[1].pageY-v[0].pageY),c.scaleD=c.pinch.endD/c.pinch.startD,t.pageX=c.pinch.endX,t.pageY=c.pinch.endY,t.scale=c.scaleD,t.deltaX=c.pinch.endX-c.pinch.startX,t.deltaY=c.pinch.endY-c.pinch.startY}else c.pan||(q=!1);q&&c.$el.trigger(t)}}function i(b,c){b.on(r.click,c,j);var d=a._data(b[0],"events").click;d.unshift(d.pop())}function j(a){s.killEvent(a,!0),a.data.$links.off(r.click)}function k(b){var c=b.data,d="undefined"!==a.type(c.touches)?c.touches[0]:null,e=d?d.pageX:b.pageX,f=d?d.pageY:b.pageY,g=e-c.startX,h=f-c.startY,j=(new Date).getTime(),k=c.scale?r.scaleEnd:r.panEnd,m=g>0?"right":"left",n=h>0?"down":"up",o=Math.abs(g)>1,p=Math.abs(h)>1;if(c.swipe&&Math.abs(g)>u&&j-c.startTq;q++)i(c.$links.eq(q),c)}var w=l(k,b,e,f,c.scaleD,g,h,m,n);t.off([r.touchMove,r.touchEnd,r.touchCancel,r.mouseMove,r.mouseUp,r.pointerMove,r.pointerUp,r.pointerCancel].join(" ")),c.$el.trigger(w),c.touches=[],c.scale,c.touching=!1}function l(b,c,d,e,f,g,h,i,j){return a.Event(b,{originalEvent:c,bubbles:!0,pageX:d,pageY:e,scale:f,deltaX:g,deltaY:h,directionX:i,directionY:j})}function m(a,b){return(a+b)/2}function n(a,b){return Math.sqrt(a*a+b*b)}function o(a,b){a.css({"-ms-touch-action":b,"touch-action":b})}var p=!b.window.PointerEvent,q=b.Plugin("touch",{widget:!0,defaults:{axis:!1,pan:!1,scale:!1,swipe:!1},methods:{_construct:d,_destruct:e},events:{pointerDown:p?"MSPointerDown":"pointerdown",pointerUp:p?"MSPointerUp":"pointerup",pointerMove:p?"MSPointerMove":"pointermove",pointerCancel:p?"MSPointerCancel":"pointercancel"}}),r=q.events,s=q.functions,t=b.$window,u=10,v=50;r.pan="pan",r.panStart="panstart",r.panEnd="panend",r.scale="scale",r.scaleStart="scalestart",r.scaleEnd="scaleend",r.swipe="swipe"}(jQuery,Formstone);
!function(a,b,c){"use strict";function d(a,c){if(c){a.$target=this.find(a.target),a.$check=a.target?a.$target:this,a.callback=c,a.styles=i(a.$check),a.timer=null;var d=a.$check.css(b.transition+"-duration"),e=parseFloat(d);b.support.transition&&d&&e?this.on(l.transitionEnd,a,f):a.timer=m.startTimer(a.timer,50,function(){h(a)},!0)}}function e(a){m.clearTimer(a.timer,!0),this.off(l.namespace)}function f(b){b.stopPropagation(),b.preventDefault();var c=b.data,d=b.originalEvent,e=c.target?c.$target:c.$el;c.property&&d.propertyName!==c.property||!a(d.target).is(e)||g(c)}function g(a){a.always||a.$el[k.namespaceClean]("destroy"),a.callback.apply(a.$el)}function h(a){var b=i(a.$check);j(a.styles,b)||g(a),a.styles=b}function i(b){var c,d,e,f={};if(b instanceof a&&(b=b[0]),n.getComputedStyle){c=n.getComputedStyle(b,null);for(var g=0,h=c.length;h>g;g++)d=c[g],e=c.getPropertyValue(d),f[d]=e}else if(b.currentStyle){c=b.currentStyle;for(d in c)c[d]&&(f[d]=c[d])}return f}function j(b,c){if(a.type(b)!==a.type(c))return!1;for(var d in b)if(!b.hasOwnProperty(d)||!c.hasOwnProperty(d)||b[d]!==c[d])return!1;return!0}var k=b.Plugin("transition",{widget:!0,defaults:{always:!1,property:null,target:null},methods:{_construct:d,_destruct:e,resolve:g}}),l=k.events,m=k.functions,n=b.window}(jQuery,Formstone);
!function(a,b,c){"use strict";function d(){W=b.$body,X=a("html, body"),Y=b.window.location.hash.replace("#","")}function e(){$&&j()}function f(a){this.on(S.click,a,i);var b=this.data(O+"-gallery");!Z&&Y&&b===Y&&(Z=!0,this.trigger(S.click))}function g(a){k(),this.off(S.namespace)}function h(b,c){b instanceof a&&i.apply(U,[{data:a.extend(!0,{},{$object:b},P,c||{})}])}function i(c){if(!$){var d=c.data,e=d.$el,f=d.$object,g=e&&e[0].href?e[0].href||"":"",h=e&&e[0].hash?e[0].hash||"":"",i=(g.toLowerCase().split(".").pop().split(/\#|\?/),e?e.data(O+"-type"):""),j="image"===i||g.match(d.fileTypes)||"data:image"===g.substr(0,10),l=M(g),m="url"===i||!j&&!l&&"http"===g.substr(0,4)&&!h,o="element"===i||!j&&!l&&!m&&"#"===h.substr(0,1),q="undefined"!=typeof f;if(o&&(g=h),!(j||l||m||o||q))return;if(T.killEvent(c),$=a.extend({},{visible:!1,gallery:{active:!1},isMobile:b.isMobile||d.mobile,isTouch:b.support.touch,isAnimating:!0,oldContentHeight:0,oldContentWidth:0},d),$.touch=d.touch&&$.isMobile&&$.isTouch,$.margin*=2,j?$.type="image":l?$.type="video":$.type="element",j||l){var r=e.data(O+"-gallery");r&&($.gallery.active=!0,$.gallery.id=r,$.gallery.$items=a("a[data-lightbox-gallery="+$.gallery.id+"], a[rel="+$.gallery.id+"]"),$.gallery.index=$.gallery.$items.index($.$el),$.gallery.total=$.gallery.$items.length-1)}var t="";$.isMobile||(t+='');var u=[Q.raw.base,Q.raw.loading,Q.raw.animating,$.customClass];$.fixed&&u.push(Q.raw.fixed),$.isMobile&&u.push(Q.raw.mobile),$.isTouch&&u.push(Q.raw.touch),m&&u.push(Q.raw.iframed),(o||q)&&u.push(Q.raw.inline),t+='',t+='
",t+='
',t+='
",W.append(t),$.$overlay=a(Q.overlay),$.$lightbox=a(Q.base),$.$close=a(Q.close),$.$container=a(Q.container),$.$content=a(Q.content),$.$tools=a(Q.tools),$.$meta=a(Q.meta),$.$position=a(Q.position),$.$caption=a(Q.caption),$.$controlBox=a(Q.controls),$.$controls=a(Q.control),$.isMobile?($.paddingVertical=$.$close.outerHeight(),$.paddingHorizontal=0,$.mobilePaddingVertical=parseInt($.$content.css("paddingTop"),10)+parseInt($.$content.css("paddingBottom"),10),$.mobilePaddingHorizontal=parseInt($.$content.css("paddingLeft"),10)+parseInt($.$content.css("paddingRight"),10)):($.paddingVertical=parseInt($.$lightbox.css("paddingTop"),10)+parseInt($.$lightbox.css("paddingBottom"),10),$.paddingHorizontal=parseInt($.$lightbox.css("paddingLeft"),10)+parseInt($.$lightbox.css("paddingRight"),10),$.mobilePaddingVertical=0,$.mobilePaddingHorizontal=0),$.contentHeight=$.$lightbox.outerHeight()-$.paddingVertical,$.contentWidth=$.$lightbox.outerWidth()-$.paddingHorizontal,$.controlHeight=$.$controls.outerHeight(),n(),$.gallery.active&&($.$lightbox.addClass(R.has_controls),E()),V.on(S.keyDown,F),W.on(S.click,[Q.overlay,Q.close].join(", "),k),$.gallery.active&&$.$lightbox.on(S.click,Q.control,D),$.isMobile&&$.isTouch&&$.$lightbox.on(S.click,Q.caption_toggle,p),$.$lightbox.fsTransition({property:"opacity"},function(){j?s(g):l?A(g):m?H(g):o?G(g):q&&I($.$object)}).addClass(Q.raw.open),$.$overlay.addClass(Q.raw.open)}}function j(a){"object"!=typeof a&&($.targetHeight=arguments[0],$.targetWidth=arguments[1]),"element"===$.type?J($.$content.find("> :first-child")):"image"===$.type?y():"video"===$.type&&B(),m()}function k(a){T.killEvent(a),$&&($.$lightbox.fsTransition("destroy"),$.$container.fsTransition("destroy"),t(),$.$lightbox.addClass(Q.raw.animating).fsTransition({property:"opacity"},function(a){$.$lightbox.off(S.namespace),$.$container.off(S.namespace),V.off(S.keyDown),W.off(S.namespace),$.$overlay.remove(),$.$lightbox.remove(),$=null,V.trigger(S.close)}),$.$lightbox.removeClass(Q.raw.open),$.$overlay.removeClass(Q.raw.open),$.isMobile&&X.removeClass(R.lock))}function l(){var a=o();$.isMobile?0:$.duration;$.isMobile||$.$controls.css({marginTop:($.contentHeight-$.controlHeight-$.metaHeight)/2}),$.$lightbox.fsTransition({property:$.contentHeight!==$.oldContentHeight?"height":"width"},function(){$.$container.fsTransition({property:"opacity"},function(){$.$lightbox.removeClass(Q.raw.animating),$.isAnimating=!1}),$.$lightbox.removeClass(Q.raw.loading),$.visible=!0,V.trigger(S.open),$.gallery.active&&C()}),$.isMobile||$.$lightbox.css({height:$.contentHeight+$.paddingVertical,width:$.contentWidth+$.paddingHorizontal,top:$.fixed?0:a.top});var b=$.oldContentHeight!==$.contentHeight||$.oldContentWidth!==$.contentWidth;($.isMobile||!b)&&$.$lightbox.fsTransition("resolve"),$.oldContentHeight=$.contentHeight,$.oldContentWidth=$.contentWidth,$.isMobile&&X.addClass(R.lock)}function m(){if($.visible&&!$.isMobile){var a=o();$.$controls.css({marginTop:($.contentHeight-$.controlHeight-$.metaHeight)/2}),$.$lightbox.css({height:$.contentHeight+$.paddingVertical,width:$.contentWidth+$.paddingHorizontal,top:$.fixed?0:a.top})}}function n(){var a=o();$.$lightbox.css({top:$.fixed?0:a.top})}function o(){if($.isMobile)return{left:0,top:0};var a={left:(b.windowWidth-$.contentWidth-$.paddingHorizontal)/2,top:$.top<=0?(b.windowHeight-$.contentHeight-$.paddingVertical)/2:$.top};return $.fixed!==!0&&(a.top+=V.scrollTop()),a}function p(a){T.killEvent(a),$.captionOpen?q():($.$lightbox.addClass(Q.raw.caption_open).find(Q.caption_toggle).text($.labels.captionOpen),$.captionOpen=!0)}function q(){$.$lightbox.removeClass(Q.raw.caption_open).find(Q.caption_toggle).text($.labels.captionClosed),$.captionOpen=!1}function r(){var a=this.attr("title"),b=a!==c&&a?a.replace(/^\s+|\s+$/g,""):!1;return b?''+b+"
":""}function s(b){$.hasScaled=!1,$.$imageContainer=a(''),$.$image=$.$imageContainer.find("img"),$.$image.one(S.load,function(){var a=L($.$image);$.naturalHeight=a.naturalHeight,$.naturalWidth=a.naturalWidth,$.retina&&($.naturalHeight/=2,$.naturalWidth/=2),$.$content.prepend($.$imageContainer),""===$.$caption.html()?($.$caption.hide(),$.$lightbox.removeClass(R.has_caption)):($.$caption.show(),$.$lightbox.addClass(R.has_caption)),y(),l(),$.touch&&(u(),w({scale:1,deltaX:0,deltaY:0}),x(),$.$container.fsTouch({pan:!0,scale:!0}).on(S.scaleStart,v).on(S.scaleEnd,x).on(S.scale,w))}).error(K).attr("src",b).addClass(Q.raw.image),($.$image[0].complete||4===$.$image[0].readyState)&&$.$image.trigger(S.load)}function t(){$.$image&&$.$image.length&&$.$container.fsTouch("destroy")}function u(){$.scalePosition=$.$imageContainer.position(),$.scaleY=$.scalePosition.top,$.scaleX=$.scalePosition.left,$.scaleHeight=$.$image.outerHeight(),$.scaleWidth=$.$image.outerWidth()}function v(a){u(),$.$lightbox.removeClass(Q.raw.animating)}function w(a){$.targetContainerY=$.scaleY+a.deltaY,$.targetContainerX=$.scaleX+a.deltaX,$.targetImageHeight=$.scaleHeight*a.scale,$.targetImageWidth=$.scaleWidth*a.scale,$.targetImageHeight<$.scaleMinHeight&&($.targetImageHeight=$.scaleMinHeight),$.targetImageHeight>$.scaleMaxHeight&&($.targetImageHeight=$.scaleMaxHeight),$.targetImageWidth<$.scaleMinWidth&&($.targetImageWidth=$.scaleMinWidth),$.targetImageWidth>$.scaleMaxWidth&&($.targetImageWidth=$.scaleMaxWidth),$.hasScaled=!0,$.isScaling=!0,$.$imageContainer.css({top:$.targetContainerY,left:$.targetContainerX}),$.$image.css({height:$.targetImageHeight,width:$.targetImageWidth,top:-($.targetImageHeight/2),left:-($.targetImageWidth/2)})}function x(a){u(),$.isScaling=!1;var b=$.$container.outerHeight()-$.metaHeight,c=$.$container.outerWidth();$.scaleMinY=b-$.scaleHeight/2,$.scaleMinX=c-$.scaleWidth/2,$.scaleMaxY=$.scaleHeight/2,$.scaleMaxX=$.scaleWidth/2,$.scaleHeight$.scaleMaxY&&($.scalePosition.top=$.scaleMaxY)),$.scaleWidth$.scaleMaxX&&($.scalePosition.left=$.scaleMaxX)),$.$lightbox.addClass(Q.raw.animating),$.$imageContainer.css({left:$.scalePosition.left,top:$.scalePosition.top})}function y(){if($.$image){var a=0;for($.windowHeight=$.viewportHeight=b.windowHeight-$.mobilePaddingVertical-$.paddingVertical,$.windowWidth=$.viewportWidth=b.windowWidth-$.mobilePaddingHorizontal-$.paddingHorizontal,$.contentHeight=1/0,$.contentWidth=1/0,$.imageMarginTop=0,$.imageMarginLeft=0;$.contentHeight>$.viewportHeight&&2>a;)$.imageHeight=0===a?$.naturalHeight:$.$image.outerHeight(),$.imageWidth=0===a?$.naturalWidth:$.$image.outerWidth(),$.metaHeight=0===a?0:$.metaHeight,$.spacerHeight=0===a?0:$.spacerHeight,0===a&&($.ratioHorizontal=$.imageHeight/$.imageWidth,$.ratioVertical=$.imageWidth/$.imageHeight,$.isWide=$.imageWidth>$.imageHeight),$.imageHeight<$.minHeight&&($.minHeight=$.imageHeight),$.imageWidth<$.minWidth&&($.minWidth=$.imageWidth),$.isMobile?($.isTouch?($.$controlBox.css({width:b.windowWidth}),$.spacerHeight=$.$controls.outerHeight(!0)):($.$tools.css({width:b.windowWidth}),$.spacerHeight=$.$tools.outerHeight(!0)),$.contentHeight=$.viewportHeight,$.contentWidth=$.viewportWidth,z(),$.imageMarginTop=($.contentHeight-$.targetImageHeight-$.spacerHeight)/2,$.imageMarginLeft=($.contentWidth-$.targetImageWidth)/2):(0===a&&($.viewportHeight-=$.margin+$.paddingVertical,$.viewportWidth-=$.margin+$.paddingHorizontal),$.viewportHeight-=$.metaHeight,z(),$.contentHeight=$.targetImageHeight,$.contentWidth=$.targetImageWidth),$.isMobile||$.isTouch||$.$meta.css({width:$.contentWidth}),$.hasScaled||($.$image.css({height:$.targetImageHeight,width:$.targetImageWidth}),$.touch?$.$image.css({top:-($.targetImageHeight/2),left:-($.targetImageWidth/2)}):$.$image.css({marginTop:$.imageMarginTop,marginLeft:$.imageMarginLeft})),$.isMobile||($.metaHeight=$.$meta.outerHeight(!0),$.contentHeight+=$.metaHeight),a++;$.touch&&($.scaleMinHeight=$.targetImageHeight,$.scaleMinWidth=$.targetImageWidth,$.scaleMaxHeight=$.naturalHeight,$.scaleMaxWidth=$.naturalWidth)}}function z(){var a=$.isMobile?$.contentHeight-$.spacerHeight:$.viewportHeight,b=$.isMobile?$.contentWidth:$.viewportWidth;$.isWide?($.targetImageWidth=b,$.targetImageHeight=$.targetImageWidth*$.ratioHorizontal,$.targetImageHeight>a&&($.targetImageHeight=a,$.targetImageWidth=$.targetImageHeight*$.ratioVertical)):($.targetImageHeight=a,$.targetImageWidth=$.targetImageHeight*$.ratioVertical,$.targetImageWidth>b&&($.targetImageWidth=b,$.targetImageHeight=$.targetImageWidth*$.ratioHorizontal)),($.targetImageWidth>$.imageWidth||$.targetImageHeight>$.imageHeight)&&($.targetImageHeight=$.imageHeight,$.targetImageWidth=$.imageWidth),($.targetImageWidth<$.minWidth||$.targetImageHeight<$.minHeight)&&($.targetImageWidth<$.minWidth?($.targetImageWidth=$.minWidth,$.targetImageHeight=$.targetImageWidth*$.ratioHorizontal):($.targetImageHeight=$.minHeight,$.targetImageWidth=$.targetImageHeight*$.ratioVertical))}function A(b){var c=b.match(/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/ ]{11})/i),d=b.match(/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/),e=b.split("?"),f=null!==c?"//www.youtube.com/embed/"+c[1]:"//player.vimeo.com/video/"+d[3];e.length>=2&&(f+="?"+e.slice(1)[0].trim()),$.$videoWrapper=a(''),$.$video=a(''),$.$video.attr("src",f).addClass(Q.raw.video).prependTo($.$videoWrapper),$.$content.prepend($.$videoWrapper),B(),l()}function B(){$.windowHeight=$.viewportHeight=b.windowHeight-$.mobilePaddingVertical-$.paddingVertical,$.windowWidth=$.viewportWidth=b.windowWidth-$.mobilePaddingHorizontal-$.paddingHorizontal,$.videoMarginTop=0,$.videoMarginLeft=0,$.isMobile?($.isTouch?($.$controlBox.css({width:b.windowWidth}),$.spacerHeight=$.$controls.outerHeight(!0)):($.$tools.css({width:b.windowWidth}),$.spacerHeight=$.$tools.outerHeight(!0)),$.viewportHeight-=$.spacerHeight,$.targetVideoWidth=$.viewportWidth,$.targetVideoHeight=$.targetVideoWidth*$.videoRatio,$.targetVideoHeight>$.viewportHeight&&($.targetVideoHeight=$.viewportHeight,$.targetVideoWidth=$.targetVideoHeight/$.videoRatio),$.videoMarginTop=($.viewportHeight-$.targetVideoHeight)/2,$.videoMarginLeft=($.viewportWidth-$.targetVideoWidth)/2):($.viewportHeight=$.windowHeight-$.margin,$.viewportWidth=$.windowWidth-$.margin,$.targetVideoWidth=$.videoWidth>$.viewportWidth?$.viewportWidth:$.videoWidth,$.targetVideoWidth<$.minWidth&&($.targetVideoWidth=$.minWidth),$.targetVideoHeight=$.targetVideoWidth*$.videoRatio,$.contentHeight=$.targetVideoHeight,$.contentWidth=$.targetVideoWidth),$.isMobile||$.isTouch||$.$meta.css({width:$.contentWidth}),$.$videoWrapper.css({height:$.targetVideoHeight,width:$.targetVideoWidth,marginTop:$.videoMarginTop,marginLeft:$.videoMarginLeft}),$.isMobile||($.metaHeight=$.$meta.outerHeight(!0),$.contentHeight=$.targetVideoHeight+$.metaHeight)}function C(b){var c="";$.gallery.index>0&&(c=$.gallery.$items.eq($.gallery.index-1).attr("href"),M(c)||a('')),$.gallery.index<$.gallery.total&&(c=$.gallery.$items.eq($.gallery.index+1).attr("href"),M(c)||a(''))}function D(b){T.killEvent(b);var c=a(b.currentTarget);$.isAnimating||c.hasClass(Q.raw.control_disabled)||($.isAnimating=!0,t(),q(),$.gallery.index+=c.hasClass(Q.raw.control_next)?1:-1,$.gallery.index>$.gallery.total&&($.gallery.index=$.infinite?0:$.gallery.total),$.gallery.index<0&&($.gallery.index=$.infinite?$.gallery.total:0),$.$lightbox.addClass(Q.raw.animating),$.$container.fsTransition({property:"opacity"},function(){"undefined"!=typeof $.$imageContainer&&$.$imageContainer.remove(),"undefined"!=typeof $.$videoWrapper&&$.$videoWrapper.remove(),$.$el=$.gallery.$items.eq($.gallery.index),$.$caption.html($.formatter.call($.$el,$)),$.$position.find(Q.position_current).html($.gallery.index+1);var a=$.$el.attr("href"),b=M(a);b?($.type="video",A(a)):($.type="image",s(a)),E()}),$.$lightbox.addClass(Q.raw.loading))}function E(){$.$controls.removeClass(Q.raw.control_disabled),$.infinite||(0===$.gallery.index&&$.$controls.filter(Q.control_previous).addClass(R.control_disabled),$.gallery.index===$.gallery.total&&$.$controls.filter(Q.control_next).addClass(R.control_disabled))}function F(a){!$.gallery.active||37!==a.keyCode&&39!==a.keyCode?27===a.keyCode&&$.$close.trigger(S.click):(T.killEvent(a),$.$controls.filter(37===a.keyCode?Q.control_previous:Q.control_next).trigger(S.click))}function G(b){var c=a(b).find("> :first-child").clone();I(c)}function H(b){b+=b.indexOf("?")>-1?"&"+$.requestKey+"=true":"?"+$.requestKey+"=true";var c=a('');I(c)}function I(a){$.$content.append(a),J(a),l()}function J(a){$.windowHeight=b.windowHeight-$.mobilePaddingVertical-$.paddingVertical,$.windowWidth=b.windowWidth-$.mobilePaddingHorizontal-$.paddingHorizontal,$.objectHeight=a.outerHeight(!0),$.objectWidth=a.outerWidth(!0),$.targetHeight=$.targetHeight||($.$el?$.$el.data(O+"-height"):null),$.targetWidth=$.targetWidth||($.$el?$.$el.data(O+"-width"):null),$.maxHeight=$.windowHeight<0?$.minHeight:$.windowHeight,$.isIframe=a.is("iframe"),$.objectMarginTop=0,$.objectMarginLeft=0,$.isMobile||($.windowHeight-=$.margin,$.windowWidth-=$.margin),$.contentHeight=$.targetHeight?$.targetHeight:$.isIframe||$.isMobile?$.windowHeight:$.objectHeight,$.contentWidth=$.targetWidth?$.targetWidth:$.isIframe||$.isMobile?$.windowWidth:$.objectWidth,($.isIframe||$.isObject)&&$.isMobile?($.contentHeight=$.windowHeight,$.contentWidth=$.windowWidth):$.isObject&&($.contentHeight=$.contentHeight>$.windowHeight?$.windowHeight:$.contentHeight,$.contentWidth=$.contentWidth>$.windowWidth?$.windowWidth:$.contentWidth)}function K(b){var c=a('');$.type="element",$.$tools.remove(),$.$image.off(S.namespace),I(c)}function L(a){var b=a[0],c=new Image;return"undefined"!=typeof b.naturalHeight?{naturalHeight:b.naturalHeight,naturalWidth:b.naturalWidth}:"img"===b.tagName.toLowerCase()?(c.src=b.src,{naturalHeight:c.height,naturalWidth:c.width}):!1}function M(a){return a.indexOf("youtube.com")>-1||a.indexOf("youtu.be")>-1||a.indexOf("vimeo.com")>-1}var N=b.Plugin("lightbox",{widget:!0,defaults:{customClass:"",fileTypes:/\.(jpg|sjpg|jpeg|png|gif)$/i,fixed:!1,formatter:r,infinite:!1,labels:{close:"Close",count:"of",next:"Next",previous:"Previous",captionClosed:"View Caption",captionOpen:"Close Caption"},margin:50,minHeight:100,minWidth:100,mobile:!1,retina:!1,requestKey:"fs-lightbox",top:0,touch:!0,videoRatio:.5625,videoWidth:800},classes:["loading","animating","fixed","mobile","touch","inline","iframed","open","overlay","close","loading_icon","container","content","image","image_container","video","video_wrapper","tools","meta","controls","control","control_previous","control_next","control_disabled","position","position_current","position_total","caption_toggle","caption","caption_open","has_controls","has_caption","iframe","error","lock"],events:{open:"open",close:"close"},methods:{_setup:d,_construct:f,_destruct:g,_resize:e,resize:j},utilities:{_initialize:h,close:k}}),O=N.namespace,P=N.defaults,Q=N.classes,R=Q.raw,S=N.events,T=N.functions,U=b.window,V=b.$window,W=null,X=null,Y=!1,Z=!1,$=null}(jQuery,Formstone);
jQuery(document).ready(function(a){a(".cq-hovercard").each(function(b,c){var d=a(this),e=a(this).data("linktype"),f=a(this).data("contentcolor"),g=a(this).data("iconcolor"),i=(a(this).data("bgtype"),a(this).data("captionoffset")),k=(""==a(this).data("bgheight")?240:parseInt(a(this).data("bgheight")),""==a(this).data("videowidth")?640:parseInt(a(this).data("videowidth"))),l=""==a(this).data("lightboxmargin")?20:parseInt(a(this).data("lightboxmargin")),m=a("a.cq-hovercard-lightbox",d);if(""!=i&&a(".cq-hovercard-textcontainer",d).css("top",i),""!=f&&a(".cq-hovercard-title, .cq-hovercard-content",d).css("color",f),""!=g&&a(".cq-hovercard-icon",d).css("color",g),"lightbox"==e)m.boxer({margin:l,fixed:!0});else if("lightbox_custom"==e){var n=m.attr("href");n.indexOf("youtube")>-1||n.indexOf("vimeo")>-1?m.lightbox({viewportFill:1,fixed:!0,margin:10,videoWidth:k,retina:!0,minWidth:320}):m.boxer({margin:l,fixed:!0})}})});