protected Map<String, Object> getMenuOptions(UIComponent component) {
Map<String, Object> options = new HashMap<String, Object>();
RendererUtils utils = getUtils();
utils.addToScriptHash(options, "direction", component.getAttributes().get("direction"), "auto");
utils.addToScriptHash(options, "jointPoint", component.getAttributes().get("jointPoint"), "auto");
utils.addToScriptHash(options, "verticalOffset", component.getAttributes().get("verticalOffset"), "0");
utils.addToScriptHash(options, "horizontalOffset", component.getAttributes().get("horizontalOffset"), "0");
utils.addToScriptHash(options, "oncollapse", component.getAttributes().get("oncollapse"), null, ScriptHashVariableWrapper.EVENT_HANDLER);
utils.addToScriptHash(options, "onexpand", component.getAttributes().get("onexpand"), null, ScriptHashVariableWrapper.EVENT_HANDLER);
utils.addToScriptHash(options, "onitemselect", component.getAttributes().get("onitemselect"), null, ScriptHashVariableWrapper.EVENT_HANDLER);
utils.addToScriptHash(options, "ongroupactivate", component.getAttributes().get("ongroupactivate"), null, ScriptHashVariableWrapper.EVENT_HANDLER);