text: _.treeview=(function(){function a(b,c){a.element=b;if(c){a.props=_.extend(a.props,c)}a.init()}a.props={on:true,onClass:"trOn",offClass:"trOff",leafClass:"leaf",iconEl:"<span>&nbsp;&nbsp;&nbsp;</span>",func:function(c){c.toggle();var d=c.parent();var b=d.query("span").first();b.toggleClass(a.props.onClass,a.props.offClass)}};a.init=function(){a.tree(a.element)};a.tree=function(b){_.foreach(_("li",b).getContent().reverse(),function(){var c=_.create("<div>"+a.props.iconEl+"</div>");if(_.tag("ul",this).length>0){if(a.props.on){_("span",c).setClass(a.props.onClass)}else{_("span",c).setClass(a.props.offClass)}}else{_("span",c).setClass(a.props.leafClass)}_.html(this,_.html(c)+_.html(this))});_.foreach(_("li",b).getContent().reverse(),function(){if(_.tag("ul",this).length>0){var d=_("span",this);var c=_("ul",this);d=d.length>0?d.first():d;c=c.length>0?c.first():c;d.click(function(){a.props.func(c)});if(!a.props.on){c.toggle()}}})};_.addPlugin({treeview:a});return a})();