{"version":3,"sources":["../assets/scripts/main.js"],"names":["$","Sage","common","init","finalize","home","about_us","UTIL","fire","func","funcname","args","namespace","undefined","loadEvents","each","document","body","className","replace","split","i","classnm","ready","jQuery"],"mappings":"CAYA,SAAAA,GAIA,GAAAC,IAEAC,QACAC,KAAA,aAGAC,SAAA,cAKAC,MACAF,KAAA,aAGAC,SAAA,cAKAE,UACAH,KAAA,eAQAI,GACAC,KAAA,SAAAC,EAAAC,EAAAC,GACA,GAAAH,GACAI,EAAAX,CACAS,OAAAG,KAAAH,EAAA,OAAAA,EACAF,EAAA,KAAAC,EACAD,EAAAA,GAAAI,EAAAH,IACAD,EAAAA,GAAA,kBAAAI,GAAAH,GAAAC,KAGAE,EAAAH,GAAAC,GAAAC,IAGAG,WAAA,WAEAP,EAAAC,KAAA,UAGAR,EAAAe,KAAAC,SAAAC,KAAAC,UAAAC,QAAA,KAAA,KAAAC,MAAA,OAAA,SAAAC,EAAAC,GACAf,EAAAC,KAAAc,GACAf,EAAAC,KAAAc,EAAA,cAIAf,EAAAC,KAAA,SAAA,aAKAR,GAAAgB,UAAAO,MAAAhB,EAAAO,aAEAU","file":"main.js","sourcesContent":["/* ========================================================================\n * DOM-based Routing\n * Based on http://goo.gl/EUTi53 by Paul Irish\n *\n * Only fires on body classes that match. If a body class contains a dash,\n * replace the dash with an underscore when adding it to the object below.\n *\n * .noConflict()\n * The routing is enclosed within an anonymous function so that you can\n * always reference jQuery with $, even when in .noConflict() mode.\n * ======================================================================== */\n\n(function($) {\n\n // Use this variable to set up the common and page specific functions. If you\n // rename this variable, you will also need to rename the namespace below.\n var Sage = {\n // All pages\n 'common': {\n init: function() {\n // JavaScript to be fired on all pages\n },\n finalize: function() {\n // JavaScript to be fired on all pages, after page specific JS is fired\n }\n },\n // Home page\n 'home': {\n init: function() {\n // JavaScript to be fired on the home page\n },\n finalize: function() {\n // JavaScript to be fired on the home page, after the init JS\n }\n },\n // About us page, note the change from about-us to about_us.\n 'about_us': {\n init: function() {\n // JavaScript to be fired on the about us page\n }\n }\n };\n\n // The routing fires all common scripts, followed by the page specific scripts.\n // Add additional events for more control over timing e.g. a finalize event\n var UTIL = {\n fire: function(func, funcname, args) {\n var fire;\n var namespace = Sage;\n funcname = (funcname === undefined) ? 'init' : funcname;\n fire = func !== '';\n fire = fire && namespace[func];\n fire = fire && typeof namespace[func][funcname] === 'function';\n\n if (fire) {\n namespace[func][funcname](args);\n }\n },\n loadEvents: function() {\n // Fire common init JS\n UTIL.fire('common');\n\n // Fire page-specific init JS, and then finalize JS\n $.each(document.body.className.replace(/-/g, '_').split(/\\s+/), function(i, classnm) {\n UTIL.fire(classnm);\n UTIL.fire(classnm, 'finalize');\n });\n\n // Fire common finalize JS\n UTIL.fire('common', 'finalize');\n }\n };\n\n // Load Events\n $(document).ready(UTIL.loadEvents);\n\n})(jQuery); // Fully reference jQuery after this point.\n"],"sourceRoot":"assets/scripts/"}