Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
try dragging Safari's preference file in username/Library/Prefrerences to the desktop and relaunch Safari. if this doesnt work move it back and replace to get your settings back.
 
I have seen that before the post under yours should help.

Which version of safari are you running?

Does it happen to any other apps?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.