﻿/// <reference path="jquery-1.4.1-vsdoc.js" />

$('form').attr('autocomplete', 'off');

$(function () {
    // fix password tooltip error
    $(".ServerErrorField").each(function () {
        var container = $(this);
        container.find("input").change(function () {
            // when we enter a new password, hide any error until next postback
            container.find(".ServerError").html("");
        });
    });
    // clear autocomplete password text
    $("input[type=password]").val("");

    // use mask to select date
    $(".DateField .textbox").each(function () {
        var box = $(this);

        var refresh = function () {
            if (box.val() == "")
                box.val("dd/mm/yyyy");
        }
        refresh();
        box.blur(refresh);
        box.focus(function () {
            if (box.val() == "dd/mm/yyyy")
                box.val("");
        });


    });
});
