Are legal fees incurred to sell property deductible?

Due to a boundary dispute with the neighbor of my vacation home I had to hire a surveyor to establish the boundary and a lawyer to sue the neighbor when he would not agree to my offer of an easement.  The property could not be sold without resolving the boundary dispute.   Are the approximately $2,000 in surveyor fees and $10,000 in attorneys' fees deductible at all?