text: function loopedOffsetLookup(offset, val) {
  	if(this.length == 1) return val;
  	
  	if(this.indexOf(val) != -1) {
  		return this[(this.indexOf(val) + offset + this.length) % this.length];
  	} else {
  		throw new Error("Value not found in array, so can't find offset.");
  	}
  }
  
  Array.prototype.next = function next(val) {
  	return loopedOffsetLookup.call(this, 1, val);
  };
  
  Array.prototype.prev = function prev(val) {
  	return loopedOffsetLookup.call(this, -1, val);
  };
  
  
  Array.prototype.pushUnique = function pushUnique(value) {
  	if(this.indexOf(value) == -1) {
  		this.push(value);
  		return true;
  	} else {
  		return false;
  	}
  };
  
  Array.prototype.swap = function swap(index1, index2) {
  	var temp = this[index1];
  	this[index1] = this[index2];
  	this[index2] = temp;
  };
  
  Array.prototype.contains = function contains(value) {
  	return this.indexOf(value) !== -1;
  };