PageSourceSearch

https://hmgroup.com/wp-content/themes/hm-group-theme/assets/js/main.js?ver=1.0.0

js hmgroup.com collected 2026-10-01 08:59:35 UTC 11,445 bytes, 10 lines download raw bytes

1jQuery(document).ready(function(t){waitForEl(".brand_puff",function(){t("article.us_portfolio_category-brands").each(function(){let o=t("div a",this).attr("aria-label");t(".brand_logo",this).attr("alt","Explore "+o),o="Our brands"===o?"our_brands_logo.svg":o.toLowerCase().replace(/\& o/,"and o").replace(/\&/g,"").replace(/ /g,"_")+"_logo_white.svg",t(".brand_logo",this).attr("src","/wp-content/uploads/2020/06/"+o),t(".brand_logo",this).attr("srcset","/wp-content/uploads/2020/06/"+o)})}),1025<=t(window).width()&&t(".vc_non_responsive .vc_row .vc_col-sm-12").css("padding","0")});
2jQuery(document).ready(function(o){waitForEl("#climate-interactive",function(){o('div[class*="hotspots"]').each(function(){var t=o(this).attr("class").split(/\s+/),s=t[2].replace(/-/g," ");o(".hotspots."+t[2]).attr("title","Click to read about "+s)}),o('div[class*="popups"]').attr("title","Click to close this text"),o('div[class*="hotspots"]').on("click",function(){var t=o(this).attr("class").split(/\s+/);o(".hotspots."+t[2]).css({"z-index":"100",cursor:"default"}),o(".popup-container").css("z-index","75"),o(".popups."+t[2]).fadeIn("fast")}),o('div[class*="popups"]').on("click",function(){var t=o(this).attr("class").split(/\s+/);o(".hotspots."+t[2]).css({"z-index":"25",cursor:"pointer"}),o(".popups."+t[2]).fadeOut("fast"),o(".popup-container").css("z-index","-50")})})});
3jQuery(document).ready(function(e){waitForEl(".ult_modal-header",function(){e(".ult_modal-header").remove()}),e(window).width()<=1024&&e(".ult_modal").removeClass("ult-small").addClass("ult-large"),e("article").each(function(){var t=e(".post_title",this).text().toLowerCase().replace(/ /g,"_").replace(/\&/g,"and");null!=t&&""!=t&&null!=t&&e(this).prop("id",t)}),(-1<window.location.href.indexOf("press-contacts/")||-1<window.location.href.indexOf("contact-us/"))&&e(".w-grid-list .us_portfolio_category-brands h3").remove(),e(".contact_grid").length&&e("article").each(function(){var t=e("h3.post_title",this).text().toLowerCase().replace(/ /g,"_").replace(/\&/g,"and");null!=t&&""!=t&&null!=t&&e(this).prop("id",t)})});
4jQuery(document).ready(function(e){function t(){e("a.jig-downloadLink").off("click"),waitForEl("a.jig-downloadLink",function(){e("a.jig-downloadLink").on("click",n)});let i="";return-1<window.location.href.indexOf("video")?waitForEl("div#pp_full_res iframe",function(){i=(i=(i=(i=e("#pp_full_res iframe").attr("src")).match(/.mp4/g)?i.match(/^(.*?)\.mp4/g):i.match(/^(.*?)\.webm/g))[0].replace(/\/\?jig-video=/g,"")).replace(/%2F/g,"/"),e("#pp_full_res iframe").remove(),e("#pp_full_res").prepend('<iframe class="ajframe" src="'+i+'">'),e(".pp_pic_holder").addClass("video")}):waitForEl("div#pp_full_res img",function(){i=e("#pp_full_res img").attr("src")}),i}function n(){let i=t();!0===e('input[name^="acceptance"]').prop("checked")?e("a.jig-downloadLink").attr({href:i,target:"_blank",download:""}):(e("a.jig-downloadLink").attr("href","#"),e("button.btn-modal").click(),e('input[name^="acceptance"]').click(function(){e("a.jig-downloadLink").attr({href:i,target:"_blank",download:""}),e("#button-click-overlay").click()}))}e(".galleries_tiles").length&&(e(".w-image-h img.attachment-medium.size-medium").removeAttr("sizes"),e(".w-image-h img.attachment-medium.size-medium").removeAttr("width"),e(".w-image-h img.attachment-medium.size-medium").removeAttr("height"),1025<=e(window).width()?e(".w-image-h img.attachment-medium.size-medium").css("height","5vw"):600<=e(window).width()?e(".w-image-h img.attachment-medium.size-medium").css("height","7vw"):e(".w-image-h img.attachment-medium.size-medium").css("height","15vw")),e(".justified-image-grid").length&&(e(".jig-filterButton").click(function(){e(".jig-link").off("click"),setTimeout(function(i){e(".jig-link").on("click",t)},500),e(".jig-link").off("click"),setTimeout(function(i){e(".jig-link").on("click",t)},1e3)}),e(".jig-link").on("click",t))});
5let waitForEl=function(e,o){jQuery(e).length?o():setTimeout(function(){waitForEl(e,o)},100)};jQuery(document).ready(function(o){o(window).width()<=1024&&waitForEl(".slalom",function(){o(".slalom .usg_vwrapper_1").addClass("val
5ign_top").removeClass("valign_middle")}),o("a").each(function(){null!=o(this).attr("href")&&-1!=o(this).attr("href").indexOf("pdf")&&"w-image-h"!=o(this).attr("class")&&o(this).hasClass("topbar")<=-1&&(o(this).html(o(this).text()+' <i class="fal fa-file-pdf"></i>'),o(this).addClass("pdf"))}),o(".w-socials-item-popup").remove(),o(".shareLink a").click(function(e){e.preventDefault(),o("#modal-share-message").css({opacity:"1","z-index":"50"}),setTimeout(function(){o("#modal-share-message").css({opacity:"0","z-index":"-50"})},1e3);e=window.location.protocol+"//"+window.location.hostname+o(this).attr("href");navigator.clipboard.writeText(e)}),o(window).width()<=1024&&o(".slalom .ult-video").parent(".wpb_wrapper").css({height:"calc(100% / 1.78)","margin-bottom":"-42vh"}),o(window).scroll(function(e){10<o(window).scrollTop()?o("body").addClass("page-scrolled"):o("body").removeClass("page-scrolled")}),o(".hmgroup-nav-menu__placeholder").on("click",function(){o(".hmgroup-nav-menu__placeholder").removeClass("hmgroup-nav-menu__placeholder--active"),o(document).find(".hmgroup-nav-menu__level").first().toggleClass("hmgroup-nav-menu__level--open"),o(".menu-toggle-icon").fadeOut("normal",function(){o(this).toggleClass("fa-times").toggleClass("fa-bars").fadeIn()})}),o("#menu-toggle").on("click",function(){o(".hmgroup-nav-menu__placeholder").toggleClass("hmgroup-nav-menu__placeholder--active"),o(".menu-toggle-icon").fadeOut("normal",function(){o(this).toggleClass("fa-times").toggleClass("fa-bars").fadeIn()})}),o(".hmgroup-nav-menu__toggle-icon").on("click",function(){o(this).toggleClass("hmgroup-nav-menu__toggle-icon--rotate"),o(this).parent().find(".hmgroup-nav-menu__level").first().toggleClass("hmgroup-nav-menu__level--open")}),o(".back-to-top").on("click",function(){return document.querySelector("body").scrollIntoView(!0),!1}),o(window).scroll(function(e){200<o(window).scrollTop()?o(".back-to-top").addClass("active"):o(".back-to-top").removeClass("active")}),$us.header.isStickyEnabled=function(){return!1}});
6jQuery(document).ready(function(e){e(".g-breadcrumbs a").each(function(){-1<e(this).attr("href").indexOf("category/news/")&&e(this).attr("href","/media/news/"),-1<e(this).attr("href").indexOf("category/nyheter/")&&e(this).attr("href","/media/nyhetsrum/"),-1<e(this).attr("href").indexOf("category/our-stories/")&&e(this).attr("href","/media/our-stories/")}),-1<window.location.href.indexOf("news")&&(e("#filter_normal .w-filter-list .w-filter-item .w-filter-item-values a").each(function(){this.text&&!isNaN(this.text)&&this.remove()}),e("#filter_normal .w-filter-item-value-select option").each(function(){this.value&&isNaN(this.value)&&e("#filter_normal .w-filter-item-value-select option[value='"+this.value+"']").remove()}),e("div.w-filter-item-values").addClass("w-btn-wrapper"),e("a.w-filter-item-value").addClass("us-btn-style_1"),e(window).width()<1024)&&e("#filter_normal a.w-filter-opener").text("Show filters")});
7jQuery(document).ready(function(t){if(1<=t('input[name="s"]').length){t(".search-open").on("click",function(){t(".hmgroup-search__form").slideDown(),t(".search-open").slideUp(),t(".hmgroup-search__form input").focus()}),t(".search-close").on("click",function(){t(".search-open").slideDown(),t(".hmgroup-search__form").slideUp()});let s=null;t('input[name="s"]').keyup(function(e){let a=e.target.value,r="page";"page"==(r="hmgroup-search__input"==e.target.getAttribute("id")?"header":r)&&t(".search-field").parents("form").parent().find("#hmgroup-search__result").length<=0&&t(".search-field").parents("form").parent().append(t("<ul/>",{id:"hmgroup-search__result",class:"hmgroup-search__result"}));let n=t(e.target).parents("form").parent().parent().find(".hmgroup-search__result");a.length<3?(l(e=n),e.addClass("remove-loading-spinner"),e.append(t("<li/>").append(t("<label/>",{html:"Keep typing...",class:"text-center hmgroup-search__result__link"})))):(clearTimeout(s),s=setTimeout(()=>{return s=a,l(r=n),void t.ajax({url:"/wp-json/relevanssi/v1/search",data:{search:s}}).done(function(e){var a=[];e.length<=0?a.push(t("<li/>").append(t("<label/>",{html:"No result found.",class:"text-center hmgroup-search__result__link"}))):t.each(e,function(e,r){a.push(t("<li/>",{class:"hmgroup-search__result__item"}).append(t("<a/>",{class:"hmgroup-search__result__link",html:r.title+" »",href:r.link+"?s="+s})))}),r.addClass("remove-loading-spinner"),r.append(a)});var s,r},600))}),t(document).mouseup(function(e){var r=t("#hmgroup-search__result,#hmgroup-search__result-search-page");r.is(e.target)||0!==r.has(e.target).length||r.hide()})}function l(e){e.empty(),e.slideDown(),e.removeClass("remove-loading-spinner")}});
8jQuery(document).ready(function(s){0<s(".search-results").length&&(s(".search-results div.w-post-elm.post_content.usg_post_content_1").each(function(){var e=s(this).text().split(" ");for(let t=0;t<=e.length;t++)e[t]&&20<=e[t].length&&s(this).text("")}),s("span.w-filter-item-value-label").each(function(){"Manual slalom"==s(this).html()&&s(this).closest(".w-filter-item-values").css("display","none")}),s(window).width()<900&&s("div.w-vwrapper.usg_vwrapper_1.align_center.valign_middle").removeClass("val
8ign_middle").addClass("valign_top"),s(".w-grid img").each(function(){null!=s(this).attr("width")&&s(this).attr("width")/s(this).attr("height")<=1&&s(this).css("object-fit","contain")}),s("article a").each(function(){-1<s(this).attr("href").indexOf("board-member/")&&s(this).attr("href","/about-us/corporate-governance/board-of-directors/"),-1<s(this).attr("href").indexOf("styrelsemedlem/")&&s(this).attr("href","/about-us/corporate-governance/styrelse/")}))});
9jQuery(document).ready(function(e){function s(){return!0===e("#checkbox-privacy").prop("checked")?(e("#privacy-validation-message").fadeOut("fast"),e("#checkbox-privacy").css({border:"unset"}),!0):(e("#privacy-validation-message").fadeIn("fast"),e("#checkbox-privacy").css({border:"1px solid #ff3f3f"}),!1)}function n(){return""!=e("#name").val().trim()?(e("#name-validation-message").fadeOut("fast"),e("#name").css({border:"1px solid #dddddd"}),!0):(e("#name-validation-message").fadeIn("fast"),e("#name").css({border:"1px solid #ff3f3f"}),!1)}function c(){return a=e("#email").val(),/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(a)?(e("#email-validation-message").fadeOut("fast"),e("#email").css({border:"1px solid #dddddd"}),!0):(e("#email-validation-message").fadeIn("fast"),e("#email").css({border:"1px solid #ff3f3f"}),!1);var a}e(".subscription_form").length&&(e("#email").focusout(function(){c()}),e("#name").focusout(function(){n()}),e("#checkbox-privacy").on("click",function(){s()}),e("#subscribe-btn").on("click",function(){var a=c(),e=n(),i=s();return a&&e&&i}))});
10function hmGroupToggleWagesChart(e,t,a){var s=document.getElementsByClassName(e+"-"+t),h=document.getElementsByClassName(e+"-"+a),l=document.getElementById("chart-toggle-btn--"+e),n="Show wage data in ";for(let e=0;e<h.length;e++)if(h[e].classList.contains("hm-wages-chart--hide")){h[e].classList.remove("hm-wages-chart--hide"),l.innerHTML=n+t.toUpperCase();for(let e=0;e<s.length;e++)s[e].classList.add("hm-wages-chart--hide")}else{h[e].classList.add("hm-wages-chart--hide"),l.innerHTML=n+a.toUpperCase();for(let e=0;e<s.length;e++)s[e].classList.remove("hm-wages-chart--hide")}}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.