setup initial document structure
import jquery and state machine libs