
var getFragment = function(href) {
    var split = href.split("#");
    if (split.length > 1 && split[1].length > 0) {
        return split[1];
    } else {
        return null;
    }
}

$(document).ready(function() {
        var fragment = getFragment(document.location.href);
        if (fragment != null) {
            $(".overview li." + fragment).addClass("active");
            $("#a" + fragment).addClass("active");
        } else {
            $(".overview").addClass("all");
            $("#all").addClass("active");
        }
        $("a.pool").click(function() {
                $(".overview").removeClass("all");
                $(".overview li").removeClass("active");
                $(".subnavigation a").removeClass("active");
                $(this).addClass("active");
                var fragment = getFragment(this.href);
                $(".overview li." + fragment).addClass("active");
				this.blur();
				window.focus();
				return false;
            });
        $("a.all").click(function() {
                $(".overview li").removeClass("active");
                $(".overview").addClass("all");
                $(".subnavigation a").removeClass("active");
                $(this).addClass("active");
				this.blur();
				window.focus();
				return false;
            });
    });

