I am building a custom theme based on Magento 1.9 RWD.
How do I manage to hide/close the mini cart and header-account drop down by clicking anywhere outside of those sections ?
EDIT - 1
zhartaunik's answer helped me to resolve the issue. But I am now facing below issue.
If I click the language-switcher its stays open. Now when I click the mini cart and header-account, those drop-downs opens, but also the language-switcher still stays open! I want this one to close directly when another button is clicked? How do I get this done?