document.addEventListener("DOMContentLoaded",function(){var n=$(".dropdown"),t=$("#search"),r=$(".button.options"),u=$(".faq .question"),i=$("#toggle-navigation"),f=$(".checkbox.reveal"),e;i.on("click",function(){$(this).toggleClass("active");t.removeClass("active");$(".main-navigation").toggleClass("navigation-open").slideToggle(300);$(".search-box-mobile").slideUp(50)});t.on("click",function(){$(this).toggleClass("active");i.removeClass("active");$(".search-box-mobile").slideToggle(300);$(".main-navigation").slideUp(50);$(".search-box-mobile > #search-form > input").focus();$(".main-navigation").removeClass("navigation-open")});r.on("click",function(){$(this).find(".options-menu").slideToggle(300)});u.on("click",function(){$(this).toggleClass("active").next(".answer").slideToggle(300)});n.on("click",function(t){$(window).width()<1024&&($(this).find(".dropdown-menu").slideToggle(300),$(this).toggleClass("active"),n.not(this).removeClass("active"),n.not(this).find(".dropdown-menu").slideUp(300),t.stopPropagation())});f.on("click",function(){$(this).find("input").prop("checked")==!1?$(".checkbox-hide").addClass("visible-xs-flex"):$(".checkbox-hide").removeClass("visible-xs-flex")});$(".online-container").fadeIn();$(".outline.online").on("click",function(){$(this).addClass("active");$(".outline.phone").removeClass("active");$(".online-container").fadeIn();$(".phone-container").fadeOut()});$(".outline.phone").on("click",function(){$(this).addClass("active");$(".outline.online").removeClass("active");$(".online-container").fadeOut();$(".phone-container").fadeIn()});$(".notify .exit").on("click",function(){$(this).parent(".notify").fadeOut()});$(".generic-popup-link").on("click",function(){$(".generic-popup").fadeIn()});$(".generic-popup-bg, .generic-popup .exit").on("click",function(){$(".generic-popup").fadeOut()});$(".generic-popup-link-notify").on("click",function(){$(".generic-popup-notify").fadeIn()});$(".generic-popup-bg-notify, .generic-popup-notify .exit").on("click",function(){$(".generic-popup-notify").fadeOut()});$(".generic-popup-link-patient").on("click",function(){$(".generic-popup-patient").fadeIn()});$(".generic-popup-bg-patient, .generic-popup-patient .exit").on("click",function(){$(".generic-popup-patient").fadeOut()});$(".generic-popup-link-social").on("click",function(){$(".generic-popup-social").fadeIn()});$(".generic-popup-bg-social, .generic-popup-social .exit").on("click",function(){$(".generic-popup-social").fadeOut()});$(".generic.strength .table tr").on("click mouseover",function(){$(this).addClass("active")});$(".generic.strength .table tr").on("mouseout",function(){$(this).removeClass("active")});$(".order .button").on("click",function(n){$(this).toggleClass("active");var t=$(this).attr("src-order"),i=".order-details."+t;$(i).slideToggle();n.stopPropagation()});e=$(".container-main").addClass("responsive");$(".generic-popup-bg-visitor, .generic-popup-ca-visitor .exit").on("click",function(){$(".generic-popup-ca-visitor").fadeOut()});$(".go-popup-link-sezzle").on("click",function(){$(".generic-popup-sezzle").fadeIn()});$(".generic-popup-bg, .generic-popup-sezzle .exit").on("click",function(){$(".generic-popup-sezzle").fadeOut()});$(".strength-info").tooltip({classes:{"ui-tooltip":"highlight"},content:function(){return this.getAttribute("title")}})});document.addEventListener("DOMContentLoaded",function(){function t(n,t,i){var r=new Date,u;r.setDate(r.getDate()+i);u=escape(t)+(null==i?"":"; path=/;expires="+r.toUTCString());document.cookie=n+"="+u}function i(n){var t=document.cookie,i=t.indexOf(" "+n+"="),r;return(-1==i&&(i=t.indexOf(n+"=")),-1==i)?t=null:(i=t.indexOf("=",i)+1,r=t.indexOf(";",i),-1==r&&(r=t.length),t=unescape(t.substring(i,r))),t}var u,n,r;$(document).ready(function(){var u=i("countryCode"),n,r;(""==u||null==u||"undefined"==u)&&(n=function(){var n,t=$("#IpifyAPIUrlValue").val();return jQuery.ajax({url:t,success:function(t){n=t},async:!1}),n}(),null!=n&&""!=n?($("#ip-address").length&&$("#ip-address").val(n),t("visitorIp",n,30),t("countryCode","unknown",30)):t("countryCode","unknown",3));$("#CustomerLastIp").length&&(r=i("visitorIp"),null!=r&&""!=r&&"undefined"!=r&&$("#CustomerLastIp").val(r));$("#productNameFilter").autocomplete({source:function(n,t){$.ajax({url:"/product/GetMatchingProductJson",type:"POST",dataType:"json",data:{searchTerm:n.term},success:function(n){t($.map(n,function(n){return{label:n.ProductName,value:n.ProductSafeName}}))}})},select:function(n,t){var i="/products/"+t.item.value;document.location.href=i},messages:{noResults:"",results:function(){}}});$("#productNameFilterMobile").autocomplete({source:function(n,t){$.ajax({url:"/product/GetMatchingProductJson",type:"POST",dataType:"json",data:{searchTerm:n.term},success:function(n){t($.map(n,function(n){return{label:n.ProductName,value:n.ProductSafeName}}))}})},select:function(n,t){var i="/products/"+t.item.value;document.location.href=i},messages:{noResults:"",results:function(){}}});$(".btn-product-search").click(function(){return!($("#productNameFilter").val().replace("<","").replace(">","").length<3)||(alert("Search terms must be greater than or equal to 3 characters."),$("#productNameFilter").focus(),!1)});$(".btn-product-search-mobile").click(function(){return!($("#productNameFilterMobile").val().replace("<","").replace(">","").length<3)||(alert("Search terms must be greater than or equal to 3 characters."),$("#productNameFilterMobile").focus(),!1)});$("#ddlMenu").on("change","#menu",function(){var n=$(this).val();null!=n&&""!=n&&(window.location.href=n)});$(".btn-what-is-generic").click(function(n){n.preventDefault?n.preventDefault():n.returnValue=!1;$("#what-is-generic-wrap").toggle()});$(".btn-what-is-price-match").click(function(n){n.preventDefault?n.preventDefault():n.returnValue=!1;$("#price-match-detail").toggle()});$("#search-redirect").click(function(n){n.preventDefault?n.preventDefault():n.returnValue=!1;document.getElementById("productNameFilter").focus()});$(".order-status-container").each(function(){var n=$(this).attr("src-order");$(this).find("li").prepend('<img class="icon small" src="/content/images/icons/attention-yellow.svg" src-order='+n+"/>")})});u=i("LangForCp");$(".setLang[data-lang='"+u+"']").addClass("active-lang");$(".setLang").on("click",function(){t("LangForCp",$(this).attr("data-lang"),30);location.reload(!0)});jQuery.ui.autocomplete.prototype._resizeMenu=function(){this.menu.element.outerWidth(this.element.outerWidth())};n=document.createElement("link");n.rel="stylesheet";n.href="https://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/blitzer/jquery-ui.css";n.type="text/css";r=document.getElementsByTagName("link")[0];r.parentNode.insertBefore(n,r)});document.addEventListener("DOMContentLoaded",function(){window.onload=function(){for(var t=$("img.defer"),n=0;n<t.length;n++)t[n].getAttribute("data-src")&&t[n].setAttribute("src",t[n].getAttribute("data-src"))};let t=[].slice.call(document.querySelectorAll("img.lazy")),i=!1;const n=function(){!1===i&&(i=!0,setTimeout(function(){t.forEach(function(i){i.getBoundingClientRect().top<=window.innerHeight&&i.getBoundingClientRect().bottom>=0&&"none"!==getComputedStyle(i).display&&(i.src=i.dataset.src,i.srcset=i.dataset.srcset,i.classList.remove("lazy"),0===(t=t.filter(function(n){return n!==i})).length&&(document.removeEventListener("scroll",n),window.removeEventListener("resize",n),window.removeEventListener("orientationchange",n)))});i=!1},200))};window.innerwidth;window.innerHeight>840&&n();document.addEventListener("scroll",n);window.addEventListener("resize",n);window.addEventListener("orientationchange",n);var r=[].slice.call(document.querySelectorAll(".lazy-background"));if("IntersectionObserver"in window){let n=new IntersectionObserver(function(t){t.forEach(function(t){t.isIntersecting&&(t.target.classList.add("visible"),n.unobserve(t.target))})});r.forEach(function(t){n.observe(t)})}})