﻿$(document).ready(function() {
    $("#tab .toggle").click(function() {
        $("#loginslider").slideToggle();
        $(this).toggleClass("active"); return false;
    });

    $("#tab .logout").click(function() {
        top.location.href = '/handlers/logout.ashx';
    });

    $("#login_form .top label").inFieldLabels();
    $(".new_links li label").inFieldLabels();
    $(".admin_search label").inFieldLabels();

    $('.accordion .head').click(function() {
        $(this).next().slideToggle('slow');
        $(this).toggleClass("active");
        return false;
    }).next().hide();

    lastBlock = $(".team_submissions .open .round_content");
    minWidth = 1;

    $(".rounds_four li a.toggle").click(function() {
        $(lastBlock).animate({ width: minWidth + "px" }, { queue: false, duration: 400 });
        $(this).next().animate({ width: "125px" }, { queue: false, duration: 400 });
        lastBlock = $(this).next();
    });

    $(".rounds_three li a.toggle").click(function() {
        $(lastBlock).animate({ width: minWidth + "px" }, { queue: false, duration: 400 });
        $(this).next().animate({ width: "148px" }, { queue: false, duration: 400 });
        lastBlock = $(this).next();
    });

});