text: $(document).ready(function(){$.ajaxSetup({cache:false});});var cartData=new ItemData();var cartTimer;var miniCartDisplayLock=false;var searchAutoCompletexhr=null;function htmlDecode(input){var y=document.createElement('textarea');y.innerHTML=input;return y.value;}
  function NewWindow(n){var t=new Date,i=t.getTime();window.open(n,"newwin_"+i,"toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=800,height=600,left = 240,top = 212")}
  function showMessage(n,t,i){if(t===null)$(n).hide(),$(n).removeClass();else{$(n).html("<ul><li>"+t+"<\/li><\/ul>");switch(i){case 1:$(n).addClass("validation-summary-nothing");break;case 2:$(n).addClass("validation-summary-warning");break;case 3:$(n).addClass("validation-summary-errors");break;case 4:$(n).addClass("validation-summary-info")}
  $(n).show()}}
  function AddToCart(materialNumber){var tempMaterial=materialNumber.replace('-','');var qty=$("#qty_"+tempMaterial).val();if(qty===''){qty=1;}
  AddItem(materialNumber,qty);}
  function AddItem(stockNum,quantity){var addCartItem='/checkout/AddItem/?stockNum='+stockNum+'&quantity='+quantity;$.ajax({url:addCartItem,success:function(r){console.log(r);GetCheckoutMiniCart();LoadUserInfo();$("#addToCartAlert span").text(stockNum);$("#addToCartAlert").show();setTimeout(function(){$("#addToCartAlert").hide();},3000);}});trackEvent('Site Template','Add to Cart',stockNum);}
  function AddOrderToCart(stockNum,quantity,orderNumber){var addCartItem='/checkout/AddItem/?stockNum='+stockNum+'&quantity='+quantity;$.ajax({url:addCartItem,success:function(r){console.log(r);GetCheckoutMiniCart();LoadUserInfo();$("#addOrderToCartAlert span").text(orderNumber);$("#addOrderToCartAlert").show();setTimeout(function(){$("#addOrderToCartAlert").hide();},3000);}});}
  function AddToCompareList(materialNumber,partNumberId){var addToCompare="AddToCompare_"+materialNumber;if($('#'+addToCompare).prop('checked')){if($("#productCompareItemsCount").val()==="5"){$("#compareListFull").show();$('#AddToCompare_'+materialNumber).prop('checked',false);$("html,body").animate({scrollTop:$(".thetop").offset().top},"1000");}
  else{AddToCompareToolBar(materialNumber,partNumberId);$("#addToCompareList span").text(materialNumber);$("#addToCompareList").show();setTimeout(function(){$("#addToCompareList").hide();},3000);}}
  else{RemoveFromCompareToolBar(partNumberId);}}
  function AddToCompareToolBar(materialNumber,partNumberId){var addToCompareItem='/Tools/ProductComparer/AddItemByCheckBox/';$.ajax({url:addToCompareItem,type:'POST',data:{stockNum:materialNumber,partNumberId:partNumberId},success:function(){$("#productCompareToolbar").show();GetProductCompareToolBarData();trackEvent('Product Compare','Add to Compare',materialNumber);}});}
  function RemoveFromCompareToolBar(partNumberId,materialNumber){var removeItem='/Tools/ProductComparer/RemoveItemFromToolbar/';$.ajax({url:removeItem,type:'POST',data:{partNumberId:partNumberId},success:function(){GetProductCompareToolBarData();$('#AddToCompare_'+materialNumber).prop('checked',false);}});}
  function RemoveAllFromCompareToolbar(MaterialNumbers){$("#productCompareToolbar").hide();var str=MaterialNumbers;var res=str.split(",")
  for(var i=0;i<res.length;i++){$("#removeItem_"+res[i]).trigger("click");}
  $("input[id*='AddToCompare_']").each(function(){$(this).prop('checked',false);});sessionStorage.setItem("expandToolbar",false);GetProductCompareToolBarData();}
  function RemoveFromComparePage(partNumberId){var removeItem='/Tools/ProductComparer/RemoveItemFromComparePage/';$.ajax({url:removeItem,type:'POST',data:{partNumberId:partNumberId},success:function(){UpdateProductComparePageSpecs();LoadInventoryLabels();}});}
  function getToggleFunction(){$('#productCompareExpand').toggleClass('fa fa-angle-down fa fa-angle-right');$('#productContainer').slideToggle('500');if($('#productCompareExpand').hasClass('fa-angle-down fa')){sessionStorage.setItem("expandToolbar",true);$('#productContainer').show();}
  else{sessionStorage.setItem("expandToolbar",false);}}
  function GetProductCompareToolBarData(){var expand;if(sessionStorage.getItem("expandToolbar")==="true"){expand=true;}
  else{expand=false;}
  var getToolBar='/Tools/ProductComparer/_ProductCompareToolBar/';$.ajax({url:getToolBar,type:'POST',data:{sessionProductCompareID:Cookies.get("ProductCompareId"),isExapanded:expand},success:function(html){if(html===""){$('#productCompareToolbar').hide();}
  else{$('#productCompareToolbar').html(html);if(sessionStorage.getItem("expandToolbar")==="true"){$('#productContainer').show();}
  else{$('#productContainer').hide();}}}});}
  function getCheckBoxes(){$("input[id*='hiddenCheckbox']").each(function(){checkOffCheckBoxes($(this).val());});}
  function checkOffCheckBoxes(stockNumber){var addToCompare='#AddToCompare_'+stockNumber;$(addToCompare).prop('checked',true);}
  function UpdateProductComparePageSpecs(){var getPageData='/Tools/ProductComparer/_ProductCompareSpecs/';$.ajax({url:getPageData,type:'POST',data:{sessionProductCompareID:Cookies.get("ProductCompareId")},success:function(html){$('#productCompareSpecs').html(html);LoadInventoryLabels();}});}
  function LoadProductComparePageData(){GetProductComparePageData();event.preventDefault();}
  function GetProductComparePageData(){var getPageData='/Tools/ProductComparer/Index/';$.ajax({url:getPageData,type:'POST',data:{sessionProductCompareID:Cookies.get("ProductCompareId")},success:function(html){window.open(getPageData);$('#productCompareArea').html(html);LoadInventoryLabels();}});}
  function feedback(){$("#feedback-tab").hasClass("out")?($("#feedback-tab").removeClass("out"),$("#feedback-tab").animate({right:"0px"},300,"swing"),$(".feedback-div-inner").animate({right:"-400px"},300,"swing")):($("#feedback-tab").addClass("out"),$("#feedback-tab").animate({right:"400px"},300,"swing"),$(".feedback-div-inner").animate({right:"0"},300,"swing"))}
  function hideandclear(){clearPageTimeout();toggleCountry("")}
  function clearPageTimeout(){clearTimeout(showtimeout);clearTimeout(hidetimeout)}
  function toggleCookieNotice(){$("#cookieacceptance").is(":visible")?$("#cookieacceptance").slideUp(300).fadeOut(200):$("#cookieacceptance").show()
  Cookies.set("HasBeenShownCookieNotice","true",{expires:30});}
  function PreviewLink(previewCode){$('a').each(function(s,a){var href=$(a).attr("href");if(href!=null&&href.toLowerCase().indexOf('previewcode')==-1&&(href.indexOf('/c/')>-1||href.indexOf('/f/')>-1||href.indexOf('/p/')>-1)&&!$(a).hasClass('no-preview')){$(a).attr("href",href+'?&previewcode='+previewCode)}})}
  function SearchWebsite(){$(".website-search-form").submit(function(event){var searchTerm=$(event.target).find('.searchbox').val();searchTerm=searchTerm.replace('#','');var tab="&Tab=Products";if($('#AutoCompleteProducts').length===0&&$('#AutoCompleteResources').length>0)
  tab="&Tab=Resources";trackEvent('Search','Search',$(event.target).find('.searchbox').val());window.location="/search/?criteria="+encodeURIComponent(searchTerm)+tab;event.preventDefault();});}
  function SearchAutoComplete(){var searchTerm=$('#WebsiteSearchTerm').val();if(searchTerm===''){$('.search-result').hide()}else{$('.search-result').html('<i class="fa fa-spin fa-refresh search-result-spinner"></i>');$('.search-result').show()
  searchAutoCompletexhr=$.ajax({url:'/search/search/_AutoComplete?criteria='+encodeURIComponent(searchTerm),beforeSend:function(){if(searchAutoCompletexhr!=null){searchAutoCompletexhr.abort();}},success:function(data){$('.search-result').html(data);$('.search-result-spinner').remove();if($('.autocomplete-search-results').children().length===0){$('.search-result').hide()}
  $('#SearchSeeAllResults').click(function(){SearchSeeAllResults()})}})}}
  function SearchSeeAllResults(){var searchTerm=$('#WebsiteSearchTerm').val();searchTerm=searchTerm.replace('#','');var tab="&Tab=Products";if($('#AutoCompleteProducts').length===0&&$('#AutoCompleteResources').length>0)
  tab="&Tab=Resources";trackEvent('Search','Auto-Complete See All',$(event.target).find('.searchbox').val());window.location="/search/?criteria="+encodeURIComponent(searchTerm)+"&SearchPartNumbers=false"+tab;event.preventDefault();}
  function GetStates(){var n=$("select[name=Country]").val();var APIHostName='/Form/GetStatesByCountry?countryId='
  $.ajax({url:APIHostName+n,type:"GET",contentType:"application/json; charset=utf-8",dataType:"json",success:function(t){t!==null&&(t.length>0?$.isArray(t)&&(n==="232"?($("#provinceLabel").hide(),$("#stateLabel").show()):($("#stateLabel").hide(),$("#provinceLabel").show()),$("#regionLabel").hide(),$("input[name=Region]").hide(),$("select[name=State]").show(),$("select[name=State]").empty(),$("select[name=State]").append('<option value="">-- Select --<\/option>'),$.each(t,function(){$("select[name=State]").append('<option value="'+this.StateID+'">'+this.StateName+"<\/option>")}),hasStates=!0):($("#stateLabel").hide(),$("#provinceLabel").hide(),$("select[name=State]").val(''),$("select[name=State]").hide(),$("#regionLabel").show(),$("input[name=Region]").show(),hasStates=!1))},error:function(){$("#stateLabel").hide();$("#provinceLabel").hide();$("select[name=State]").hide();$("#regionLabel").show();$("input[name=Region]").show();hasStates=!1;alert("Unable to load states")},complete:null,beforeSend:null})}
  $(document).ready(function(){SearchWebsite();var dateOptions,expdate,showtimeout,hidetimeout,cartData,cartTimer,miniCartDisplayLock,getUrlParameter;dateOptions={year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"};expdate=new Date;expdate.setTime(expdate.getTime()+432e5);Number.prototype.format=function(n,t,i,r){var f="\\d(?=(\\d{"+(t||3)+"})+"+(n>0?"\\D":"$")+")",u=this.toFixed(Math.max(0,~~n));return(r?u.replace(".",r):u).replace(new RegExp(f,"g"),"$&"+(i||","))};Array.prototype.hasElement=function(n){for(var t=0;t<this.length;t++)
  if(this[t]===n)return!0;return!1};});$(document).ready(function(){function n(){$("#iframe").height(t()-$("#eoheader").height()).width(window.innerWidth)}
  function t(){var n=document.documentElement;return self.innerHeight||n&&n.clientHeight||document.body.clientHeight}
  $("#digitalcatalog").length>0&&(n(),$(window).resize(function(){n()}))});getUrlParameter=function(n){for(var u=decodeURIComponent(window.location.search.substring(1)),r=u.split("&"),t,i=0;i<r.length;i++)
  if(t=r[i].split("="),t[0]===n)return t[1]===undefined?!0:t[1]};function ResourcesLoadBreadCrumb(){var resultResultUrlPage=sessionStorage.getItem("ResultUrlPath");if(resultResultUrlPage!=null&&location.pathname.replace(/\//g,'')==resultResultUrlPage.replace(/\//g,'')){var resultCategoryIdFilter=sessionStorage.getItem("ResultCategoryIdFilter");$.getJSON('/api/ResourceSearch/GetEpiserverCategory?categoryId='+resultCategoryIdFilter+'&languageId=1',function(data){var template=kendo.template($("#BreadCrumbTemplate").html());var result=template(data);$("#ResourceSearchBreadCrumb").html(result)})
  console.log(resultCategoryIdFilter);}}
  $(window).scroll(function(){if($(this).scrollTop()>=50){$('#return-to-top').fadeIn(200);}else{$('#return-to-top').fadeOut(200);}});$(function(){$("#return-to-top").click(function(){$("html,body").animate({scrollTop:$(".thetop").offset().top},"1000");trackEvent('Site Template','Back to Top','Click')
  return false;})})
  jQuery(document).ready(function(e){function t(t){e(t).bind("click",function(t){t.preventDefault();e(this).parent().fadeOut()})}
  e(".dropdown-toggle").click(function(){var t=e(this).parents(".button-dropdown").children(".dropdown-menu").is(":hidden");e(".button-dropdown .dropdown-menu").hide();e(".button-dropdown .dropdown-toggle").removeClass("active");if(t){if((window.location.pathname.indexOf("/cart/")>-1)&&e(this).children().first().attr('id')==='cartshiftfull'){e(this).parents(".button-dropdown").children(".dropdown-menu").hide().parents(".button-dropdown").children(".dropdown-toggle").addClass("active");}
  else{e(this).parents(".button-dropdown").children(".dropdown-menu").toggle().parents(".button-dropdown").children(".dropdown-toggle").addClass("active");}}});e(document).bind("click",function(t){var n=e(t.target);if(!n.parents().hasClass("button-dropdown"))e(".button-dropdown .dropdown-menu").hide();});e(document).bind("click",function(t){var n=e(t.target);if(!n.parents().hasClass("button-dropdown"))e(".button-dropdown .dropdown-toggle").removeClass("active");})});$(document).ready(function(){var bannerHidden=Cookies.get("bannerHidden");if(jQuery.isEmptyObject(bannerHidden)||bannerHidden==="false"){$(".slitherBannerWrapper").show();}
  $(".slitherBannerX").click(function(){$(".slitherBannerWrapper").hide();Cookies.set("bannerHidden",true);});});$(document).ready(function(){var d=new Date();var n=d.getFullYear();$("#year").text(n);});function LoadUserInfo(){$.getJSON('/UserInfo',function(result){$('#cartCount').html(result.NumberOfCartItems);$('.countryname').html(result.CountryName);$('.flag').attr('src','/Assets/images/flags/'+result.CountryId+'.gif').show();ToggleLoggedInStatus(result.IsLoggedIn);var firstname=result.AccountFirstName;if(firstname.length>11)
  {firstname=firstname.slice(0,11);firstname=firstname.concat('...');}
  $('#myaccountwelcome span').html(result.FirstName)
  $('#helloFirstName span').html(firstname)
  ToggleProductCompareToolbar(result.NumberOfProductCompareItems);});}
  function ToggleLoggedInStatus(IsLoggedIn){if(IsLoggedIn===true){$('#MyAccountLogout').show();$('#MyAccountLogin').hide();$('#myaccountwelcome').show();$('#myaccountpadding').hide();$('#homepageLogin').hide();$('#homepageLogout').show();if(window.location.href.indexOf('my-account')!==-1){$("#my-account-banner-container").css("display","block");}}else{$('#MyAccountLogin').show();$('#MyAccountLogout').hide();$('#myaccountpadding').show();$('#myaccountwelcome').hide();$('#homepageLogin').show();$('#homepageLogout').hide();}}
  function ToggleProductCompareToolbar(NumberOfProductCompareItems){var path=window.location.pathname;if(path.indexOf("/ProductComparer/Index")!==-1){$('#productCompareToolbar').hide();}
  else{if(NumberOfProductCompareItems===0){sessionStorage.setItem("expandToolbar",false);}
  if(NumberOfProductCompareItems>0){GetProductCompareToolBarData();$('#productCompareToolbar').show();}}}
  $(document).ready(function(){LoadUserInfo();});function ModalWindow(url,width,height,elementId){if($('#'+elementId).length===0){$('body').append("<div id=\""+elementId+"\"></div>");}
  var u=$("#"+elementId),f;u.data("kendoWindow")?f=$("#"+elementId).data("kendoWindow").open():($("#"+elementId).html("<div><\/div>"),$.ajax({url:url,type:"GET",contentType:"text/plain",success:function(n){$("#"+elementId).html(n);var u=$("#"+elementId);u.kendoWindow({width:width,height:height,resizable:false,title:false,visible:false,pinned:true}).data("kendoWindow").open();$('.close').click(function(){$('.k-widget').hide()});}}))}
  function EOModalWindow(url,width,height,modalElementId,conentElementId){var modalElement=$('#'+modalElementId);var contentElement=$('#'+conentElementId);var newUrl=url.replace(' ','');$(contentElement).load(newUrl,function(){$(".eo-modal-content").width(width);$(".eo-modal-content").height(height);$(modalElement).show();});$('.eo-modal-content .close').click(function(){$(".eo-modal-window").hide();})
  $('.eo-modal-window').click(function(thisItem){if($(thisItem.target).hasClass('eo-modal-window')){$(".eo-modal-window").hide();}})}
  $(document).ready(function(){var referrer=document.referrer;var cancelRedirect=$.cookie("cancelRedirect");if(referrer.indexOf("edmundoptics.")==-1){if(jQuery.isEmptyObject(cancelRedirect)||cancelRedirect=="false"){var countryName='';var countryId='';$.getJSON("/country/GetLanguageIDByCountryCode",function(data){if(data.Result==true){countryName=data.Data.CountryName;countryId=data.Data.CountryID;RedirectCountryModalWindow('/Country/_CountryRedirectPopup/?countryId='+countryId+'&countryName='+countryName,'650px','385px','redirectCountryModal','redirectCountryContent');}});}}});function RedirectCountryModalWindow(url,width,height,modalElementId,conentElementId){var modalElement=$('#'+modalElementId);var contentElement=$('#'+conentElementId);var newUrl=url.replace(' ','');$(contentElement).load(newUrl,function(){$(".eo-modal-content").width(width);$(".eo-modal-content").height(height);$(modalElement).show();trackEvent('Site Template','Country Geolocation Popup','Shown');});$('.eo-modal-content .close').click(function(){redirectCloseWindow();})}
  function redirectCountry(CountryId){$.ajax({url:"/Country/RedirectCountry?countryID="+CountryId,type:"GET",contentType:"text/plain",success:function(n){location.reload();}})}
  function redirectCloseWindow(){Cookies.set("cancelRedirect","true",{expires:30});$('.eo-modal-window').hide();location.reload();}
  function LoadInventoryLabels(){$.each($(".inventory-label"),function(key,value){var partNumberId=$(value).data('partnumberid');var stockNumber=$(value).data('stocknumber');var displayIconFlag=false;if($(value).data('showicon')==='1')displayIconFlag=true;$(value).load('/Catalog/PartNumber/_InventoryLabel?partNumberID='+partNumberId+'&stockNumber='+stockNumber+'&displayIconFlag='+displayIconFlag);});}
  function ItemData(){var easing='easeOutExpo';miniCartDisplayLock=true;this.GetCartData=function(itemid,message,succeed,success,error){$.ajax({url:'/MiniCart/GetCartJson/',type:'GET',cache:false,contentType:'application/json; charset=utf-8',dataType:'json',success:success,error:error}).done(function(){clearTimeout(cartTimer);if(typeof itemid!==undefined&&typeof message!==undefined&&typeof succeed!==undefined){try{if(succeed){var overflowDiv=$('#container_'+itemid).parent().parent().parent();var targetDiv=$('#container_'+itemid);$(overflowDiv).animate({scrollTop:$(targetDiv).position().top},'slow');$('#upd_message_'+itemid).addClass('alert').addClass('alert-success').css('padding','4px').html(message).slideDown('slow',easing).delay(3000).slideUp('slow',easing);}else{$('#upd_message_'+itemid).addClass('alert').addClass('alert-danger').css('padding','4px').html(message).slideDown('slow',easing);}}
  catch(e){}}});};this.UpdateItemCount=function(itemid,quantity,success,error){miniCartDisplayLock=true;$.ajax({url:'/MiniCart/UpdateCartItemCount/',type:'GET',data:'itemid='+itemid+'&qty='+quantity,contentType:'application/json; charset=utf-8',dataType:'json',success:success,error:function(){DisplayMiniCart(itemid,itemMessages.notupdated,false);error;}}).done(function(){if(quantity===0)
  DisplayMiniCart();else
  DisplayMiniCart(itemid,itemMessages.updated,true);});};this.InsertItems=function(itemObj,success,error){miniCartDisplayLock=true;$('html, body').animate({scrollTop:0},'slow');var itemid=itemObj[itemObj.length-1]['ItemId'];$.ajax({url:'/MiniCart/InsertCartItem/',type:'POST',traditional:true,data:JSON.stringify(itemObj),contentType:'application/json; charset=utf-8',dataType:'json',success:success,error:function(){DisplayMiniCart(itemid,itemMessages.notupdated,false);error;}}).done(function(){DisplayMiniCart(itemid,itemMessages.updated,true);});};};function ToggleMiniCart(){if($('#container-checkoutminicart').is(':visible')){HideMiniCart();}
  else{GetCheckoutMiniCart()}}
  function HideMiniCart(){if(!miniCartDisplayLock){$('#container-checkoutminicart').hide();}}
  function GetCheckoutMiniCart(){var checkoutMiniCart='/checkout/_MiniCart/';var checkoutMiniCartContainer=$('#container-checkoutminicart');$.ajax({url:checkoutMiniCart,success:function(r){$(checkoutMiniCartContainer).html(r);if(window.location.href.indexOf("cart")===-1){$('.miniCartFooter').show()
  $('.minicart-header').hide()}
  $('#container-checkoutminicart').show();LoadInventoryLabels();},cache:false});}
  $(function(){$('#miniCartClick').click(function(){if(window.location.href.indexOf("cart")===-1){ToggleMiniCart();}});});function ToggleClass(element,classA,classB){if(element.hasClass(classA)){element.removeClass(classA);element.addClass(classB);}else{element.removeClass(classB);element.addClass(classA);}}
  $(window).resize(function(){var width=$(window).width();if(width<600)
  $('#mobileMenu').hide();else
  $('#mobileMenu').show();});var scrollMarks,maxScroll=0,marksSent=[];function setScrollMarks(){var docHeight=$(".eoFooter").offset().top;var windowHeight=$(window).height();var maxDepth=docHeight-windowHeight;scrollMarks={'25%':parseInt(maxDepth*0.25,10),'50%':parseInt(maxDepth*0.50,10),'75%':parseInt(maxDepth*0.75,10),'100%':maxDepth};}
  $(document).ready(function(){setScrollMarks();});function checkMarks(scrollDistance){$.each(scrollMarks,function(key,val){if(scrollDistance>=val&&$.inArray(key,marksSent)==-1){marksSent.push(key);trackEvent('Scroll Depth','Percentage',key);}});}
  $(window).scroll(function(){var scrollDepth=$(window).scrollTop();if(scrollDepth>maxScroll){maxScroll=scrollDepth;checkMarks(scrollDepth);}});function onElementHeightChange(elm,callback){var lastHeight=elm.clientHeight,newHeight;(function run(){newHeight=elm.clientHeight;if(lastHeight!=newHeight)
  callback();lastHeight=newHeight;if(elm.onElementHeightChangeTimer)
  clearTimeout(elm.onElementHeightChangeTimer);elm.onElementHeightChangeTimer=setTimeout(run,200);})();}
  onElementHeightChange(document.body,function(){setScrollMarks();});$(window).resize(function(){setScrollMarks();});$(document).ready(function(){var phoneNumber='1-800-363-1992'
  $.ajax({type:'GET',dataType:'HTML',url:'/General/GetCountrySpecificPhoneNumber/',cache:false,success:function(response){phoneNumber=response;},complete:function(){$(".CountrySpecificPhoneNumber").each(function(){$(this).html('<a href="tel:'+phoneNumber+'">'+phoneNumber+'</a>');});}});});function LoadMyAccountBlock(){$.ajax({type:'GET',dataType:'HTML',url:'/my-account/_MyAccountBlock/',cache:false,success:function(response){$(".DynamicMyAccountBlock").each(function(){$(this).html(response);});}});}
  $(".country-arrow-link").click(function(){$(".country-arrow").toggleClass("down");document.getElementById("achevron").classList.remove("down");});$(".fa-chevron-down.country-arrow:before").click(function(){$(".country-arrow").toggleClass("down");document.getElementById("achevron").classList.remove("down");});const element2=document.querySelector("#countrylink");if(element2!=null){document.addEventListener('click',function(event){if(event.target.closest('.cbutton-dropdown'))return;if(event.target.closest('.cdropdown-menu'))return;if(element2.classList.contains("active")){$(".country-arrow").toggleClass("down");document.getElementById("achevron").classList.remove("down");}});}
  $(".myaccount-link").click(function(){$(".myaccount-arrow").toggleClass("down");document.getElementById("cchevron").classList.remove("down");});$(".fa-chevron-down.myaccount-arrow:before").click(function(){$(".myaccount-arrow").toggleClass("down");document.getElementById("cchevron").classList.remove("down");});const element=document.querySelector("#accountlink");if(element!=null){document.addEventListener('click',function(event){if(event.target.closest('.abutton-dropdown'))return;if(event.target.closest('.adropdown-menu'))return;if(element.classList.contains("active")){$(".myaccount-arrow").toggleClass("down");document.getElementById("cchevron").classList.remove("down");}});}
  var userSavedContent=[];function InsertSavedContent(ContentId){userSavedContent.push(ContentId);$.getJSON("/api/ResourceSearch/InsertSavedContent?ContentId="+ContentId,function(data){if(data=="Success"){$("#savedContentStar").css("color","gold");return true;}else{return false;}})}
  function DeleteSavedContent(ContentId){for(var i=userSavedContent.length-1;i>=0;i--){if(userSavedContent[i]===ContentId){userSavedContent.splice(i,1);break;}}
  if(typeof(resourceSearchConfigurations)!="undefined"&&resourceSearchConfigurations.SavedContentTabSelected==true){$("div[data-contentid='"+ContentId+"']").fadeOut();if(userSavedContent.length==0){$("#noSavedContent").show();}else{$("#noSavedContent").hide();}}
  $.getJSON("/api/ResourceSearch/DeleteSavedContent?ContentId="+ContentId,function(data){$("#savedContentStar").css("color","lightgray");return true;})}
  function savedContent(ContentId,UserId){RequireUserToBeLoggedInResourcePage(ContentId,UserId);if(userSavedContent.length==1){DeleteSavedContent(ContentId);}
  else{InsertSavedContent(ContentId);}}
  function RequireUserToBeLoggedInResourcePage(ContentId,UserId){if(UserId==""){window.location.href='/my-account/login?ReturnUrl='+window.location.pathname+'?saveUserContentId='+ContentId;}}
  $(document).ready(function(){$("form[name=countryForm]").submit(function(event){return submitCountryForm();});$("form[name=countryForm]").keyup(function(event){if(event.keyCode==13)return submitCountryForm();});$("form[name=countryForm] > select[name=countryId]").keyup(function(event){if(event.keyCode==13)return submitCountryForm();});$("form[name=countryForm] > input[name=countrySubmit]").click(function(){return submitCountryForm();});function submitCountryForm(){var data={CountryId:$("form[name=countryForm] > select[name=countryId]").val(),Referrer:$("form[name=countryForm] > input[name=referrer]").val(),ga:$("form[name=countryForm] > input[name=ga]").val()};if(data.CountryId!="0"){trackEvent('Site Template','Country Changer',data.CountryId);$.ajax({url:'/country/changecountry',type:"POST",data:JSON.stringify(data),contentType:"application/json; charset=utf-8",dataType:"json",success:function(data){if(data==null){showMessage("#countryErrorMessage","An error has occurred changing your country, please try again.",3);}
  else{if(data.Result==true){var url=window.location.href.toLowerCase();if(url.indexOf("changecountryid=")!=-1){url=url.replace(window.location.origin,'').replace("changecountryid=",'');window.location=url;}
  else{location.reload();}}
  else if(data.Result==false){showMessage("#countryErrorMessage",data.Message,3);}}},error:function(xhr,ajaxOptions,thrownError){showMessage("#countryErrorMessage",data.Message,3);}});}
  return false;}
  function getCookie(name){var re=new RegExp(name+"=([^;]+)");var value=re.exec(document.cookie);return(value!=null)?unescape(value[1]):null;}});jQuery(document).ready(function($){var MqL=1200;moveNavigation();$(window).on('resize',function(){(!window.requestAnimationFrame)?setTimeout(moveNavigation,300):window.requestAnimationFrame(moveNavigation);});$('.cd-nav-trigger').on('click',function(event){event.preventDefault();if($('.cd-main-content').hasClass('nav-is-visible')){closeNav();$("#productsTab").val("none");$("#productsTab").removeClass("selected");$("#capabilitiesTab").val("none");$("#capabilitiesTab").removeClass("selected");$("#knowledge-centerTab").val("none");$("#knowledge").removeClass("selected");$("#companyTab").val("none");$("#companyTab").removeClass("selected");$("[id^=mobileMenu]").css("display","none");$('.cd-overlay').removeClass('is-visible');}else{$(this).addClass('nav-is-visible');$('body').css("overflow","hidden");$('.cd-primary-nav, .cd-primary-nav ul').css("overflow","auto");$('.cd-secondary-nav, .cd-secondary-nav ul').css("overflow","auto");$('#cd-primary-nav').css("overflow-y","scroll");$('.cd-primary-nav').addClass('nav-is-visible');$('.cd-main-header').addClass('nav-is-visible');$('.cd-main-content').addClass('nav-is-visible').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend',function(){$('body').addClass('overflow-hidden');});toggleSearch('close');$('.cd-overlay').addClass('is-visible');}});$('.cd-search-trigger').on('click',function(event){event.preventDefault();toggleSearch();closeNav();});$('.cd-overlay').on('swiperight',function(){if($('.cd-primary-nav').hasClass('nav-is-visible')){closeNav();$('.cd-overlay').removeClass('is-visible');}});$('.nav-on-left .cd-overlay').on('swipeleft',function(){if($('.cd-primary-nav').hasClass('nav-is-visible')){closeNav();$('.cd-overlay').removeClass('is-visible');}});$('.cd-overlay').on('click',function(){closeNav();toggleSearch('close')
  $('.cd-overlay').removeClass('is-visible');});$('.cbutton-dropdown').on('click',function(){closeNav();toggleSearch('close')
  $('.cd-overlay').removeClass('is-visible');});$('.button-dropdown').on('click',function(){closeNav();toggleSearch('close')
  $('.cd-overlay').removeClass('is-visible');});$('.button-dropdown').on('click',function(){closeNav();toggleSearch('close')
  $('.cd-overlay').removeClass('is-visible');});window.onscroll=function(){myFunction()};function myFunction(){if(window.innerWidth>1199){if(document.body.scrollTop>450||document.documentElement.scrollTop>450){closeNav();toggleSearch('close')
  $('.cd-overlay').removeClass('is-visible');}}}
  window.onresize=function(event){closeNav();toggleSearch('close')
  $('.cd-overlay').removeClass('is-visible');};$('.cd-primary-nav').children('.has-children').children('a').on('click',function(event){event.preventDefault();});$('.go-back').on('click',function(){$(this).parent('ul').addClass('is-hidden').parent('.has-children').parent('ul').removeClass('moves-out');});function closeNav(){$("#MenuContentWindow").hide();$("#MenuContentWindow").val("none");$('.cd-nav-trigger').removeClass('nav-is-visible');$('.cd-main-header').removeClass('nav-is-visible');$('.cd-primary-nav').removeClass('nav-is-visible');$('.has-children ul').addClass('is-hidden');$('.has-children a').removeClass('selected');$('.moves-out').removeClass('moves-out');$('.cd-main-content').removeClass('nav-is-visible').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend',function(){$('body').removeClass('overflow-hidden');});$('body').css("overflow","auto");}
  function toggleSearch(type){if(type=="close"){$('.cd-search').removeClass('is-visible');$('.cd-search-trigger').removeClass('search-is-visible');$('.cd-overlay').removeClass('search-is-visible');}else{$('.cd-search').toggleClass('is-visible');$('.cd-search-trigger').toggleClass('search-is-visible');$('.cd-overlay').toggleClass('search-is-visible');if($(window).width()>MqL&&$('.cd-search').hasClass('is-visible'))$('.cd-search').find('input[type="search"]').focus();($('.cd-search').hasClass('is-visible'))?$('.cd-overlay').addClass('is-visible'):$('.cd-overlay').removeClass('is-visible');}}
  $('body').click(function(e){if(window.innerWidth>1198){if(!$(e.target).closest('.megaMenuContainer').length){closeNav();toggleSearch('close')
  $('.cd-overlay').removeClass('is-visible');}}});function checkWindowWidth(){var e=window,a='inner';if(!('innerWidth'in window)){a='client';e=document.documentElement||document.body;}
  if(e[a+'Width']>=MqL){return true;}else{return false;}}
  function moveNavigation(){var navigation=$('.cd-nav');var desktop=checkWindowWidth();if(desktop){navigation.detach();navigation.insertBefore('.cd-header-buttons');}else{navigation.detach();navigation.insertAfter('.cd-main-content');}}});window.Modernizr=(function(window,document,undefined){var version='2.8.3',Modernizr={},enableClasses=true,docElement=document.documentElement,classes=[],slice=classes.slice,featureName,_hasOwnProperty=({}).hasOwnProperty,hasOwnProp;docElement.className=docElement.className.replace(/(^|\s)no-js(\s|$)/,'$1$2')+
  (enableClasses?' js '+classes.join(' '):'');return Modernizr;})(this,this.document);$(".video-container").append('<p style="background-color:yellow;padding:30px; margin:30px!important">Please <a href="javascript:Cookiebot.renew()">accept marketing-cookies</a> to watch this video.</p>');