Can I deduct hotel & meal expenses at a second hotel for an out of state job if I moved to another hotel after job was done to be closer to the airport?

The job was a little more than a hour away with rush hour traffic to contend with. The job was on a Friday but the flight rates were cheaper if we flew a few days later. While at this hotel and waiting for our return trip we were able to visit some family & friends in the area. Will those visits negate the deductibility of the second hotel & meal costs?