/* Minification failed. Returning unminified contents.
(1,3-4): run-time error JS1195: Expected expression: )
(1,5-6): run-time error JS1195: Expected expression: >
(1,23-24): run-time error JS1195: Expected expression: >
(1,1083-1084): run-time error JS1002: Syntax error: }
(1,2022-2023): run-time error JS1002: Syntax error: }
(1,2110-2111): run-time error JS1002: Syntax error: }
(1,2174-2175): run-time error JS1002: Syntax error: }
(1,2300-2301): run-time error JS1002: Syntax error: }
(1,2311-2312): run-time error JS1197: Too many errors. The file might not be a JavaScript file: {
 */
(()=>{var e=[,(e,t,n)=>{"use strict";n.r(t);var o=n(2),r=n.n(o);window.accordion=function(e,t){var n=e,o=function(){$(".altair-footer .accordion, .newsroom:not('.search') .content-wrapper .accordion").removeClass("active"),$(".altair-footer .accordion .active, .newsroom:not('.search') .content-wrapper .accordion .active").removeClass("active"),$(".altair-footer .altair-footer__about, .newsroom .content-wrapper .dropdown").removeClass("is-open")},a=function(){if(void 0===e)var e=window.innerWidth;e<t?($(n).find(".accordion").addClass("active"),$(n+" [data-accordion]").off("click").on("click",(function(e){e.preventDefault(),$(this).hasClass("about")&&$(this).parent().toggleClass("is-open");var t=$(this).attr("data-accordion");$(this).hasClass("active")?($(this).removeClass("active"),$(n+" "+t).removeClass("active")):($(n+" .accordion__content",n+" [data-accordion]").removeClass("active"),$(this).toggleClass("active"),$(n+" "+t).toggleClass("active"))}))):o()};o(),a(),window.addEventListener("resize",r()((function(){$(".newsroom").hasClass("search")||(o(),a())}),200))}},(e,t,n)=>{var o=n(3),r=n(4),a=n(7),i=Math.max,c=Math.min;e.exports=function(e,t,n){var s,l,d,u,m,v,f=0,h=!1,w=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=s,o=l;return s=l=void 0,f=t,u=e.apply(o,n)}function b(e){var n=e-v;return void 0===v||n>=t||n<0||w&&e-f>=d}function y(){var e=r();if(b(e))return _(e);m=setTimeout(y,function(e){var n=t-(e-v);return w?c(n,d-(e-f)):n}(e))}function _(e){return m=void 0,p&&s?g(e):(s=l=void 0,u)}function $(){var e=r(),n=b(e);if(s=arguments,l=this,v=e,n){if(void 0===m)return function(e){return f=e,m=setTimeout(y,t),h?g(e):u}(v);if(w)return clearTimeout(m),m=setTimeout(y,t),g(v)}return void 0===m&&(m=setTimeout(y,t)),u}return t=a(t)||0,o(n)&&(h=!!n.leading,d=(w="maxWait"in n)?i(a(n.maxWait)||0,t):d,p="trailing"in n?!!n.trailing:p),$.cancel=function(){void 0!==m&&clearTimeout(m),f=0,s=v=l=m=void 0},$.flush=function(){return void 0===m?u:_(r())},$}},e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},(e,t,n)=>{var o=n(5);e.exports=function(){return o.Date.now()}},(e,t,n)=>{var o=n(6),r="object"==typeof self&&self&&self.Object===Object&&self,a=o||r||Function("return this")();e.exports=a},(e,t,n)=>{var o="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=o},(e,t,n)=>{var o=n(8),r=n(3),a=n(10),i=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=o(e);var n=c.test(e);return n||s.test(e)?l(e.slice(2),n?2:8):i.test(e)?NaN:+e}},(e,t,n)=>{var o=n(9),r=/^\s+/;e.exports=function(e){return e?e.slice(0,o(e)+1).replace(r,""):e}},e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},(e,t,n)=>{var o=n(11),r=n(15);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==o(e)}},(e,t,n)=>{var o=n(12),r=n(13),a=n(14),i=o?o.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?r(e):a(e)}},(e,t,n)=>{var o=n(5).Symbol;e.exports=o},(e,t,n)=>{var o=n(12),r=Object.prototype,a=r.hasOwnProperty,i=r.toString,c=o?o.toStringTag:void 0;e.exports=function(e){var t=a.call(e,c),n=e[c];try{e[c]=void 0;var o=!0}catch(e){}var r=i.call(e);return o&&(t?e[c]=n:delete e[c]),r}},e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},,,,,()=>{!function(){var e=document.querySelectorAll(".altair-header #ml-menu + .container .navbar-primary .navbar__item");if(e){var t=[],n='<ul id="menu-0" class="menu__level" data-menu="main" role="menu" aria-label="All">';e.forEach((function(e,o){var r=e.querySelectorAll(".btn-text")[0],a=e.querySelector(".navbarmenu__content");if(r){if(a){var i=e.querySelectorAll(".navbarmenu__subhead");i.length?(t.push({menu:"submenu-".concat(o),items:i,label:r.innerText,level:2,hasThirdLevel:!0}),i.forEach((function(e,n){t.push({menu:"submenu-".concat(o,"-").concat(n),items:e.parentNode.querySelectorAll("a"),label:e.innerText,level:3})}))):t.push({menu:"submenu-".concat(o),items:a.querySelectorAll("a"),label:r.innerText,level:2})}n+='\n            <li id="mobile-item-'.concat(o,'" class="menu__item" role="menuitem">\n                <a ').concat(a?'data-submenu="submenu-'.concat(o,'"'):"",' class="menu__link menu__link--primary" href="').concat(r.getAttribute("href"),'" target="').concat(r.getAttribute("target")||"_self",'">\n                   ').concat(r.innerHTML,"\n                </a>\n            </li>\n            ")}}));var o=document.querySelectorAll(".altair-header .navbar-secondary > li > a");o.length&&o.forEach((function(e){n+='\n                <li class="menu__item" role="menuitem">\n                    <a class="menu__link menu__link--secondary" href="'.concat(e.getAttribute("href"),'" target="').concat(e.getAttribute("target"),'">').concat(e.innerHTML,"</a>\n                </li>\n                ")}));var r=document.querySelector(".altair-header .dropdown.language");if(r&&(n+='\n            <li class="menu__item" role="menuitem">\n                <a class="menu__link menu__link--secondary" data-submenu="submenu-lang" aria-owns="submenu-lang" href="https://www.altair.com/" target="_self">'.concat(r.querySelector(".dropdown__toggle").innerText,"</a>\n            </li>\n            ")),n+="</ul>",t.forEach((function(e){n+='<ul id="'.concat(e.menu,'" class="menu__level" data-menu="').concat(e.menu,'" role="menu" aria-label="').concat(e.label,'">'),e.items.forEach((function(t,o){var r=t.parentNode.id;n+='\n            <li id="'.concat(r,'" class="menu__item menu__level-').concat(e.level,'" role="menuitem">\n                <a ').concat(e.hasThirdLevel?'data-submenu="'.concat(e.menu,"-").concat(o,'"'):"",' class="menu__link ').concat(3==e.level?"":"menu__link--primary"," ").concat(t.getAttribute("class"),'" href="').concat(t.getAttribute("href"),'" target="').concat(t.getAttribute("target")||"_self",'">').concat(t.innerHTML,"</a>\n            </li>\n            ")})),n+="</ul>"})),r){var a=document.querySelector(".altair-header .dropdown.language .dropdown__content ul").innerHTML;n+='\n        <ul id="submenu-lang" class="menu__level" data-menu="submenu-lang" role="menu" aria-label="Languages">\n            '.concat(a,"\n        </ul>\n        ")}var i=document.querySelector("#ml-menu .menu__wrap");i&&(i.innerHTML=n)}}()},(e,t,n)=>{"use strict";n.r(t);var o=n(22),r=n.n(o),a=n(2),i=n.n(a),c=!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0,s=navigator.userAgent.indexOf("Edge")>-1,l=!!window.chrome&&!c&&!s,d=("undefined"!=typeof document&&document.documentMode,window.InstallTrigger,/^((?!chrome|android).)*safari/i.test(navigator.userAgent));var u=function(){var e=$("body").css("padding-top");e=parseInt(e,10);var t=$(".altair-header").height();Math.abs(e-t);$(".navbarmenu__content").css("opacity",0),setTimeout((function(){$(".navbarmenu__content").css("top",$(".altair-header").height()-1)}),500),setTimeout((function(){$(".navbarmenu__content").css("opacity",1)}),1e3),$(".navbarmenu__content").addClass("show")},m=function(){if(1==f()){var e=0,t=$(".menu__wrap").innerHeight()-100;-1!=navigator.platform.indexOf("iPhone")||-1!=navigator.platform.indexOf("iPod")?(d&&(t-=120),l&&(t-=90)):(d&&(t-=80),l&&(t-=50)),t!=e&&($(".menu .menu__wrap ul").height(t),e=t)}},v=function(){window.scrollbarWidth=window.innerWidth-$(document).width(),window.windowWidth=window.outerWidth-scrollbarWidth},f=function(){return window.windowWidth<1280},h=function(){var e=document.getElementById("ml-menu"),t=(new MLMenu(e,{initialBreadcrumb:"Home",backCtrl:!0,itemsDelayInterval:60}),document.querySelector(".action--open")),n=document.querySelector(".action--close");function o(){classie.remove(e,"menu--open"),t.focus(),$("body").toggleClass("nav-open")}t.addEventListener("click",(function(){classie.add(e,"menu--open"),n.focus(),$("body").toggleClass("nav-open")})),n.addEventListener("click",o),$("#submenu-6").click((function(){o()})),$(".navbar-brand__toggle").fadeTo(200,1)},w=function(){document.cookie.match("header-alert")?$("#cookie-bar").css({display:"none"}):$.cookieBar(),setTimeout((function(){u()}),500),$(".cookie-bar__btn").click((function(){u()}))};window.headerFooterInit=function(){document.querySelector(".navbar-primary")&&(v(),f(),u(),w(),h(),m()),window.accordion(".altair-footer",800)},$(document).ready((function(){document.querySelector(".navbar-primary")&&(v(),f(),u(),h(),w())})),window.addEventListener("load",(function(){document.querySelector(".navbar-primary")&&(m(),window.accordion(".altair-footer",800))})),window.addEventListener("resize",i()((function(){document.querySelector(".navbar-primary")&&(v(),u(),f(),m())}),100)),window.addEventListener("orientationchange",i()((function(){document.querySelector(".navbar-primary")&&(f(),m())}),100)),window.addEventListener("scroll",r()((function(){$("body").hasClass("search-results")||$(".altair-header .dropdown").removeClass("is-open"),$("body").addClass("scrolling"),setTimeout((function(){$("body").removeClass("scrolling")}),500),u()}),500)),$(window).scroll((function(){$("body").hasClass("scrolled-away")||$("body").hasClass("scrolled-back")||($(window).scrollTop()>0&&$(window).scrollTop()>131?$("body, .altair-header, .navbar-secondary, .cookie-bar").addClass("scroll"):$("body, .altair-header, .navbar-secondary, .cookie-bar").removeClass("scroll"))})),function(){if("en"===document.documentElement.getAttribute("lang")){var e=window.location.hostname,t=document.querySelectorAll("#EB8F7BD2-5AFA-460B-9C69-2FA808616710");[".com",".cloud",".tw"].some((function(t){return e.endsWith(t)}))||t.forEach((function(e){e.remove()}));var n=document.querySelectorAll("#CF2CD6C3-81D8-4806-B908-976251B4BBC9 .menu__link");if(n.length){var o="";e.endsWith(".de")?o="Nachhaltigkeit":e.endsWith(".es")?o="Sostenibilidad":e.endsWith(".fr")?o="Développement durable":e.endsWith(".it")?o="Sostenibilità":e.endsWith(".jp")?o="サステナビリティ":e.endsWith(".kr")?o="지속 가능성":(e.endsWith(".cn")||e.endsWith(".tw"))&&(o="永續發展"),o&&n.forEach((function(e){e.textContent=o}))}}}()},(e,t,n)=>{var o=n(2),r=n(3);e.exports=function(e,t,n){var a=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return r(n)&&(a="leading"in n?!!n.leading:a,i="trailing"in n?!!n.trailing:i),o(e,t,{leading:a,maxWait:t,trailing:i})}},()=>{var e,t=document.querySelectorAll(".SearchTB"),n=document.querySelector(".altair-header .search");var o=!1;function r(){return"ontouchstart"in window||navigator.maxTouchPoints>0}t.forEach((function(t){var a,i,c;t.addEventListener("focus",(function(){if(r()&&(o=!0),window.windowWidth<1280){e=document.querySelector(".search .SearchTB__mob");var a=document.querySelector(".navbar").offsetWidth;n.classList.toggle("active"),n.style.backgroundColor="#FFF",a-=40,e.style.transition="width 0.5s ease-out",e.style.width=a+"px",document.querySelector(".close.close_mob").classList.remove("hide")}else{e=document.querySelector(".search .SearchTB__dsk");var i=document.querySelector(".navbar-secondary").offsetWidth;e.style.transition="width 0.5s ease-out",e.style.width=i+"px",t.closest(".search").querySelector(".close").classList.remove("hide")}})),window.addEventListener("scroll",(a=function(){r()&&o||(e=window.innerWidth<1280?document.querySelector(".search .SearchTB__mob"):document.querySelector(".search .SearchTB__dsk")).blur()},i=100,function(){var e=this,t=arguments;clearTimeout(c),c=setTimeout((function(){return a.apply(e,t)}),i)})),t.addEventListener("blur",(function(){r()&&(o=!1),window.windowWidth<1280?(e=document.querySelector(".search .SearchTB__mob"),n.classList.remove("active"),n.style.backgroundColor="transparent"):e=document.querySelector(".search .SearchTB__dsk");var a=t.closest(".search").querySelector(".close");e.removeAttribute("style"),a.classList.add("hide")}))}))},()=>{$(".dropdown__toggle").on("click touch",(function(){$(this).closest(".dropdown").toggleClass("is-open")})),$(document).on("click touch",(function(e){$(e.target).parent().parent().parent().hasClass("dropdown__content")?$(e.target).closest(".dropdown").removeClass("is-open"):$(e.target).closest(".dropdown").length||$(".dropdown").removeClass("is-open")}))},(e,t,n)=>{"use strict";n.r(t);var o,r=n(22),a=n.n(r),i=n(2),c=n.n(i);if(document.querySelector(".buy-try-links ")){var s=function(){return Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.documentElement.clientWidth)},l=function(){if(s()<=529){var e=document.querySelector(".altair-header").clientHeight;d.classList.add("prod-button-stick"),d.style.top="".concat(e,"px");var t=document.querySelector("#divStickyButtons .btn").clientHeight;m.style.marginTop="".concat(t,"px")}else d.classList.remove("prod-button-stick"),d.style.removeProperty("top"),m.style.removeProperty("margin-top")};console.log("links are ready");var d=document.querySelector("#divStickyButtons"),u=document.querySelector(".product-overview__sidebar"),m=document.querySelector(".hero");l(),document.querySelector("#cookie-bar")&&(document.querySelector(".cookie-bar__btn").onclick=function(){document.querySelector("#cookie-bar").style.display="none",l()}),window.addEventListener("resize",c()((function(){l()}),300)),o=0,window.addEventListener("scroll",a()((function(){l(),document.body.getBoundingClientRect().top>o?function(){if(s()>=530){var e=document.querySelector(".altair-header").clientHeight;u&&u.getBoundingClientRect().top>=e&&d.classList.contains("prod-button-stick")&&d.classList.remove("prod-button-stick")}}():function(){if(s()>=530){var e=document.querySelector(".altair-header").clientHeight;d&&d.getBoundingClientRect().top<=e&&d.classList.add("prod-button-stick")}}(),o=document.body.getBoundingClientRect().top}),300))}},(e,t,n)=>{"use strict";n.r(t);var o=n(2),r=n.n(o);if(document.querySelector(".hero__product")){var a=function(){window.innerWidth>799&&(i.hasAttribute("autoplay")||(i.setAttribute("autoplay","autoplay"),i.load()))},i=document.querySelector("#hero-vid");a(),window.addEventListener("resize",r()((function(){console.log("browser resized"),a()}),300))}},()=>{var e,t,n;e=$(".RL-grid-view-btn"),t=$(".RL-list-view-btn"),n=$(".RL-cards"),e.on("click",(function(o){o.preventDefault(),e.addClass("active"),t.removeClass("active"),n.removeClass("RL-list-view"),n.addClass("RL-grid-view")})),t.on("click",(function(o){o.preventDefault(),t.addClass("active"),e.removeClass("active"),n.addClass("RL-list-view"),n.removeClass("RL-grid-view")}))},()=>{$(document).ready((function(){if($.fn.owlCarousel){if($(".hp-hero .owl-carousel").owlCarousel({loop:!1,mobileFirst:!0,lazyload:!0,dragEndSpeed:500,nav:!1,margin:10,dots:!0,dotsContainer:".dot__holder",items:1,dotClass:"owl-dot owl-dot__blue-dark",responsive:{0:{mouseDrag:!0},800:{mouseDrag:!1}}}),$(".cta-carousel .owl-carousel").owlCarousel({loop:!1,lazyload:!0,autoHeightClass:"owl-height",mouseDrag:!1,nav:!1,margin:10,dots:!1,items:1,dotClass:"owl-dot owl-dot__blue-lite",navText:["<div class='nav-btn prev-slide'></div>","<div class='nav-btn next-slide'></div>"],responsive:{0:{nav:!0},500:{nav:!1,dots:!0}}}),$(".locations-carousel .owl-carousel").owlCarousel({dots:!1,arrows:!0,adaptiveHeight:!1,centerMode:!1,mobileFirst:!0,items:1,infinite:!1,margin:16,nav:!0,navText:['<div class="nav-btn prev-slide"><svg xmlns="http://www.w3.org/2000/svg" width="120" height="226"><g class="slider-arrow" data-name="Group 510"><path data-name="Rectangle 193" d="M0 0h120v226H0z"/><path data-name="Icon feather-chevron-right" d="M45.5 141.943l29.722-29.721L45.5 82.5" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="4"/></g></svg></div>','<div class="nav-btn next-slide"><svg xmlns="http://www.w3.org/2000/svg" width="120" height="226"><g class="slider-arrow" data-name="Group 510"><path data-name="Rectangle 193" d="M0 0h120v226H0z"/><path data-name="Icon feather-chevron-right" d="M45.5 141.943l29.722-29.721L45.5 82.5" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="4"/></g></svg></div>'],stagePadding:36,responsive:{800:{items:2,stagePadding:70},1010:{stagePadding:100,items:3}}}),$(".culture-carousel .owl-carousel").owlCarousel({loop:!0,margin:10,nav:!1,responsive:{0:{items:1}}}),$(".quote-carousel .owl-carousel").owlCarousel({loop:!1,lazyload:!0,nav:!1,mouseDrag:!1,margin:10,dots:!1,dotsContainer:".dot-holder",items:1,dotClass:"owl-dot owl-dot__blue-lite",navText:["<div class='nav-btn prev-slide'></div>","<div class='nav-btn next-slide'></div>"],responsive:{0:{nav:!0},500:{nav:!1,dots:!0}}}),$(".quote-carousel .owl-dot").click((function(){owl.trigger("to.owl.carousel",[$(this).index(),300])})),$(".single-quotes .owl-carousel").length){var e=$(".single-quotes .owl-carousel");!function(e){e.fn.shuffle=function(){var t=this.get(),n=e.map(t,(function(){var n,o=(n=t.length,Math.floor(Math.random()*n)),r=e(t[o]).clone(!0)[0];return t.splice(o,1),r}));return this.each((function(t){e(this).replaceWith(e(n[t]))})),e(n)}}(jQuery),$(".single-quotes .owl-carousel .single-quotes__item").shuffle(),e.owlCarousel({dots:!0,dotClass:"owl-dot owl-dot__blue-dark",arrows:!1,adaptiveHeight:!1,centerMode:!1,mobileFirst:!0,items:1,infinite:!1})}$(".multi-quotes .owl-carousel").owlCarousel({dots:!0,dotClass:"owl-dot owl-dot__blue-dark",arrows:!1,adaptiveHeight:!1,centerMode:!1,mobileFirst:!0,items:1,infinite:!1})}$(".product-slider").length&&($(".product-slider").slick({slidesToShow:3,dots:!0,infinite:!1,responsive:[{breakpoint:800,settings:{slidesToShow:2}},{breakpoint:600,settings:{slidesToShow:1,arrows:!1}}]}),$(".product-slider .fancybox").fancybox({prevEffect:"fade",nextEffect:"fade"}))}))},()=>{var e=document.getElementById("secondary-nav"),t=document.querySelector(".caret-arrow");!function(){if(e)try{e.querySelectorAll("a").forEach((function(e){e.getAttribute("href").toLowerCase().endsWith(window.location.pathname)&&e.classList.add("current")}))}catch(e){console.warn("Could not set current secondary nav item")}}();var n=document.querySelector("#secondary-nav .container"),o=document.querySelector(".secondary-links");if(e){var r=function(){window.innerWidth>799&&o.clientHeight>21&&(n.classList.add("lgToggle"),o.classList.add("lgToggle"))};t.addEventListener("click",(function(){e.classList.toggle("closed")})),addEventListener("resize",(function(e){r()})),r()}},()=>{!function(){function e(e){e||(e=$(window).width()<1025&&$(".support-items").hasClass("grid-view")?57:115),$(".support-card p").dotdotdot({watch:"window",height:e})}document.querySelector(".product-resources")&&($((function(){e()})),$(window).on("resize",(function(){e()})),$(".grid-view-btn").on("click",(function(){$(".list-view-btn").removeClass("active"),$(this).addClass("active"),$(".support-items").removeClass("list-view").addClass("grid-view"),e(57)})),$(".list-view-btn").on("click",(function(){$(".grid-view-btn").removeClass("active"),$(this).addClass("active"),$(".support-items").removeClass("grid-view").addClass("list-view"),e(115)})))}()},()=>{var e=document.querySelector(".page-cta__image-bleed .row__medium-5"),t=document.querySelector(".page-cta__image-bleed .row__medium-7");if(e){var n=function(){e.offsetHeight>t.offsetHeight&&(t.setAttribute("style","display: none;"),e.setAttribute("style","padding-bottom: 2.5rem; padding-top: 2.5rem;  width: 100%")),window.innerWidth<=799&&(e.removeAttribute("style"),t.removeAttribute("style"))};window.addEventListener("load",n),window.addEventListener("resize",n)}}],t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o);n(20),n(1),n(21),n(23),n(24),n(25),n(26),n(27),n(28),n(29),n(30),n(31)})()})();;
/* CONTENTS */
/* ----------------------------------------- */
/* CUSTOM SCRIPTS */

/* CUSTOM SCRIPTS */
/* ----------------------------------------- */

/* JQUERY ACTUAL V1.0.9 */
/* ----------------------------------------- */
/*! Copyright 2012, Ben Lin (http://dreamerslab.com/)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Version: 1.0.19
 *
 * Requires: jQuery >= 1.2.3
 */
(function (a) {
    if (typeof define === "function" && define.amd) {
        define(["jquery"], a);
    } else { a(jQuery); }
}(function (a) {
    a.fn.addBack = a.fn.addBack || a.fn.andSelf; a.fn.extend({
        actual: function (b, l) {
            if (!this[b]) {
                throw '$.actual => The jQuery method "' + b + '" you called does not exist';
            } var f = { absolute: false, clone: false, includeMargin: false, display: "block" }; var i = a.extend(f, l); var e = this.eq(0); var h, j; if (i.clone === true) {
                h = function () {
                    var m = "position: absolute !important; top: -1000 !important; ";
                    e = e.clone().attr("style", m).appendTo("body");
                }; j = function () { e.remove(); };
            } else {
                var g = []; var d = ""; var c; h = function () {
                    c = e.parents().addBack().filter(":hidden");
                    d += "visibility: hidden !important; display: " + i.display + " !important; "; if (i.absolute === true) { d += "position: absolute !important; "; } c.each(function () {
                        var m = a(this);
                        var n = m.attr("style"); g.push(n); m.attr("style", n ? n + ";" + d : d);
                    });
                }; j = function () {
                    c.each(function (m) {
                        var o = a(this); var n = g[m]; if (n === undefined) {
                            o.removeAttr("style");
                        } else { o.attr("style", n); }
                    });
                };
            } h(); var k = /(outer)/.test(b) ? e[b](i.includeMargin) : e[b](); j(); return k;
        }
    });
}));

//navigation scripting
$(window).on("load", function () {

});

$(window).on("resize", function () {
    //for max height dropdown descriptions
    $(".drop.white span").css("height", "auto");

    $(".drop.white").each(function () {
        var maxHeight = -1;
        $(this).children("span").each(function () {
            var test = $(this).actual("height");
            if ($(this).actual("height") > maxHeight) {
                maxHeight = $(this).actual("height");
            }
        });
        $(this).children("span").height(maxHeight);
    });
}).trigger("resize");

$(document).ready(function () {

    $(window).on('load resize', function () {
        //$('.product-workflow .wistia-wrapper').add('.product-whats-new .wistia-wrapper').add('.product-features .wistia-wrapper').each( function() {
        $('.wistia-wrapper').each(function () {
            var $this = $(this);
            var w = $this.width();
            $this.height(w * 0.5625);
        });
    });


    if ($('.buy-try-links').length > 1) {
        $('.buy-try-links').eq(1).hide();
    }


    $(window).on('scroll', function () {
        var secNav = $('#secondary-nav');
        var queryString;
        if (secNav.length > 0) {
            var vs = window.scrollY;
            if (vs > 0) {
                sessionStorage.setItem('vs', vs.toString());
            } else {
                sessionStorage.removeItem('vs');
            }
        }

    });


    var truncateHeight;

    //hover over one element, affect another
    $("#home li .drop > a").hover(
        function () {
            var index = $(this).index();
            $(this).closest("li").find(".nav-pics img").hide().eq(index).show();
            $(this).closest("li").find(".drop.white span").hide().eq(index).css("display", "inline-block");
        }
    );

    $(".icon.search").on("click", function () {
        $("#searchbox, #for-search").addClass("opened");
    });

    $(".sb-search-close").on("click", function () {
        $("#searchbox").removeClass("opened");

        setTimeout(function () {
            $("#for-search").removeClass("opened");
        }, 320);
    });

    var navEnter;
    $("#home nav li").mouseover(function () {
        var underlay = $(this).closest("li").find(".dropdown").height();
        //console.log("underlay " + underlay);
        var $nav = $(this);

        navEnter = setTimeout(function () {
            if ($(this).find(".drop.white").length !== 0 && $(window).width() > 1200) {
                $("#underlay").addClass("white");
            } else {
                $("#underlay").removeClass("white");
            }

            if (underlay == null) {
                underlay = 0;
            }

            $("#underlay").show().height(underlay);
            $("#home nav li").removeClass("current");
            $nav.addClass("current");
        }, 250);
    });
    // reduced timeout by half 01/08/2020 dsg
    var navTimer;
    $("#home nav li, #underlay").mouseleave(function () {
        clearTimeout(navEnter);
        navTimer = setTimeout(closeNav, 250);
    }).mouseenter(function () {
        clearTimeout(navTimer);
    });

    function openNav() {

    }

    function closeNav() {
        $("#underlay").removeClass("white").hide();
        $("#home nav li").removeClass("current");
    }

    $(".journal h3, .spot-03 h3, .spot-04 h3, .half-txt h1, .half-txt h2, .third-txt h1, .third-txt h2, .consult-stories span").dotdotdot({
        watch: "window"
    });

    $('.support-items-holder div.support-card p').dotdotdot({
        watch: "window",
        height: 114
    });
    

    var initialTap = false;
    var getValue = 0;

    //wistia activation from carousel
    $(".wistia-vid").on("click", function (e) {
        $("#pager, #pager a, #stories h2, #stories .captions.current, #stories .overlay, .stories-link.current").hide();
        $("#altair-carousel li:eq(0) .wistia_embed").fadeTo(0, 1);

        //2018.08.16 //added conditional
        if ($("body").hasClass("default")) {
            $(this).hide();
        }

        var wistiaId = $(this).data('wistia_id');
        if (wistiaId === undefined) {
            wistiaId = $(this).data('id');
        }
        var video = Wistia.api(wistiaId);
        video.play();
        e.preventDefault();
    });


    $("#stories .wistia_embed").each(function () {
        var cssClass = $(this).attr('class');
        var match = /wistia_async_(\w{10})/.exec(cssClass);
        if (match !== null) {
            var id = match[1];
            window._wq = window._wq || [];
            window._wq.push({
                id: id,
                onHasData: function (video) {
                    video.bind("play", function () {
                        //console.log("The video is playing.");
                    });
                    video.bind("pause", function () {
                        //console.log("The video was just paused!");
                        $(this.container).hide();
                        $("#pager, #pager a, #stories h2, #stories .captions.current, #stories .overlay, .stories-link.current").fadeIn(360);
                        $("#stories .overlay, .stories-link.current").show();
                    });
                    video.bind("end", function () {
                        //console.log("The video has ended.");
                        $(this.container).hide();
                        $("#pager, #pager a, #stories h2, #stories .captions.current, #stories .overlay, .stories-link.current").fadeIn(360);
                        $("#stories .overlay, .stories-link.current").show();
                    });
                }
            });
        }
    });


    //hammer touch elements for carousel
    $(".pager a").each(function () {
        var mc = new Hammer(this);
        mc.on("tap", function () {
            initialTap = true;
            return false;
        });
    });

    $(".stories-link").each(function () {
        var mc = new Hammer(this);
        mc.on("swipeleft", function () {
            if (currentPage === 3) {
                getValue = 0;
            } else {
                getValue = currentPage + 1;
            }
            $("#altair-carousel").trigger("slideTo", [getValue]);
            return false;
        });

        mc.on("swiperight", function () {
            if (currentPage === 0) {
                getValue = 3;
            } else {
                getValue = currentPage - 1;
            }
            $("#altair-carousel").trigger("slideTo", [getValue]);
            return false;
        });
    });

    //touch pagination fix on mobile, applied in css
    function is_touch_device() {
        return 'ontouchstart' in window        // works on most browsers 
            || navigator.maxTouchPoints;       // works on IE10/11 and Surface
    }

    if (is_touch_device()) {
        $("html").addClass('touch');
    } else {
        $("html").addClass('no-touch');
    }

    /* MOBILE ONLY - NAVIGATION TOGGLE */
    /* ----------------------------------------- */
    $("#mobile-toggler").on("click", function () {
        window.scrollTo(0, 0);
        $(this).toggleClass("open");
        $("#mobile-menu").toggleClass("menu-opened");
        $("body").toggleClass("active-nav");
    });

    $(".root-menu").on("click", function () {
        $(this).toggleClass("open");
        $(this).next().stop().slideToggle(400);
        return false;
    });

    /* LOCATION SELECTION */
    /* ----------------------------------------- */
    if ($("select#locale-selector").length) {
        $("select#locale-selector").prop("selectedIndex", 0);
    }

    $("select#locale-selector").on('change', function () {
        $(".locale").hide();

        var locValue = this.value;

        if (locValue === 0 || locValue === 1) {
            $(".locale").show();
        } else {
            $(".locale." + locValue).show();
        }
    });

    /* ABOUT PROFILES */
    /* ----------------------------------------- */
    var profileSelect;
    var member;
    var myOffset;

    function revert() {
        setTimeout(function () {
            $(".member").removeClass("deactivated");
        }, 600);
    }

    function showNav() {
        setTimeout(function () {
            $("html, body").stop(true, true).animate({
                scrollTop: $(".profiles.current").offset().top - 82
            }, "slow");

            $(".btn-back, .btn-next, .btn-close").fadeIn(320);
        }, 500);
    }

    if ($("#interior").hasClass("about")) {
        $(".member").on("click", function () {
            member = $(this).index();
            console.log(member);

            $(".btn-back, .btn-next, .btn-close").hide();
            profileSelect = $(this).closest(".staff").next(".profiles").find(".detailed-profile").length;

            $(this).closest(".staff").next(".profiles").find(".detailed-profile").hide();
            $(this).closest(".staff").next(".profiles").find(".detailed-profile:eq(" + member + ")").show();
            //hide and show

            $(".profiles").removeClass("current");
            $(this).closest(".staff").next(".profiles").addClass("current");

            showNav();
        });

        $(".btn-back").on("click", function () {
            member = member - 1;
            console.log(member);

            if (member >= 0) {
                $(".detailed-profile").hide();
                $(this).nextAll(".detailed-profile:eq(" + member + ")").fadeIn();
            } else {
                $(".member").addClass("deactivated");
                $(".profiles").removeClass("current");
                $(".btn-back, .btn-next, .btn-close").hide();

                if ($(this).closest(".profiles").prevAll(".profiles").length) {
                    $(this).closest(".profiles").prevAll(".profiles").first().addClass("current");
                    $(this).closest(".profiles").prevAll(".profiles").first().find(".detailed-profile").last().show();
                    profileSelect = $(this).closest(".profiles").prevAll(".profiles").first().find(".detailed-profile").length;
                    console.log("number of profiles is " + profileSelect);
                } else {
                    $(".profiles").last().addClass("current");
                    $(".profiles").last().find(".detailed-profile").last().show();
                    profileSelect = $(".profiles").last().find(".detailed-profile").length;
                    console.log("number of profiles is " + profileSelect);
                }
                member = profileSelect - 1;
                showNav();
                revert();
            }
        });

        $(".btn-next").on("click", function () {
            member = member + 1;
            console.log(member);

            if (member < profileSelect) {
                $(".detailed-profile").hide();
                $(this).nextAll(".detailed-profile:eq(" + member + ")").fadeIn();
            } else {
                $(".member").addClass("activated");
                $(".profiles").removeClass("current");
                $(".btn-back, .btn-next, .btn-close").hide();

                if ($(this).closest(".profiles").nextAll(".profiles").length) {
                    $(this).closest(".profiles").nextAll(".profiles").first().addClass("current");
                    $(this).closest(".profiles").nextAll(".profiles").first().find(".detailed-profile").first().show();
                    profileSelect = $(this).closest(".profiles").nextAll(".profiles").first().find(".detailed-profile").length;
                    //console.log("number of profiles is "+profileSelect);
                } else {
                    $(".profiles").first().addClass("current");
                    $(".profiles").first().find(".detailed-profile").first().show();
                    profileSelect = $(".profiles").first().find(".detailed-profile").length;
                    //console.log("number of profiles is "+profileSelect);
                }

                member = 0;
                showNav();
                revert();
            }
        });

        //close all profiles
        $(".btn-close").on("click", function () {
            $(".profiles").removeClass("current");
            $(".btn-back, .btn-next, .btn-close").hide();
            revert();
        });
    }

    /* STEPS CUSTOM IMG SLIDER */
    /* ----------------------------------------- */
    var stepLength;
    var stepClicked = 0;
    var stepPrevious = 0;
    var stepSwiped;

    stepLength = $("#staffing-pager span").length;
    stepLength = stepLength - 1;

    function stepUpdater() {
        //console.log(stepPrevious + " : " + stepClicked);
        if (stepPrevious !== stepClicked) {
            $("#staffing-pager span").removeClass("current");
            $("#staffing-pager span:eq(" + stepClicked + ")").addClass("current");

            $("#staffing-slider li:eq(" + stepPrevious + ") video").get(0).pause();
            $("#staffing-slider li:eq(" + stepPrevious + ") video").get(0).currentTime = 0;

            $("#staffing-slider li").hide();
            $("#staffing-slider li:eq(" + stepClicked + ")").fadeIn(500, function () {
                if ($(window).width() > 1024) {
                    $("#staffing-slider li:eq(" + stepClicked + ") video").get(0).play();
                }
            });

            stepPrevious = stepClicked;
        }
    }

    $("#staffing-pager span").on("click", function () {
        stepClicked = $(this).index();
        stepClicked = stepClicked - 1;
        //console.log("step clicked: "+stepClicked);
        stepUpdater();
    });

    $("#staffing-pager .staff-left").on("click", function () {
        if (stepClicked < 1) {
            stepClicked = stepLength;
        } else {
            stepClicked--;
        }
        stepUpdater();
    });

    $("#staffing-pager .staff-right").on("click", function () {
        if (stepClicked > stepLength - 1) {
            stepClicked = 0;
        } else {
            stepClicked++;
        }
        stepUpdater();
    });

    //last video functionality
    $("#staffing-slider li:eq(5) video").on("ended", function () {
        stepClicked = 0;
        stepUpdater();
    });

    $("#staffing-slider li").each(function () {
        stepSwiped = new Hammer(this);

        stepSwiped.on("swipeleft", function () {
            if ($(window).width() < 1025) {
                if (stepClicked > stepLength - 1) {
                    stepClicked = 0;
                } else {
                    stepClicked++;
                }
                stepUpdater();
                return false;
            }
        });

        stepSwiped.on("swiperight", function () {
            if ($(window).width() < 1025) {
                if (stepClicked < 1) {
                    stepClicked = stepLength;
                } else {
                    stepClicked--;
                }
                stepUpdater();
                return false;
            }
        });
    });

    //initial page load play
    if ($("#staffing-engage").length) {
        var distance = $("#staffing-engage").offset().top - 100,
            $window = $(window);
        var initi;
        playStep();

        $window.scroll(function () {
            //console.log($window.scrollTop() +" : "+ distance);
            if ($(window).width() > 1024 && initialPlay === false) {
                playStep();
            }
        });
    }
    alPlay = false;

    //console.log($window.scrollTop() +" : "+ distance);
    function playStep() {
        if ($window.scrollTop() >= distance && $window.scrollTop() < 2100) {
            //console.log("at the top");
            if ($(window).width() > 1024 && initialPlay === false) {
                initialPlay = true;
                $("#staffing-slider li:eq(0) video").get(0).play();
            }
        }
    }

    /* CONSULTING AUTOMATION COMPONENT */
    /* ----------------------------------------- */
    $(".component-list > div").on("click", function () {
        if (!$(this).next().hasClass("opened")) {
            $(".component-list ul, .component-list > div").removeClass("opened");
        }
        $(this).toggleClass("opened");
        $(this).next().toggleClass("opened");
    });

    var loadedData = $(".component-list ul:eq(0) li:eq(0)").data("item");

    $(".component-list").on("click", "li", function (event) {
        if ($("#component .component-vids").is(":visible")) {
            var dataItem = $(this).data("item");
            //console.log("Loaded Data: " + loadedData);
            //console.log("Data item: " + dataItem);

            if (dataItem !== loadedData) {
                $("#component .component-list li").removeClass("selected");
                $(this).addClass("selected");

                $(".component-desc, .component-vids img").hide();
                $(".component-desc[data-txt='" + dataItem + "']").show();
                $(".component-desc[data-txt='" + dataItem + "'] .players img").show();
                $(".component-vids img[data-image='" + dataItem + "']").fadeIn(350);
                loadedData = dataItem;
            }
        }
    });

    //checks for empty video elements //add 08202018
    function wistiaRemoval() {
        $("#component .component-desc .wistia_embed").each(function () {
            if (!$(this).children(".wistia_click_to_play").length) {
                $(this).closest(".component-desc").addClass("without-wistia");
                $(this).parent().addClass("hidden");
            }
        });
    }

    setTimeout(wistiaRemoval, 3000);

    /* PARTNER PORTAL SCRIPTS */
    $(".datepicker").datepicker();

    function mobileSettings() {
        if ($("#mobile-toggler").is(":visible")) {
            mobileOffset = 0;
            if (targetedSteps.length == 16) {
                splicedSteps = [];
                splicedSteps = targetedSteps.splice(0, 8);
            }
        } else {
            mobileOffset = 205;
            if (targetedSteps.length == 8) {
                targetedSteps.splice(0, 0, splicedSteps);
            }
        }
    }

    if (document.getElementById("partner-main")) {
        //next line is for test, comment out for production
        //localStorage.removeItem("flagFirstVisit");

        var mobileOffset;
        var targetedSteps = ["#step2", "#step3", "#step4", "#step5", "#step6", "#step7", "#step8", "#cphSymbols_divSettings", "#mobi2", "#mobi3", "#mobi4", "#mobi5", "#mobi6", "#mobi7", "#mobi8", "#mobi9"];
        var splicedSteps = [];

        mobileSettings();

        var portalUser = localStorage.getItem("flagFirstVisit");

        if (portalUser == null) {
            localStorage.setItem("flagFirstVisit", "yes");
            portalUser = localStorage.getItem("flagFirstVisit");
            var intro = introJs().setOptions({
                showBullets: false,
                showProgress: true,
                steps: [
                    {
                        intro: "Welcome! Within this portal, you will find the tools necessary to help advance sales opportunities, learn more about our solutions, get the latest solution updates and have access to the materials you need to effectively support your end-users."
                    },
                    {
                        element: targetedSteps[0],
                        intro: "The Resource Library contains four primary categories from pre-sales, sales and training/support while providing quick access to creative assets such as logos, event banners, advertisements and brand guidelines for the various products."
                    },
                    {
                        element: targetedSteps[1],
                        intro: "Featured Resources are highlights of our latest content including our latest presentation materials, reseller webinars, events and sales/training content."
                    },
                    {
                        element: targetedSteps[2],
                        intro: "Get the latest news feed from Altair from our live news feed and blog. Please feel free to promote and share our blog content on your live feeds as well."
                    },
                    {
                        element: targetedSteps[3],
                        intro: "Channel Partners in good standing with Altair may learn more about our co-marketing or Marketing Development Funds program as well as request for funds to run a co-Marketing activity."
                    },
                    {
                        element: targetedSteps[4],
                        intro: "Get certified to demonstrate your technical know-how and sales skills."
                    },
                    {
                        element: targetedSteps[5],
                        intro: "If you're a Sales user for your organization, you may access your leads, opportunities and sales-related records via the SalesForce Community Platform."
                    },
                    {
                        element: targetedSteps[6],
                        intro: "View the latest end-user and prospect events that will feature Altair solutions across the world. You can also view upcoming end-user and reseller webinars."
                    },
                    {
                        element: targetedSteps[7],
                        intro: "Update information regarding your account, your password and if you're the designated Admin contact for your organization, you may update your company profile information here."
                    }
                ]
            });

            //repositions step number symbol
            intro.onafterchange(function () {
                if (this._currentStep >= 4) {
                    //post step 4
                    $(".introjs-helperNumberLayer").addClass("nav");
                } else {
                    $(".introjs-helperNumberLayer").removeClass("nav");
                }
            });
            //allows for smooth scrolling (desktop only)
            intro.onchange(function (targetElement) {
                mobileSettings();

                //disables button behavior
                if (this._currentStep == 0) {
                    //setup for intro.js
                    $("body").addClass("static");
                    return false;
                }

                if (this._currentStep > 0) {
                    $("body").addClass("mobile");
                } else {
                    $("body").removeClass("mobile");
                }

                if (this._currentStep > 3) {
                    if ($("#mobile-toggler").is(":visible") && !$("#mobile-toggler").hasClass("open")) {
                        $("#mobile-toggler").trigger("click");
                        $("body").addClass("nav-is-active");
                    }

                    if (this._currentStep > 6) {
                        $("body").addClass("nav-is-elevated");
                    } else {
                        $("body").removeClass("nav-is-elevated");
                    }
                } else if (this._currentStep < 4) {
                    if ($("#mobile-toggler").is(":visible") && $("#mobile-toggler").hasClass("open")) {
                        $("#mobile-toggler").trigger("click");
                        $("body").removeClass("nav-is-active");
                    }
                }

                if (this._currentStep > 0) {
                    $("html, body").stop().animate({
                        scrollTop: $(targetedSteps[this._currentStep - 1]).offset().top - mobileOffset
                    }, 500, "swing");
                }
            });
            //enables button behavior
            intro.onexit(function () {
                $("body").removeClass("static mobile nav-is-active nav-is-elevated");

                //remove mobile nav if open
                if ($("#mobile-toggler").is(":visible") && $("#mobile-toggler").hasClass("open")) {
                    $("#mobile-toggler").trigger("click");
                }
                return false;
            });

            intro.start();
        }
    }

    /* ----------------------------------------- */
    /* 	EVERYTHING BELOW ARE SCRIPTS */
    /*	FROM PREVIOUS BUILD (2013)   */
    /* ----------------------------------------- */

    /* STRUCTURE SECTION */
    /* ----------------------------------------- */
    $(".branch").mouseenter(function () {
        var myBranch = $(this).index();
        myBranch++;
        console.log("My Branch is " + myBranch);

        $(".overview").css({ "display": "none" });
        $(".overview:eq(" + myBranch + ")").css({ "display": "table" });
    });

    $("#structure").mouseleave(function () {
        $(".overview").css({ "display": "none" });
        $(".overview:eq(0)").css({ "display": "table" });
    });

    /* JQUERY CAROUFREDSEL V6.2.1 */
    /* ----------------------------------------- 
     * Removed 04/25/2022 dgreve
    if ($("#techs ul").find("li").length <= 3) {
        $("#techs ul").carouFredSel(false);

        //toggle functionality
        $("#techs li").click(function () {
            var getValue = $(this).index(); //sets value 

            console.log("This index is " + getValue);

            $("#interior #banner > a").hide();
            $("#interior #banner .desc").css({ "z-index": "-1", "opacity": "0" });
            $("#interior #banner > a").eq(getValue).show();
            $("#interior #banner .desc").eq(getValue).css({ "z-index": "1", "opacity": "1" });
        });
    } else {
        $("#techs ul").carouFredSel({
            auto: { play: false },
            pagination: "#techs .pagination",
            scroll: {
                duration: 320,
                easing: "easeOutQuint",
                pauseOnHover: true,
                items: 1,
                onBefore: function () {
                    //get the current position using the triggerHandler-method
                    var pos = $("#techs ul").triggerHandler("currentPosition");
                    //alert( "The carousel is at item number " + pos );
                    $("#interior #banner > a").hide();
                    $("#interior #banner .desc").css({ "z-index": "-1", "opacity": "0" });
                    $("#interior #banner > a").eq(pos).show();
                    $("#interior #banner .desc").eq(pos).css({ "z-index": "1", "opacity": "1" });
                }
            },
            items: {
                minimum: 3
            },
            prev: {
                button: "#prev1",
                duration: 400
            },
            next: {
                button: "#next1",
                duration: 400
            },
            mousewheel: false,
            swipe: {
                onMouse: false,
                onTouch: true
            }
        }).find("li").click(function () {
            var deviation = 0;
            $("#techs ul").trigger("slideTo", [$(this), deviation]);
        });
    }

    $("#videos ul").carouFredSel({
        auto: false,
        scroll: {
            easing: "easeOutQuint",
            items: 3
        },
        prev: {
            button: "#prev1",
            duration: 400
        },
        next: {
            button: "#next1",
            duration: 400
        },
        mousewheel: false,
        swipe: {
            onMouse: false,
            onTouch: true
        }
    });
    */

    //Concept to Reality Carousel
    /**
    Removed 04 / 25 / 2022 dgreve
    $("#scrollID ul").carouFredSel({
        auto: false,
        circular: false,
        infinite: false,
        scroll: {
            easing: "easeOutQuint",
            items: 4
        },
        prev: {
            button: "#prev1",
            duration: 320
        },
        next: {
            button: "#next1",
            duration: 320
        },
        mousewheel: false,
        swipe: {
            onMouse: false,
            onTouch: true
        }
    });

    **/

    /* PRODUCT IMAGERY NAVIGATION CODE */
    /* ----------------------------------------- */
    $(".menu_hover_item").hover(function () {
        $('#top_nav_product_image').attr('src', $(this).attr('thumbnail'));
        //$('#top_nav_product_name').text($(this).text());
        $('#top_nav_product_description').html($(this).attr('data-title').replace('\n', '<br />'));
    });
    $(".menu_hover_item1").hover(function () {
        $('#top_nav_product_image1').attr('src', $(this).attr('thumbnail'));
        //$('#top_nav_product_name').text($(this).text());
        $('#top_nav_product_description1').html($(this).attr('data-title').replace('\n', '<br />'));
    });

    /* C2R FUNCTIONALITY */
    /* ----------------------------------------- */
    $(".sm_image .expand").mouseenter(function () {
        var elem = $(this).index();
        $(this).stop().animate({ height: 140, width: 210 }, 200);
        $(this).parent().stop().animate({ height: 140, width: 210 }, 200);
    });

    $(".sm_image .expand").mouseleave(function () {
        var elem = $(this).index();
        $(this).stop().animate({ height: 90, width: 135 }, 200);
        $(this).parent().stop().animate({ height: 90, width: 135 }, 200);
    });

    $('.expand_trigger').click(function (e) {
        e.preventDefault();
        var expand_div = $(this).next('div');
        if (expand_div.is(':hidden')) {
            expand_div.slideDown(500);
        } else {
            expand_div.slideUp(500);
        }
    });

    // Accept Cookie check
    var acceptcookie = getCookie('acceptcookie');
    if (acceptcookie !== 'yes') {
        $('#accept_cookie').show('slide', { direction: 'down' });
        $('#accept_cookie div.accept').click(function () {
            setCookie('acceptcookie', 'yes', 365);
            $('#accept_cookie').hide('slide', { direction: 'down' });
        });
    }
    //if (typeof (hbspt) != 'undefined') {
    //    hbspt.forms.create({
    //        css: '',
    //        cssClass: '',
    //        portalId: '47251',
    //        formId: '2eb43dee-c8c0-4ad7-a38d-b128a13e9083',
    //        target: '#footer_form',
    //        onFormReady: function ($form, ctx) {
    //            $form.find('input[type=submit]').val(SubscribeNow).change();
    //        }
    //    });
    //}

    $('.dotdotdot-115').dotdotdot({
        witch: 'window',
        height: 115
    });

    SetFigure($('figure.responsive'));

    $('.crop-background-image').each(function () {
        var image = $(this).data('background-image');
        var croppedImage = GetCroppedJpgUrl($(this), image);
        $(this).css("background-image", "url('" + croppedImage + "')");
    });

    var utm_source = getParameterByName('utm_source');
    var utm_medium = getParameterByName('utm_medium');
    var utm_campaign = getParameterByName('utm_campaign');
    var utm_content = getParameterByName('utm_content');
    var utm_term = getParameterByName('utm_term');
    if (utm_source) {
        setCookie('utm_source', utm_source);
    }
    if (utm_medium) {
        setCookie('utm_medium', utm_medium);
    }
    if (utm_campaign) {
        setCookie('utm_campaign', utm_campaign);
    }
    if (utm_content) {
        setCookie('utm_content', utm_content);
    }
    if (utm_term) {
        setCookie('utm_term', utm_term);
    }
    utm_source = getCookie('utm_source');
    utm_medium = getCookie('utm_medium');
    utm_campaign = getCookie('utm_campaign');
    utm_content = getCookie('utm_content');
    utm_term = getCookie('utm_term');
    $('a[href*="https://web.altair.com"]').prop('href', function () {
        var url = new URL($(this).prop('href'));
        if (url.search) {
            url.search += "&";
        }
        url.search += "utm_source=" + utm_source + "&utm_medium=" + utm_medium + "&utm_campaign=" + utm_campaign + "&utm_content=" + utm_content + "&utm_term=" + utm_term;
        $(this).prop('href', url.toString());
    });
});

function ScaleCropImage($image) {

    var originalWidth = $image.width();
    var originalHeight = $image.height();
    var originalRatio = originalHeight / originalWidth;
    $image.width('auto');
    $image.height('auto');
    var width = $image.width();
    var height = $image.height();
    var ratio = height / width;

    if (width > originalWidth && height > originalHeight) {
        $image.css('position', 'absolute');
        var left = Math.floor((width - originalWidth) / 2);
        var top = Math.floor((height - originalHeight) / 2);
        if (ratio > originalRatio) {
            $image.width(originalWidth);
        }
        else if (ratio < originalRatio) {
            $image.height(originalHeight);
        }
        else {
            $image.width(originalWidth);
            $image.height(originalHeight);
        }
        //$image.width(width);
        //$image.height(height);
        //$image.css('position', 'absolute');
        //$image.css('left', -left);
        //$image.css('top', -top);
    }
    else {
        $image.width(originalWidth);
        $image.height(originalHeight);
        $image.css('position', 'relative');
        $image.css('left', '');
        $image.css('top', '');
    }
}

function GetCroppedJpgUrl($container, imageUrl) {
    if ($container === null || $container.length === 0 || imageUrl === null || imageUrl === '') {
        return null;
    }
    if (imageUrl.indexOf('?') > 0) {
        return imageUrl;
    }
    var height = $container.height();
    var width = $container.width();
    var croppedImageUrl = imageUrl + "?height=" + height + "&width=" + width + "&mode=crop&format=jpg";
    return croppedImageUrl;
}

function AddScript(src) {
    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.src = src;
    var head = document.getElementsByTagName('head')[0];
    head.appendChild(script);
}

//video carousel scripts 2017
//wistia.com/doc/player-api
//targeted Wistia video
var antiquated = "initial"; //old clicked vid
var currentVid; 			//new clicked vid

window._wq = window._wq || [];
_wq.push({
    id: "_all", onReady: function (video) {
        //console.log("This will run for every video on the page. Right now I'm on this one:", video);

        //sets variable
        // var seeked = false;

        // function pauseWistia() {
        // 	if (seeked == false) {
        //$("#pager, #pager a, #stories h2, #stories .captions.current, #stories .overlay, .stories-link.current").fadeIn(360);
        // 		$("#stories .overlay, .stories-link.current").show();
        // 	} else {
        // 		seeked = false;
        // 	}
        // }

        //played functionality
        //   video.bind("play", function() {
        //   	seeked = false;

        //       //assigns currentVid value
        //       currentVid = video.hashedId();

        //       //"initial" checks if this is not the first video clicked
        //       if(antiquated !== "initial") { 
        //       	if(antiquated !== currentVid) {
        //       		var vid = Wistia.api(antiquated);
        //       		//seeked = true;
        //       		vid.pause();
        //       	} else {
        //       		//console.log("both values are equal");
        //       	}
        //       } 

        //       //assigns as antiquated for new vid clicks
        //       antiquated = currentVid;
        //       return video.unbind();
        //   });

        //   //paused functionality
        //   video.bind("pause", pauseWistia);

        //   //this bypasses the Wistia bug of activating pause behavior on seek
        //   video.bind("seek", function(currentTime, lastTime) {
        // 		seeked = true;
        //});

        //end of video functionality
        //  video.bind("end", function() {
        //      //console.log("The video has ended");
        //      $("#pager, #pager a, #stories h2, #stories .captions.current, #stories .overlay, .stories-link.current").fadeIn(360);
        //      $("#stories .overlay, .stories-link.current").show();
        //      $("#altair-carousel li:eq(0) .wistia_embed").fadeTo(500, 0);


        //      //$("div.wistia_async_"+currentVid).fadeTo(500, 0);
        //$("a.from-feature, a.from-feature + .overlay").show();
        //  });
    }
});

// Taken from https://css-tricks.com/NetMag/FluidWidthVideo/Article-FluidWidthVideo.php
function FixYouTubeSize() {

    // Find all YouTube videos
    var $allVideos = $("iframe[src^='//www.youtube.com']"),

        // The element that is fluid width
        $fluidEl = $("body");
    // Figure out and save aspect ratio for each video
    $allVideos.each(function () {

        $(this)
            .data('aspectRatio', this.height / this.width)

            // and remove the hard coded width/height
            .removeAttr('height')
            .removeAttr('width');

    });

    // When the window is resized
    $(window).resize(function () {

        var newWidth = $fluidEl.width();

        // Resize all videos according to their own aspect ratio
        $allVideos.each(function () {

            var $el = $(this);
            $el
                .width(newWidth)
                .height(newWidth * $el.data('aspectRatio'));

        });

        // Kick off one resize to fix all videos on page load
    }).resize();
}

function Search(q) {
    var cx = "007202928960993375146:4bruyaxydmi";
    var cof = "FORID:9";
    var ie = "UTF-8";
    var as_sitesearch = location.hostname;
    if (as_sitesearch.indexOf("mediag.com") >= 0 || as_sitesearch === "webpreview.altair.com") {
        as_sitesearch = "www.altair.com";
    }
    window.location.href = "SearchResults.aspx?cx=" + cx + "&cof=" + cof + "&ie=" + ie + "&q=" + q + "%20site:" + as_sitesearch;
}

// Source: https://www.w3schools.com/js/js_cookies.asp
function setCookie(cname, cvalue, exdays) {
    var d = new Date();
    d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);
    var expires = "expires=" + d.toUTCString();
    document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
function getCookie(cname) {
    var name = cname + "=";
    var decodedCookie = decodeURIComponent(document.cookie);
    var ca = decodedCookie.split(';');
    for (var i = 0; i < ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) === ' ') {
            c = c.substring(1);
        }
        if (c.indexOf(name) === 0) {
            return c.substring(name.length, c.length);
        }
    }
    return "";
}

