Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Featured Youtube & Vimeo Videos
.videomodal-overlay {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 2147483647;
width: 100%;
height: 100%;
overflow: hidden;
-ms-touch-action: none;
touch-action: none;
background-color: rgba(0, 0, 0, 0.7);
-webkit-overflow-scrolling: touch;
-webkit-backface-visibility: hidden;
text-align: center;
}
.videomodal-overlay:before {
content: "";
display: inline-block;
height: 100%;
width: 1px;
margin-right: -1px;
vertical-align: middle;
}
[dir="rtl"] .videomodal-overlay:before {
margin-right: 0;
margin-left: -1px;
}
::-moz-selection {
background: #b3d4fc;
text-shadow: none;
}
::selection {
background: #b3d4fc;
text-shadow: none;
}
.videomodal-container,
.videomodal-ajax.videomodal-container,
.videomodal-iframe,
.videomodal-container-full {
margin: 0 auto;
}
.videomodal-container.fixed,
.fixed.videomodal-iframe,
.fixed .videomodal-container,
.fixed .videomodal-iframe,
.videomodal-container-full.fixed,
.fixed .videomodal-container-full {
width: 100%;
}
.videomodal-container-full {
overflow-x: hidden;
}
.videomodal-container,
.videomodal-ajax.videomodal-container,
.videomodal-iframe {
max-width: 1140px;
width: calc(100% - 16px);
}
.videomodal-container.fixed,
.fixed.videomodal-iframe,
.fixed .videomodal-container,
.fixed .videomodal-iframe {
width: 1140px;
}
.media {
height: 0;
height: auto;
margin-bottom: 1rem;
max-width: 100%;
overflow: hidden;
padding-bottom: 56.25%;
position: relative;
}
.media.four-by-three {
padding-bottom: 75%;
}
.media.instagram {
height: auto;
max-width: none;
padding-bottom: 120%;
}
.media.vine {
height: auto;
max-width: none;
padding-bottom: 100%;
}
.media.getty {
height: auto;
padding-bottom: 79.9663%;
}
.media iframe,
.media object,
.media embed,
.media video {
background-color: transparent;
border: 0;
height: 100%;
left: 0;
margin: 0;
outline: none;
padding: 0;
position: absolute;
top: 0;
width: 100%;
}
.media img {
bottom: -1000000%;
left: -1000000%;
margin: auto;
position: absolute;
right: -1000000%;
top: -1000000%;
width: 100%;
}
.media.media-scroll {
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
.videomodal-loader:after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 3;
width: 25px;
height: 25px;
margin: auto;
content: "";
background-image: url(loadingiframe.gif);
background-size: contain;
}
.videomodal {
display: inline-block;
max-height: 95%;
max-width: 95%;
vertical-align: middle;
margin: 0 auto;
overflow: auto;
}
.videomodal-iframe,
.videomodal-image {
overflow: hidden;
}
.videomodal-iframe .media,
.videomodal-iframe iframe {
max-height: 100%;
max-width: 100%;
}
.videomodal-iframe .media {
background-color: #fff;
margin-bottom: 0;
}
.videomodal-iframe.iframe-full {
height: 95%;
}
.iframe-full .media {
height: 100%;
padding: 0;
}
.videomodal-image > img {
max-height: 100%;
}
.videomodal-content {
max-height: 100%;
overflow: auto;
padding: 1rem;
background-color: white;
text-align: left;
}
[dir="rtl"] .videomodal-content {
text-align: right;
}
.videomodal-header,
.videomodal-footer {
position: fixed;
top: 0;
right: 0;
left: 0;
color: #fff;
}
.videomodal-header {
padding: 0 4.555rem;
h2 {
margin-top: 20px;
}
}
.videomodal-footer {
top: auto;
bottom: 0;
}
.videomodal-close {
position: fixed;
top: 3%;
right: 3%;
z-index: 2;
display: inline-block;
padding: 1.245rem;
font-size: 1.5rem;
font-weight: bold;
color: rgba(0, 139, 139, 0);
cursor: pointer;
background: url(x.png) no-repeat;
height: 25px;
width: 25px;
&:focus{
outline: none;
}
}
[dir="rtl"] .videomodal-close {
right: auto;
left: 1px;
}
.videomodal-direction {
position: fixed;
top: 49%;
left: 0;
z-index: 2;
display: block;
width: 3rem;
padding: 1rem;
color: white;
font-size: 2rem;
font-weight: bold;
text-align: center;
}
[dir="rtl"] .videomodal-direction {
right: 0;
}
.videomodal-direction.next {
left: auto;
right: 0;
}
[dir="rtl"] .videomodal-direction.next {
right: auto;
left: 0;
}
button.videomodal-close,
button.videomodal-direction {
background-color: transparent;
border: none;
}
button.videomodal-close:hover,
button.videomodal-direction:hover {
text-decoration: underline;
}
.fade-out,
.fade-in {
-webkit-transition: opacity .3s;
transition: opacity .3s;
}
.fade-out {
opacity: 0 !important;
}
.fade-in {
opacity: 1 !important;
}
.videomodal-container,
.videomodal-ajax.videomodal-container,
.videomodal-iframe {
max-width: 100%;
width: 100%;
}
.videomodal-container.fixed,
.fixed.videomodal-iframe,
.fixed .videomodal-container,
.fixed .videomodal-iframe {
width: 100%;
}
.videomodal:focus {
outline: none;
}
.visuallyhidden {
display: none;
}
{% if page.features_count > 0 %}
{% if page.features.size > 0 %}
<div id="carousel-generic" class="carousel slide" data-ride="carousel">
{% if page.features.size > 1 %}
<!-- Indicators -->
<ol class="carousel-indicators">
{% for feature in page.features %}
<li data-target="#carousel-generic" data-slide-to="{{ forloop.index | minus:'1' }}" {% if forloop.first == true %}class="active"{% endif %}></li>
{% endfor %}
</ol>
{% endif %}
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
{% for feature in page.features %}
<div class="item {% if forloop.first == true %}active{% endif %}">
<!-- Youtube modal -->
{% assign lowercase_name = feature.name | downcase %}
{% if lowercase_name contains "youtube" and lowercase_name contains "|" %}
<a href="//youtube.com/embed/{{ feature.name | split:'|' | last | strip }}" data-videomodal-title="{{ feature.headline }}">
<img src="{{ feature.image_url }}" alt="{{ feature.headline }}">
<div class="carousel-caption">
{% if feature.headline contains "|" %}
<h1>{{ feature.headline | split:"|" | first }}</h1>
<p>{{ feature.headline | split:"|" | last}}</p>
{% else %}
<h1>{{ feature.headline }}</h1>
{% endif %}
</div>
</a>
<!-- Vimeo modal -->
{% elsif lowercase_name contains "vimeo" and lowercase_name contains "|" %}
<a href="//player.vimeo.com/video/{{ feature.name | split:'|' | last | strip }}" data-videomodal-title="{{ feature.headline }}">
<img src="{{ feature.image_url }}" alt="{{ feature.headline }}">
<div class="carousel-caption">
{% if feature.headline contains "|" %}
<h1>{{ feature.headline | split:"|" | first }}</h1>
<p>{{ feature.headline | split:"|" | last}}</p>
{% else %}
<h1>{{ feature.headline }}</h1>
{% endif %}
</div>
</a>
{% else %}
<a href="{{ feature.page.url }}">
<img src="{{ feature.image_url }}" alt="{{ feature.headline }}">
<div class="carousel-caption">
{% if feature.headline contains "|" %}
<h1>{{ feature.headline | split:"|" | first }}</h1>
<p>{{ feature.headline | split:"|" | last}}</p>
{% else %}
<h1>{{ feature.headline }}</h1>
{% endif %}
</div>
</a>
{% endif %}
</div>
{% endfor %}
</div>
{% if page.features.size > 1 %}
<!-- Controls -->
<a class="left carousel-control" href="#carousel-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
{% endif %}
</div>
{% endif %}
{% endif %}
/*! Responsive v4.1.1 | MIT License | responsivebp.com */
!function(a,b,c){"use strict";a.pseudoUnique=function(a){var b=a||8,c="",d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e=d.length;b>e&&(b=e);for(var f=0;f<b;f+=1)c+=d.charAt(Math.floor(Math.random()*e));return c},a.support.rtl=function(){return!!a("html[dir=rtl]").length}(),a.support.currentGrid=function(){return function(){var b=a("<div/>").addClass("grid-state-indicator").prependTo("body"),c=["xxs","xs","s","m","l"],d=parseInt(b.width(),10);return b.remove(),{grid:c[d],index:d,range:c}}}(),a.support.scrollbarWidth=function(){return function(){var d=0;if(c.body.clientWidth<b.innerWidth){var e=a("<div/>").addClass("scrollbar-measure").prependTo("body");d=e[0].offsetWidth-e[0].clientWidth,e.remove()}return d}}(),a.toggleBodyLock=function(){var d,b=a("html"),c=a("body");if(void 0!==b.attr("data-lock"))return d=c.data("bodyPad"),c.css("padding-right",d||"").removeData("bodyPad"),void b.removeAttr("data-lock").trigger(a.Event("unlock.r.bodylock"));d=parseInt(c.css("padding-right")||0);var e=a.support.scrollbarWidth();e&&(c.css("padding-right",d+e),d&&c.data("bodyPad",d),b.attr("data-lock","").trigger(a.Event("lock.r.bodylock",{padding:d+e})))},a.support.transition=function(){var a=function(){for(var a=c.createElement("div"),b={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},d=Object.keys(b),e=d.length,f=0;f<e;f++)if(void 0!==a.style[d[f]])return{end:b[d[f]]};return!1};return a()}(),a.fn.redraw=function(){var a;return this.each(function(){a=this.offsetWidth})},function(){var c=function(a){var b=/\d+(.\d+)?/;return 1e3*(b.test(a.css("transition-duration"))?a.css("transition-duration").match(b)[0]:0)};a.fn.ensureTransitionEnd=function(d){if(!a.support.transition)return this;var e=!1,f=a(this),g=function(){e||f.trigger(a.support.transition.end)};return d||(d=c(f)),f.one(a.support.transition.end,function(){e=!0}),b.setTimeout(g,d),this},a.fn.onTransitionEnd=function(d){var e=a.support.transition;return this.each(function(){if(a.isFunction(d)){var f=a(this),g=c(f),h=g/10,i=new Date,j=arguments;f.redraw(),e?f.one(e.end,function(){var a=new Date;return a.getMilliseconds()-i.getMilliseconds()<=h?void b.setTimeout(function(){d.apply(this,j)}.bind(this),g):void d.apply(this,j)}):d.apply(this,j)}})}}(),a.support.touchEvents=function(){return"ontouchstart"in b||b.DocumentTouch&&c instanceof b.DocumentTouch}(),a.support.pointerEvents=function(){return b.PointerEvent||b.MSPointerEvent}(),function(){var b=a.support.touchEvents,c=a.support.pointerEvents,d=["pointerdown","MSPointerDown"],e=["pointermove","MSPointerMove"],f=["pointerup","pointerout","pointercancel","pointerleave","MSPointerUp","MSPointerOut","MSPointerCancel","MSPointerLeave"],g="touchstart",h="touchmove",i=["touchend","touchleave","touchcancel"],j="mousedown",k="mousemove",l=["mouseup","mouseleave"],m=function(a){var m,n,o;return b?(m=g+a,n=h+a,o=i.join(a+" ")+a):c?(m=d.join(a+" ")+a,n=e.join(a+" ")+a,o=f.join(a+" ")+a):(m=j+a,n=k+a,o=l.join(a+" ")+a),{start:m,move:n,end:o}},n=function(b,d){var e=d.namespace?"."+d.namespace:"",f="swipestart",g="swipemove",h="swipeend",i=m(e),j=d.data&&d.data.touchAction||"none",k=d.data&&d.data.sensitivity||5;return c&&b.css({"-ms-touch-action":""+j,"touch-action":""+j}),b.each(function(){var b=a(this),c={},d={},e=function(e){var l,f="mousemove"===e.type,h="touchmove"!==e.type&&!f,i=e.originalEvent;if(!(f&&1!==e.which||i.touches&&i.touches.length>1||e.scale&&1!==e.scale)){var o,m=(f?i.pageX:h?i.clientX:i.touches[0].pageX)-c.x,n=(f?i.pageY:h?i.clientY:i.touches[0].pageY)-c.y,p=Math.abs(parseFloat(m/b.width()*100))||100,q=Math.abs(parseFloat(n/b.height()*100))||100;switch(j){case"pan-x":Math.abs(n)>Math.abs(m)&&e.preventDefault(),o=Math.abs(n)>Math.abs(m)&&Math.abs(n)>k&&q<100;break;case"pan-y":Math.abs(m)>Math.abs(n)&&e.preventDefault(),o=Math.abs(m)>Math.abs(n)&&Math.abs(m)>k&&p<100;break;default:e.preventDefault(),o=Math.abs(n)>k||Math.abs(m)>k&&p<100&&q<100}e.stopPropagation(),o&&(l=a.Event(g,{delta:{x:m,y:n}}),b.trigger(l),l.isDefaultPrevented()||(d={x:m,y:n}))}},l=function(){var f,e=+new Date-c.time;if(Math.abs(d.x)>1||Math.abs(d.y)>1){var g=d.x<0?"left":"right",j=d.y<0?"up":"down",k=Math.abs(d.x)>Math.abs(d.y)?g:j;f=a.Event(h,{delta:d,direction:k,duration:e}),b.trigger(f)}b.off(i.move).off(i.end)};b.off(i.start).on(i.start,function(g){var h="mousedown"===g.type,j="touchstart"!==g.type&&!h,k=g.originalEvent;(j||h)&&a(g.target).is("img")&&g.preventDefault(),g.stopPropagation(),c={x:h?k.pageX:j?k.clientX:k.touches[0].pageX,y:h?k.pageY:j?k.clientY:k.touches[0].pageY,time:+new Date};var m=a.Event(f,{start:c});b.trigger(m),m.isDefaultPrevented()||(d={x:0,y:0},b.on(i.move,e).on(i.end,l))})})},o=function(b,c){var d=c.namespace?"."+c.namespace:"",e=m(d);return b.each(function(){a(this).css({"-ms-touch-action":"","touch-action":""}).off(e.start).off(e.move).off(e.end)})};a.event.special.swipe={add:function(b){n(a(this),b)},remove:function(b){o(a(this),b)}}}(),a.extend(a.expr[":"],{attrStart:function(b,c,d){var e=!1;return a.each(b.attributes,function(){return 0!==this.name.indexOf(d[3])||(e=!0,!1)}),e}}),a.getDataOptions=function(b,c){var d={};return a.each(b.data(),function(a,b){if(0===a.indexOf(c)&&a.length>c.length){var e=c.length,f=a.charAt(e).toLowerCase()+a.substring(e+1);d[f]=b}}),Object.keys(d).length?d:b.data()},a.debounce=function(a,c,d){var e;return function(){var f=this,g=arguments;b.clearTimeout(e),e=b.setTimeout(function(){e=null,d||a.apply(f,g)},c),d&&!e&&a.apply(f,g)}},function(b){var d=a.Event("domchanged"),e=a(c);a.fn.html=function(){var a=b.apply(this,arguments);return arguments.length&&e.trigger(d),a}}(a.fn.html)}(jQuery,window,document),function(a,b,c,d){"use strict";if(!b.RESPONSIVE_AUTOSIZE){var e="ready"+c+d,f=["domchanged"+c+d,"shown.r.videomodal"+d].join(" "),g=["resize"+c,"orientationchange"+c].join(" "),h="input",i="keyup",j="size"+c,k="sized"+c;!function(b){a.fn.val=function(){var c=b.apply(this,arguments);return this.data("r.autosize")&&arguments.length&&this.trigger(a.Event(h)),c}}(a.fn.val);var l=function(c,d){this.$element=a(c),this.element=c,this.options=a.extend({},this.defaults,d),this.sizing=null,this.difference=0,this.height=this.$element.height(),this.init(),this.$element.on([h,i].join(" "),a.debounce(a.proxy(this.size,this),100)),a(b).on(g,a.debounce(a.proxy(this.size,this),100))};l.prototype.init=function(){var a=this.$element.outerHeight();this.difference=parseFloat(this.$element.css("paddingBottom"))+parseFloat(this.$element.css("paddingTop")),this.element.scrollHeight+this.difference<=a&&(this.difference=0),this.element.value.replace(/\s/g,"").length>0&&this.$element.height(this.element.scrollHeight)},l.prototype.size=function(){var b=this,c=this.$element,d=this.element,e=a.Event(j);if(!this.sizing){c.height("auto");var f=d.scrollHeight-this.difference,g=this.height!==f;if(c.height(this.height),g&&c.trigger(e),!this.sizing&&!e.isDefaultPrevented())return this.sizing=!0,c.height(f),g?void c.onTransitionEnd(function(){b.sizing=!1,b.height=f,c.trigger(a.Event(k))}):void(this.sizing=!1)}};var m=a.fn.autoSize;a.fn.autoSize=function(b){return this.each(function(){var c=a(this),d=c.data("r.autosize"),e="object"==typeof b?a.extend({},b):null;d||c.data("r.autosize",d=new l(this,e)),"size"===b&&d.size()})},a.fn.autoSize.Constructor=l,a.fn.autoSize.noConflict=function(){return a.fn.autoSize=m,this};var n=function(){a("textarea[data-autosize]").each(function(){var b=a(this),c=b.data("r.autosizeLoaded");c||(b.data("r.autosizeLoaded",!0),b.addClass("autosize").autoSize(a.getDataOptions(b,"autosize")))})},o=a.debounce(n,500);a(document).on([e,f].join(" "),function(a){"ready"===a.type?n():o()}),b.RESPONSIVE_AUTOSIZE=!0}}(jQuery,window,".r.autosize",".data-api"),function(a,b,c,d){"use strict";if(!b.RESPONSIVE_CAROUSEL){var e=a.support.transition,f=a.support.rtl,g="mouseenter",h="mouseleave",i="keydown",j="click",k="ready"+c+d,l=["domchanged"+c+d,"shown.r.videomodal"+d].join(" "),m="slide"+c,n="slid"+c,o={SPACE:32,ENTER:13,LEFT:37,RIGHT:39},p=function(c,d){this.$element=a(c),this.defaults={interval:0,mode:"slide",pause:"hover",wrap:!0,keyboard:!0,touch:!0,lazyImages:!0,lazyOnDemand:!0,nextTrigger:null,nextHint:"Next ("+(f?"Left":"Right")+" Arrow)",previousTrigger:null,previousHint:"Previous ("+(f?"Right":"Left")+" Arrow)",indicators:null},this.options=a.extend({},this.defaults,d),this.paused=null,this.interval=null,this.sliding=null,this.$items=null,this.keyboardTriggered=null,this.translationDuration=null,this.$nextTrigger=this.options.nextTrigger?a(this.options.nextTrigger):this.$element.children("button.forward"),this.$previousTrigger=this.options.previousTrigger?a(this.options.previousTrigger):this.$element.children("button:not(.forward)"),this.$indicators=this.options.indicators?a(this.options.indicators):this.$element.find("> ol > li"),this.id=this.$element.attr("id")||"carousel-"+a.pseudoUnique();var e=this,k=this.activeindex();this.options.wrap||0===k&&this.$previousTrigger.attr({"aria-hidden":!0,hidden:!0}),1===this.$items.length&&(this.$previousTrigger.attr({"aria-hidden":!0,hidden:!0}),this.$nextTrigger.attr({"aria-hidden":!0,hidden:!0})),"fade"===this.options.mode&&this.$element.addClass("carousel-fade"),this.options.lazyImages&&!this.options.lazyOnDemand&&a(b).on("load",a.proxy(this.lazyimages),this),this.$element.attr({role:"listbox","aria-live":"polite",id:this.id}),this.$element.children("figure").each(function(b){var c=b===k;a(this).attr({role:"option","aria-selected":c,tabindex:c?0:-1})});var l=this.$nextTrigger.add(this.$previousTrigger);l.each(function(){var b=a(this).attr({tabindex:0,"aria-controls":e.id});b.is("button")?b.attr({type:"button"}):b.attr({role:"button"}),b.find(".visuallyhidden").length||a("<span/>").addClass("visuallyhidden").html(this===e.$nextTrigger.get(0)?e.options.nextHint:e.options.previousHint).appendTo(b)}),this.$indicators.attr({role:"button","aria-controls":e.id}).eq(k).addClass("active"),"hover"===this.options.pause&&(a.support.touchEvents||a.support.pointerEvents||this.$element.on(g,a.proxy(this.pause,this)).on(h,a.proxy(this.cycle,this))),this.options.touch&&this.$element.on("swipe.carousel",{touchAction:"pan-y"},!0).on("swipemove.carousel",a.proxy(this.swipemove,this)).on("swipeend.carousel",a.proxy(this.swipeend,this)),this.options.keyboard&&this.$element.on(i,a.proxy(this.keydown,this)),a(document).on(this.options.keyboard?[j,i].join(" "):j,"[aria-controls="+this.id+"]",a.proxy(this.click,this))};p.prototype.activeindex=function(){var a=this.$element.find(".carousel-active");return this.$items=a.parent().children("figure"),this.$items.index(a)},p.prototype.cycle=function(c){return c||(this.paused=!1),this.interval&&b.clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=b.setInterval(a.proxy(this.next,this),this.options.interval)),this},p.prototype.to=function(b){var c=this.activeindex(),d=this;return!(b>this.$items.length-1||b<0)&&(this.sliding?this.$element.one(n,function(){d.to(b)}):c===b?this.pause().cycle():this.slide(b>c?"next":"prev",a(this.$items[b])))},p.prototype.pause=function(c){return c||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=b.clearInterval(this.interval),this},p.prototype.next=function(){return!this.sliding&&this.slide("next")},p.prototype.prev=function(){return!this.sliding&&this.slide("prev")},p.prototype.slide=function(b,c){var k,l,d=this.$element.children("figure.carousel-active"),e=c||d[b]("figure"),f=this.interval,g="next"===b,h=g?"left":"right",i=g?"first":"last",j=this;if(f&&this.pause(),!e.length){if(!this.options.wrap)return!1;e=this.$element.children("figure")[i]()}if(e.hasClass("carousel-active"))return this.sliding=!1;if(k=a.Event(m,{relatedTarget:e[0],direction:h}),this.$element.trigger(k),k.isDefaultPrevented())return!1;this.options.lazyImages&&this.options.lazyOnDemand&&this.lazyimages.call(e),this.sliding=!0,f&&this.pause(),this.$element.one(n,function(){if(!j.options.wrap){var a=j.activeindex();j.$items&&a===j.$items.length-1?(j.$nextTrigger.attr({"aria-hidden":!0,hidden:!0}),j.$previousTrigger.removeAttr("aria-hidden").removeAttr("hidden"),j.keyboardTriggered&&(j.$previousTrigger.focus(),j.keyboardTriggered=!1)):j.$items&&0===a?(j.$previousTrigger.attr({"aria-hidden":!0,hidden:!0}),j.$nextTrigger.show().removeAttr("aria-hidden").removeAttr("hidden"),j.keyboardTriggered&&(j.$nextTrigger.focus(),j.keyboardTriggered=!1)):(j.$nextTrigger.removeAttr("aria-hidden").removeAttr("hidden"),j.$previousTrigger.removeAttr("aria-hidden").removeAttr("hidden"),j.keyboardTriggered=!1)}j.$indicators.removeClass("active").eq(j.activeindex()).addClass("active")});var o=function(){j.$items&&j.$items.removeClass("swiping").css({"transition-duration":""}),d.removeClass(["carousel-active",h].join(" ")).attr({"aria-selected":!1,tabIndex:-1}),e.removeClass([b,h].join(" ")).addClass("carousel-active").attr({"aria-selected":!0,tabIndex:0}),j.sliding=!1,l=a.Event(n,{relatedTarget:e[0],direction:h}),j.$element.trigger(l)};return e.addClass(b).redraw(),d.addClass(h),e.addClass(h),this.$items&&this.$items.each(function(){a(this).removeClass("swipe swipe-next").css({left:"",right:"",opacity:""})}),d.onTransitionEnd(o).ensureTransitionEnd(),f&&this.cycle(),this},p.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){var b=a&&a.which;if(b===o.LEFT||b===o.RIGHT)switch(this.keyboardTriggered=!0,a.preventDefault(),a.stopPropagation(),b){case o.LEFT:f?(this.next(),this.$nextTrigger.focus()):(this.prev(),this.$previousTrigger.focus());break;case o.RIGHT:f?(this.prev(),this.$previousTrigger.focus()):(this.next(),this.$nextTrigger.focus())}}},p.prototype.click=function(b){if(b){var c=b.which;if(c&&1!==c){if(c!==o.SPACE&&c!==o.ENTER)return;this.keyboardTriggered=!0}b.preventDefault(),b.stopPropagation();var d=a(b.target);d.hasClass("forward")?this.next():d.is("button")?this.prev():this.to(d.index())}},p.prototype.swipemove=function(a){if(!this.sliding){this.pause();var b=a.delta.x<0,c=b?f?"prev":"next":f?"next":"prev",d=b?f?"last":"first":f?"first":"last",e=this.activeindex(),g=this.$items.eq(e),h=g[c]("figure");if(1!==this.$items.length){if(!h.length){if(!this.options.wrap)return;h=this.$element.children("figure")[d]()}if(this.$items.not(g).not(h).removeClass("swipe swiping swipe-next").css({left:"",right:"",opacity:""}),!h.hasClass("carousel-active")){this.options.lazyImages&&this.options.lazyOnDemand&&this.lazyimages.call(h);var i=g.width(),j=parseFloat(a.delta.x/i*100),k=b?100:-100;f&&(j*=-1),this.$element.addClass("no-transition"),"slide"===this.options.mode?f?(g.addClass("swiping").css({right:j+"%"}),h.addClass("swipe swipe-next").css({right:j-k+"%"})):(g.addClass("swiping").css({left:j+"%"}),h.addClass("swipe swipe-next").css({left:j+k+"%"})):(g.addClass("swipe").css({opacity:1-Math.abs(j/100)}),h.addClass("swipe swipe-next"))}}}},p.prototype.swipeend=function(b){if(!this.sliding&&this.$element.hasClass("no-transition")){var c=b.direction,d="next";if("right"===c&&(d="prev"),this.$element.removeClass("no-transition"),e){var f=this.activeindex(),g=this.$items.eq(f);this.translationDuration||(this.translationDuration=parseFloat(g.css("transition-duration")));var h=g.width(),i=Math.abs(b.delta.x)/h*100,j=b.duration/1e3*100/i,k=(100-i)/100*Math.min(this.translationDuration,j);this.$items.each(function(){a(this).css({"transition-duration":k+"s"})})}this.cycle(),this.slide(d,a(this.$items.filter(".swipe-next")))}},p.prototype.lazyimages=function(){this.data("lazyLoaded")||(this.find("img[data-src]").each(function(){0===this.src.length&&(this.src=this.getAttribute("data-src"))}),this.data("lazyLoaded",!0))};var q=a.fn.carousel;a.fn.carousel=function(b){return this.each(function(){var c=a(this),d=c.data("r.carousel"),e="object"==typeof b?b:null;d||c.data("r.carousel",d=new p(this,e)),"number"==typeof b?d.to(b):"string"==typeof b&&/(cycle|pause|next|prev)/.test(b)||(b=e&&e.slide)?d[b]():d.options.interval&&d.pause().cycle()})},a.fn.carousel.Constructor=p,a.fn.carousel.noConflict=function(){return a.fn.carousel=q,this};var r=function(){a(".carousel").each(function(){var b=a(this),c=b.data("r.carouselLoaded");c||(b.data("r.carouselLoaded",!0),b.carousel(a.getDataOptions(b,"carousel")))})},s=a.debounce(r,500);a(document).on([k,l].join(" "),function(a){"ready"===a.type?r():s()}),b.RESPONSIVE_CAROUSEL=!0}}(jQuery,window,".r.carousel",".data-api"),function(a,b,c,d){"use strict";if(!b.RESPONSIVE_CONDITIONAL){var e="ready"+c+d,f=["domchanged"+c+d,"shown.r.videomodal"+d].join(" "),g=["resize"+c,"orientationchange"+c].join(" "),h="load"+c,i="loaded"+c,j="error"+c,k=function(c,d){this.$element=a(c),this.defaults={xxs:null,xs:null,s:null,m:null,l:null,fallback:null,errorHint:"<p>An error has occured.</p>"},this.cache={},this.options=a.extend({},this.defaults,d),this.currentGrid=null,this.currentTarget=null,this.loading=null,a(b).on(g,a.debounce(a.proxy(this.resize,this),50)),this.resize()};k.prototype.resize=function(){var b=a.support.currentGrid(),c=b.grid,d=b.range;if(!this.options.fallback)for(var e in d)if(d.hasOwnProperty(e)){var f=d[e];this.options[f]||(this.options[f]="fallback",this.cache[f]=this.$element.html())}if(this.currentGrid!==c){this.currentGrid=c;var g=this,k=this.options[c]||this.options.fallback;if(k&&k!==this.currentTarget){this.currentTarget=k;var l=a.Event(h);if(this.$element.trigger(l),this.loading||l.isDefaultPrevented())return;this.loading=!0,this.cache[this.currentGrid]?(this.$element.empty().html(this.cache[this.currentGrid]),this.loading=!1,this.$element.trigger(a.Event(i,{relatedTarget:g.$element[0],loadTarget:k,grid:this.currentGrid}))):this.$element.empty().load(k,null,function(b,d){if("error"===d)return g.$element.trigger(a.Event(j,{relatedTarget:g.$element[0],loadTarget:k,grid:g.currentGrid})),g.$element.html(g.options.errorHint),void(g.loading=!1);var e,f=k.indexOf(" ");f>=0&&(e=a.trim(k.slice(f))),g.cache[c]=e?a("<div>").append(a.parseHTML(b)).find(e).wrap("<div>").parent().html():b,g.loading=!1,g.$element.trigger(a.Event(i,{relatedTarget:g.$element[0],loadTarget:k,grid:g.currentGrid}))})}}};var l=a.fn.conditional;a.fn.conditional=function(b){return this.each(function(){var c=a(this),d=c.data("r.conditional"),e="object"==typeof b?a.extend({},b):null;d||c.data("r.conditional",d=new k(this,e)),"resize"===b&&d.resize()})},a.fn.conditional.Constructor=k,a.fn.conditional.noConflict=function(){return a.fn.conditional=l,this};var m=function(){a(":attrStart(data-conditional)").each(function(){var b=a(this),c=b.data("r.conditionalLoaded");c||(b.data("r.conditionalLoaded",!0),b.conditional(a.getDataOptions(b,"conditional")))})},n=a.debounce(m,500);a(document).on([e,f].join(" "),function(a){"ready"===a.type?m():n()}),b.RESPONSIVE_CONDITIONAL=!0}}(jQuery,window,".r.conditional",".data-api"),function(a,b,c,d){"use strict";if(!b.RESPONSIVE_DISMISS){var e="ready"+c+d,f=["domchanged"+c+d,"shown.r.videomodal"+d].join(" "),g="click",h="dismiss"+c,i="dismissed"+c,j=function(b,c){this.defaults={closeHint:"Click to close"},this.options=a.extend({},this.defaults,c),this.$element=a(b).attr({type:"button"}),this.$target=this.$element.closest(c.target),this.dismissing=null,this.$element.is("button")&&a(b).attr({type:"button"}),this.$target.hasClass("alert")&&this.$target.attr({role:"alert"}),this.$element.find(".visuallyhidden").length||a("<span/>").addClass("visuallyhidden").html(this.options.closeHint).appendTo(this.$element),this.$element.on(g,a.proxy(this.click,this))};j.prototype.close=function(){var b=a.Event(h),c=this.$target,d=this,e=function(){d.dismissing=!1,c.removeClass("fade-out").attr({"aria-hidden":!0,hidden:!0,tabindex:-1}),d.$element.trigger(a.Event(i))};this.$element.trigger(b),this.dismissing||b.isDefaultPrevented()||(this.dismissing=!0,c.addClass("fade-in fade-out").redraw().removeClass("fade-in"),this.$target.onTransitionEnd(e))},j.prototype.click=function(a){a.preventDefault(),this.close()};var k=a.fn.dismiss;a.fn.dismiss=function(b){return this.each(function(){var c=a(this),d=c.data("dismiss");d||c.data("dismiss",d=new j(this,b)),"close"===b&&d.close()})},a.fn.dismiss.Constructor=j,a.fn.dismiss.noConflict=function(){return a.fn.dismiss=k,this};var l=function(){a("button[data-dismiss-target]").each(function(){var b=a(this),c=b.data("r.dismissLoaded");c||(b.data("r.dismissLoaded",!0),b.dismiss(a.getDataOptions(b,"dismiss")))})},m=a.debounce(l,500);a(document).on([e,f].join(" "),function(a){"ready"===a.type?l():m()}),b.RESPONSIVE_DISMISS=!0}}(jQuery,window,".r.dismiss",".data-api"),function(a,b,c,d){"use strict";if(!b.RESPONSIVE_DROPDOWN){var e=b.getComputedStyle&&a.support.transition,f=a.support.rtl,g="ready"+c+d,h=["domchanged"+c+d,"shown.r.videomodal"+d].join(" "),i="click",j="keydown",k="show"+c,l="shown"+c,m="hide"+c,n="hidden"+c,o={SPACE:32,LEFT:37,RIGHT:39},p=function(b,c){this.$element=a(b),this.$target=a(c.target),this.defaults={dimension:"height"},this.options=a.extend({},this.defaults,c),this.$parent=null,this.transitioning=null,this.endSize=null,this.options.parent&&(this.$parent=this.$target.closest(this.options.parent)),this.$parent?this.$parent.attr({role:"tablist","aria-multiselectable":"true"}).find("div:not(.collapse,.accordion-body)").attr("role","presentation"):a(".accordion").find("div:not(.collapse,.accordion-body)").addBack().attr("role","presentation");var d=this.$element.attr("id")||"dropdown-"+a.pseudoUnique(),e=this.$target.attr("id")||"dropdown-"+a.pseudoUnique(),f=!this.$target.hasClass("collapse");this.$element.attr({id:d,role:"tab","aria-controls":e,"aria-selected":f,"aria-expanded":f,tabindex:0}),this.$target.attr({id:e,role:"tabpanel","aria-labelledby":d,"aria-hidden":!f,hidden:!f,tabindex:f?0:-1}),this.$element.on(i,a.proxy(this.click,this)),this.$element.on(j,a.proxy(this.keydown,this))};p.prototype.show=function(){if(!this.transitioning&&!this.$target.hasClass("expand")){this.transitioning=!0;var f,c=this,d=this.options.dimension,g=[];this.$parent&&(g=this.$parent.find(" > [role=presentation] > [role=presentation]").children("[role=tab]"),g=a.grep(g,function(b){var d=a(b).data("r.dropdown"),e=d&&d.$target;return e&&e.hasClass("dropdown-group")&&!e.hasClass("collapse")&&d.$parent&&d.$parent[0]===c.$parent[0]})),this.$target[d](0),e&&(this.$target[d]("auto").attr({"aria-hidden":!1,hidden:!1}),this.$target.find("[tabindex]:not(.collapse)").attr({"aria-hidden":!1,hidden:!1}),f=b.getComputedStyle(this.$target[0])[d],this.$target[d](0).redraw()),this.$target[d](f||""),this.transition("removeClass",a.Event(k),l),g&&g.length&&a.each(g,function(){a(this).dropdown("hide")})}},p.prototype.hide=function(){if(!this.transitioning&&!this.$target.hasClass("collapse")){this.transitioning=!0;var d,c=this.options.dimension;e&&(d=b.getComputedStyle(this.$target[0])[c],this.$target[c](d).redraw()),this.$target.removeClass("expand"),this.$target[c](0),this.transition("addClass",a.Event(m),n)}},p.prototype.toggle=function(){this.transitioning||this[this.$target.hasClass("collapse")?"show":"hide"]()},p.prototype.transition=function(b,c,d){var e=this,f="removeClass"===b,g=function(){var b=a.Event(d);e.$target.removeClass("trans")[e.options.dimension](""),e.$target.attr({"aria-hidden":!f,hidden:!f,tabindex:f?0:-1});var c=a("#"+e.$target.attr("aria-labelledby")).attr({"aria-selected":f,"aria-expanded":f});f&&c.focus(),e.$target.find("[tabindex]:not(.collapse)").attr({"aria-hidden":!f,hidden:!f,tabindex:f?0:-1}),e.transitioning=!1,e.$element.trigger(b)};this.$element.trigger(c),c.isDefaultPrevented()||(this.$target[b]("collapse"),this.$target["show"===c.type?"addClass":"removeClass"]("trans expand"),this.$target.onTransitionEnd(g))},p.prototype.click=function(a){a.preventDefault(),a.stopPropagation(),this.toggle()},p.prototype.keydown=function(b){if(!/input|textarea/i.test(b.target.tagName)){var c=b.which;if(c===o.SPACE||c===o.LEFT||c===o.RIGHT){b.preventDefault(),b.stopPropagation();var d=a(b.target);if(c===o.SPACE)return void this.toggle();var e=this.options.parent?d.closest("[role=tablist]"):d.closest(".accordion"),g=e.find(" > [role=presentation] > [role=presentation]").children("[role=tab]"),h=g.index(g.filter(":focus")),i=g.length;c===o.LEFT?f?h+=1:h-=1:c===o.RIGHT&&(f?h-=1:h+=1),h===i&&(h=0),h<0&&(h=i-1),a(g.eq(h)).data("r.dropdown").show()}}};var q=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("r.dropdown"),e="object"==typeof b?a.extend({},b):null;d||c.data("r.dropdown",d=new p(this,e)),"string"==typeof b&&/(show|hide|toggle)/.test(b)&&d[b]()})},a.fn.dropdown.Constructor=p,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=q,this};var r=function(){a(":attrStart(data-dropdown)").each(function(){var b=a(this),c=b.data("r.dropdownLoaded");c||(b.data("r.dropdownLoaded",!0),b.dropdown(a.getDataOptions(b,"dropdown")))})},s=a.debounce(r,500);a(document).on([g,h].join(" "),function(a){"ready"===a.type?r():s()}),b.RESPONSIVE_DROPDOWN=!0}}(jQuery,window,".r.dropdown",".data-api"),function(a,b,c,d){"use strict";if(!b.RESPONSIVE_MODAL){var e=a(b),f=a("body"),g=a("<div/>").attr({role:"document"}).addClass("videomodal-overlay videomodal-loader fade-out"),h=a("<div/>").addClass("videomodal fade-out").appendTo(g),i=a("<div/>").addClass("videomodal-header fade-out"),j=a("<div/>").addClass("videomodal-footer fade-out"),k=a("<button/>").attr({type:"button"}).addClass("videomodal-close fade-out"),l=a("<button/>").attr({type:"button"}).addClass("videomodal-direction prev fade-out"),m=a("<button/>").attr({type:"button"}).addClass("videomodal-direction next fade-out"),n=a("<div/>").addClass("videomodal-placeholder"),o="ready"+c+d,p="domchanged"+c+d,q=["resize"+c,"orientationchange"+c].join(" "),r="click"+c,s="keydown"+c,t="focusin"+c,u="show"+c,v="shown"+c,w="hide"+c,x="hidden"+c,y="error"+c,z=a.support.rtl,A=a.support.currentGrid(),B={ESCAPE:27,LEFT:37,RIGHT:39},C=0,D=0===b.location.protocol.indexOf("http")?b.location.protocol:"http:",E=new RegExp("//"+b.location.host+"($|/)"),F=/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|ti(ff|f)|webp|svg)((\?|#).*)?$)/i,G=/^#.*$/,H=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,I=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,J=function(c,d){this.$element=a(c),this.defaults={videomodal:null,external:!1,group:null,image:!1,immediate:!1,iframe:!1,iframeScroll:!0,keyboard:!0,touch:!0,next:">",nextHint:"Next ("+(z?"Left":"Right")+" Arrow)",previous:"<",previousHint:"Previous ("+(z?"Right":"Left")+" Arrow)",closeHint:"Close (Esc)",errorHint:"<p>An error has occured.</p>",mobileTarget:null,mobileViewportWidth:"xs",fitViewport:!0},this.options=a.extend({},this.defaults,d),this.title=null,this.description=null,this.isShown=null,this.$group=null,this.options.group&&(this.$group=a(this.options.group)),0===f.length&&(f=a("body")),this.$element.on(r,this.click.bind(this));var e=a.debounce(this.resize.bind(this),15);a(b).off(q).on(q,e),this.options.immediate&&this.show()};J.prototype.click=function(a){a.preventDefault();var c=h.data("currentVideomodal");if(c&&c[0]!==this.$element[0]){var d=function(){b.setTimeout(function(){this.show(!0)}.bind(this),150)}.bind(this);return c.data("r.videomodal").toggleVideomodal(!0,!0),void h.onTransitionEnd(d)}this.show()},J.prototype.show=function(c){if(!this.isShown){var d=a.Event(u);if(this.$element.trigger(d),!d.isDefaultPrevented()){if(this.isShown=!0,this.options.mobileTarget){var f=this.options.mobileViewportWidth;if("number"==typeof f&&f>=e.width())return void(b.location.href=this.options.mobileTarget);if("string"==typeof f){var g=a.inArray(f,A.range);if(A.index<=g&&g>-1)return void(b.location.href=this.options.mobileTarget)}}return c?void this.toggleVideomodal():void this.overlay()}}},J.prototype.hide=function(){this.toggleVideomodal(!0)},J.prototype.overlay=function(){if(a(".videomodal-overlay").length||f.append(g),g.hasClass("fade-in")){var b=function(){h.removeData("currentVideomodal").removeAttr("tabindex"),a.toggleBodyLock(),g.attr("hidden"," "),e.scrollTop(C)}.bind(this);return void g.removeClass("fade-in").onTransitionEnd(b)}void 0===a("html").attr("data-lock")&&(C=e.scrollTop(),a.toggleBodyLock()),g.removeAttr("hidden").redraw().addClass("fade-in").onTransitionEnd(function(){this.toggleVideomodal()}.bind(this))},J.prototype.toggleVideomodal=function(c,d){var e;if(!c)return e=function(){var b=h.find("[autofocus]");f.attr({tabindex:-1}),h.data("currentVideomodal",this.$element).attr({tabindex:0}),b.length?b.focus():h.focus(),a(document).off(t).on(t,this.focus.bind(this)),this.options.keyboard&&a(document).off(s).on(s,this.keydown.bind(this)),this.options.group&&this.options.touch&&h.off("swipe.videomodal").on("swipe.videomodal",!0).off("swipeend.videomodal").on("swipeend.videomodal",this.swipeend.bind(this)),g.off(r).on(r,this.overlayclick.bind(this)),this.$element.trigger(a.Event(v))}.bind(this),this.create(),void h.onTransitionEnd(e).off(r).on(r,this.videomodalclick.bind(this));if(this.isShown){var n=a.Event(w);this.$element.trigger(n),n.isDefaultPrevented()||(this.isShown=!1,g.removeClass("videomodal-loader"),a.each([i,j,k,m,l,h],function(){this.removeClass("fade-in")}),e=function(){return this.$sibling&&this.$sibling.data("r.videomodal")?(this.destroy(!0),this.$element.trigger(a.Event(x)),void b.setTimeout(function(){this.$sibling.data("r.videomodal").show(!0),this.$sibling=null}.bind(this),150)):d?(this.destroy(!0),void this.$element.trigger(a.Event(x))):(this.destroy(),void this.$element.trigger(a.Event(x)))}.bind(this),h.onTransitionEnd(e))}},J.prototype.create=function(){g.addClass("videomodal-loader");var b=function(a){var b=H.exec(a)||H.exec(D+a);return void 0!==b&&!G.test(a)&&(!(!b||!b[2]||I.test(b[1]))&&!E.test(b[2]))},c=function(){this.resize(),a.each([i,j,k,m,l,h],function(){this.addClass("fade-in")}),h.redraw(),g.removeClass("videomodal-loader")}.bind(this),d=this.options.title,e=this.options.description,f=this.options.videomodal,o=this.options.target,p=!G.test(this.options.target),q=b(o),r=!p&&!q,s=this.$group,t=this.options.next+'<span class="visuallyhidden">'+this.options.nextHint+"</span>",u=this.options.previous+'<span class="visuallyhidden">'+this.options.previousHint+"</span>",v=this.options.iframeScroll,w=this.options.image||F.test(o),x=!!(this.options.iframe||p&&q)&&!w,z=a("<div/>").addClass(v?"media media-scroll":"media"),A=a("<div/>").addClass("videomodal-content");if(s){var B=s.filter(function(){return a(this).data("r.videomodal")});B.length&&(m.html(t).prependTo(h),l.html(u).prependTo(h))}if(d||!f){if(d){var C="videomodal-label-"+a.pseudoUnique();i.html('<div class="videomodal-container"><h2 id="'+C+'">'+d+"</h2></div>").appendTo(g.attr({"aria-labelledby":C}))}f||k.html('x <span class="visuallyhidden">'+this.options.closeHint+"</span>").appendTo(g)}if(e&&j.html('<div class="videomodal-container">'+e+"</div>").appendTo(g),r){var J=a(o);this.isLocalHidden=J.is(":hidden"),h.addClass(this.options.fitViewport?"videomodal-container":""),n.detach().insertAfter(J),J.detach().appendTo(A).removeClass("hidden").attr({"aria-hidden":!1,hidden:!1}),A.appendTo(h),c()}else if(x){h.addClass("videomodal-iframe");var K=b(o)&&0!==o.indexOf("http")?D+o:o,L=function(a){var b={youtube:/youtu(be\.com|be\.googleapis\.com|\.be)/i,vimeo:/vimeo/i,vine:/vine/i,instagram:/instagram|instagr\.am/i,getty:/embed\.gettyimages\.com/i};for(var c in b)if(b.hasOwnProperty(c)&&b[c].test(a))return[c,"scaled"].join(" ");return!1};a("<iframe/>").attr({scrolling:v?"yes":"no",allowTransparency:!0,frameborder:0,hspace:0,vspace:0,webkitallowfullscreen:"",mozallowfullscreen:"",allowfullscreen:""}).one("load error",function(){c()}).appendTo(z).attr("src",K+"?autoplay=1");var M=L(o)||"";M||h.addClass("iframe-full"),z.addClass(M).appendTo(h)}else w?(h.addClass("videomodal-image"),a("<img/>").one("load error",function(){c()}).appendTo(h).attr("src",o)):(h.addClass("videomodal-ajax"),
h.addClass(this.options.fitViewport?"videomodal-container":""),A.load(o,null,function(b,d){"error"===d&&(this.$element.trigger(a.Event(y,{relatedTarget:A[0]})),A.html(this.options.errorHint)),A.appendTo(h),c()}.bind(this)))},J.prototype.destroy=function(c){m.detach(),l.detach(),i.empty().detach(),j.empty().detach(),k.detach(),g.removeAttr("aria-labelledby"),this.options.external||h.is(".videomodal-iframe, .videomodal-ajax, .videomodal-image")||(a(this.options.target).addClass(this.isLocalHidden?"hidden":"").attr({"aria-hidden":!!this.isLocalHidden,hidden:!!this.isLocalHidden}).detach().insertAfter(n),n.detach().insertAfter(g)),h.find("iframe").attr("src",""),b.setTimeout(function(){h.removeClass("videomodal-iframe iframe-full videomodal-ajax videomodal-image videomodal-container").css({"max-height":"","max-width":""}).empty()}.bind(this),100),c||this.overlay()},J.prototype.overlayclick=function(b){if(!this.options.videomodal){var c=k[0],d=b.target;if(d!==h[0]&&!a.contains(h[0],d))return d===c?void this.hide():void((d===g[0]||a.contains(g[0],d))&&this.hide())}},J.prototype.videomodalclick=function(a){var b=m[0],c=l[0],d=a.target;return d===b||d===c?(a.preventDefault(),a.stopPropagation(),void this[d===b?"next":"prev"]()):void(this.options.videomodal&&d===h.find(this.options.videomodal)[0]&&(a.preventDefault(),a.stopPropagation(),this.hide()))},J.prototype.focus=function(b){if(b.target!==g[0]&&!a.contains(g[0],b.target)){var c=h.find("a, area, button, input, object, select, textarea, [tabindex]").first();return c.length?c.focus():h.focus(),!1}return!0},J.prototype.keydown=function(a){if(!this.options.videomodal){if(a.which===B.ESCAPE)return void this.hide();if(this.options.group){if(/input|textarea/i.test(a.target.tagName))return;a.which===B.LEFT&&(z?this.next():this.prev()),a.which===B.RIGHT&&(z?this.prev():this.next())}}},J.prototype.swipeend=function(a){return z?void this["right"===a.direction?"prev":"next"]():void this["right"===a.direction?"next":"prev"]()},J.prototype.resize=function(){var b=e.height(),c=i.length&&i.height()||0,d=k.length&&k.outerHeight()||0,f=d>c?d:c,g=j.length&&j.height()||0,l=.95*(b-(f+g));if(a(".videomodal-overlay").css({"padding-top":f,"padding-bottom":g}),h.hasClass("videomodal-image"))h.children("img").css("max-height",l);else if(h.hasClass("videomodal-iframe")){var m=h.find(".media > iframe"),n=m.width(),o=m.height(),p=n/o,q=l*p;m.parent().hasClass("scaled")&&h.css({"max-height":l,"max-width":q})}else{var r=h.children(".videomodal-content");a.each([h,r],function(){this.css({"max-height":l})})}A=a.support.currentGrid()},J.prototype.direction=function(b){if(this.isShown&&this.options.group){var c=this.$group.index(this.$element),d=this.$group.length,e="next"===b?c+1:c-1;"next"===b?(e>=d||e<0)&&(e=0):(e>=d&&(e=0),e<0&&(e=d-1)),this.$sibling=a(this.$group[e]),this.hide()}},J.prototype.next=function(){this.direction("next")},J.prototype.prev=function(){this.direction("prev")};var K=a.fn.videomodal;a.fn.videomodal=function(b){return this.each(function(){var c=a(this),d=c.data("r.videomodal"),e="object"==typeof b?a.extend({},b):{};e.target||(e.target=c.attr("href")),d||c.data("r.videomodal",d=new J(this,e)),"string"==typeof b&&/(show|hide|next|prev)/.test(b)&&d[b]()})},a.fn.videomodal.Constructor=J,a.fn.videomodal.noConflict=function(){return a.fn.videomodal=K,this};var L=function(){a(":attrStart(data-videomodal)").each(function(){var b=a(this),c=b.data("r.videomodalLoaded");c||(b.data("r.videomodalLoaded",!0),b.videomodal(a.getDataOptions(b,"videomodal")))})},M=a.debounce(L,500);a(document).on([o,p,v].join(" "),function(a){"ready"===a.type?L():M()}),b.RESPONSIVE_MODAL=!0}}(jQuery,window,".r.videomodal",".data-api"),function(a,b,c,d){"use strict";if(!b.RESPONSIVE_NAVIGATION){var e=a(b),f="ready"+c+d,g=["domchanged"+c+d,"shown.r.videomodal"+d].join(" "),h="show.r.videomodal"+d,i="click"+c,j="focusin"+c,k="keydown"+c,l="show"+c,m="shown"+c,n="hide"+c,o="hidden"+c,p={SPACE:32,ESCAPE:27},q=function(b){this.$element=a(b).addClass("navigation"),this.defaults={start:"xxs",end:"l"},this.$button=this.$element.children().first(),this.transitioning=!1,this.lastScroll=0,this.$button.length||(this.$button=a("<button/>").text("Menu").prependTo(this.$element));var c=this.$element.attr("id")||"navigation-"+a.pseudoUnique();this.$element.attr({id:c,role:"navigation"}),this.$button.attr({"aria-controls":c,"aria-expanded":!1}),this.$clone=this.$element.clone().removeAttr("id data-navigation").removeClass("canvas-navigation").addClass("visuallyhidden"),this.$clone.children("button").first().remove(),this.$clone.appendTo("body"),this.$button.on(i,this.click.bind(this)),a(document).on(j,this.focus.bind(this)).on(h,function(){this.hide(!0)}.bind(this))};q.prototype.toggle=function(){this[this.$element.hasClass("open")?"hide":"show"]()},q.prototype.show=function(){if(!this.transitioning){this.transitioning=!0;var b=a.Event(l),c=a.Event(m);if(this.$element.trigger(b),!b.isDefaultPrevented()){var d=function(){this.transitioning=!1,this.$button.attr({"aria-expanded":!0}),a(document).on(k,this.keydown.bind(this)),this.$element.trigger(c)}.bind(this);this.lastScroll=e.scrollTop(),a.toggleBodyLock(),this.$element.addClass("open visible").onTransitionEnd(d)}}},q.prototype.hide=function(b){if(!this.transitioning){this.transitioning=!0;var c=a.Event(n),d=a.Event(o);if(this.$element.trigger(c),!c.isDefaultPrevented()){var f=function(){this.$element.removeClass("visible"),this.$button.attr({"aria-expanded":!1}),this.transitioning=!1,a(document).off(k),this.$element.trigger(d)}.bind(this);b||(a.toggleBodyLock(),e.scrollTop(this.lastScroll)),this.$element.removeClass("open").onTransitionEnd(f).ensureTransitionEnd()}}},q.prototype.click=function(){this.toggle()},q.prototype.keydown=function(a){a.which===p.ESCAPE&&this.$element.hasClass("open")&&this.hide()},q.prototype.focus=function(b){if(this.$element.hasClass("open")){if(!b.shiftKey&&b.target!==this.$element[0]&&!a.contains(this.$element[0],b.target))return this.$button.focus(),!1}else if(!b.shiftKey&&(b.target===this.$clone[0]||a.contains(this.$clone[0],b.target)))return this.$button.focus().click(),!1;return!0};var r=a.fn.navigation;a.fn.navigation=function(b){return this.each(function(){var c=a(this),d=c.data("r.navigation");d||c.data("r.navigation",d=new q(this)),"string"==typeof b&&/(show|hide)/.test(b)&&d[b]()})},a.fn.navigation.Constructor=q,a.fn.navigation.noConflict=function(){return a.fn.navigation=r,this};var s=function(){a("nav[data-navigation]").each(function(){var b=a(this),c=b.data("r.navigationLoaded");c||(b.data("r.navigationLoaded",!0),b.navigation())})},t=a.debounce(s,500);a(document).on([f,g].join(" "),function(a){"ready"===a.type?s():t()}),b.RESPONSIVE_NAVIGATION=!0}}(jQuery,window,".r.navigation",".data-api"),function(a,b,c,d){"use strict";if(!b.RESPONSIVE_TABLE){var e="ready"+c+d,f=["domchanged"+c+d,"shown.r.videomodal"+d].join(" "),g="add"+c,h="added"+c,i=function(b){this.$element=a(b).addClass("table-list"),this.$thead=this.$element.find("thead"),this.$tfoot=this.$element.find("tfoot"),this.$tbody=this.$element.find("tbody"),this.$headerColumns=this.$thead.find("th"),this.$footerColumns=this.$tfoot.find("th"),this.$bodyRows=this.$tbody.find("tr"),this.isAdded=null,this.add()};i.prototype.add=function(){if(!this.isAdded){var b=this,c=a.Event(g),d=function(){b.$element.trigger(a.Event(h))};this.$element.trigger(c),c.isDefaultPrevented()||(this.isAdded=!0,a.each(this.$bodyRows,function(){a(this).find("th, td").each(function(c){var d=a(this),e=a(b.$headerColumns[c]).text();if(d.attr("data-thead",e),b.$tfoot.length){var f=a(b.$footerColumns[c]).text();d.attr("data-tfoot",f)}})}),this.$element.redraw().addClass("fade-in"),this.$element.onTransitionEnd(d))}};var j=a.fn.tablelist;a.fn.tablelist=function(b){return this.each(function(){var c=a(this),d=c.data("r.tablelist"),e="object"==typeof b?b:null;d||c.data("r.tablelist",d=new i(this,e)),"string"==typeof b&&d[b]()})},a.fn.tablelist.Constructor=i,a.fn.tablelist.noConflict=function(){return a.fn.tablelist=j,this};var k=function(){a("table[data-table-list]").each(function(){var b=a(this),c=b.data("r.tableLoaded");c||(b.data("r.tableLoaded",!0),b.tablelist(a.getDataOptions(b,{},"tablelist","r")))})},l=a.debounce(k,500);a(document).on([e,f].join(" "),function(a){"ready"===a.type?k():l()}),b.RESPONSIVE_TABLE=!0}}(jQuery,window,".r.tablelist",".data-api"),function(a,b,c,d){"use strict";if(!b.RESPONSIVE_TABS){var e=a.support.rtl,f="ready"+c+d,g=["domchanged"+c+d,"shown.r.videomodal"+d].join(" "),h="click",i="keydown",j="show"+c,k="shown"+c,l={SPACE:32,LEFT:37,RIGHT:39},m=function(b){this.$element=a(b),this.tabbing=null;var c=this.$element.children("ul:first").attr("role","tablist"),d=c.children().attr("role","presentation"),e=this.$element.children(":not(ul)"),f=a.pseudoUnique(),g=c.find("[aria-selected=true]").parent().index(),j=g>-1;d.each(function(b){var c=a(this),d=c.children("a"),h=j&&b===g||!j&&0===b;d.attr({role:"tab",id:"tab-"+f+"-"+b,"aria-controls":"pane-"+f+"-"+b,"aria-selected":!!h,tabindex:0}),e.eq(b).attr({role:"tabpanel",id:"pane-"+f+"-"+b,"aria-labelledby":"tab-"+f+"-"+b,tabindex:h?0:-1})}),a(this.$element).on(h,"ul[role=tablist] > li > [role=tab]",a.proxy(this.click,this)).on(i,"ul[role=tablist] > li > [role=tab]",a.proxy(this.keydown,this))};m.prototype.show=function(b){var c=this.$element.children("ul").find("[aria-selected=true]"),d=c.closest("ul").children(),e=c.parent().index(),f=this;return!(b>d.length-1||b<0)&&(e!==b&&this.tab(e,b,function(b){var c=function(){f.tabbing=!1,b.siblings().addBack().removeClass("fade-out fade-in"),f.$element.trigger(a.Event(k,{relatedTarget:b[0]}))};b.onTransitionEnd(c)}))},m.prototype.tab=function(b,c,d){var e=a.Event(j),f=this.$element,g=f.children("ul").children("li"),h=f.children(":not(ul)"),i=g.eq(c),k=h.eq(b),l=h.eq(c);f.trigger(e),this.tabbing||e.isDefaultPrevented()||(this.tabbing=!0,g.children("a").attr({"aria-selected":!1}),i.children("a").attr({"aria-selected":!0}).focus(),k.addClass("fade-out fade-in"),l.attr({tabIndex:0}).addClass("fade-out"),h.filter(".fade-in").attr({tabIndex:-1}).removeClass("fade-in"),l.redraw().addClass("fade-in"),d.call(this,l))},m.prototype.click=function(b){b.preventDefault(),b.stopPropagation();var c=a(b.target),d=c.parent(),e=d.index();this.show(e)},m.prototype.keydown=function(b){var c=b.which;if(c===l.SPACE||c===l.LEFT||c===l.RIGHT){b.preventDefault(),b.stopPropagation();var d=a(b.target),f=d.parent(),g=f.siblings().addBack(),h=g.length,i=f.index();if(c===l.SPACE)return void this.show(i);i=c===l.LEFT?e?i+1:i-1:e?i-1:i+1,i===h&&(i=0),i<0&&(i=h-1),this.show(i)}};var n=a.fn.tabs;a.fn.tabs=function(b){return this.each(function(){var c=a(this),d=c.data("r.tabs");d||c.data("r.tabs",d=new m(this)),"number"==typeof b&&d.show(b)})},a.fn.tabs.Constructor=m,a.fn.tabs.noConflict=function(){return a.fn.tabs=n,this};var o=function(){a("[data-tabs]").each(function(){var b=a(this),c=b.data("r.tabsLoaded");c||(b.data("r.tabsLoaded",!0),b.tabs())})},p=a.debounce(o,500);a(document).on([f,g].join(" "),function(a){"ready"===a.type?o():p()}),b.RESPONSIVE_TABS=!0}}(jQuery,window,".r.tabs",".data-api");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.