Not a tax specialist, but a CPA.
A couple of things said so far are correct in respects to the 2nd lien, but keep in mind also that if you sell the house you can include the costs of the new flooring as an improvement, which will be added to the basis of the house, thus eliminating some taxable gain in the year you sell the house.
But, neither of those scenarios are your current issue. One possible remedy in the current year would be to take it as a "casualty loss", which is a tax deductible event for destroyed, damaged or stolen property - personal or business-use. Unfortunately, the IRS, in all of their glorified wisdom, does not consider termite damage a casualty loss as indicated in the following exerpt of Topic 507:
If your property is destroyed, damaged, or stolen due to casualty or theft, you may be entitled to a tax deduction. A casualty is the damage, destruction, or loss of property resulting from an identifiable event that is sudden, unexpected, or unusual.
A sudden event is one that is swift, not gradual or progressive. It does not include damage from events such as termite infestation or deterioration from normal wind and weather.
So with that said, no you are not allowed to take this event as a loss or as a tax deductible event in the current year. But remember, when you sell the house, you will be able to add the "upgrade" as an increase to your adjusted basis in the house, thus lowering any tax gain.
*edit: Tominator beat me to the adjusted basis comment, sorry.