Car won't start - bad ignition switch?

Starter relay is bad or bad connection.....mine is doing the same thing, after the car sits for awhile, it doesn't make a Sound when trying to start it....go under the hood and tap on the starter relay and it pops right off....if I drive the car around town, it will work, but once it sits for more than a few hours, doesn't want to work again. I bought a new relay and it will go in ASAP :glasses7: