﻿$(document).ready(function () {
    if ($(".error").length > 0)
        $("#regform").css("display", "block");
    else
        $("#regform").css("display", "none");
    
    $(".togglePopup").bind("click", function (e) {
        e.preventDefault();
        var href = $(this).attr("href");

        var $regForm = $("#regform");

        if ($regForm.css("display") == "none") {
            $regForm.css("display", "block");
            $(href).attr("checked", "checked");
        }
        else
            $regForm.css("display", "none");
    });
});
