function updateValue(t,e){t.val(e),null===t.val()&&t.val(e),t.focus(function(){t.val()===e&&t.val("")}),t.blur(function(){null!==t.val()&&""!==t.val()||t.val(e)})}function backgroundImage(t,e,i){$(t).each(function(){var t=$(this).find("img").first().attr("src");t&&(1==i?$(this).find("img").first("img").hide():$(this).find("img").parent(".image, .spotlight-image").hide(),$(this).css("background","url("+t+")"+e))})}function bodyClassToggler(t,e,i){$(t).on("click",function(){switch(i){case"add":$("body").addClass(e);break;case"remove":$("body").removeClass(e);break;default:$("body").toggleClass(e)}})}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, .catalogs--pageflex").length)){var t=$(this).find(".form-row__label label, .e2ma_signup_form_label"),e=$(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"]'),i=$(this).find("textarea"),n=$.trim(t.text()).replace(/ +(?= )/g,""),a=!1;$(this).hasClass("form-row--required")&&(a=!0),a&&(n+=" *"),n&&(e.length&&($(e).attr("placeholder",n),t.hide(),$(this).find(".form-row__label").hide()),i.length&&($(i).attr("placeholder",n),t.hide(),$(this).find(".form-row__label").hide()),$(this).hasClass("payment--cc-csc")&&$(this).find(".form-row__label").show())}})}function textWrapper(t,e,i,n){$(t).each(function(){$(this).find(e).html(function(t,e){0<=$(this).text().indexOf(i)&&(splitText=$(this).text().split(i),formattedText=splitText[0]+'<span class="'+n+'">'+splitText[1]+"</span>",$(this).html(formattedText))})})}function initCounter(){$(".fast-facts-container .collection-item-description p").each(function(){-1!=$(this).html().indexOf("%")?($(this).attr("data-type","percent"),$(this).attr("data-number",$(this).html().replace("%","")),$(this).html("0")):-1!=$(this).html().indexOf("$")?($(this).attr("data-type","dollar"),$(this).attr("data-number",$(this).html().replace("$","")),$(this).html("0")):$(this).html().match(/^([a-z\(\)]+)$/i)?$(this).attr("data-type","alpha"):($(this).attr("data-type","none"),$(this).attr("data-number",$(this).html().replace(/,|$/g,"")),$(this).html("0"))})}function counter(t){var e,i=$(".collection-item-description p");e=674<$(window).width()?1e3:0,t.each(function(){i.each(function(){var a=$(this),t=a.attr("data-number"),s=a.attr("data-type");$({value:0}).animate({value:t},{duration:e,easing:"swing",step:function(t,e){var i=Math.round(t);if("dollar"==s||"none"==s){var n=i.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,");"none"==s?a.html(n):"dollar"==s&&a.html("$"+n)}else"percent"==s&&a.html(i+"%")}})})})}function landingImage(t,e){$(t).each(function(){var t=$(this).find(".masthead-container img").first().attr("src");$(this).find(".masthead-container").hide(),$(this).css("background","url("+t+")"+e)})}function escapr(e,i){$(document).keyup(function(t){27==t.keyCode&&$(e).removeClass(i)})}function focusr(t,e){t.on("click",function(){e.focus()})}$(document).ready(function(){0<$("nav.accordion").length&&($("nav.accordion").find("ul").children("li").has("ul").each(function(){$(this).children("a").append('<span class="accordion_toggle"></span>'),$(this).hasClass("nav__list--here")&&($(this).addClass("accordion_open"),$(this).closest("li").children("ul").slideDown())}),$("span.accordion_toggle").click(function(t){t.preventDefault(),$(this).closest("li").hasClass("accordion_open")?$(this).closest("li").removeClass("accordion_open").children("ul").slideUp():($(this).closest("li").siblings().removeClass("accordion_open").children("ul").slideUp(),$(this).closest("li").addClass("accordion_open"),$(this).closest("li").children("ul").slideDown())}))}),function(a,i,e,t){function n(t,e,i){this.$el=a(t),this.selector=i;var n={activeClass:"desktop-nav-is-too-wide",children:[],childrenWidth:0,targets:[a("body")],minWidth:0};this.options=a.extend({},n,e),this.init()}n.prototype={init:function(){var t=this;0===t.options.children.length&&t.options.children.push(t.$el.children()),t.initEvents(),t.checkSize()},initEvents:function(){var t=this;a(i).resize(function(){t.checkSize()}),a(i).on("load",function(){t.checkSize()}),a(e).ready(function(){t.getChildren(),t.checkSize()})},getChildren:function(){var i=this;i.options.childrenWidth=0,a.each(i.options.children,function(t,e){e.each(function(){i.options.childrenWidth+=a(this).outerWidth()})})},checkSize:function(){var t=this,e=t.$el.width();a(i).width()>t.options.minWidth?t.options.childrenWidth>=e?t.updateClasses("add"):t.updateClasses("remove"):t.updateClasses("add")},updateClasses:function(i){var n=this;a.each(n.options.targets,function(t,e){"remove"==i?e.removeClass(n.options.activeClass):e.addClass(n.options.activeClass)})}},a.fn.navChecker=function(t){var e=this.selector;return this.each(function(){a.data(this,"navChecker")||a.data(this,"navChecker",new n(this,t,e))})}}(jQuery,window,document),1<$(".spotlight-container ul > li").length&&$(".spotlight-container ul").each(function(){$(this).fireSlider({delay:8e3,hoverPause:!0,pager:$(".spotlight-container .slider-controls-pager"),prev:$(this).parents(".slider__contents").siblings(".slider__controls").find(".slider-nav--prev"),next:$(this).parents(".slider__contents").siblings(".slider__controls").find(".slider-nav--next")})});var 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}];1<$(".logos-container .collection--list ul > li").length&&$(".logos-container .collection--list ul").fireSlider({active:2,delay:8e3,hoverPause:!0,disableLinks:!1,prev:$(".logos-container").find(".slider-nav--prev"),next:$(".logos-container").find(".slider-nav--next"),breakpoints:bps}),initCounter(),$(document).ready(function(){landingImage($(".has-bg-landing"),"center center / cover no-repeat")}),$(document).ready(function(){backgroundImage($(".has-bg"),"center center / cover no-repeat",2),backgroundImage($(".has-bg__collection li"),"center center / cover no-repeat",2),backgroundImage($(".has-bg-li__collection li .collection-item-image"),"center center / cover no-repeat",1),$("#e2ma_signup_submit_button").attr("value","Sign Up"),updateValue($(".nav-container .search-block input"),"Search"),bodyClassToggler(".search-trigger","search-is-visible"),bodyClassToggler(".mobile-menu-trigger","mobile-menu-is-open"),focusr($(".search-trigger"),$(".search-container input")),$(".subnav-trigger").on("click",function(){$(this).toggleClass("is-open"),$("nav.subnav").slideToggle()}),$(".quicklinks-block li").each(function(){var t=$(this).find(".collection-item-label a").attr("href"),e=$(this).find(".collection-item-label a").attr("target");t&&$(this).addClass("has-link").find(".collection-item-description").append('<a class="learn-more-link" href="'+t+'" target="'+e+'">LEARN MORE</a>')}),$(".news-article").each(function(){var t=$(this).find(".news-article-title a").attr("href"),e=$(this).find(".news-article-title a").attr("target");t&&$(this).find(".news-article-details").append('<a class="read-more-link" href="'+t+'" target="'+e+'">READ MORE</a>')}),$(".news-container").each(function(){var t=$(this).find(".news-articles--list");t.addClass("js-is-available");var e=t.find(".news-article").first().clone();t.find(".news-article").first().remove(),t.wrapInner("<div class='col-right col'>"),t.prepend(e),e.wrap("<div class='col-left col'>")})});