IU.homeOwnerForm = (function(){

//Private Members

/**
* Mask all the inputs that are static
* Params:
* - none
* 
* Returns:
* - none
*/
function maskInputs(){
  $("#Zip").mask("99999");
  $("#Telephone").mask("(999) 999-9999");
  $("#Fax").mask("(999) 999-9999");
  $("#DOB").mask("99/99/9999");
  $("#Current_Insurance_Exp_Date").mask("99/99/9999");
}

/**
* Fill all the fields in the form passed
* Params:
* - form: JQueryObject --  A form element wrapped with JQuery
* - exceptions: String -- JQuery string of ids not to be filled
* 
* Returns:
* - none
*/
function fillValues(form, exceptions){
  if (true){
    var elements = form.find(".required");
    if (exceptions && exceptions != ""){
      elements = elements.not(exceptions);
    }
    var i = 0;
    for (i in elements){
      if (elements[i].nodeName == "SELECT"){
        elements[i].selectedIndex = 1;
      }
      else{
        elements[i].value = i;
      }
    }
  }
}

//Public Members
return {
  initialize: function(){
    maskInputs();
//    fillValues($("#stepForm_1"), "#Age");
//    fillValues($("#stepForm_2"));
//    fillValues($("#stepForm_3"));
//    fillValues($("#stepForm_4"));
  }
};

})();
