(function(n,t,i){var r=n(t),u=n(i);u.ready(function(){function u(){var i=n(".content").css("min-height",0),t=n(".sidebar").css("min-height",0);i.outerHeight()>t.outerHeight()?t.css("min-height",i.outerHeight()-(t.outerHeight()-t.height())):i.css("min-height",t.outerHeight())}n("body").toggleClass("touch","ontouchstart"in i.body).toggleClass("no-touch",!("ontouchstart"in i.body));n(".back-top").on("click",function(t){n("html, body").animate({scrollTop:0},700);t.preventDefault()});n(".popup-open").fancybox({maxWidth:800,maxHeight:600,fitToView:!1,width:"70%",height:"70%",autoSize:!1,closeClick:!1,helpers:{overlay:{locked:!1}}});n(".book").hover(function(){n(this).addClass("flip")},function(){n(this).removeClass("flip")});n(".search-trigger").on("click",function(t){n(".search-primary-alpha").toggleClass("expanded");t.preventDefault()});r.width()>991&&n(".nav.nav-pills > li").hover(function(){n(this).addClass("open")},function(){n(this).removeClass("open")});u();n(".select").selectpicker();r.load(function(){u()});r.resize(function(){u()});n("ul.dropdown-menu.hidden-lg.hidden-md").each(function(){$this=n(this);$listItems=$this.html();$clone=n('<div class="dropdown-menu hidden-sm hidden-xs cols-3" />');$clone.append(n('<div class="cols" />').append(n('<div class="col" />').append(n("<ul />").append($listItems))));$clone.insertBefore($this)});n(".search-primary button[type=button]").click(function(){$this=n(this);$this.parent().find("input[type=submit]").click()});n(i).on("click",function(t){n(t.target).closest("#nav-holder").length||n("#nav-holder.in").removeClass("in")});n("section.section-blog").on("DOMSubtreeModified propertychange",function(){u()});var f=n(".videoWrapper iframe[src^='https://www.youtube.com'], .videoWrapper iframe[src^='//player.vimeo.com']"),e=n("body");f.each(function(){n(this).data("aspectRatio",this.height/this.width).removeAttr("height").removeAttr("width")});n(t).resize(function(){var t=e.width();f.each(function(){var i=n(this);i.width(t).height(t*i.data("aspectRatio"))})}).resize()})})(jQuery,window,document)