-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.min.js
2 lines (2 loc) · 2.89 KB
/
main.min.js
1
2
"use strict";jQuery(document).ready(function(i){function s(){var s=i(window).scrollTop();t.length>0?e(s):n(s),c=s,l=!1}function n(i){c-i>f?o.removeClass("is-hidden"):i-c>f&&i>v&&o.addClass("is-hidden")}function e(i){var s=t.offset().top-d.height()-o.height();c>=i?s>i?(o.removeClass("is-hidden"),d.removeClass("fixed slide-up"),t.removeClass("secondary-nav-fixed")):c-i>f&&(o.removeClass("is-hidden"),d.removeClass("slide-up").addClass("fixed"),t.addClass("secondary-nav-fixed")):i>s+v?(o.addClass("is-hidden"),d.addClass("fixed slide-up"),t.addClass("secondary-nav-fixed")):i>s&&(o.removeClass("is-hidden"),d.addClass("fixed").removeClass("slide-up"),t.addClass("secondary-nav-fixed"))}function a(){i("#success").is(":checked")?i(".response-success").addClass("slide-in"):i("#error").is(":checked")?i(".response-error").addClass("is-visible"):i(".response-notification").addClass("is-visible")}var o=i(".auto-hide-header"),d=i(".secondary-nav"),t=i(".sub-nav-hero"),r=o.height(),l=!1,c=0,f=10,v=150;o.on("click",".nav-trigger",function(i){i.preventDefault(),o.toggleClass("nav-open")}),i(window).on("scroll",function(){l||(l=!0,window.requestAnimationFrame?requestAnimationFrame(s):setTimeout(s,250))}),i(window).on("resize",function(){r=o.height()});var u=i('div[data-type="message"]');i(".form .email").keyup(function(s){13!=s.which&&(u.removeClass("slide-in is-visible"),i(".form").removeClass("is-submitted").find(".loading").off("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend"));var n=i(this),e=n.val(),a=e.indexOf("@"),o=e.lastIndexOf(".");1>a||a+2>o?i(".form").removeClass("is-active").find(".loading").off("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend"):i(".form").addClass("is-active")}),i(".form .email").on("focus",function(){u.removeClass("slide-in is-visible"),i(".form").removeClass("is-submitted").find(".loading").off("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend")}),i(".submit").on("click",function(s){i(".form").hasClass("is-active")&&(s.preventDefault(),i(".form").addClass("is-submitted").find(".loading").one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){a()}),i("html").hasClass("no-csstransitions")&&a())}),Modernizr.input.placeholder||(i("[placeholder]").focus(function(){var s=i(this);s.val()==s.attr("placeholder")&&s.val("")}).blur(function(){var s=i(this);""!=s.val()&&s.val()!=s.attr("placeholder")||s.val(s.attr("placeholder"))}).blur(),i("[placeholder]").parents("form").submit(function(){i(this).find("[placeholder]").each(function(){var s=i(this);s.val()==s.attr("placeholder")&&s.val("")})}))});
"use strict";mapboxgl.accessToken="pk.eyJ1IjoibWFydGlud2FhZyIsImEiOiJjaWo0NWt6ZWYwMDE0dXlrcm0yenVkNDR5In0.0I9xJzLubP9g3V_NTt1PhA";var map=new mapboxgl.Map({container:"map",style:"mapbox://styles/mapbox/light-v9",zoom:5,center:[5.3770023,52.1626588]});map.scrollZoom.disable();