Could this be done with Applescript? I've never used it before, so I'm not exactly sure how to go about writing an Applescript to do this. I got a new MacBook (adjusting from a 1920x1200 17" MBP), and the dock is just taking up way too much space at the bottom for web browsing. I like having the dock show all the time, especially when I don't have any windows open. But when Safari and iTunes are open, I really don't want it do be there. And yes, I realize there's a key command to hide/show the dock, but I'd just like it to be automatically done for me. 
I'd really appreciate anybody's help. Thanks!
I'd really appreciate anybody's help. Thanks!