function filtersDisplay(){$(".dateFilterOptions").show().parent().children("#filterDate").find(">.fa:first-child").removeClass("fa-chevron-down").addClass("fa-chevron-up");$(".sortOptions").show().parent().children("#filterSort").find(">.fa:first-child").removeClass("fa-chevron-down").addClass("fa-chevron-up");$(".categoryFilterOptions").show().parent().children("#filterCategory").find(">.fa:first-child").removeClass("fa-chevron-down").addClass("fa-chevron-up");$(".tagFilterOptions").show().parent().children("#filterTag").find(">.fa:first-child").removeClass("fa-chevron-down").addClass("fa-chevron-up")}function getParameterByName(n,t){t||(t=window.location.href);n=n.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+n+"(=([^&#]*)|&|#|$)"),i=r.exec(t);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null}function mediaQueryHeader(){var n=$("#header").outerHeight(!0),t=$(".desktopMenu").css("display");$(".desktopMenu").css("max-width")=="none"?($(".desktopMenu").css("margin-top","0"),$(".accountMobile").css("margin-top","0")):t=="none"?$(".accountMobile").css("margin-top",n):$(".desktopMenu").css("margin-top",n)}function search(){var n=document.getElementById("searchBox"),t;n!==undefined&&n!==null&&(t=n.value,t!==""&&(window.location.href="/search-results?query="+t))}function searchDT(){var n=document.getElementById("dtSearchBox"),t;n!==undefined&&n!==null&&(t=n.value,t!==""&&(window.location.href="/search-results?query="+t))}function categoryHeightResize(){var i=0,r=0,u,n,t,f;for($("div.categorySubArticles .content").each(function(){$(this).outerHeight(!0)>i&&(i=$(this).height())}),$("div.categorySubArticles .content").height(i),$(".categorySubArticles").each(function(){$(this).outerHeight(!0)>r&&(r=$(this).height())}),$(".categorySubArticles").height(r),u=$(".categoryArticleSnippets .content"),n=0;n<u.length;n+=3)t=0,f=u.slice(n,n+3),f.each(function(){var n=$(this).height();n>t&&(t=n)}),f.each(function(){$(this).height(t)})}function newsSnippetsHeight(){for(var f=$(".relatedStories .newsSnippetContainer .content"),e=$("#relatedArticles .newsSnippetContainer .content"),t,r,i,u,n=0;n<f.length;n+=2)t=0,r=f.slice(n,n+2),r.each(function(){var n=$(this).height();n>t&&(t=n)}),r.each(function(){$(this).height(t)});for(n=0;n<e.length;n+=2)i=0,u=e.slice(n,n+2),u.each(function(){var n=$(this).height();n>i&&(i=n)}),u.each(function(){$(this).height(i)})}function homepageArticleHeightResize(){var i=0,r=0,u,n,t,f;for($(".homepageSubArticles .content").each(function(){$(this).outerHeight(!0)>i&&(i=$(this).height())}),$(".homepageSubArticles .content").height(i),$(".homepageSubArticles").each(function(){$(this).outerHeight(!0)>r&&(r=$(this).height())}),$(".homepageSubArticles").height(r),u=$(".homepageArticleSnippets .content"),n=0;n<u.length;n+=3)t=0,f=u.slice(n,n+3),f.each(function(){var n=$(this).height();n>t&&(t=n)}),f.each(function(){$(this).height(t)})}function topPanelHeights(){function n(){var n=parseInt($(window).outerWidth(!0),10);n<=980?$(".topPanelContainer").imagesLoaded(function(){$(".topPanelContainer").not(".slick-initialized").slick({speed:300,slidesToShow:1,infinite:!0,dots:!0,variableWidth:!1})}):($(".topPanelContainer").height(""),$(".topPanelContainer").hasClass("slick-initialized")&&$(".topPanelContainer").slick("unslick"))}n()}var resizeTimerSearch,scrollPos,savedScrollPos,senseSpeed,previousScroll,didScroll,hasFocus,resizeTimerSiteHeader,resizeTimerCategory,resizeTimerHomepage,resizeTimerTopPanel;$("#txtSearchTerm").keyup(function(n){n.keyCode==13&&$("#btnSearchAgain").click()});$("#filterCategory").click(function(){var n=$(this).parent().children(".categoryFilterOptions").css("display");n=="none"?($(this).find(".fa").removeClass("fa-chevron-down").addClass("fa-chevron-up"),$(".categoryFilterOptions").slideDown("slow","swing")):($(this).find(".fa").removeClass("fa-chevron-up").addClass("fa-chevron-down"),$(".categoryFilterOptions").slideUp("slow","swing"))});$("#filterTag").click(function(){var n=$(this).parent().children(".tagFilterOptions").css("display");n=="none"?($(this).find(".fa").removeClass("fa-chevron-down").addClass("fa-chevron-up"),$(".tagFilterOptions").slideDown("slow","swing")):($(this).find(".fa").removeClass("fa-chevron-up").addClass("fa-chevron-down"),$(".tagFilterOptions").slideUp("slow","swing"))});$("#filterDate").click(function(){var n=$(this).parent().children(".dateFilterOptions").css("display");n=="none"?($(this).find(".fa").removeClass("fa-chevron-down").addClass("fa-chevron-up"),$(".dateFilterOptions").slideDown("slow","swing")):($(this).find(".fa").removeClass("fa-chevron-up").addClass("fa-chevron-down"),$(".dateFilterOptions").slideUp("slow","swing"))});$("#filterSort").click(function(){var n=$(this).parent().children(".sortOptions").css("display");n=="none"?($(this).find(".fa").removeClass("fa-chevron-down").addClass("fa-chevron-up"),$(".sortOptions").slideDown("slow","swing")):($(this).find(".fa").removeClass("fa-chevron-up").addClass("fa-chevron-down"),$(".sortOptions").slideUp("slow","swing"))});$(".showFiltersButton").click(function(){$(".showFiltersButton").text()=="Hide filters"?$(".showFiltersButton").text("Show filters"):$(".showFiltersButton").text("Hide filters");filtersDisplay();$("#searchFiltersContainer").slideToggle("slow")});$(window).resize(function(){clearTimeout(resizeTimerSearch);resizeTimerSearch=setTimeout(function(){var n=parseInt($(window).outerWidth(!0),10);n<600?($(".showFiltersButton").css("display","inline-block"),$("#searchFiltersContainer").css("display")=="block"?($(".showFiltersButton").text("Show filters"),$("#searchFiltersContainer").hide()):$(".showFiltersButton").text("Show filters")):($(".showFiltersButton").css("display","none"),$("#searchFiltersContainer").show(),filtersDisplay())},250)});$(document).ready(function(){var n=parseInt($(window).outerWidth(!0),10);n<600?($(".showFiltersButton").css("display","inline-block"),$("#searchFiltersContainer").hide()):($(".showFiltersButton").css("display","none"),$("#searchFiltersContainer").show());filtersDisplay()});$(document).ready(function(){var t=600,n=300,i=parseInt($(window).outerWidth(!0),10);i<=980&&$(function(){var i;$(window).scroll(function(){clearTimeout(i);i=setTimeout(function(){$(this).scrollTop()>t?$(".back-to-top").fadeIn(n):$(".back-to-top").fadeOut(n)},300)})});$(".back-to-top").click(function(t){return t.preventDefault(),$("html, body").animate({scrollTop:0},n),!1});$(".paywallMessage").css("display")=="none"||$(".paywallMessage").css("display")==undefined?$(".back-to-top").css("bottom","35px"):$(".back-to-top").css("bottom","105px")});var isiDevice=/ipad|iphone|ipod/i.test(navigator.userAgent.toLowerCase()),expandDiv=document.getElementById("srchBar"),inputSearch=document.getElementById("searchBox"),searchIcon=document.getElementById("faSearch"),wrapper=document.querySelector(".measuringWrapper");if(isiDevice){function expandSearch(){expandDiv.clientHeight?(expandDiv.style.height=0,$(searchIcon).fadeIn(100)):(expandDiv.style.height=wrapper.clientHeight+"px",$(searchIcon).fadeOut(100))}}else function expandSearch(){expandDiv.clientHeight?(expandDiv.style.height=0,$(searchIcon).fadeIn(100)):(expandDiv.style.height=wrapper.clientHeight+"px",$(searchIcon).fadeOut(100),$(inputSearch).focus(),$(window).scrollTop(savedScrollPos),hasFocus=!0)}scrollPos=$(document).scrollTop();savedScrollPos=scrollPos;$(window).scroll(function(){scrollPos=$(document).scrollTop();savedScrollPos=scrollPos});$("#searchBox").focusout(function(){$("#srchBar").css("height",0);$("#faSearch").fadeIn(100)});senseSpeed=5;previousScroll=0;$(window).scroll(function(){didScroll=!0;var n=document.getElementById("srchBar");n.clientHeight==0&&$("#faSearch").fadeIn(100)});setInterval(function(){didScroll&&(didScroll=!1)},200);$(document).ready(function(){$(".desktopMenu a").click(function(){$(this).parent().children().removeClass("active");$(this).toggleClass("active")});var t=110,n=300,i=$(".accountContainer .content");$(function(){var i;$(window).scroll(function(){clearTimeout(i);i=setTimeout(function(){$(this).scrollTop()>=t?$(".topPanelImg").fadeIn(n):$(".topPanelImg").fadeOut(n)},100)})})});$(window).on("load",function(){mediaQueryHeader()});$(window).resize(function(){clearTimeout(resizeTimerSiteHeader);resizeTimerSiteHeader=setTimeout(function(){mediaQueryHeader()},250)});$(document).ready(function(){function n(){var n=$(this).attr("src");$(this).parent().css("display","none");$(this).parent().parent().find(".content").css("width","100%")}function t(){var n=$(".articleImage").find("img").attr("src");(n===undefined||n===null||n==="")&&($(".articleImage").css("display","none"),$(".articleImageContent").css("display","none"))}function i(){function i(){var t=$("#articleName").text(),i;t=$.trim(t);i=$(".share").css("text-transform");t.length>37&&n>0&&i=="lowercase"&&$(".share").addClass("shareAltMulti").removeClass("share");t.length==0&&$(".by").css("display","none")}var t=$(".postedByImage").children("img"),n;$.fn.hasAttr=function(n){return this.attr(n)!==undefined};n=0;n=$(t).hasAttr("src")?$(t).attr("src").length:0;n<1&&($(".postedByImage").css("display","none"),$(".postedByAuthor").css("padding-left","0"),$(".share").addClass("shareAlt").removeClass("share"));i()}$(".newsSnippetContainer, .topFeature, .topComment").find("img").each(function(){var t=$(this).attr("src");t.length<1&&(n(),n.call(this))});i();t();var r=parseInt($(window).outerWidth(!0),10);r<=450&&$(".inlineImageContainer").css("max-width","").find("img").css("margin","0 auto")});$(window).on("load",function(){var n=parseInt($(window).outerWidth(!0),10);n>=600&&(categoryHeightResize(),newsSnippetsHeight())});$(window).resize(function(){clearTimeout(resizeTimerCategory);resizeTimerCategory=setTimeout(function(){$("div.categorySubArticles .content").css("height","auto");$(".categorySubArticles").css("height","auto");$(".categoryArticleSnippets .content").css("height","auto");$(".relatedStories .newsSnippetContainer .content").css("height","auto");$("#relatedArticles .newsSnippetContainer .content").css("height","auto");var n=parseInt($(window).outerWidth(!0),10);n>=600&&(categoryHeightResize(),newsSnippetsHeight())},250)});$(document).ready(function(){clearTimeout(resizeTimerHomepage);resizeTimerHomepage=setTimeout(function(){$(".homepageSubArticles .content").css("height","auto");$(".homepageSubArticles").css("height","auto");$(".homepageArticleSnippets .content").css("height","auto");var n=parseInt($(window).outerWidth(!0),10);n>=600&&homepageArticleHeightResize()},950)});$(window).resize(function(){clearTimeout(resizeTimerHomepage);resizeTimerHomepage=setTimeout(function(){$(".homepageSubArticles .content").css("height","auto");$(".homepageSubArticles").css("height","auto");$(".homepageArticleSnippets .content").css("height","auto");var n=parseInt($(window).outerWidth(!0),10);n>=600&&homepageArticleHeightResize()},250)});$(document).ready(function(){topPanelHeights()});$(window).resize(function(){clearTimeout(resizeTimerTopPanel);resizeTimerTopPanel=setTimeout(function(){topPanelHeights()},250)})