JS plugin to generate selects for hierarchical data