function $(selector) {
  var itemType = typeof selector;

  if (itemType == "function") {
    window.onload = selector;
  } else if (itemType == "string") {

    function JQLite(elem, length) {
      this.element = elem;
      this.length = length || 0;
    }
    JQLite.prototype.html = function(newHTML) {
      if (!this.length) {
        if (newHTML === undefined) {
          return this.element.innerHTML;
        }
        this.element.innerHTML = newHTML;
        return this;
      }
    }
    JQLite.prototype.click = function(fn) {
      this.element.onclick = fn;
      return this;
    }
    JQLite.prototype.blur = function(fn) {
      this.element.onblur = fn;
      return this;
    }
    JQLite.prototype.focus = function(fn) {
      this.element.onfocus = fn;
      return this;
    }
    JQLite.prototype.append = function(newElem) {
      if (typeof newElem == "string") {
        newElem = document.createElement(newElem);
      }
      this.element.appendChild(newElem);
      return new JQLite(newElem);
    }
    JQLite.prototype.each = function(fn) {
      if (this.length) {
        this.element.forEach(fn);
      } else {
        fn(this.element);
      }
    }
    /*
    addAttr
    removeAttr
    addClass
    removeClass

    toggleClass
    value

    */

    /*
    change
    dlbclick
    hover
    submit
    */

    /*
    first
    last
    children
    parent
    toArray
    get(+-num)
    slice
    eq
    is
    wrap
    unwrap
    appendTo
    prepend
    before
    after
    text

    replaceWith
    replaceAll
    data
    filter
    not
    hide
    */

    /*
    now()
    trim()
    isArray
    isFunction
    isNumeric
    each(object, fn)

    parseHTML
    stringify

    table
    */
    switch (selector.charAt(0)) {
      case "#":
      return new JQLite(document.getElementById(selector.substring(1)));
      break;
      case ".":
      var items = document.getElementsByClassName(selector.substring(1));
      return new JQLite(items, items.length);
      break;
      default:
      var items = document.getElementsByTagName(selector);
      return new JQLite(items, items.length);
      break;
    }
  }
}

@@ -1183,23 +1183,465 @@
 %7D%0A    %7D%0A
+    JQLite.prototype.parent = function() %7B%0A      return new JQLite(this.element.parent);%0A    %7D%0A    JQLite.prototype.first = function() %7B%0A      var elem = this;%0A      if (this.length) %7B%0A        elem = new JQLite(this.element%5B0%5D);%0A      %7D%0A      return elem;%0A    %7D%0A    JQLite.prototype.last = function() %7B%0A      var elem = this;%0A      if (this.length) %7B%0A        elem = new JQLite(this.element%5Bthis.length - 1%5D);%0A      %7D%0A      return elem;%0A    %7D%0A
     /*%0A
-
     addA
@@ -1827,19 +1827,8 @@
 ren%0A
-    parent%0A
     
@@ -1850,16 +1850,16 @@
 (+-num)%0A
+
     slic
@@ -1864,22 +1864,8 @@
 ice%0A
-    eq%0A    is%0A
     

add first, parent, last