Building my own javaScript modal plugin