{"version":3,"file":"landingpage.js","names":["$","checkElementLocation","$window","window","bottom_of_window","scrollTop","height","each","i","bottom_of_object","this","position","top","addClass","on","event","link","attr","startsWith","preventDefault","animate","offset","length","parent","navigator","userAgent","indexOf","jQuery","Drupal"],"sources":["landingpage.js"],"mappings":"CAAA,SAAWA,GAET,SAASC,IACP,IAAIC,EAAUF,EAAEG,QACZC,EAAmBF,EAAQG,YAAcH,EAAQI,SAErDN,EAAE,wCAAwCO,MAAK,SAASC,GACtD,IACIC,EADQT,EAAEU,MACeC,WAAWC,IAAM,GAG1CR,EAAmBK,GACrBT,EAAEU,MAAMG,SAAS,UAErB,GACF,CAEAZ,IAEAD,EAAEG,QAAQW,GAAG,UAAU,WACrBb,GACF,IAGAD,EAAE,8BAA8Bc,GAAG,SAAS,SAASC,GACnD,IAAIC,EAAOhB,EAAEU,MAAMO,KAAK,QACpBD,EAAKE,WAAW,OAClBH,EAAMI,iBACNnB,EAAE,wCAAwCa,SAAS,WACnDb,EAAE,cAAcoB,QAAQ,CAAEf,UAAWL,EAAEgB,GAAMK,SAAST,MAE1D,IAGGZ,EAAE,uEAAuEsB,QAC1EtB,EAAE,uEAAuEuB,SAASV,SAAS,yBAG1Fb,EAAE,4BAA4BsB,UACgB,GAA5CE,UAAUC,UAAUC,QAAQ,YAC7B1B,EAAE,QAAQa,SAAS,OAEnBb,EAAE,QAAQa,SAAS,MAGxB,CA7CD,CA6CGc,OAAQC","sourcesContent":["(function ($, Drupal) {\n /* FADE IN TRANSITION */\n function checkElementLocation() {\n var $window = $(window);\n var bottom_of_window = $window.scrollTop() + $window.height();\n\n $('.node--type-landing-page .field-item').each(function(i) {\n var $that = $(this);\n var bottom_of_object = $that.position().top + 50;\n\n //if element is in viewport, add the animate class\n if (bottom_of_window > bottom_of_object) {\n $(this).addClass('fade-in');\n }\n });\n }\n // if in viewport, show the animation\n checkElementLocation();\n\n $(window).on('scroll', function() {\n checkElementLocation();\n });\n\n // SCROLL FOR ANCHOR ID\n $('.node--type-landing-page a').on('click', function(event){\n var link = $(this).attr('href');\n if( link.startsWith(\"#\") ){\n event.preventDefault();\n $('.node--type-landing-page .field-item').addClass('fade-in');\n $('body, html').animate({ scrollTop: $(link).offset().top });\n }\n });\n\n /* FIXED BUTTON POSITION */\n if($('.node--type-landing-page .field-item .paragraph--type--fixed-button').length){\n $('.node--type-landing-page .field-item .paragraph--type--fixed-button').parent().addClass('fixed-button-position');\n }\n\n if($('.node--type-landing-page').length){\n if(navigator.userAgent.indexOf('Mac OS X') != -1){\n $('body').addClass('mac');\n } else {\n $('body').addClass('pc');\n }\n }\n})(jQuery, Drupal);"]}