If a nonconforming building or use is damaged or destroyed by fire, natural disaster or other act of God, such building may be repaired, rebuilt or replaced to eliminate or reduce the nonconforming features to the extent possible, without the need to obtain a variance. Such building may also be repaired, rebuilt or replaced to its original nonconforming condition. The owner shall apply for a building permit and any work done to repair, rebuild or replace such building shall be in compliance with the provisions of the Uniform Statewide Building Code. Any work done to repair, rebuild or replace such building shall be in compliance with the provisions of the local floodplain regulations adopted as a condition of participation in the National Flood Insurance Program. Unless such building is repaired or rebuilt within two years of the date of the natural disaster or replaced within two years of the date of the natural disaster or other act of God, such building shall only be repaired, rebuilt or replaced in accordance with the provisions of this chapter. However, if the nonconforming building is in an area under a federal disaster declaration and the building has been damaged or destroyed as a direct result of conditions that gave rise to the declaration, then the owner shall have an additional two years for the building to be repaired, rebuilt or replaced as otherwise provided in this section. For purposes of this section, owners of property damaged by an accidental fire have the same rights to rebuild such property as if it were damaged by an act of God. Nothing herein shall be construed to enable the property owner to commit an arson and obtain vested rights under this section.