Looks to me like two problems going on:
1. An outdated Safari plugin or input manager, and
2. A problem with the Hewlett-Packard SmartX software.
The first problem can be resolved by removing things from the Safari Plug-ins and Input Managers folder. Look at Input Managers first. Open your hard drive, look in the Library folder on the top level of the hard drive (NOT the Library folder in your home folder) for a folder named Input Managers. If there's anything in the Input Managers folder, move it to the Desktop and restart.
The second problem can be fixed by using the HP printer software installer to uninstall, then reinstall, the HP software.