sameNode: function(otherNode) {
         return this.nativeNode === otherNode.nativeNode;
-    }
+    },
+
+    parent: function() {
+        return this.nativeNode.parentNode ? new ElementNode(this.nativeNode.parentNode) : null;
+    },
+
+    before: function(node) {
+        this._$.before(node.nativeNode);
+    },
+
+    wrapWith: function(node) {
+        if(this.parent())
+            this.before(node);
+        node.append(this);
+    },
 });
 
 var ElementNode = function(nativeNode) {
         return this.nativeNode.tagName.toLowerCase();
     },
 
-    append: function(documentNode) {
-        this._$.append(documentNode.nativeNode);
-    },
-
-    before: function(node) {
-        this._$.before(node.nativeNode);
-    },
-
     contents: function() {
         var toret = [];
         this._$.contents().each(function() {
         return this._$.contents().index(node._$);
     },
 
-    parent: function() {
-        return new ElementNode(this._$.parent());
+    getAttr: function(name) {
+        return this._$.attr(name);
+    },
+
+    setAttr: function(name, value) {
+        this._$.attr(name, value);
+    },
+
+    append: function(documentNode) {
+        this._$.append(documentNode.nativeNode);
     },
 
     unwrapContent: function() {