--- /dev/null
+--- mif.tree-v1.2.6.4.js 2011-07-29 09:55:04.000000000 +0200
++++ mif.tree_for-mt-1.3.2.js 2011-07-29 09:55:49.000000000 +0200
+@@ -7,8 +7,9 @@
+ copyright: Anton Samoylov (http://mifjs.net)
+ authors: Anton Samoylov (http://mifjs.net)
+ requires:
+- - Core:1.2.4/*
++ - Core:1.3/*
+ - More/Fx.Scroll
++ - More/Fx.Drag
+ provides: Mif.Tree
+
+ ...
+@@ -24,7 +25,7 @@
+
+ version: '1.2.6.4',
+
+- Implements: [new Events, new Options],
++ Implements: [Events, Options],
+
+ options:{
+ types: {},
+@@ -36,7 +37,7 @@
+
+ initialize: function(options){
+ this.setOptions(options);
+- $extend(this, {
++ Object.append(this, {
+ types: this.options.types,
+ forest: this.options.forest,
+ animateScroll: this.options.animateScroll,
+@@ -62,7 +63,7 @@
+ this.updateOpenState();
+ if(this.options.expandTo) this.initExpandTo();
+ this.DOMidPrefix='mif-tree-';
+- this.wrapper = new Element('div').addClass('mif-tree-wrapper').injectInside(this.container);
++ this.wrapper = new Element('div').addClass('mif-tree-wrapper').inject(this.container,'bottom');
+ this.events();
+ this.initScroll();
+ this.initSelection();
+@@ -343,12 +344,12 @@
+ Implements: [Events],\r
+ \r
+ initialize: function(structure, options) {\r
+- $extend(this, structure);\r
++ Object.append(this, structure);
+ this.children = [];\r
+ this.type = options.type || this.tree.dfltType;\r
+ this.property = options.property || {};\r
+ this.data = options.data;\r
+- this.state = $extend($unlink(this.tree.dfltState), options.state);\r
++ this.state = Object.append(Object.clone(this.tree.dfltState), options.state);
+ this.$calculate();\r
+ this.UID = Mif.Tree.Node.UID++;\r
+ Mif.Tree.Nodes[this.UID] = this;\r
+@@ -359,13 +360,13 @@
+ },\r
+ \r
+ $calculate: function(){\r
+- $extend(this, $unlink(this.tree.defaults));\r
+- this.type = $splat(this.type);\r
++ Object.append(this, Object.clone(this.tree.defaults));
++ this.type = Array.from(this.type);
+ this.type.each(function(type){\r
+ var props = this.tree.types[type];\r
+- if(props) $extend(this, props);\r
++ if(props) Object.append(this, props);
+ }, this);\r
+- $extend(this, this.property);\r
++ Object.append(this, this.property);
+ return this;\r
+ },\r
+ \r
+@@ -418,7 +419,7 @@
+ },\r
+ \r
+ recursive: function(fn, args){\r
+- args=$splat(args);\r
++ args=Array.from(args);
+ if(fn.apply(this, args) !== false){\r
+ this.children.each(function(node){\r
+ if(node.recursive(fn, args) === false){\r
+@@ -671,7 +672,7 @@
+ getHTML: function(node,html){\r
+ var prefix = node.tree.DOMidPrefix;\r
+ var checkbox;\r
+- if($defined(node.state.checked)){\r
++ if(node.state.checked != undefined){
+ if(!node.hasCheckbox) node.state.checked='nochecked';\r
+ checkbox = '<span class="mif-tree-checkbox mif-tree-node-'+node.state.checked+'" uid="'+node.UID+'">'+Mif.Tree.Draw.zeroSpace+'</span>';\r
+ }else{\r
+@@ -713,7 +714,7 @@
+ },\r
+ \r
+ forestRoot: function(tree){\r
+- var container = new Element('div').addClass('mif-tree-children-root').injectInside(tree.wrapper);\r
++ var container = new Element('div').addClass('mif-tree-children-root').inject(tree.wrapper,'bottom');
+ Mif.Tree.Draw.children(tree.root, container);\r
+ },\r
+ \r
+@@ -757,7 +758,7 @@
+ element = element || node.getDOM('node') || this.node(node);\r
+ var previous = node.getPrevious();\r
+ if(previous){\r
+- element.injectAfter(previous.getDOM('node'));\r
++ element.inject(previous.getDOM('node'),'after');
+ return;\r
+ }\r
+ var container;\r
+@@ -773,7 +774,7 @@
+ \r
+ };\r
+ \r
+-Mif.Tree.Draw.zeroSpace = Browser.Engine.trident ? '­' : (Browser.Engine.webkit ? '​' : '');\r
++Mif.Tree.Draw.zeroSpace = Browser.ie ? '­' : (Browser.chrome ? '​' : '');
+ \r
+
+
+@@ -795,7 +796,11 @@
+ \r
+ initSelection: function(){\r
+ this.defaults.selectClass = '';\r
+- this.wrapper.addEvent('mousedown', this.attachSelect.bindWithEvent(this));\r
++ this.wrapper.addEvent('mousedown', function(e) {
++ //this.attachSelect.bindWithEvent(this)
++ this.attachSelect(e)
++ }.bind(this)
++ );
+ },\r
+ \r
+ attachSelect: function(event){\r
+@@ -881,13 +886,13 @@
+ name: false,\r
+ node: false\r
+ };\r
+- this.hoverState = $unlink(this.defaultHoverState);\r
++ this.hoverState = Object.clone(this.defaultHoverState);
+ },\r
+ \r
+ hover: function(){\r
+ var cnode = this.mouse.node;\r
+ var ctarget = this.mouse.target;\r
+- $each(this.hoverState, function(node, target, state){\r
++ Object.each(this.hoverState, function(node, target, state){
+ if(node == cnode && (target == 'node'||target==ctarget)) return;\r
+ if(node) {\r
+ Mif.Tree.Hover.out(node, target);\r
+@@ -905,7 +910,7 @@
+ },\r
+ \r
+ updateHover: function(){\r
+- this.hoverState = $unlink(this.defaultHoverState);\r
++ this.hoverState = Object.clone(this.defaultHoverState);
+ this.hover();\r
+ }\r
+ \r
+@@ -976,7 +981,7 @@
+ \r
+ load: function(options){\r
+ var tree = this;\r
+- this.loadOptions = this.loadOptions||$lambda({});\r
++ this.loadOptions = this.loadOptions||Function.from({});
+ function success(json){\r
+ var parent = null;\r
+ if(tree.forest){\r
+@@ -992,8 +997,8 @@
+ tree.fireEvent('load');\r
+ return tree;\r
+ }\r
+- options = $extend($extend({\r
+- isSuccess: $lambda(true),\r
++ options = Object.append(Object.append({
++ isSuccess: Function.from(true),
+ secure: true,\r
+ onSuccess: success,\r
+ method: 'get'\r
+@@ -1022,8 +1027,8 @@
+ self.tree.fireEvent('loadNode', self);\r
+ return self;\r
+ }\r
+- options=$extend($extend($extend({\r
+- isSuccess: $lambda(true),\r
++ options=Object.append(Object.append(Object.append({
++ isSuccess: Function.from(true),
+ secure: true,\r
+ onSuccess: success,\r
+ method: 'get'\r
+@@ -1066,12 +1071,12 @@
+ },\r
+ \r
+ attach: function(){\r
+- var event = Browser.Engine.trident || Browser.Engine.webkit ? 'keydown' : 'keypress';\r
++ var event = Browser.ie || Browser.chrome ? 'keydown' : 'keypress';
+ document.addEvent(event, this.bound.action);\r
+ },\r
+ \r
+ detach: function(){\r
+- var event = Browser.Engine.trident || Browser.Engine.webkit ? 'keydown' : 'keypress';\r
++ var event = Browser.ie || Browser.chrome ? 'keydown' : 'keypress';
+ document.removeEvent(event, this.bound.action);\r
+ },\r
+ \r
+@@ -1158,12 +1163,14 @@
+ \r
+ });\r
+ \r
++/*
+ Event.Keys.extend({\r
+ 'pgdown': 34,\r
+ 'pgup': 33,\r
+ 'home': 36,\r
+ 'end': 35\r
+ });\r
++*/
+
+
+ /*\r
+@@ -1299,7 +1306,7 @@
+ function copy(structure){\r
+ var node = structure.node;\r
+ var tree = structure.tree;\r
+- var options = $unlink({\r
++ var options = Object.clone({
+ property: node.property,\r
+ type: node.type,\r
+ state: node.state,\r
+@@ -1407,7 +1414,7 @@
+ \r
+ Mif.Tree.Drag = new Class({\r
+ \r
+- Implements: [new Events, new Options],\r
++ Implements: [Events, Options],
+ \r
+ Extends: Drag,\r
+ \r
+@@ -1427,7 +1434,7 @@
+ initialize: function(tree, options){\r
+ tree.drag = this;\r
+ this.setOptions(options);\r
+- $extend(this, {\r
++ Object.append(this, {
+ tree: tree,\r
+ snap: this.options.snap,\r
+ groups: [],\r
+@@ -1439,7 +1446,7 @@
+ \r
+ this.setDroppables(this.options.droppables);\r
+ \r
+- $extend(tree.defaults, {\r
++ Object.append(tree.defaults, {
+ dropDenied: [],\r
+ dragDisabled: false\r
+ });\r
+@@ -1447,7 +1454,7 @@
+ tree.root.dropDenied.combine(['before', 'after']);\r
+ });\r
+ \r
+- this.pointer = new Element('div').addClass('mif-tree-pointer').injectInside(tree.wrapper);\r
++ this.pointer = new Element('div').addClass('mif-tree-pointer').inject(tree.wrapper,'bottom');
+ \r
+ this.current = Mif.Tree.Drag.current;\r
+ this.target = Mif.Tree.Drag.target;\r
+@@ -1456,7 +1463,7 @@
+ this.element = [this.current, this.target, this.where];\r
+ this.document = tree.wrapper.getDocument();\r
+ \r
+- this.selection = (Browser.Engine.trident) ? 'selectstart' : 'mousedown';\r
++ this.selection = (Browser.ie) ? 'selectstart' : 'mousedown';
+ \r
+ this.bound = {\r
+ start: this.start.bind(this),\r
+@@ -1464,7 +1471,7 @@
+ drag: this.drag.bind(this),\r
+ stop: this.stop.bind(this),\r
+ cancel: this.cancel.bind(this),\r
+- eventStop: $lambda(false),\r
++ eventStop: Function.from(false),
+ leave: this.leave.bind(this),\r
+ enter: this.enter.bind(this),\r
+ keydown: this.keydown.bind(this)\r
+@@ -1504,7 +1511,7 @@
+ },\r
+ \r
+ addToGroups: function(groups){\r
+- groups = $splat(groups);\r
++ groups = Array.from(groups);
+ this.groups.combine(groups);\r
+ groups.each(function(group){\r
+ Mif.Tree.Drag.groups[group]=(Mif.Tree.Drag.groups[group]||[]).include(this);\r
+@@ -1512,7 +1519,7 @@
+ },\r
+ \r
+ setDroppables: function(droppables){\r
+- this.droppables.combine($splat(droppables));\r
++ this.droppables.combine(Array.from(droppables));
+ this.groups.each(function(group){\r
+ this.droppables.combine(Mif.Tree.Drag.groups[group]);\r
+ }, this);\r
+@@ -1555,7 +1562,7 @@
+ onleave: function(){\r
+ this.tree.unselect();\r
+ this.clean();\r
+- $clear(this.scrolling);\r
++ clearInterval(this.scrolling);
+ this.scrolling = null;\r
+ this.target = false;\r
+ },\r
+@@ -1621,7 +1628,7 @@
+ }.periodical(this.options.scrollDelay, this, [sign]);\r
+ }\r
+ if(!sign){\r
+- $clear(this.scrolling);\r
++ clearInterval(this.scrolling);
+ this.scrolling = null;\r
+ }\r
+ },\r
+@@ -1633,7 +1640,7 @@
+ \r
+ var target = this.tree.mouse.target;\r
+ if(!target) return;\r
+- this.current = $splat(this.options.startPlace).contains(target) ? this.tree.mouse.node : false;\r
++ this.current = Array.from(this.options.startPlace).contains(target) ? this.tree.mouse.node : false;
+ if(!this.current || this.current.dragDisabled) {\r
+ return;\r
+ }\r
+@@ -1691,7 +1698,7 @@
+ clean: function(){\r
+ this.pointer.style.width = 0;\r
+ if(this.openTimer){\r
+- $clear(this.openTimer);\r
++ clearInterval(this.openTimer);
+ this.openTimer = false;\r
+ this.wrapper.style.cursor = 'inherit';\r
+ this.wrapper = false;\r
+@@ -1702,8 +1709,8 @@
+ var wrapper = this.current.getDOM('wrapper');\r
+ var ghost = new Element('span').addClass('mif-tree-ghost');\r
+ ghost.adopt(Mif.Tree.Draw.node(this.current).getFirst())\r
+- .injectInside(document.body).addClass('mif-tree-ghost-notAllowed').setStyle('position', 'absolute');\r
+- new Element('span').set('html',Mif.Tree.Draw.zeroSpace).injectTop(ghost);\r
++ .inject(document.body,'bottom').addClass('mif-tree-ghost-notAllowed').setStyle('position', 'absolute');
++ new Element('span').set('html',Mif.Tree.Draw.zeroSpace).inject(ghost,'top');
+ ghost.getLast().getFirst().className = '';\r
+ Mif.Tree.Drag.ghost = ghost;\r
+ },\r
+@@ -1835,7 +1842,7 @@
+ \r
+ onstop: function(){\r
+ this.clean();\r
+- $clear(this.scrolling);\r
++ clearInterval(this.scrolling);
+ }\r
+ });\r
+ \r
+@@ -2021,7 +2028,7 @@
+ left: -2000,\r
+ top:0,\r
+ padding: 0\r
+- }).injectInside(document.body);\r
++ }).inject(document.body,'bottom');
+ input.addEvent('keydown',function(event){\r
+ (function(){\r
+ input.setStyle('width',Math.max(20, span.set('html', input.value.replace(/\s/g,' ')).offsetWidth+15));\r