Ready to Tour? Fill out the form below and a leasing agent will contact you.
Time Out Error . Refresh Page or Try Again Later
");
}
}
});
if (defaultSource == 0)
$('#usersource').val('');
else if (defaultSource)
$('#usersource').val(defaultSource);
else
$('#usersource').val('');
if (disableReferralTracking.toLowerCase() != 'true' && matchedSourceId) {
$('.contact-us-enhanced #usersource').val(matchedSourceId);
$('.contact-us-enhanced #usersourceDiv').hide();
}
$('.contact-us-enhanced #btnEnhSubmit').on('click', function () {
if (f_validateFields()) {
f_enhSubmit();
}
});
});
function f_validateFields() {
$('.contact-us-enhanced .required-group input').each(function() {
if ($(this).val() == '') {
var msg = $(this).attr("aria-label");
$(this).attr("aria-invalid", "true")
$(this).addClass('validate-field');
}
else {
$(this).removeAttr("aria-invalid");
$(this).removeClass('validate-field');
}
});
$('.contact-us-enhanced .required-group input[type="checkbox"]').each(function() {
if ($(this).is(":not(:checked)")) {
var msg = $(this).attr("aria-label");
$(this).attr("aria-invalid", "true")
$(this).addClass('validate-field');
$("label[for=" + $(this).attr("id") + "]").addClass('validate-field');
}
else {
$(this).removeAttr("aria-invalid");
$(this).removeClass('validate-field');
$("label[for=" + $(this).attr("id") + "]").removeClass('validate-field');
}
});
$('.contact-us-enhanced .required-group textarea').each(function () {
if ($(this).val() == '') {
var msg = $(this).attr("aria-label");
$(this).attr("aria-invalid", "true")
$(this).addClass('validate-field');
}
else {
$(this).removeAttr("aria-invalid");
$(this).removeClass('validate-field');
}
});
$('.contact-us-enhanced .required-group select').each(function () {
if ($(this).val() == '') {
var msg = $(this).attr("aria-label");
$(this).attr("aria-invalid", "true")
$(this).addClass('validate-field');
}
else {
$(this).removeAttr("aria-invalid");
$(this).removeClass('validate-field');
}
});
if ($('.contact-us-enhanced .validate-field').length == 0)
return true;
else {
$('.validate-field:first').focus();
return false;
}
}
function f_enhBuildBedRoomSelect() {
var bathRooms = 0;
var bedRooms = 0;
var countUnit = 1;
for (var i = 0; i < rpData.floorplans.length; i++) {
var currentbathRooms = rpData.floorplans[i].bathRooms;
var currentbedRooms = rpData.floorplans[i].bedRooms;
if (bathRooms != currentbathRooms || bedRooms != currentbedRooms) {
var str = currentbedRooms + ' Bed /' + currentbathRooms + ' Bath';
try {
$('.contact-us-enhanced #unitType').append('
' + str + ' ');
} catch(err) {
//This error typically happens when it cannot find the str and consaquently cannot find the key.
}
bathRooms = currentbathRooms;
bedRooms = currentbedRooms;
countUnit++;
}
}
}
function f_getCookie(cookieName) {
var cookieValue = document.cookie;
var cookieStart = cookieValue.indexOf(" " + cookieName + "=");
if (cookieStart == -1) {
cookieStart = cookieValue.indexOf(cookieName + "=");
}
if (cookieStart == -1) {
cookieValue = null;
}
else {
cookieStart = cookieValue.indexOf("=", cookieStart) + 1;
var cookieEnd = cookieValue.indexOf(";", cookieStart);
if (cookieEnd == -1) {
cookieEnd = cookieValue.length;
}
cookieValue = unescape(cookieValue.substring(cookieStart, cookieEnd));
}
return cookieValue;
}
function f_enhValidPhone(b) {
var a = window.event ? b.keyCode : b.which;
if (internationalProperty == 'true' && $('#dayPhone1').val().length == 0 && b.shiftKey && b.keyCode == 43)
return true;
if (a == 0 || a == 8)
return true;
if (a > 47 && a < 58)
return true;
else
return false;
}
function submitContactEnhanced() {
if (enableGoogleRecaptcha == "true") {
o['cmsSiteId'] = cmsSiteId;
o['pageName'] = pageName;
o['widgetName'] = widgetName;
}
o['googleAnalyticsId'] = googleAnalyticsId;
$(".contact-us-enhanced input").each(function () {
if (internationalProperty == 'true' && this.name == 'movedate') {
o[$(this).attr('name')] = ($(this).val().substring(3, 5) + '-' + $(this).val().substring(0, 2) + '-' + $(this).val().substring(6, 10));
}
else {
o[$(this).attr('name')] = $(this).val();
}
});
$(".contact-us-enhanced select").each(function () {
if (this.name == 'usersource')
o[$(this).attr('name')] = $('option:selected', this).text();
else
o[$(this).attr('name')] = $(this).val();
});
$(".contact-us-enhanced textarea").each(function () {
o[$(this).attr('name')] = escape($(this).val());
});
if ($('.contact-us-enhanced #e-mail').val().length == 0) {
var id = $(".contact-us-enhanced #unitType option:selected").val();
try {
//format number before Hash
var formatPhone = rptracker.formatPhoneNumber($('.contact-us-enhanced #phone').val(), countryCode);
//Hash all the parts before sending them to RPTracker.
var first_name = rptracker.hash($('.contact-us-enhanced #firstname').val());
var last_name = rptracker.hash($('.contact-us-enhanced #lastname').val());
var phone = rptracker.hash(formatPhone);
var email = rptracker.hash($('.contact-us-enhanced #email').val());
var source = $('.contact-us-enhanced #usersource option:selected').text();
var bed = 0;
var bath = 0;
for (var key in kpv) {
// skip loop if the property is from prototype
if (!kpv.hasOwnProperty(key)) continue;
var item = kpv[key];
if (item.key === parseInt(id)) {
bed = item.bed;
bath = item.bath;
break;
}
}
//Send the informaiton back over to RPTracker.
rptracker.track('Form Submitted', {
first_name: first_name,
last_name: last_name,
email: email,
phone_number: phone,
bed: bed,
bath: bath,
movein_date: $('.contact-us-enhanced #movedate').val(),
source: source,
comments: escape( ($('.contact-us-enhanced #comments').val() === undefined || $('.contact-us-enhanced #comments').val().length <= 0 ? "" : $('.contact-us-enhanced #comments').val()) )
});
}
catch(err) {
console.log("RPTracker failed but it is not a dependancy for the contact form. Please continue.");
}
$.ajax({
type: "POST",
dataType: "json",
cache: false,
url: "CMSSiteManager/Callback.aspx?act=set_contact",
data: o,
timeout: timeoutValue,
success: function (json) {
if (json.ErrorNumber) {
formSuccess = false;
$('#lblError').html('Failed to submit guest card.');
$('#btnEnhSubmit').html('Error Submitting!');
$('#btnEnhSubmit').prop('disabled', false);
} else {
try {
ga('set', { 'dimension15': json.LeaseStarLeadId });
if (json.Lead2LeaseLeadId != 0)
ga('set', { 'dimension17': json.Lead2LeaseLeadId });
f_analyticsSendEvent('Contact', 'Information Request', 'Thank you');
ga('set', { 'dimension15': null, 'dimension17': null });
} catch (e) {
}
try {
_gaq.push(['_trackEvent', 'Contact', 'Information Request', 'Thank you',, false]);
} catch (e) {
}
if (successScreen == '')
window.open('/Thank-You.aspx', '_self');
else
window.open(successScreen, '_self');
}
},
beforeSend: function (json) {
formSuccess = true;
$('#btnEnhSubmit').html('Sending...');
$('#btnEnhSubmit').prop('disabled', true);
},
error: function (e) {
formSuccess = false;
$('#btnEnhSubmit').html('Error Submitting!');
$('#btnEnhSubmit').prop('disabled', false);
}
});
}
}
function f_enhSubmit() {
if (formSuccess == true) {
return false;
}
$('.contact-us-enhanced #pid').val(propertyId);
var lcid = f_getCookie('RP_LSWS_LCID');
lcid = lcid ? lcid : "4";
$('.contact-us-enhanced #lcid').val(lcid);
var cid = f_getCookie('RP_LSWS_SEM');
cid = cid ? cid : "Property Website";
if (cid != "Property Website") {
$('.contact-us-enhanced #cid').val(matchedSource); //The logic for setting the matchedSource based on the cid value in the commondata.ascx file
}
googleAnalyticsId = f_getCookie('_ga');
var trackingId = f_analyticsGetTrackingId() || '';
$('.contact-us-enhanced #trackingid').val(trackingId);
submitContactEnhanced();
}