var ml=ml||{};ml.sell=function($){var $sellForm,initializeAjaxForm=function(){$sellForm.ajaxForm({ignore:".ignore",rules:{address:{required:!0,minlength:2,noHTML:!0},sqft:{required:!0},zip:{required:!0},name:{required:!0,minlength:2,noHTML:!0},emailAddress:{required:!0,email:!0,noHTML:!0},cellPhone:{customPhoneUSandInternational:!0,requiredCellPhoneContactPreference:!0,requiredPhoneContactPreference:!0,requiredCellPhoneForSMSCheckbox:!0},homePhone:{customPhoneUSandInternational:!0},workPhone:{customPhoneUSandInternational:!0},other:{noHTML:!0},captcha:{required:!0,minlength:5}},messages:{address:ml.messages.error.addressRequired,sqft:ml.messages.error.sqftRequired,zip:ml.messages.error.zipRequired,name:ml.messages.error.nameRequired,emailAddress:ml.messages.error.emailRequired,cellPhone:{customPhoneUSandInternational:ml.messages.error.validMobilePhone},homePhone:{customPhoneUSandInternational:ml.messages.error.validHomePhone},workPhone:{customPhoneUSandInternational:ml.messages.error.validWorkPhone},captcha:ml.messages.error.captchaRequired},success:function(results){window.grecaptcha&&grecaptcha.reset(),results.hasOwnProperty("payload")&&results.payload.hasOwnProperty("isSuccess")&&results.payload.isSuccess?ml.ajaxForm.showThankYouMessage(results.payload.thankYouMarkup):($(".js-section-error").html('<div class="alert alert-danger" role="alert">We were unable to process your request. Please try again later.</div>'),$(document).scrollTop(0))},invalidHandler:function(event,validator){ml.contactPreferences.invalidHandler(validator)},errorMsgAppendToElem:".js-section-error"}),void 0===mlVars.role&&$sellForm.on("beforeSubmit",(function(event){var $form=$(event.target);handle_grecaptcha_presubmit($form)}))};return{init:function(){$sellForm=$("#js-sell-form"),initializeAjaxForm(),ml.changeEmailForm.primaryEmailUpdatedNotification((function(newPrimaryEmail){$(".js-prospect-email").text(newPrimaryEmail)}))}}}(jQuery),$(document).ready((function(){$("#js-sell-form").length&&ml.sell.init()}));