function SetBackgroundImageOrVideo($element, image, video) {
    var croppedImage = GetCroppedJpgUrl($element, image);
    if (window.innerWidth > 450) {
        if (video != '') {
            $element.prepend('<video autoplay loop muted poster="' + croppedImage + '"><source src="' + video + '" type="video/mp4"></video>');
        } else {
            $element.addClass('bkgImg');
            $element.css({ 'background': 'url("' + croppedImage + '") 50% 50% no-repeat', 'background-size': 'cover' });
        }
    } else {
        $element.addClass('no-video');
        $element.css({ 'background': 'url("' + croppedImage + '") 50% 50% no-repeat', 'background-size': 'cover' });
    }

}

// From http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript
function getParameterByName(name) {
    name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
    var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
        results = regex.exec(location.search);
    return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}

// Modified from https://developers.hubspot.com/docs/methods/forms/submit_form_v3
function SubmitHubSpotV3(formID, json, $container) {
    var portalID = 47251;
    // Create the new request 
    var xhr = new XMLHttpRequest();
    var url = 'https://api.hsforms.com/submissions/v3/integration/submit/' + portalID + '/' + formID;
    var final_data = JSON.stringify(json);

    xhr.open('POST', url);
    // Sets the value of the 'Content-Type' HTTP request headers to 'application/json'
    xhr.setRequestHeader('Content-type', 'application/json');

    xhr.onreadystatechange = function () {
        if (xhr.readyState === 4 && xhr.status === 200) {
            console.log(xhr.responseText);
            try {
                var responseJSON = JSON.parse(xhr.responseText);
                if ($container && responseJSON.inlineMessage) {
                    $container.html('<div class="submitted-message">' + responseJSON.inlineMessage + '</div>');
                }
                else if (responseJSON.redirectUri) {
                    location.href = responseJSON.redirectUri;
                }
            } catch (e) {
                console.error(e);
            }
        } else if (xhr.readyState === 4 && xhr.status === 400) {
            console.error(xhr.responseText); // Returns a 400 error the submission is rejected.          
        } else if (xhr.readyState === 4 && xhr.status === 403) {
            console.error(xhr.responseText); // Returns a 403 error if the portal isn't allowed to post submissions.           
        } else if (xhr.readyState === 4 && xhr.status === 404) {
            console.error(xhr.responseText); //Returns a 404 error if the formGuid isn't found     
        }
    };


    // Sends the request 
    xhr.send(final_data);
}

