function debounce(a, b) {
    var c;
    return function() {
        function d() {
            a(), c = null
        }
        c && clearTimeout(c), c = setTimeout(d, b || 100)
    }
}
jQuery(window).load(function() {
    function a(a) {
        var b = a;
        b.find(".front").css("background-image", "url(" + b.data("img") + ")")
    }

    function b(a) {
        var b = (g - a.height()) / 2;
        $mobile = h < 768 ? 50 : b, j.one("arrangeComplete", function() {
            jQuery("html, body").animate({
                scrollTop: a.offset().top - 180
            }, 900)
        })
    }

    function c(a) {
        var b = a.find(".full-bio"),
            c = a.find(".flipper"),
            d = !1 === b.attr("aria-hidden", !1),
            e = !0 !== c.attr("aria-expanded", !0);
        b.attr("aria-hidden", d), c.attr("aria-expanded", e)
    }
    var d, e = jQuery("#searcher_wrap"),
        f = jQuery("#searcher"),
        g = jQuery(window).height(),
        h = jQuery(window).width(),
        i = jQuery("#filter"),
        j = jQuery(".grid").isotope({
            itemSelector: ".grid-item",
            percentPosition: !0,
            masonry: {
                columnWidth: ".grid-sizer"
            },
			filter: ".current-scholar"
//            ,filter: ".2017:not(.title-card)"
//            filter: ":not(.title-card)"
        });
    j.one("arrangeComplete", function() {
        jQuery("#overlay").fadeOut(300, function() {
            jQuery(this).remove()
        })
    }), j.isotope();
    var k = jQuery(".quicksearch").keyup(debounce(function() {
        d = new RegExp(k.val(), "gi"), j.isotope({
            filter: function() {
                var a = jQuery(this);
                return (!d || a.text().match(d)) && a.is(":not(.title-card)")
            }
        })
    }, 200));
    if (jQuery(".featured").each(function(b, c) {
            a(jQuery(c))
        }), j.on("click", ".grid-item", function() {
            var d = jQuery(this),
                e = d.data("name"),
                f = e && "#name=" + e;
            d.hasClass("open") || d.hasClass("special") ? (d.removeClass("open"), c(d)) : (jQuery(".grid-item").removeClass("open"), d.addClass("open"), a(d), b(d), window.location.hash = f, c(d)), j.isotope()
        }), jQuery("#clear").on("click", function(a) {
            a.preventDefault(), jQuery("select").prop("selectedIndex", 0), jQuery(".grid-item").removeClass("open"), i.removeClass("select_active"), i.find("li").removeClass("labelToggle"), window.location.hash = "", j.isotope({
                filter: ":not(.title-card)"
            })
        }), i.on("change", "select", function() {
            "" === this.value ? jQuery(this).parent("li").removeClass("labelToggle") : jQuery(this).parent("li").addClass("labelToggle");
            var a = "",
                b = !1;
            i.addClass("select_active"), jQuery(".labelToggle > select").each(function() {
                ".arts-sci-arts, .arts-sci-humanities, .arts-sci-natural-sci, .arts-sci-social-sci, .arts-sci-all-divisions" == jQuery(this).val() ? b = !0 : a += jQuery(this).val()
            }), filterValueReturn = b ? ".arts-sci-arts" + a + ", .arts-sci-humanities" + a + ", .arts-sci-natural-sci" + a + ", .arts-sci-social-sci" + a + ", .arts-sci-all-divisions" + a : a, a = a, j.isotope({
                filter: filterValueReturn
            })
        }), i.each(function(a, b) {
            var c = jQuery(b);
            c.on("click", "button", function() {
                c.find(".is-checked").removeClass("is-checked"), jQuery(this).addClass("is-checked")
            })
        }), jQuery("#searcher").on("click", function(a) {
            a.preventDefault(), e.find("input").focus(), e.toggleClass("active_search"), f.hasClass("is-checked") && (e.find("input").val(""), jQuery(".quicksearch").keyup()), f.toggleClass("is-checked")
        }), jQuery(document).on("keyup", function(a) {
            27 == a.keyCode && jQuery("#searcher").hasClass("is-checked") && (e.toggleClass("active_search"), f.toggleClass("is-checked"), e.find("input").val(""))
        }), jQuery(document).keypress(function(a) {
            13 == a.which && jQuery(a.target).trigger("click")
        }), location.hash.match(/^#name/)) {
        var l = location.hash.substring(6),
            m = jQuery('*[data-name="' + l + '"]');
        m.toggleClass("open"), j.isotope(), a(m), b(m), c(m)
    }
    jQuery(".tags").on("click", "a", function(a) {
        var b = jQuery(this),
            c = a;
        $text = b.text(), c.preventDefault(), c.stopPropagation(), i.addClass("select_active"), j.isotope({
            filter: function() {
                return !$text || jQuery(this).find(".tags").text().match($text)
            }
        })
    })
}), "onpropertychange" in document && window.matchMedia && jQuery("html").addClass("ie10");