Fixed 11830377 

Comments:

- Formatted code.<br/>
- Separated the declarations for `$container`, `currentDate`, and `mode`.<br/>
- Fixed 11830377 https://github.com/karlseguin/jquery.datePicker/issues/5#issuecomment-11830377
<br/>
Added `self.isOpen`. 

When `self.show()` is called `.isOpen` is set after a short 15 ms delay. This helps protect against event propagation.
However it's better if somehow you could get `event.stopPropagation()` to work in `$input.click()`.