﻿// Master JS
$(document).ready(function() {

    $('.js-clear').each(function() {
        $(this).attr("value2", $(this).attr("value"));
    });

    $('.js-clear').focus(function() {
        if ($(this).attr("value2") == $(this).attr("value")) {
            $(this).attr("value", "");
        }
    });

    $('.js-clear').blur(function() {
        if ("" == $(this).attr("value")) {
            $(this).attr("value", $(this).attr("value2"));
        }
    });

    $(".confirm input").click(function() {
        if ($(this).attr("checked") == true) {
            $("input.submit").attr("disabled", "");
        }
        else {
            $("input.submit").attr("disabled", "disabled");
        }
    });

    if ($(this).attr("checked") == true) {
        $("input.submit").attr("disabled", "");
    }
    else {
        $("input.submit").attr("disabled", "disabled");
    }
    
});
