/* Array.indexOf polyfill * https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/indexOf */ if (!Array.prototype.indexOf) { Array.prototype.indexOf = function (e) { "use strict"; if (this == null) { throw new TypeError } var t = Object(this); var n = t.length >>> 0; if (n === 0) { return -1 } var r = 0; if (arguments.length > 1) { r = Number(arguments[1]); if (r != r) { r = 0 } else if (r != 0 && r != Infinity && r != -Infinity) { r = (r > 0 || -1) * Math.floor(Math.abs(r)) } } if (r >= n) { return -1 } var i = r >= 0 ? r : Math.max(n - Math.abs(r), 0); for (; i < n; i++) { if (i in t && t[i] === e) { return i } } return -1 } } /*! http://mths.be/placeholder v1.8.7 by @mathias */ (function (f, h, c) { var a = 'placeholder' in h.createElement('input'), d = 'placeholder' in h.createElement('textarea'), i = c.fn, j; if (a && d) { j = i.placeholder = function () { return this }; j.input = j.textarea = true } else { j = i.placeholder = function () { return this.filter((a ? 'textarea' : ':input') + '[placeholder]').not('.placeholder').bind('focus.placeholder', b).bind('blur.placeholder', e).trigger('blur.placeholder').end() }; j.input = a; j.textarea = d; c(function () { c(h).delegate('form', 'submit.placeholder', function () { var k = c('.placeholder', this).each(b); setTimeout(function () { k.each(e) }, 10) }) }); c(f).bind('unload.placeholder', function () { c('.placeholder').val('') }) } function g(l) { var k = {}, m = /^jQuery\d+$/; c.each(l.attributes, function (o, n) { if (n.specified && !m.test(n.name)) { k[n.name] = n.value } }); return k } function b() { var k = c(this); if (k.val() === k.attr('placeholder') && k.hasClass('placeholder')) { if (k.data('placeholder-password')) { k.hide().next().show().focus().attr('id', k.removeAttr('id').data('placeholder-id')) } else { k.val('').removeClass('placeholder') } } } function e() { var o, n = c(this), k = n, m = this.id; if (n.val() === '') { if (n.is(':password')) { if (!n.data('placeholder-textinput')) { try { o = n.clone().attr({ type: 'text' }) } catch (l) { o = c('').attr(c.extend(g(this), { type: 'text' })) } o.removeAttr('name').data('placeholder-password', true).data('placeholder-id', m).bind('focus.placeholder', b); n.data('placeholder-textinput', o).data('placeholder-id', m).before(o) } n = n.removeAttr('id').hide().prev().attr('id', m).show() } n.addClass('placeholder').val(n.attr('placeholder')) } else { n.removeClass('placeholder') } } } (this, document, jQuery)); /* * jQuery scrollintoview() plugin and :scrollable selector filter * * Version 1.8 (14 Jul 2011) * Requires jQuery 1.4 or newer * * Copyright (c) 2011 Robert Koritnik * Licensed under the terms of the MIT license * http://www.opensource.org/licenses/mit-license.php */ (function (f) { var c = { vertical: { x: false, y: true }, horizontal: { x: true, y: false }, both: { x: true, y: true }, x: { x: true, y: false }, y: { x: false, y: true } }; var b = { duration: "fast", direction: "both" }; var e = /^(?:html)$/i; var g = function (k, j) { j = j || (document.defaultView && document.defaultView.getComputedStyle ? document.defaultView.getComputedStyle(k, null) : k.currentStyle); var i = document.defaultView && document.defaultView.getComputedStyle ? true : false; var h = { top: (parseFloat(i ? j.borderTopWidth : f.css(k, "borderTopWidth")) || 0), left: (parseFloat(i ? j.borderLeftWidth : f.css(k, "borderLeftWidth")) || 0), bottom: (parseFloat(i ? j.borderBottomWidth : f.css(k, "borderBottomWidth")) || 0), right: (parseFloat(i ? j.borderRightWidth : f.css(k, "borderRightWidth")) || 0) }; return { top: h.top, left: h.left, bottom: h.bottom, right: h.right, vertical: h.top + h.bottom, horizontal: h.left + h.right } }; var d = function (h) { var j = f(window); var i = e.test(h[0].nodeName); return { border: i ? { top: 0, left: 0, bottom: 0, right: 0 } : g(h[0]), scroll: { top: (i ? j : h).scrollTop(), left: (i ? j : h).scrollLeft() }, scrollbar: { right: i ? 0 : h.innerWidth() - h[0].clientWidth, bottom: i ? 0 : h.innerHeight() - h[0].clientHeight }, rect: (function () { var k = h[0].getBoundingClientRect(); return { top: i ? 0 : k.top, left: i ? 0 : k.left, bottom: i ? h[0].clientHeight : k.bottom, right: i ? h[0].clientWidth : k.right } })() } }; f.fn.extend({ scrollintoview: function (j) { j = f.extend({}, b, j); j.direction = c[typeof (j.direction) === "string" && j.direction.toLowerCase()] || c.both; var n = ""; if (j.direction.x === true) { n = "horizontal" } if (j.direction.y === true) { n = n ? "both" : "vertical" } var l = this.eq(0); var i = l.closest(":scrollable(" + n + ")"); if (i.length > 0) { i = i.eq(0); var m = { e: d(l), s: d(i) }; var h = { top: m.e.rect.top - (m.s.rect.top + m.s.border.top), bottom: m.s.rect.bottom - m.s.border.bottom - m.s.scrollbar.bottom - m.e.rect.bottom, left: m.e.rect.left - (m.s.rect.left + m.s.border.left), right: m.s.rect.right - m.s.border.right - m.s.scrollbar.right - m.e.rect.right }; var k = {}; if (j.direction.y === true) { if (h.top < 0) { k.scrollTop = m.s.scroll.top + h.top } else { if (h.top > 0 && h.bottom < 0) { k.scrollTop = m.s.scroll.top + Math.min(h.top, -h.bottom) } } } if (j.direction.x === true) { if (h.left < 0) { k.scrollLeft = m.s.scroll.left + h.left } else { if (h.left > 0 && h.right < 0) { k.scrollLeft = m.s.scroll.left + Math.min(h.left, -h.right) } } } if (!f.isEmptyObject(k)) { if (e.test(i[0].nodeName)) { i = f("html,body") } i.animate(k, j.duration).eq(0).queue(function (o) { f.isFunction(j.complete) && j.complete.call(i[0]); o() }) } else { f.isFunction(j.complete) && j.complete.call(i[0]) } } return this } }); var a = { auto: true, scroll: true, visible: false, hidden: false }; f.extend(f.expr.pseudos, { scrollable: function (k, i, n, h) { var m = c[typeof (n[3]) === "string" && n[3].toLowerCase()] || c.both; var l = (document.defaultView && document.defaultView.getComputedStyle ? document.defaultView.getComputedStyle(k, null) : k.currentStyle); var o = { x: a[l.overflowX.toLowerCase()] || false, y: a[l.overflowY.toLowerCase()] || false, isRoot: e.test(k.nodeName) }; if (!o.x && !o.y && !o.isRoot) { return false } var j = { height: { scroll: k.scrollHeight, client: k.clientHeight }, width: { scroll: k.scrollWidth, client: k.clientWidth }, scrollableX: function () { return (o.x || o.isRoot) && this.width.scroll > this.width.client }, scrollableY: function () { return (o.y || o.isRoot) && this.height.scroll > this.height.client } }; return m.y && j.scrollableY() || m.x && j.scrollableX() } }) })(jQuery); /* * Foundation Responsive Library * http://foundation.zurb.com * Copyright 2014, ZURB * Free to use under the MIT license. * http://www.opensource.org/licenses/mit-license.php * * Foundation Zurb - Off Canvas layout jQuery */ (function (e, t, n) { var r = n("#topMenu"), i = "click.fndtn"; if (r.length > 0) r.css("margin-top", r.height() * -1); var s = n("#sidebarButton"); if (s.length > 0) { n("#sidebarButton").on(i, function (e) { e.preventDefault(); n("body").toggleClass("active") }) } var o = n("#menuButton"); if (o.length > 0) { n("#menuButton").on(i, function (e) { e.preventDefault(); n("body").toggleClass("active-menu") }) } var u = n("#switchPanels"); if (u.length > 0) { n("#switchPanels dd").on(i, function (e) { e.preventDefault(); var t = n(this).children("a").attr("href"), r = n(t).index(); n(this).toggleClass("active").siblings().removeClass("active"); n(t).parent().css("left", r * -100 + "%") }) } n("#nav li a").on(i, function (e) { e.preventDefault(); var t = n(this).attr("href"), r = n(t); n("html, body").animate({ scrollTop: r.offset().top }, 300) }) })(this, document, jQuery) /* highlight v4 Highlights arbitrary terms. MIT license. Johann Burkard */ jQuery.fn.highlight=function(e,t,n){n||(n="span");var d=function(e){return e.toUpperCase()},i=function(e){return e.toLowerCase()},a=function(e){return e};function o(e,a,h){if(this.skip=0,3==e.nodeType){if(e.data.length!=h(e.data).length||a.length!=h(a).length)return!1;var l=h(a),r=h(e.data),s=e.parentNode.className;if(t)for(var c=t.split(" "),p=0;p=0){var N=document.createElement(n);t&&(N.className=t);var f=e.splitText(u),g=(f.splitText(h(a).length),f.cloneNode(!0));N.appendChild(g),f.parentNode.replaceChild(N,f),this.skip=1}else this.skip=0}}else if(1==e.nodeType&&e.childNodes&&!/(script|style)/i.test(e.tagName))for(p=0;p1,n=0;ne.childNodes[0].data.length&&(e.innerText=n)}}}).end()};