made documentClickHandler permanent; made clickout events always execute before click events