function setHeaderHeight(n){if($(".mainLogo").css("min-height",$(".mainLogo img").outerHeight()),n==="desktop"){var t=$headerInner.outerHeight();$headerSpacing.css("min-height",t);$(".stayInformedFormStickyHeader12").length>0?$headerSpacing.css("min-height",t+20):$(".stayInformedStyles").length>0&&$("#siteFooter .stayInformedStyles").length===0&&$headerSpacing.css("min-height",t+20)}}function swapImageRows(){if($whitneyBelowFeatureRow.length>1)$(".whitneyImageContainer").on("click",function(){$whitneyBelowFeatureRow.toggleClass("currentRow hiddenRow")})}function footerMobileNavigation(n){$(".mobileMenuButtonFooter").on("click",function(n){n.stopImmediatePropagation();$(this).toggleClass("open");$(".footerMobileNavigation").toggleClass("showNav").slideToggle(750)});(!$(".touch").length>0||n!=="767"||n!=="640")&&($(".mobileMenuButtonFooter").removeClass("open"),$(".footerLinksPhone").css({display:"",overflow:"visible"}))}function sameHeightFooter3(n,t,i){var u=i.outerHeight(),r=t.outerHeight();n!="767"&&n!="640"?u<=r?i.css("min-height",r):i.css("min-height",""):i.css("min-height","")}var $whitneyBelowFeatureRow=$(".whitneyBelowSliderFeatureRow"),$headerInner=$("#siteHeadInner"),$headerSpacing=$("#headerSpacing"),$nav=$("#navigation"),$body=$("body"),$stayInformedContour=$(".stayInformedForm .contour"),$stayInformedText=$(".stayInformedForm .stayInformedText"),$stayInformedClose=$(".stayInformedClose"),timer,width=$(window).width(),height=$(window).height();$(function(){updateMobileDropdowns($(".navDropdown, .subNavDropdown"));setNavClassShared($("#topLinksList"),!0);setHeaderHeight(currentMediaQuery);navigation.handleNavigation(currentMediaQuery);stayInformed.initializeForm(currentMediaQuery);swapImageRows()});$(window).on("resize",function(){stayInformed.checkForm(currentMediaQuery);setHeaderHeight(currentMediaQuery);($(window).width()!=width||$(window).height()!=height)&&(width=$(window).width(),height=$(window).height(),navigation.handleNavigation(currentMediaQuery));$(".siteFooter9").length==0&&($(".stayInformedFormStickyHeader12").length>0?$("#siteHeader").css("margin-top",$(".stayInformedFormStickyHeader12").height()):$(".stayInformedStyles").length>0)});$(window).on("load",function(){setHeaderHeight(currentMediaQuery)});var stayInformed={initializeForm:function(n){this.openContourForm();this.openContourFormMobile();this.checkForm(n)},openContourForm:function(){$(".stayInformedForm .contourField").on("click",function(){$(".stayInformedForm .contourField").animate({width:"115px",marginLeft:"5px",marginRight:"5px"},{complete:function(){$(".siteFooter9").length==0&&($(".stayInformedFormStickyHeader12").length>0?$(window).outerWidth()<=1024&&$("#siteHeader").css("margin-top",$(".stayInformedFormStickyHeader12").height()):$(".stayInformedStyles").length>0)}})})},openContourFormMobile:function(){if($(".stayInformedForm .contourMessageOnSubmit").length===0){$stayInformedText.on("click",function(){$(this).parent().addClass("open");$stayInformedContour.slideDown()});$stayInformedClose.on("click",function(){$(this).parent().removeClass("open");$stayInformedContour.slideUp()})}},resizeContourForm:function(n){var t=n==="767"||n==="640";t?this.openContourFormMobile():t||($stayInformedText.unbind("click"),$stayInformedClose.unbind("click"),$(".stayInformedForm").removeClass("open"),$stayInformedContour.css({display:"",overflow:""}))},checkForm:function(n){$(".stayInformedForm .contourMessageOnSubmit").length>0?$(".stayInformedForm").addClass("submitedForm"):this.resizeContourForm(n)}},navigation={handleNavigation:function(n){if(n!=="767"&&n!=="640"){if($body.hasClass("desktopNavigation"))return this.secondLevelNavigationPosition(),!1;this.unBindPhoneNavigation();$body.addClass("desktopNavigation");preventNavigationContainerClicks();this.secondLevelNavigationPosition();this.bindDesktopNavigation()}else{if($body.hasClass("phoneNavigation"))return navigation.setMinHeightNav(),!1;$body.addClass("phoneNavigation");this.unBindDesktopNavigation();this.bindPhoneNavigation()}return!1},bindPhoneNavigation:function(){$(".mobileMenuButton").on("click",function(){$(this).toggleClass("open");$nav.slideToggle(500,function(){navigation.setMinHeightNav()})});$(".hasDrop:not(.noMobileDrop) > a").on("touchend click",function(n){n.preventDefault();n.stopImmediatePropagation();$(".hasDrop > a").attr("aria-expanded","false");$(this).parent().toggleClass("displayDrop");$(this).parent().hasClass("displayDrop")&&$(this).attr("aria-expanded","true");$(this).next().slideToggle(500,function(){navigation.setMinHeightNav()}).addClass("openNav");$(this).parent().siblings().removeClass("displayDrop").find(".openNav").slideUp(500,function(){navigation.setMinHeightNav()}).removeClass("openNav")})},unBindPhoneNavigation:function(){$(".openNav").removeClass("openNav");$(".subNavDropdown, .navDropdown").css({overflow:"",display:"",height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""});$nav.css({overflow:"",display:""});$(".hasDrop").removeClass("displayDrop");$(".hasDrop > a").attr("aria-expanded","false");$(".hasDrop > a").off("touchend click");$("#container").css("min-height","");$(".mobileMenuButton").off("click").removeClass("open")},bindDesktopNavigation:function(){var n="displayDrop",i=!1,r,u,f,t;if($(".touch").length>0){r="click";"ontouchstart"in document.documentElement?r="touchend":(i=!0,n="displayDrop touched");$(".hasDrop.mainNavLiItem > a").on(r,function(t){return(t.preventDefault(),t.stopImmediatePropagation(),clearTimeout(timer),$(this).parent().hasClass("displayDrop"))?($(this).parent().removeClass(n),$(this).attr("aria-expanded","false"),!1):($(".hasDrop > a").attr("aria-expanded","false"),$(this).attr("aria-expanded","true"),$(this).parent().addClass(n).siblings().removeClass(n),!1)});$(".hasDrop.secondLevelLi > a").on(r,function(n){if(n.preventDefault(),n.stopImmediatePropagation(),$(this).parent().hasClass("subNavOpened"))return $(this).parent().removeClass("subNavOpened").find(".subNavDropdown").stop().animate({height:0},1100),!1;var t=0;return $(this).parent().find(".subNavDropdown").children().each(function(){t+=$(this).outerHeight()}),$(this).parent().addClass("subNavOpened").find(".subNavDropdown").stop().animate({height:t},750),!1})}$(".hasDrop.mainNavLiItem").on("mouseenter",function(){var t=$(this);i?timer=setTimeout(function(){t.addClass(n);t.find("a").first().attr("aria-expanded","true")},150):(u=t.text().trim(),window.clearTimeout(f),$(".hasDrop > a").attr("aria-expanded","false"),t.find("a").first().attr("aria-expanded","true"),t.addClass(n).siblings().removeClass(n))}).on("mouseleave",function(){var t=$(this);t.find("a").first().attr("aria-expanded","false");i?timer=setTimeout(function(){t.removeClass(n)},150):(u="",f=window.setTimeout(function(){u!=t.text().trim()&&t.removeClass(n)},750))});t=0;$(".hasDrop.secondLevelLi").on("mouseenter",function(){var n=0;t=0;$(this).find("a").first().attr("aria-expanded","true");$(this).find(".subNavDropdown").children().each(function(){(!$(this).hasClass("dropDownTouchOnly")||i)&&(n+=$(this).outerHeight(),t++)});$(this).hasClass("subNavOpened")||$(this).find(".subNavDropdown").stop().animate({height:n},450+1*t)}).on("mouseleave",function(){$(this).find("a").first().attr("aria-expanded","false");t=$(this).find("li:not(.dropDownTouchOnly)").length;$(this).removeClass("subNavOpened").find(".subNavDropdown").stop().animate({height:0},450+1*t)})},unBindDesktopNavigation:function(){$body.removeClass("desktopNavigation");$(".subNavDropdown, .navDropdown").css({overflow:"",display:"",height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""});$(".hasDrop").off("mouseenter mouseleave");$(".hasDrop > a").off("touchend click")},secondLevelNavigationPosition:function(){var n=$(window).width(),t=238;$(".mainNav > li.hasDrop").each(function(){var i=$(this).offset(),r=i.left+t;r>n?$(this).find(".navDropdown").addClass("dropLeft"):$(this).find(".navDropdown").removeClass("dropLeft")})},setMinHeightNav:function(){if($(".mobileMenuButton").hasClass("open")){var n=$(".navigationHolder").offset().top+$(".navigationHolder").outerHeight();$("#container").css("min-height",n)}else $("#container").css("min-height","")}},$rightColTop=$(".topFooterRight"),$rightColBot=$(".bottomFooterRight "),$leftColTop=$(".topFooterLeft"),$leftColBot=$(".bottomFooterLeft");$(function(){footerMobileNavigation(currentMediaQuery);sameHeightFooter3(currentMediaQuery,$leftColTop,$rightColTop);sameHeightFooter3(currentMediaQuery,$leftColBot,$rightColBot)});$(window).on("resize",function(){footerMobileNavigation(currentMediaQuery);sameHeightFooter3(currentMediaQuery,$leftColTop,$rightColTop);sameHeightFooter3(currentMediaQuery,$leftColBot,$rightColBot)})