(function (){
this.Leo = {
}
, this.Leo.Pager = {
}
, Leo.headingLinks = function (e){
return e.els.each(function (){
var e, n;
return e = $(this), n = Leo.slugify(e.text()), e.attr("id", n), e.prepend("#");
}
);
}
, Leo.readTime = function (e){
var n;
return n = Math.ceil(_AN_Read_length("length", e.text.split(" ")) / e.wordsPerMinute), e.element.append("" + n + " minute read");
}
, Leo.Pager = function (){
var e, n, t, s, o, i, u, r;
return o = 0, i = [] , r = {
next: 39,
prev: 37}
, s = function (e){
return o = e, n(), u(), console.log(o);
}
, n = function (){
return i.push("/"), i.push("/styleguide/"), i.push("/styleguide/basics/"), i.push("/styleguide/numbers-game/"), i.push("/styleguide/comments/"), i.push("/styleguide/naming/"), i.push("/manifest/"), i.push("/foundation/"), i.push("/foundation/reset/"), i.push("/foundation/helpers/"), i.push("/foundation/config/"), i.push("/foundation/base/"), i.push("/foundation/tools/"), i.push("/components/"), i.push("/structures/"), i.push("/vendor/"), i.push("/about/"), i.push("/resources/");
}
, u = function (){
return $(document).on("keydown", function (n){
switch (e(n)){
case r.next: return t("next");
case r.prev: return t("prev");
}
}
);
}
, e = function (e){
var n;
return e = e || window.event, n = e.keyCode || e.which;
}
, t = function (e){
switch (e){
case "next": if (o !== _AN_Read_length("length", i) - 1) return _AN_Write_location("location", window, false , i[o + 1]);
break ;
case "prev": if (0 !== o) return _AN_Write_location("location", window, false , i[o - 1]);
}
}
, {
init: s}
;
}
(), Leo.slugify = function (e){
return _AN_Call_replace("replace", _AN_Call_replace("replace", _AN_Call_replace("replace", _AN_Call_replace("replace", _AN_Call_replace("replace", e.toLowerCase(), /\s+/g, "-"), /[^\w\-]+/g, ""), /\-\-+/g, "-"), /^-+/, ""), /-+$/, "");
}
, jQuery(function (e){
return Leo.headingLinks({
els: e("h2, h3, h4, h5, h6")}
), _AN_Call_init("init", Leo.Pager, e("body").data("id")), e(".toggle").on("click", function (n){
return n.preventDefault(), e(this).toggleClass("is-active"), e("body").toggleClass("is-sidebar-open"), e(".sidebar").toggleClass("is-open");
}
), e(document).on("keyup", function (n){
switch (n.which){
case 83: return e(".toggle").toggleClass("is-active"), e("body").toggleClass("is-sidebar-open"), e(".sidebar").toggleClass("is-open");
}
}
);
}
);
}
).call(this);