﻿

$(document).ready(function () {

    // Expand Panel
    $("#open").click(function () {
        $("div.slidepanel").slideDown("slow");

    });

    // Collapse Panel
    $("#close").click(function () {
        $("div.slidepanel").slideUp("slow");
    });

    // Switch buttons from "Log In | Register" to "Close Panel" on click
    $("#toggle a").click(function () {
        $("#toggle a").toggle();
    });		

    $("a[href^='http']").filter(function () {
        var urlWithoutQuery;
        if (this.href.indexOf("?") == -1) {
            urlWithoutQuery = this.href;
        } else {
            urlWithoutQuery = this.href.substring(0, this.href.indexOf("?"));
        }

        return (urlWithoutQuery.indexOf(location.hostname) == -1) && (urlWithoutQuery.indexOf("addthis") == -1);

    }).click(function () {
        recordOutboundLink(this, 'Outbound Links', $(this).attr('href'));
    });

    $("#header ul.navigation li:last-child").addClass("last");

    if ($(".table tr")) {
        $(".table tr:odd").addClass("odd");
    }

});
