Some applications on MacBook Pro think Internet is not connected when it is
Just stabbing in the dark here - DNS? Or rather, the relation of Safari towards DNS (since you mentioned that Firefox was working fine). 

I know that Safari takes on the system wide proxy settings and firefox has its own - another possible avenue why firefox works when safari doesn't.

Maybe you could try opening two new tabs when the issue occurs again and try accessing http://72.30.2.43 and www.yahoo.com on the second tab. Perhaps we could help eliminate DNS with that test.

Muck around the system proxy settings is another possible investigation route.