function getUrlVars(){for(var t=[],n,r=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),i=0;i0&&(t>767||t==undefined)){var i=0;n.css({height:"auto"});n.each(function(){var t=$(this);t.outerHeight()>i&&(i=n.hasClass("m-content-placement-item")?t.outerHeight()+20:t.outerHeight())});n.css("height",i)}}catch(r){}}function swapImages(){var n=$("head"),t=n.find("#phltsbkmklt");t.length>=1&&$('div[class*="ContentPlacement"]').each(function(){SetEqualHeight($(this).find(".m-content-placement-item .toutheading"));SetEqualHeight($(this).find(".m-content-placement-item .toutpara"))})}function checkWidth(){var n=$window.width();if(n<=767){setTimeout(function(){$("#mwf_view-all-devices_page .device-category.panel-devices-head .mobileAlignment .mobile-showAllButton.acc").each(function(){$(this).attr("data-offset",$(this).offset().top)})},3e3);$(document).on("click",'#mwf_view-all-devices_page .device-category.panel-devices-head .mobileAlignment .mobile-showAllButton.acc[aria-expanded="false"]',function(){$(window).scrollTop($(this).attr("data-offset")-150)})}}function SetEqualHeight(n,t){try{if(n.length>0&&(t>767||t==undefined)){var i=0;n.css({height:"auto"});n.each(function(){var t=$(this);t.outerHeight()>i&&(i=n.hasClass("m-product-placement-item")?t.outerHeight()+20:t.outerHeight())});n.css("height",i)}}catch(r){}}function isPanelInViewport(n,t){var i,f,r,e,u,o;try{return i=jQuery(n),t=t==undefined?0:t,f=navigator.userAgent.toLowerCase().indexOf("edge/")!=-1?"body":"html",r=jQuery(f).scrollTop(),navigator.userAgent.indexOf("Safari")!=-1&&navigator.userAgent.indexOf("Chrome")==-1&&(r=window.pageYOffset),e=r+jQuery(window).height(),i.length>0&&(u=Math.round(i.offset().top)+t,o=u+i.height()),ur}catch(s){console.log(s)}}function gotoBenefits(){$("html, body").animate({scrollTop:$("#benefits").offset().top},1e3)}function CheckAndRedeemCoupon(n,t){var i=$(t).attr("data-url");window.open(i,"_blank")}function GetCouponCode(n,t){$(".loading").addClass("show");var i=$("#token").text(),r={offerCode:n,token:i};$("#"+n).attr("aria-disabled",!0);$.ajax({type:"POST",url:"/Coupon/GetCouponCode/",data:r,dataType:"json",success:function(i){var u,r,f,e;if(i.CouponCode!=null&&i.CouponCode!=""){$(t).attr("value",i.CouponCode);$(t).attr("data-url",i.PartnerURL);$(t).prop("onclick",null).off("click");$(t).on("click",function(){CheckAndRedeemCoupon(n,$(t))});u=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);r=window.open(i.PartnerURL);!r||r.closed||typeof r.closed=="undefined"?(f=$(t).attr("data-offer"),e=i.Status_Description.replace("[CompanyName]",f),alert(e)):u&&window.open(i.PartnerURL,"_blank");$("#"+n).attr("aria-disabled",!1);$(".loading").removeClass("show")}else i.Url!=null&&i.Url!=""?(localStorage.setItem("offerid",n),doConfirm(i.Message,function(){window.location.href=i.Url;$("#"+n).attr("aria-disabled",!1);$(".loading").removeClass("show")})):i.Message!=null?(alert(i.Message),$("#"+n).attr("aria-disabled",!1),$(".loading").removeClass("show")):(window.open(i.PartnerURL,"_blank"),$("#"+n).attr("aria-disabled",!1),$(".loading").removeClass("show"))},error:function(t){t.responseText!=null&&(alert(t.responseText),$("#"+n).attr("aria-disabled",!1),$(".loading").removeClass("show"))}})}function doConfirm(n,t){var i=$("#confirmBox");i.find(".message").text(n);i.find(".yes").unbind().click(function(){i.hide()});i.find(".yes").click(t);i.show()}function UHFDropdownClickOnIEbrowsers(){if((navigator.userAgent.toLowerCase().indexOf("trident")!=-1||navigator.userAgent.toLowerCase().indexOf("msie")!=-1)&&window.innerWidth>860)$("#uhf-g-nav .nested-menu.uhf-menu-item button, #uhf-c-nav .all-ms-nav").on("click",function(n){n.preventDefault();var t=$(this).attr("aria-expanded");t=="false"?($(this).attr("aria-expanded","true"),$(this).next("ul").attr("aria-hidden","false"),$(this).next("ul.f-multi-column.f-multi-column-6").css("margin-left","-1000px")):($(this).attr("aria-expanded","false"),$(this).next("ul").attr("aria-hidden","true"),$(this).next("ul.f-multi-column.f-multi-column-6").css("margin-left","0px"))})}function toutsminheightcalc(){window.matchMedia("(min-width: 768px)").matches?setTimeout(function(){var t,n;for($articletouts.css("min-height","").find(".c-heading,p,.toutpara").css("min-height",""),t=$(".shopmain").length>0?".shopmain .m-content-placement .content-touts.tout-row-large-":".articlesmain .m-content-placement .content-touts.tout-row-large-",n=0;n"+t[r]+"<\/span><\/a>, <\/span>";$(this).html(i);i=""});$("sup").find("span:last").remove()}catch(r){console.log(r)}}function noSuperScript(){try{var r=window.location.href,n=[],t=[];$("sup .supText:visible").not("#mwf-common-prefooter .c-caption-2 sup").each(function(){var t=$(this).text().trim();n.push(t)});n=$.unique(n);$(".c-tooltip sup").each(function(){var n=$(this).text().trim();t.push(n)});t=$.unique(t);n.length==0?$("#mwf-common-prefooter").addClass("hide"):$("#mwf-common-prefooter").hasClass("hide")&&setTimeout(function(){$("#mwf-common-prefooter").removeClass("hide")},6e3);$("#mwf-common-prefooter .c-caption-2").each(function(){var t=$(this).find(".supLink .supFn").text().trim();$.inArray(t,n)==-1?$(this).addClass("hide"):$(this).hasClass("hide")&&$(this).removeClass("hide");$(this).hasClass("context-glyph-tile")&&$(this).removeClass("hide")})}catch(i){console.log(i)}}function ManageConsentChanges(){siteConsent.manageConsent()}function GetCategoryFromMSCC(n){var t=n,i,r;return n.match("^cid")&&(i=n.indexOf("c1="),t=n.substring(i,n.length)),n.match("^c1")&&(r=n.indexOf("-cid"),t=n.substring(0,r)),t}function ShowHideManageCookies(n){if(typeof siteConsent!="undefined"&&siteConsent.isConsentRequired)if($("#c-uhff-footer_managecookies").length>0)$("#c-uhff-footer_managecookies").removeClass("x-hidden");else{var t='