function Subscribe(form) {
    var email = form.email.value;
    if (validateEmail(email)) {
        var fields = [];
        var $inputs = $(form).find('.hs-input');
        for (var i = 0; i < $inputs.length; i++) {
            fields.push({ "name": $inputs[i].name, "value": $inputs[i].value });
        }
        var data = {
            //"submittedAt": new Date().getTime(),
            "fields": fields,
            "context": {
                "hutk": getCookie('hubspotutk') // include this parameter and set it to the hubspotutk cookie value to enable cookie tracking on your submission
            }
        };
        var communications = [];
        var $consents = $inputs.filter('.legal-consent');
        for (var j = 0; j < $consents.length; j++) {
            var $consent = $consents.eq(j);
            communications.push({
                "value": $consent.val() === 'true',
                "subscriptionTypeId": Number($consent.data("subscriptiontypeid")),
                "text": $consent.data("text")
            });
        }
        if (communications.length > 0) {
            data["legalConsentOptions"] = {
                "consent": {
                    "consentToProcess": true,
                    "text": "Altair is committed to protecting your privacy, and weï¿½ll only use your personal information to provide the products and services you requested. From time to time, Altair and our resellers would like to contact you about our products and services. If you show interest in a Partner product, we may provide your personal information to partners involved in the Altair Partner Alliance Program.",
                    "communications": communications
                }
            };
        }
        SubmitHubSpotV3(form.id, data, $('#footer_form'));
    }
    else {
        alert(email + ' is an invalid email.');
    }
}

