!function(a){"use strict";a.fn.fitVids=function(b){var c={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var d=document.head||document.getElementsByTagName("head")[0],e=document.createElement("div");e.innerHTML='

x

",d.appendChild(e.childNodes[1])}return b&&a.extend(c,b),this.each(function(){var b=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];c.customSelector&&b.push(c.customSelector);var d=".fitvidsignore";c.ignore&&(d=d+", "+c.ignore);var e=a(this).find(b.join(","));e=e.not("object object"),e=e.not(d),e.each(function(){var b=a(this);if(!(b.parents(d).length>0||"embed"===this.tagName.toLowerCase()&&b.parent("object").length||b.parent(".fluid-width-video-wrapper").length)){b.css("height")||b.css("width")||!isNaN(b.attr("height"))&&!isNaN(b.attr("width"))||(b.attr("height",9),b.attr("width",16));var c="object"===this.tagName.toLowerCase()||b.attr("height")&&!isNaN(parseInt(b.attr("height"),10))?parseInt(b.attr("height"),10):b.height(),e=isNaN(parseInt(b.attr("width"),10))?b.width():parseInt(b.attr("width"),10),f=c/e;if(!b.attr("name")){var g="fitvid"+a.fn.fitVids._count;b.attr("name",g),a.fn.fitVids._count++}b.wrap('
').parent(".fluid-width-video-wrapper").css("padding-top",100*f+"%"),b.removeAttr("height").removeAttr("width")}})})},a.fn.fitVids._count=0}(window.jQuery||window.Zepto),jQuery(document).ready(function(a){function b(){if(r.hasClass("open"))r.trigger("close"),r.removeClass("open"),a(this).children("span").text(ct_author_objectL10n.openPrimaryMenu),a(this).attr("aria-expanded","false"),a("#menu-primary-items ul, .menu-unset ul").removeAttr("style"),a(".menu-item-has-children").each(function(){a(this).hasClass("open")&&a(this).removeClass("open")}),g(),d(),a(window).unbind("scroll",k);else{r.addClass("open"),r.trigger("open"),a(this).children("span").text(ct_author_objectL10n.closePrimaryMenu),a(this).attr("aria-expanded","true");var b=window.innerWidth;if(b>549&&b<950){var c=0;s.find(".social-media-icons").length&&(c=s.find(".social-media-icons").find("ul").outerHeight());var e=y.outerHeight(),f=r.outerHeight(),h=u.height(),i=h+f+c+e;i>window.innerHeight&&t.css("min-height",i+"px"),a(window).scroll(k)}}}function c(){var b=a(this).parent();b.hasClass("open")?(b.removeClass("open"),a(this).children("span").text(ct_author_objectL10n.openChildMenu),a(this).attr("aria-expanded","false")):(b.addClass("open"),a(this).children("span").text(ct_author_objectL10n.closeChildMenu),a(this).attr("aria-expanded","true"),A=!1),e(a(this)),g()}function d(){var b=window.innerWidth;if(b>549&&b<950){var c=0;s.find(".social-media-icons").length&&(c=s.find(".social-media-icons").find("ul").outerHeight());var d=y.outerHeight(),e=r.outerHeight();a("#menu-primary").css("top",e+c+24+"px"),u.css("top",e+c+d+48+"px")}else a("#sidebar-primary, #menu-primary").css("top","")}function e(a){var b=window.innerWidth;if(b>549&&b<950){var c=a.next(),d=0;c.children().each(function(){d+=36});var e=u.css("top"),f=t.css("min-height");e=parseInt(e),f=parseInt(f);a.parent().hasClass("open")?(u.css("top",e+d+"px"),t.css("min-height",f+d+"px")):(u.css("top",e-d+"px"),t.css("min-height",f-d+"px"))}}function f(){window.innerWidth>949&&r.hasClass("open")&&b()}function g(){t.css("min-height","");var a=v.height();x.length>0&&(a-=x.outerHeight()),G=r.outerHeight(),G>a&&(a=G),a>window.innerHeight&&t.css("min-height",a.toString()+"px")}function h(){if(C=window.innerWidth,D=a(window).height(),E=a("body").hasClass("admin-bar")?a("#wpadminbar").height():0,F=v.height(),G=r.outerHeight(),window.innerWidth<950){r.removeAttr("style")}}function i(){if(!(950>C)){var b=a(window).scrollTop();G+E>D&&1!=A?b>z?n?(n=!1,B=r.offset().top>0?r.offset().top-E:0,r.attr("style","top: "+B+"px;")):!o&&b+D>=G+r.offset().top&&G+E<=F?(o=!0,r.attr("style","position: fixed; bottom: 0;")):G+E>D&&!o&&(B=r.offset().top>0?r.offset().top-E:0,r.attr("style","top: "+B+"px;")):b0?r.offset().top-E:0,r.attr("style","top: "+B+"px;")):!n&&b>=0&&b+E<=r.offset().top&&(n=!0,r.attr("style","position: fixed;")):n=o=!1:(n=!0,A=!0,r.attr("style","position: fixed;")),z=b}}function j(){h(),i()}function k(){var c=u.offset().top+u.height();a(window).scrollTop()>c+50&&b()}function l(){"object-fit"in document.body.style||a(".featured-image").each(function(){if(!a(this).parent(".entry").hasClass("ratio-natural")){var b=a(this).children("img").add(a(this).children("a").children("img"));if(b.hasClass("no-object-fit"))return;b.addClass("no-object-fit"),b.outerWidth()=200?a("#scroll-to-top").addClass("visible"):a("#scroll-to-top").removeClass("visible")}),a("#scroll-to-top").click(function(b){a("body,html").animate({scrollTop:0},800),a(this).blur()}))}),window.addEventListener("hashchange",function(a){var b=document.getElementById(location.hash.substring(1));b&&(/^(?:a|select|input|button|textarea)$/i.test(b.tagName)||(b.tabIndex=-1),b.focus())},!1);