$(function(){
$('[data-toggle="tooltip"]').tooltip();
$(".req-input input, .req-input textarea").on("click input", function(){
validate($(this).closest("[data-form-container]"));
});
var currentlySelected;
$(document).mousedown(function(e) {
currentlySelected = $(e.target);
});
$(".req-input input, .req-input textarea").on("blur", function(e){
var Parent = $(this).closest("[data-form-container]");
if(typeof currentlySelected != "undefined" && currentlySelected.parent().hasClass("req-input") && Parent.attr("id") == currentlySelected.closest(".form-container").attr("id"))
return;
var length = 0;
Parent.find("input").each(function(){
length += $(this).val().length;
});
Parent.find("textarea").each(function(){
length += $(this).val().length;
});
if(length == 0){
var container = $(this).closest(".form-container");
resetForm(container);
}
});
$(".create-account").on('click', function(){
if($(".confirm-password").is(":visible")){
$(this).text("Create an Account");