Keyboard Maestro is free (unless you want more than a certain number of hotkeys), it includes a cool program switcher and doesn't leave an icon in your dock. Just my personal preference. If you want iTunes to hide when you press F6, for example, you choose "Remap Keystroke" in Keyboard Maestro, press F6 as the key to be remapped and Apple+H in the 'remap to' box. It knows not to hide the application when you're entering the keystroke so that won't be a problem. I just tried it, works like a charm.
As for applescript -- search on the web and you'll find some good sites and examples. Here's the script I use to make Cmd+H hide Illustrator since Adobe chooses not to support that keystroke:
tell application "Finder"
set visible of process "Adobe Illustrator 10" to false
end tell
You can activate applescripts through Keyboard Maestro (or whatever hotkey app you like that supports applescripts). You can use 'Script Editor' in the 'Applescript' directory in 'Applications' to make applescripts and test them and look through applications' applescript libraries. I think that comes with OS X, otherwise I can't remember how I got it. If you search through your directories you'll also find some good scripts that you can use as examples to learn from.