function validateEmail(email) {
    var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
    return re.test(String(email).toLowerCase());
}

/**
 * Uses data on each of the $elements to set image.
 * @param {any} $elements - jquery elements
 */
function SetFigure($elements) {
    $elements.each(function () {
        var isMobile = $(this).is('.mobile-device');
        var desktopImage = $(this).data('desktopimage');
        var mobileImage = $(this).data('mobileimage');
        var alternateText = $(this).data('alternatetext');
        var imageType = $(this).data('imagetype');
        if (imageType === 'BackgroundImage') {
            SetBackgroundImage(isMobile, $(this), desktopImage, mobileImage);
        }
        else {
            SetImage(isMobile, $(this), desktopImage, mobileImage, alternateText);
        }
    });
}

/**
 * Adds image or mobileImage to $element.
 * @param {boolean} isMobile - if the browser is a mobile device
 * @param {object} $element - jquery element
 * @param {string} image - large image src
 * @param {string} mobileImage - small image src
 * @param {string} imageAlt - alternate text for image or mobileImage
 */
function SetImage(isMobile, $element, image, mobileImage, imageAlt) {
    if (mobileImage && (isMobile || window.innerWidth <= 520)) {
        $element.prepend('<img class="mobile" src="' + mobileImage + '" alt="' + imageAlt + '" />');
    } else {
        $element.prepend('<img src="' + image + '" alt="' + imageAlt + '" />');
    }
}

/**
 * Sets image or mobileImage as background-image of $element.
 * @param {boolean} isMobile - if the browser is a mobile device
 * @param {object} $element - jquery element
 * @param {string} image - large image src
 * @param {string} mobileImage - small image src
 */
function SetBackgroundImage(isMobile, $element, image, mobileImage) {
    if (mobileImage && (isMobile || window.innerWidth <= 520)) {
        $element.css('background-image', "url('" + mobileImage + "')");
    } else {
        $element.css('background-image', "url('" + image + "')");
    }
}

function isEmpty(str) {
    return (!str || 0 === str.trim().length);
};
