Are you trying to open Safari from the Dock or from the Applications folder? If opening from the dock, try opening from the Applications folder. If that works, click and hold on the old icon on the dock, drag it up over the desktop and let it go "POOF". Now, from the Applications folder, click and drag Safari back onto the dock.
Is Safari missing from the Applications folder? If it's missing, put your Leopard DVD in the iMac, and look for a folder that says something like Other Software Installs, or Extra Applications Install. And re-install Safari, then use Software Update to update to latest version for Leopard.
Or maybe the Safari Preferences fileis corrupt. Try dragging this file to the trash:
Macintosh HD> Users> YourUserName> Library> Preferences> com.apple.safari.plist