improve enter key behaviour: now it submits form only if calendar is hidden
support dynamic changing of AMPM condition
add animation on calendar show/hide, fix incorrect tab
use mousedown instead of click to prevent loosing focus
use a instead of button to simplify code
center calendar for input + various other fixes
listen blur on local level instead of document-level