Minimize other windows of an application
This doesn't work with Preview or other aplications that don't support AppleScript.

tell application (path to frontmost application as text)
    try
        set miniaturized of windows where visible is true and index is not 1 and miniaturizable is true to true
    end try
    try -- at least Finder
        set collapsed of windows where visible is true and index is not 1 and closeable is true to true
    end try
end tell


I don't know how to get the focused window or hidden windows with System Events. The focused window isn't window 1 or AXMain or AXFocused. Setting AXMinimized to true didn't work with Tweetbot either.

tell application "System Events" to tell (process 1 where frontmost is true)
    windows where value of attribute "AXMinimized" is false
    --repeat with w in result
    --try
    --set value of attribute "AXMinimized" of w to true
    --end try
    --end repeat
end tell


There are many ways to assign shortcuts to scripts, but shortcuts for Automator services don't work reliably in 10.7 or 10.8.