/**
 *  Default javascript for the system.
 */

$(document).ready (function () {

    // Open external links in a new window.
    $("a.external").attr ("target", "_blank");

    // Set any "required" form fields to have bold labels.
    $("label.required").each (function () {
        $(this).attr ("style", "font-weight: bold;");
        $(this).html ($(this).html () + " *");
    });

    // Set any delete links so that they ask for confirmation before you delete
    $("a.delete_link").click (function (e) {
        return confirm ("Are you sure you wish to delete this item?");
    });

    // Set up the date fields
    $(".datefield").datepicker ({
        dateFormat: "d/m/yy"
    });

});
