function updateValue(e,i){e.val(i),null===e.val()&&e.val(i),e.focus(function(){e.val()===i&&e.val("")}),e.blur(function(){null!==e.val()&&""!==e.val()||e.val(i)})}function backgroundImage(e,i){$(e).each(function(){var e=$(this).find("img").first().attr("src");e&&($(this).find("img").first("img").hide(),$(this).css("background","url("+e+")"+i))})}function footerImage(e,i){$(e).each(function(){var e=$(this).find(".footer-background img").first().attr("src");e&&($(this).find(".footer-background img").first("img").hide(),$(this).css("background","url("+e+")"+i))})}function bodyClassToggler(e,i){$(e).on("click",function(){$("body").toggleClass(i)})}function placeHolders(s){$(s).find(".portal-login div, .form-row, .e2ma_signup_form_row").each(function(){if(!$(s).hasClass("fdpc_designready_order_form")&&!($(this).hasClass("form-row--sub-options")||$(this).hasClass("form-row--file")||$(this).hasClass("form-row--date")||$(this).hasClass("form-row--datetime")||$(this).hasClass("form-row--time")||$(this).hasClass("payment--cc-exp")||$(this).parents(".checkout_process, .event-calendar-search__jump").length)){var e=$(this).find(".form-row__label label, .e2ma_signup_form_label"),i=$(this).find('.form-row__controls input[type="text"], .form-row__controls input[type="email"], .form-row__controls input[type="password"], .e2ma_signup_form_element input[type="text"], .e2ma_signup_form_element input[type="email"]'),t=$(this).find("textarea"),n=$.trim(e.text()).replace(/ +(?= )/g,""),o=!1;$(this).hasClass("form-row--required")&&(o=!0),o&&(n+=" *"),n&&(i.length&&($(i).attr("placeholder",n),e.hide(),$(this).find(".form-row__label").hide()),t.length&&($(t).attr("placeholder",n),e.hide(),$(this).find(".form-row__label").hide()),$(this).hasClass("payment--cc-csc")&&$(this).find(".form-row__label").show())}})}function landingImage(e,i){$(e).each(function(){var e=$(this).find(".masthead-container img").first().attr("src");$(this).find(".masthead-container").hide(),$(this).css("background","url("+e+")"+i)})}$(document).ready(function(){0<$("nav.accordian").length&&($("nav.accordian").find("ul").children("li").has("ul").each(function(){$(this).children("a").append('<span class="accordian_toggle"></span>'),$(this).hasClass("nav__list--here")&&($(this).addClass("accordian_open"),$(this).closest("li").children("ul").slideDown())}),$("span.accordian_toggle").click(function(e){e.preventDefault(),$(this).closest("li").hasClass("accordian_open")?$(this).closest("li").removeClass("accordian_open").children("ul").slideUp():($(this).closest("li").siblings().removeClass("accordian_open").children("ul").slideUp(),$(this).closest("li").addClass("accordian_open"),$(this).closest("li").children("ul").slideDown())}))}),$(document).ready(function(){landingImage($(".has-bg-landing"),"center center / cover no-repeat")}),1<$(".spotlight-container ul > li").length?$(".spotlight-container ul").each(function(){$(this).fireSlider({delay:8e3,hoverPause:!0,prev:$(this).parents(".slider__contents").siblings(".slider__controls").find(".slider-nav--prev"),next:$(this).parents(".slider__contents").siblings(".slider__controls").find(".slider-nav--next")})}):$(".spotlight-container .slider__nav").css("display","none");var dropdownWidth,socialWidth,donateWidth,wrapWidth,bps=[{breakpoint:1,show:1,active:1},{breakpoint:640,show:2,active:1},{breakpoint:800,show:3,active:1},{breakpoint:1e3,show:4,active:2}];function logoSizer(){var e=$("header").height(),i=$(".spotlight-overlay").height();$(".spotlight-container .spotlight-overlay").css("padding-top",e),$(".spotlight-container .spotlight--list ul").css("min-height",e+i),$(".masthead-container").css("padding-top",e)}function bottomNavSizer(){(wrapWidth=$(".bottom-nav-container .wrap").width())<dropdownWidth+socialWidth?$("body").delay().addClass("desktop_nav_is_too_wide"):$("body").removeClass("desktop_nav_is_too_wide"),wrapWidth<donateWidth+socialWidth?$("body").addClass("donate_social_is_too_wide"):$("body").removeClass("donate_social_is_too_wide")}1<$(".sponsors-container ul > li").length?$(".sponsors-container ul").fireSlider({active:2,delay:8e3,disableLinks:!1,prev:$(".sponsors-container .slider-nav--prev"),next:$(".sponsors-container .slider-nav--next"),breakpoints:bps}):$(".sponsors-container .slider-controls-nav").css("display","none"),$(window).on("load",function(){$("body").addClass("window_load"),logoSizer(),bottomNavSizer()}),$(".social-media-block img").on("load",function(){socialWidth=$(".bottom-nav-container .social-media-block").outerWidth(),logoSizer(),bottomNavSizer()}),$(window).resize(function(){logoSizer(),bottomNavSizer()}),$(document).ready(function(){"white"===$('meta[name="theme"]').attr("content")&&$("body").addClass("theme_white"),socialWidth=dropdownWidth=0,socialWidth=$(".bottom-nav-container .social-media-block").outerWidth(),donateWidth=$(".bottom-nav-container .donate-block").outerWidth(),$("nav.dropdown > ul > li").each(function(){dropdownWidth+=$(this).outerWidth()}),logoSizer(),bottomNavSizer(),placeHolders(".e2ma_signup_form form"),bodyClassToggler(".mobile-trigger","mobile_nav_is_visible"),bodyClassToggler(".subnav-trigger","subnav_nav_is_visible"),backgroundImage($(".has-bg"),"center center / cover no-repeat"),backgroundImage($(".has-bg__collection li"),"center center / cover no-repeat"),backgroundImage($(".has-bg-li__collection li .collection-item-image"),"center center / cover no-repeat"),footerImage($(".has-bg-footer"),"center center / cover no-repeat"),$("#e2ma_signup_submit_button").attr("value","Sign Up"),$(".subnav-trigger").on("click",function(){$("nav.subnav").slideToggle()}),$(".featured-container ul li").each(function(){var e=$(this).find(".collection-item-label").detach();$(this).find(".collection-item-image").append(e);var i=$(this).find(".collection-item-image > a").attr("href");$(this).find(".collection-item-image").wrap('<a class="collection-link" href="'+i+'"></a>')}),$(".news-container .news-articles .news-article").first().addClass("first--item"),$(".news-container .news-articles .news-article").eq(0).wrap('<div class=".news-article-column first--column"></div>'),$(".news-container .news-articles .news-article").slice(1).wrapAll('<div class=".news-article-column second--column"></div>'),$(".news-article-meta .date-month").each(function(){var e=$(this).text().substring(0,3);$(this).text(e)}),$(".homepage .news-articles .news-article").each(function(){var e=$(this).find(".news-article-title a").attr("href"),i=$(this).find(".news-article-title a").attr("target");e&&i?$(this).append('<div class="news-read-more"><a href="'+e+'" target="'+i+'"></a></div>'):e&&$(this).append('<div class="news-read-more"><a href="'+e+'"></a></div>')}),$(".search-block").each(function(){$(this).append('<div class="search-trigger search-open"><i class="fa fa-search"></i></div>'),$(this).find(".search-form").append('<div class="search-trigger search-close"><?xml version="1.0" ?><svg enable-background="new 0 0 100 100" id="Layer_1" version="1.1" viewBox="0 0 100 100" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><polygon points="77.6,21.1 49.6,49.2 21.5,21.1 19.6,23 47.6,51.1 19.6,79.2 21.5,81.1 49.6,53 77.6,81.1 79.6,79.2   51.5,51.1 79.6,23 "/></svg></div>')}),$(".search-block .search-trigger").on("click",function(){$("body").toggleClass("search_is_visible"),$(".search-block input").focus()}),$(".spotlight-container ul > li").length<2&&$(".spotlight-container .slider-controls-nav").css("display","none"),$(".sponsors-container ul > li").length<2&&($(".sponsors-container .slider__nav").css("display","none"),$(".sponsors-container ul").addClass("no-sliding"))});