jQuery(document).ready(function($) {if(typeof SITE_URL !== "undefined"){ siteurl = SITE_URL; } else { siteurl = ''; };if($("#form-1").length > 0){timer_1 = 0;var frm_multisites = $("#form-1");var unload_triggerted_1 = 0;$(document).on('keyup change', '#form-1 #first-name,#form-1 #last-name,#form-1 #email-address,#form-1 #phone,#form-1 #message', function() {if(unload_triggerted_1 == 0){$(window).on("beforeunload", function() {return "You have started filling out a form, are you certain you wish to leave this page and lose the information you have entered?";});unload_triggerted_1 = 1;}});$("#form-1").find("#first-name").attr("autocomplete", "off");$("#form-1").find("#last-name").attr("autocomplete", "off");$("#form-1").find("#email-address").attr("autocomplete", "off");$("#form-1").find("#phone").attr("autocomplete", "off");$("#form-1").find("#message").attr("autocomplete", "off");$(document).on('keyup change click', '#form-1 #first-name,#form-1 #last-name,#form-1 #email-address,#form-1 #phone,#form-1 #message', function() {var data= new FormData();data.append ('idform', '1');data.append ('first-name', $("#form-1").find("#first-name").val());data.append ('last-name', $("#form-1").find("#last-name").val());data.append ('email-address', $("#form-1").find("#email-address").val());data.append ('phone', $("#form-1").find("#phone").val());data.append ('message', $("#form-1").find("#message").val());if($("#form-1").find("#first-name").val() != '' && ( $("#form-1").find("#email-address").val() != '' || ($("#form-1").find("#phone").val() != '' && $("#form-1").find("#phone").val().length >= '7' ))) {if (timer_1) {clearTimeout(timer_1);};timer_1 = setTimeout(function() {$.ajax({type: "POST",url: siteurl+"/?docaptureabandoned=1",data: data,processData: false,contentType: false,success: function( response ) {}});}, 900);}});};if($("#form-2").length > 0){timer_2 = 0;var frm_multisites = $("#form-2");var unload_triggerted_2 = 0;$(document).on('keyup change', '#form-2 #first-name,#form-2 #last-name,#form-2 #email-address,#form-2 #phone-number,#form-2 #comments-questions', function() {if(unload_triggerted_2 == 0){$(window).on("beforeunload", function() {return "You have started filling out a form, are you certain you wish to leave this page and lose the information you have entered?";});unload_triggerted_2 = 1;}});$("#form-2").find("#first-name").attr("autocomplete", "off");$("#form-2").find("#last-name").attr("autocomplete", "off");$("#form-2").find("#email-address").attr("autocomplete", "off");$("#form-2").find("#phone-number").attr("autocomplete", "off");$("#form-2").find("#comments-questions").attr("autocomplete", "off");$(document).on('keyup change click', '#form-2 #first-name,#form-2 #last-name,#form-2 #email-address,#form-2 #phone-number,#form-2 #comments-questions', function() {var data= new FormData();data.append ('idform', '2');data.append ('first-name', $("#form-2").find("#first-name").val());data.append ('last-name', $("#form-2").find("#last-name").val());data.append ('email-address', $("#form-2").find("#email-address").val());data.append ('phone-number', $("#form-2").find("#phone-number").val());data.append ('comments-questions', $("#form-2").find("#comments-questions").val());if($("#form-2").find("#first-name").val() != '' && ( $("#form-2").find("#email-address").val() != '' || ($("#form-2").find("#phone-number").val() != '' && $("#form-2").find("#phone-number").val().length >= '7' ))) {if (timer_2) {clearTimeout(timer_2);};timer_2 = setTimeout(function() {$.ajax({type: "POST",url: siteurl+"/?docaptureabandoned=1",data: data,processData: false,contentType: false,success: function( response ) {}});}, 900);}});}});