-/**
- * @class Ext.Element
- */
-Ext.Element.addMethods(
-function() {
- var GETDOM = Ext.getDom,
- GET = Ext.get,
- DH = Ext.DomHelper;
-
- return {
- <div id="method-Ext.Element-appendChild"></div>/**
- * Appends the passed element(s) to this element
- * @param {String/HTMLElement/Array/Element/CompositeElement} el
- * @return {Ext.Element} this
- */
- appendChild: function(el){
- return GET(el).appendTo(this);
- },
-
- <div id="method-Ext.Element-appendTo"></div>/**
- * Appends this element to the passed element
- * @param {Mixed} el The new parent element
- * @return {Ext.Element} this
- */
- appendTo: function(el){
- GETDOM(el).appendChild(this.dom);
- return this;
- },
-
- <div id="method-Ext.Element-insertBefore"></div>/**
- * Inserts this element before the passed element in the DOM
- * @param {Mixed} el The element before which this element will be inserted
- * @return {Ext.Element} this
- */
- insertBefore: function(el){
- (el = GETDOM(el)).parentNode.insertBefore(this.dom, el);
- return this;
- },
-
- <div id="method-Ext.Element-insertAfter"></div>/**
- * Inserts this element after the passed element in the DOM
- * @param {Mixed} el The element to insert after
- * @return {Ext.Element} this
- */
- insertAfter: function(el){
- (el = GETDOM(el)).parentNode.insertBefore(this.dom, el.nextSibling);
- return this;
- },
-
- <div id="method-Ext.Element-insertFirst"></div>/**
- * Inserts (or creates) an element (or DomHelper config) as the first child of this element
- * @param {Mixed/Object} el The id or element to insert or a DomHelper config to create and insert
- * @return {Ext.Element} The new child
- */
- insertFirst: function(el, returnDom){
- el = el || {};
- if(el.nodeType || el.dom || typeof el == 'string'){ // element
- el = GETDOM(el);
- this.dom.insertBefore(el, this.dom.firstChild);
- return !returnDom ? GET(el) : el;
- }else{ // dh config
- return this.createChild(el, this.dom.firstChild, returnDom);
+Ext.Element.addMethods({
+<span id='Ext-Element-method-appendChild'> /**
+</span> * Appends the passed element(s) to this element
+ * @param {String/HTMLElement/Ext.Element} el
+ * The id of the node, a DOM Node or an existing Element.
+ * @return {Ext.Element} this
+ */
+ appendChild : function(el) {
+ return Ext.get(el).appendTo(this);
+ },
+
+<span id='Ext-Element-method-appendTo'> /**
+</span> * Appends this element to the passed element
+ * @param {String/HTMLElement/Ext.Element} el The new parent element.
+ * The id of the node, a DOM Node or an existing Element.
+ * @return {Ext.Element} this
+ */
+ appendTo : function(el) {
+ Ext.getDom(el).appendChild(this.dom);
+ return this;
+ },
+
+<span id='Ext-Element-method-insertBefore'> /**
+</span> * Inserts this element before the passed element in the DOM
+ * @param {String/HTMLElement/Ext.Element} el The element before which this element will be inserted.
+ * The id of the node, a DOM Node or an existing Element.
+ * @return {Ext.Element} this
+ */
+ insertBefore : function(el) {
+ el = Ext.getDom(el);
+ el.parentNode.insertBefore(this.dom, el);
+ return this;
+ },
+
+<span id='Ext-Element-method-insertAfter'> /**
+</span> * Inserts this element after the passed element in the DOM
+ * @param {String/HTMLElement/Ext.Element} el The element to insert after.
+ * The id of the node, a DOM Node or an existing Element.
+ * @return {Ext.Element} this
+ */
+ insertAfter : function(el) {
+ el = Ext.getDom(el);
+ el.parentNode.insertBefore(this.dom, el.nextSibling);
+ return this;
+ },
+
+<span id='Ext-Element-method-insertFirst'> /**
+</span> * Inserts (or creates) an element (or DomHelper config) as the first child of this element
+ * @param {String/HTMLElement/Ext.Element/Object} el The id or element to insert or a DomHelper config
+ * to create and insert
+ * @return {Ext.Element} The new child
+ */
+ insertFirst : function(el, returnDom) {
+ el = el || {};
+ if (el.nodeType || el.dom || typeof el == 'string') { // element
+ el = Ext.getDom(el);
+ this.dom.insertBefore(el, this.dom.firstChild);
+ return !returnDom ? Ext.get(el) : el;
+ }
+ else { // dh config
+ return this.createChild(el, this.dom.firstChild, returnDom);
+ }
+ },
+
+<span id='Ext-Element-method-insertSibling'> /**
+</span> * Inserts (or creates) the passed element (or DomHelper config) as a sibling of this element
+ * @param {String/HTMLElement/Ext.Element/Object/Array} el The id, element to insert or a DomHelper config
+ * to create and insert *or* an array of any of those.
+ * @param {String} where (optional) 'before' or 'after' defaults to before
+ * @param {Boolean} returnDom (optional) True to return the .;ll;l,raw DOM element instead of Ext.Element
+ * @return {Ext.Element} The inserted Element. If an array is passed, the last inserted element is returned.
+ */
+ insertSibling: function(el, where, returnDom){
+ var me = this, rt,
+ isAfter = (where || 'before').toLowerCase() == 'after',
+ insertEl;
+
+ if(Ext.isArray(el)){
+ insertEl = me;
+ Ext.each(el, function(e) {
+ rt = Ext.fly(insertEl, '_internal').insertSibling(e, where, returnDom);
+ if(isAfter){
+ insertEl = rt;
+ }
+ });
+ return rt;
+ }
+
+ el = el || {};
+
+ if(el.nodeType || el.dom){
+ rt = me.dom.parentNode.insertBefore(Ext.getDom(el), isAfter ? me.dom.nextSibling : me.dom);
+ if (!returnDom) {
+ rt = Ext.get(rt);