{"version":3,"sources":["styles.js","scripts.js","site.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"site.js","sourcesContent":["// Performs tests to see if a stylesheet was loaded successfully, if the stylesheet failed to load, appends a new\r\n// link tag pointing to the local copy of the stylesheet before performing the next check.\r\n(function (document) {\r\n \"use strict\";\r\n\r\n var fallbacks = [\r\n {\r\n // metaName - The name of the meta tag that the test is performed on. The meta tag must have a class from the\r\n // relevant stylesheet on it so it is styled and a test can be performed against it. E.g. for\r\n // font awesome the meta tag is\r\n // added. The 'fa' class causes the font awesome style to be applied to it.\r\n metaName: \"x-font-awesome-stylesheet-fallback-test\",\r\n // test - The test to perform against the meta tag. Checks to see if the Font awesome styles loaded\r\n // successfully by checking that the font-family of the meta tag is 'FontAwesome'.\r\n test: function (meta) { return meta.style.fontFamily === \"FontAwesome\"; },\r\n // href - The URL to the fallback stylesheet.\r\n href: \"/css/font-awesome.css\"\r\n }\r\n ];\r\n\r\n var metas = document.getElementsByTagName(\"meta\");\r\n\r\n for (var i = 0; i < fallbacks.length; ++i) {\r\n var fallback = fallbacks[i];\r\n\r\n for (var j = 0; j < metas.length; ++j) {\r\n var meta = metas[j];\r\n if (meta.getAttribute(\"name\") === fallback.metaName) {\r\n if (!fallback.test(meta)) {\r\n var link = document.createElement(\"link\");\r\n link.href = fallback.href;\r\n link.rel = \"stylesheet\";\r\n document.getElementsByTagName(\"head\")[0].appendChild(link);\r\n }\r\n break;\r\n }\r\n }\r\n\r\n }\r\n\r\n})(document);","// Performs tests to see if a script was loaded successfully, if the script failed to load, appends a new script tag\r\n// pointing to the local copy of the script and then waits for it to load before performing the next check.\r\n// Example: Bootstrap is dependant on jQuery. If loading jQuery from the CDN fails, this script loads the jQuery\r\n// fallback and waits for it to finish loading before attempting the next fallback test.\r\n(function (document) {\r\n \"use strict\";\r\n\r\n var fallbacks = [\r\n // test - Tests whether the script loaded successfully or not. Returns true if the script loaded successfully or\r\n // false if the script failed to load and the fallback is required.\r\n // src - The URL to the fallback script.\r\n { test: function () { return window.jQuery; }, src: \"/js/jquery.js\" },\r\n { test: function () { return window.jQuery.fn.modal; }, src: \"/js/bootstrap.js\" }\r\n ];\r\n\r\n var check = function (fallbacks, i) {\r\n if (i < fallbacks.length) {\r\n var fallback = fallbacks[i];\r\n if (fallback.test()) {\r\n check(fallbacks, i + 1);\r\n }\r\n else {\r\n var script = document.createElement(\"script\");\r\n script.onload = function () {\r\n check(fallbacks, i + 1);\r\n };\r\n script.src = fallback.src;\r\n document.getElementsByTagName(\"body\")[0].appendChild(script);\r\n }\r\n }\r\n };\r\n check(fallbacks, 0);\r\n\r\n})(document);","// Its good practice to wrap your JavaScript in an immediately-invoked function expression (IIFE)\r\n// (See https://en.wikipedia.org/wiki/Immediately-invoked_function_expression) to stop your functions being added to\r\n// the global scope (See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions).\r\n\r\n// framework - The namespace under which all your code should live if you want it to be globally available. As an\r\n// example a calculator object has been created under the framework namespace below. Note that due to the\r\n// '||' we are using when passing in the namespace at the bottom of this file, you can repeat the pattern\r\n// in as many files as you want. The calculator would be better off in a calculator.js file for example.\r\n// (See http://elijahmanor.com/angry-birds-of-javascript-red-bird-iife/)\r\n// $ - The jQuery object. We can't assume that '$' sign is the main jQuery object or being used for something\r\n// else. It is good practice to pass in the full 'jQuery' object and assign it to the dollar sign here.\r\n// window - The window object could have been changed during the application lifetime, to guard against this it is\r\n// good practice to hold onto a copy.\r\n// document - Same as above.\r\n// undefined - We have an undefined parameter but we do not pass in a value for it. This ensures that the undefined\r\n// keyword does actually mean undefined and has not been reassigned (Yes, that is possible in JavaScript).\r\n//\r\n(function (framework, $, window, document, undefined) {\r\n \"use strict\";\r\n\r\n //$(function () {\r\n // $('.flexslider').flexslider({\r\n // animation: \"slide\",\r\n // controlNav: \"thumbnails\",\r\n // prevText: \"\",\r\n // nextText: \"\"\r\n // });\r\n\r\n // /*\r\n // Slider 2\r\n // */\r\n // $('.slider-2-container').backstretch([\r\n // \"/img/slider/3.jpg\", \"/img/slider/1.jpg\", \"/img/slider/2.jpg\", \"/img/slider/4.jpg\"\r\n // ], { duration: 9000, fade: 750 });\r\n //});\r\n\r\n // This is an example of creating a Calculator object under the framework namespace. The Calculator is using the\r\n // Revealing Prototype Pattern. You can use the Calculator using the 'new' keyword e.g. var c = new Calculator();\r\n // (See http://weblogs.asp.net/dwahlin/techniques-strategies-and-patterns-for-structuring-javascript-code-revealing-prototype-pattern)\r\n framework.Calculator = function (throwOnDivideByZero) {\r\n // Calculator constructor. You can pass parameters to the Calculator and/or create private variables like here.\r\n this.throwOnDivideByZero = throwOnDivideByZero === undefined ? true : throwOnDivideByZero;\r\n };\r\n framework.Calculator.prototype = (function () {\r\n\r\n // The 'self' variable ensures that the 'this' keyword references the Calculator and not the calling function.\r\n // (See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this)\r\n var self = this;\r\n\r\n function add(a, b) {\r\n return a + b;\r\n }\r\n\r\n function subtract(a, b) {\r\n return a - b;\r\n }\r\n\r\n function multiply(a, b) {\r\n return a * b;\r\n }\r\n\r\n function divide(a, b) {\r\n checkDivideByZero(b);\r\n return a / b;\r\n }\r\n\r\n // This private function is not exposed to those who want to use the Calculator.\r\n function checkDivideByZero(x) {\r\n if ((x === 0) && self.throwOnDivideByZero) {\r\n throw new Error(\"Divide by Zero.\");\r\n }\r\n }\r\n\r\n return {\r\n add: add,\r\n subtract: subtract,\r\n multiply: multiply,\r\n divide: divide\r\n };\r\n }());\r\n\r\n})(window.framework = window.framework || {}, window.jQuery, window, document);\r\n"],"sourceRoot":"/source/"}