(function() {

  function Tractile(node, options) {

    // doing this allows the developer to omit the `new` keyword from their calls to Tractile
    if (!(this instanceof Tractile)) {
      if (node.length) {
        Array.prototype.forEach.call(node, function(n) {
          return new Tractile(n, options);
        });
      } else {
        return new Tractile(node, options);
      }
    }

    node = (node instanceof jQuery) ? node[0] : node;

    if (!node.children || node.children.length < 2) {
      return;
    }

    var userOptions = options || {};

    var defaults = {
      interval: 2000
    };

    this.options = {};

    for (var x in defaults) {
      this.options[x] = userOptions[x] || defaults[x];
    }

    this.current = 0;

    this.elements = node.children;

    this.total = this.elements.length;

    this.klasses = {
      active: 'is-active',
      previous: 'is-previous'
    };

    setInterval(this.run.bind(this), this.options.interval);

  }

  Tractile.prototype.run = function() {

    var addClass = function(classname, element) {
      var cn = element.className;
      if (cn.indexOf(classname) != -1) {
        return;
      }
      if (cn !== '') {
        classname = ' ' + classname;
      }
      element.className = cn + classname;
    };

    var removeClass = function(classname, element) {
      var cn = element.className;
      var rxp = new RegExp("\\s?\\b" + classname + "\\b", "g");
      cn = cn.replace(rxp, '');
      element.className = cn;
    };

    var clear = function(klass) {
      if (!klass) {
        return;
      }
      var len = this.total;
      while (len--) {
        removeClass(klass, this.elements[len]);
      }
    }.bind(this);

    if ((this.current - 1) >= 0) {
      removeClass(this.klasses.previous, this.elements[this.current - 1]);
    }
    if ((this.current + 1) < this.total) {
      clear(this.klasses.previous);
      removeClass(this.klasses.active, this.elements[this.current]);
      addClass(this.klasses.previous, this.elements[this.current]);
      addClass(this.klasses.active, this.elements[this.current + 1]);
      this.current++;
    } else {
      this.current = 0;
      clear(this.klasses.active);
      addClass(this.klasses.previous, this.elements[this.total - 1]);
      addClass(this.klasses.active, this.elements[this.current]);
    }

  };

  // expose Tractile
  window.Tractile = Tractile;

})();

@@ -50,102 +50,8 @@
  %7B%0A%0A
-    // doing this allows the developer to omit the %60new%60 keyword from their calls to Tractile%0A
     
@@ -169,39 +169,32 @@
 (n) %7B%0A          
-return 
 new Tractile(n, 
@@ -242,15 +242,8 @@
     
-return 
 new 
@@ -244,35 +244,32 @@
   new Tractile(n
-ode
 , options);%0A    
@@ -281,140 +281,113 @@
    %7D
-%0A%0A    node = (node instanceof jQuery) ? node%5B0%5D : node;%0A%0A    if (!node.children %7C%7C node.children.length %3C 2) %7B%0A      return;%0A
+ else %7B%0A%0A      this.klasses = %7B%0A        active: 'is-active',%0A        previous: 'is-previous'%0A  
     %7D
+;
 %0A%0A
+  
     
@@ -416,24 +416,26 @@
 ons %7C%7C %7B%7D;%0A%0A
+  
     var defa
@@ -449,16 +449,18 @@
 %7B%0A      
+  
 interval
@@ -466,16 +466,18 @@
 l: 2000%0A
+  
     %7D;%0A%0A
@@ -476,24 +476,26 @@
     %7D;%0A%0A    
+  
 this.options
@@ -498,24 +498,26 @@
 ions = %7B%7D;%0A%0A
+  
     for (var
@@ -536,24 +536,26 @@
 ts) %7B%0A      
+  
 this.options
@@ -595,19 +595,161 @@
 x%5D;%0A    
+  
 %7D%0A%0A
+      node = (node instanceof jQuery) ? node%5B0%5D : node;%0A%0A      if (!node.children %7C%7C node.children.length %3C 2) %7B%0A        return;%0A      %7D%0A%0A  
     this
@@ -763,16 +763,18 @@
 t = 0;%0A%0A
+  
     this
@@ -801,24 +801,26 @@
 ldren;%0A%0A    
+  
 this.total =
@@ -849,92 +849,8 @@
 %0A%0A  
-  this.klasses = %7B%0A      active: 'is-active',%0A      previous: 'is-previous'%0A    %7D;%0A%0A
     
@@ -906,20 +906,31 @@
 erval);%0A
+    %7D%0A    
 %0A  %7D
+;
 %0A%0A  Trac
@@ -2303,29 +2303,8 @@
 %7D;%0A%0A
-  // expose Tractile%0A
   wi

Fix constructor being run an extra time when new keyword is omitted