add some feature and made function from some codes

[add] constructor argument: called from element want to show modal (argument backward compatible)
[add] init option: auto vertical centering of element (option backward compatible)
[improve] check whether or not the insertion of overlay div block the duplicate
[modify] split open modal codes, made 'open_modal' function