}
// else if (n.hasClass(CLASS_BUTTON)) {
else if (yuiWidget != null && yuiWidget.equals("button")) {
Element e = n.getDOMNode();
NodeList prevChildren = n.children();
String prevId = n.get("id");
String prevClass = e.getClassName();
WidgetConfig config = ButtonConfig.create().srcNode(n);
config = y.merge(config, nodeConfig).cast();
w = y.newButton(config).render();
e = w.contentBox().getDOMNode();
//fix - re set previous id and class attributes - http://jsfiddle.net/cancerbero_sgx/MPc4g/3/
e.setClassName(e.getClassName()+" "+prevClass);
y.one(e).prepend(prevChildren);
n.set("id", prevId);
}
else if (yuiWidget != null && yuiWidget.equals("togglebutton")) {
Element e = n.getDOMNode();
NodeList prevChildren = n.children();
String prevId = n.get("id");
String prevClass = e.getClassName();
WidgetConfig config = ButtonConfig.create().srcNode(n);