(function (c) { (function () { var j = {}, k = function (b, a) { return j[b] = a }, i = { ui: [{ selector: ".checkbox", onEvent: "click", className: "checked", target: !1, condition: !1, complete: function (b) { var a = b.hasClass("checked"); b.children("input").attr("checked", a) } }, { selector: ".radio", onEvent: "click", className: "checked", target: !1, condition: !1, complete: function (b) { b = b.children("input"); c('input[name="' + b.attr("name") + '"]').attr("checked", !1).parent().removeClass("checked"); b.attr("checked", !0).parent().addClass("checked") } }, { selector: 'form[data-form="validate"] .field', onEvent: "blur", className: "error", target: !1, condition: function (b) { var a = b.find("input, textarea").first(), c = a.val(); if (!a.attr("required"))return !1; if ("email" === a.attr("type") && !c.match(/^[\w.%&=+$#!-']+@[\w.-]+\.[a-zA-Z]{2,4}$/) || !c.length)return b.addClass("error"), !1; b.removeClass("error") }, complete: !1 }, { selector: '.toggle:not([data-on]), .toggle[data-on="click"]', onEvent: "click", className: "active", target: function (b) { return b.add(c(b.attr("data-for"))) }, condition: !1, complete: !1 }, { selector: '.toggle[data-on="hover"]', onEvent: "mouseover mouseout", className: "active", target: function (b) { return b.add(c(b.attr("data-for"))) }, condition: !1, complete: !1 }], init: function () { var b, a, e, f, h, d; for (b in i.ui)a = i.ui[b], c(a.selector), e = a.complete && "function" === typeof a.complete ? a.complete : !1, f = a.condition && "function" === typeof a.condition ? a.condition : !1, d = a.target && "function" === typeof a.target ? a.target : !1, h = a.className || !1, k(a.selector.replace(" ", "-"), { GumbyCallback: e, GumbyConditionalCallBack: f, GumbyActiveClass: h, GumbyTarget: d }), c(document).on(a.onEvent, a.selector, function (a) { a.preventDefault(); var b = c(this), e = c(this), a = a.handleObj.selector.replace(" ", "-"), a = j[a] || !1; if (a.GumbyConditionalCallBack)return a.GumbyConditionalCallBack(b); a.GumbyActiveClass && (a.GumbyTarget && (e = a.GumbyTarget(b)), e.toggleClass(a.GumbyActiveClass)); a.GumbyCallback && a.GumbyCallback(b) }) } }, g = { init: function () { g.pickers(); g.skipLinks(); g.tabs() }, pickers: function () { c(document).on("click", ".picker", function (b) { b.preventDefault(); var b = c(this), a = null; if ("handheld" === window.getComputedStyle(b.get(0), ":after").getPropertyValue("content"))return !1; b.hover(function () { clearTimeout(a) }, function () { var b = c(this); a = setTimeout(function () { b.removeClass("open") }, 500) }); b.toggleClass("open") }); c(document).on("click", ".picker > ul > li", function (b) { b.preventDefault(); var b = c(this), a = b.parents(".picker"), e = b.children("a").html(); a.children(".toggle").html(e + ''); a.find("option").attr("selected", !1).eq(b.index() + 1).attr("selected", !0) }) }, skipLinks: function () { var b = function () { var a, b, f = c("[data-type]"), h = !1, d = !1; a = c(this); if (a.get(0) === window && !window.location.hash)return !1; a.get(0) === window && window.location.hash ? (b = window.location.hash.replace("#", ""), d = !0) : (a = a.attr("href").split("#"), b = a[a.length - 1]); f.each(function () { var a = c(this).attr("data-type").split(" "), f; for (f in a)if (a[f] === b) { h = c(this); return false } }); if (!h.length)return !1; c("body,html").animate({scrollTop: h.offset().top}, 350); d && (window.location.hash = b) }; c(document).on("click", ".skiplink a, .skipnav ul li a, .skip", b); c(window).load(b) }, tabs: function () { var b = function (a) { var b = a.parents(".tabs"), c = { tab: b.find("ul").children("li.active"), content: b.find("div[data-tab].active") }, a = { tab: a.parent("li"), content: b.find("[data-tab=" + a.attr("href").replace("#", "") + "]") }, d, g; for (d in c)c[d].removeClass("active"); for (g in a)a[g].addClass("active") }; c(document).on("click", ".tabs ul li a", function () { b(c(this)) }); if (window.location.hash) { var a = c('a[href="' + window.location.hash + '"]'); a.length && a.parents(".tabs").length && b(a) } } }; return { i: function () { i.init(); g.init() } } })().i() })(window.jQuery);