(function (a) {
        var b = a.sammy("#viewport", function () {
        this.use(Sammy.Handlebars, "hb"); this.use(Sammy.GoogleAnalytics, "#!"); this.helpers({ slide: function () { a("#header a").removeClass("selected");   var c = b.getLocation().replace("#!/", "").split("/")[0];  if (c) { a("#" + c).addClass("active") } if (!c) {   var d = a("#home"); hide_ribbon(); a(document).unbind("keydown"); activated = false} else { show_ribbon(); if (!activated) { evaluate_key_press() } var d = a("#" + c); a("#nav ." + c + " a").addClass("selected") } a("#viewport").scrollTo(d, 1000, { offset: 50 }); a("#all").children().children().animate({ opacity: 1 }); is_hidden = false } }); this.bind("event-context-after", function () { var c = b.getLocation().replace("#!/", "").split("/"); var d = "ACH Tools"; for (x in c) { if (c != "") { d = d.concat(" - " + c[x].charAt(0).toUpperCase() + c[x].slice(1)) } } document.title = d }); this.bind("load_about", function () { if (!jQuery.data(document.body, "about-loaded")) { a("#about").html(""); this.load("templates/about.htm").then(function (c) { a("#about").html(c); this.trigger("toggle_about") }); jQuery.data(document.body, "about-loaded", true) } else { this.trigger("toggle_about") } }); this.bind("toggle_about", function () { var c = b.getLocation().replace("#!/", "").split("/")[1]; a("#about-menu a").removeClass("selected"); a("#about-menu ." + c + " a").addClass("selected") }); this.bind("staff_toggle", function (d, c) { a("#staff-photos .staffer, .name-bubble").hide(); a("#staff-menu a").removeClass("selected"); a("#staff-photos ." + c).show(); a("#staff-menu li." + c + " a").addClass("selected"); a("#about").removeClass().addClass("mod").addClass(c) }); this.bind("careers_toggle", function (d, c) { a(".career").hide(); a("#careers-" + c).show(); a("#careers-menu a").removeClass("selected"); a("#careers-menu ." + c).addClass("selected") });
        this.get("#!/", function () { this.load("templates/home.htm").then(function (c) { a("#home").html(c) }); this.slide() });
        this.get("#!/demo", function () {
            this.slide()
        });
        this.get("#!/clients", function () { this.load("templates/clients.htm").then(function (c) { a("#clients").html(c) }); this.slide() });
        this.get("#!/signup", function () {

         this.slide() });
        this.get("#!/about", function () { this.trigger("load_about"); this.slide(); this.redirect("#!/about/company") }); 
        this.get("#!/contact", function () {
            this.slide()
        })
    });
    a(function () {
          b.run("#!/") }) })(jQuery); var is_hidden = false; var activated = false; function hide_panel() { $("#all").children().children().animate({ opacity: 0 }); is_hidden = true } function show_panel() {  $("#all").children().children().animate({ opacity: 1 }); is_hidden = false } function evaluate_key_press() { activated = true; $(document).keydown(function (a) { if (a.keyCode == 32) { if (!is_hidden) { } else { show_panel() } return true } }) } function show_ribbon() { if ($(".ribbon").css("top") == "-36px") { var a = 0; $(".ribbon").delay(500).animate({ top: 0 }, 1000, "easeOutBounce"); $(".ribbon").hover(function () { a = setInterval("$('.space-key').fadeIn(600).fadeOut(600)", 1200); $(".popup").stop(true, true).fadeIn() }, function () { $(".popup").stop(true, true).delay(200).fadeOut("slow"); clearInterval(a) }) } } function hide_ribbon() { if ($(".ribbon").css("top") == "0px") { $(".ribbon").delay(500).animate({ top: "-36px" }, 300, "easeInQuad") } } $(document).ready(function () { $(".staffer").live({ mouseenter: function () { if (!$(this).hasClass("jonas")) { $(this).find(".name-bubble").stop(false, true).fadeIn() } }, mouseleave: function () { $(this).find(".name-bubble").stop(false, true).fadeOut() } }); function b(c) { var e = $(".mod"); var d = e.css("padding-top").replace("px", ""); var f = (c - d); if (f > "630") { e.css("height", f) } } b($(window).height()); $(window).bind("resize", function () { b($(window).height()) }); puke_preload = new Image(); puke_preload.src = "../images/puke.png"; function a() { if ($("#about").hasClass("jonas")) { var c = "<audio preload='auto' autoplay='autoplay' src='files/blahh.m4a' id='audio'></audio>"; $("body").append(c) } setTimeout("$('#audio').remove()", 8500); $("#about.jonas").css("position", "relative"); $("#about.jonas").prepend("<div id='puke'></div>"); $("#puke").hide().delay(500).fadeIn(1500); $("#about.jonas").prepend("<div id='clean-up'></div>"); $("#clean-up").hide().delay(3000).fadeIn(1000) } $("#clean-up").live("click", function () { $("#puke").fadeOut(1500); $("#clean-up").fadeOut(500) }); $(window).konami(function () { a() }) }); (function (a) { a.fn.konami = function (c, b) { if (b == undefined) { b = "38,38,40,40,37,39,37,39,66,65" } return this.each(function () { var d = []; a(this).keydown(function (f) { d.push(f.keyCode); if (d.toString().indexOf(b) >= 0) { a(this).unbind("keydown", arguments.callee); c(f) } }, true) }) } })(jQuery);
