{"version":3,"names":[],"mappings":"","sources":["main.js"],"sourcesContent":["// Main.js file.\n// IIFE - Immediately Invoked Function Expression\n(function (yourcode) {\n // The global jQuery object is passed as a parameter\n yourcode(window.jQuery, window, document);\n}(function ($, window, document) {\n // The $ is now locally scoped\n // Listen for the jQuery ready event on the document\n $(function () {\n// The DOM is ready!\n\n\n /**\n * Hero image height\n */\n\n if ($('.content-hero').length) {\n var image_url;\n image_url = $('.content-hero').css('background-image');\n var image;\n image_url = image_url.match(/^url\\(\"?(.+?)\"?\\)$/);\n // image = new Image();\n // image.src = image_url;\n if (image_url != null) {\n image_url = image_url[1];\n image = new Image();\n image.src = image_url;\n\n // just in case it is not already loaded\n $(image).load(function () {\n if($(window).width() > 1023) {\n $('.content-hero').height(image.height);\n }else {\n $('.content-hero').css('min-height', '200px');\n }\n });\n\n $(window).resize(function () {\n if($(window).width() > 1023) {\n $('.content-hero').height(image.height);\n }else {\n $('.content-hero').css('min-height', '200px');\n $('.content-hero').css('height', 'auto');\n }\n });\n }\n }\n\n /**\n * Open/Close mobile menu\n */\n\n $('.navbar-toggler').click(function () {\n $('.section-mobile-navigation').slideToggle();\n // $(this).attr('aria-expanded', 'true');\n $(this).attr('aria-expanded', function(index, attr){\n return attr == 'true' ? 'false' : 'true';\n });\n });\n\n\n /**\n * Sticky menu\n */\n\n $(window).scroll(function () {\n if($(document).scrollTop() > 40) {\n $('.main-navigation-wrapper').addClass('is--sticky');\n $('#content').css('margin-top', '72px');\n }else {\n $('.main-navigation-wrapper').removeClass('is--sticky');\n $('#content').css('margin-top', '0');\n }\n });\n\n\n\n });\n}));"],"file":"main.js"}