Mountain Lion takes long time to shutdown
Take a look at the following threads: 

https://discussions.apple.com///thread/4424200?start=0&amp;tstart=0

https://discussions.apple.com/thread/4339540?start=0&amp;tstart=0

http://forums.macrumors.com/archive/index.php/t-1414639.html

In short, it was recommended to: "removing items from Login Items for the user account and adding them back one at a time while testing restart/shutdown. Also, clearing out the ~/Library/Saved Application State folder and the System/Library/Caches folder and making sure your ML volume is selected as the volume to boot from in System Preferences / Startup Disk."

Also, maybe you have Dropbox/Google Drive/Software Update that runs in the background? 

Another thing that mentioned was to uncheck "Reopen windows when logging" when shutting down for quick shutdown times.

Can you tell us which applications you think might cause problems?