clickElsewhere directive for closing opened things; browser functionality