function kVibrate(s) {
	this.settings = s;
	this.ghosts = [];
	this.homePosition = null;
	this.s = {
		node: null,
		hardness: 7,
		opacity: 4,
		decay: 1.5,
		ghosts: 5
	};

	this.initialize = function(s) {
		for (var key in s) { this.s[key] = s[key] };
		this.homePosition = Position.cumulativeOffset(this.s.node);
		for (var x=0; x<this.s.ghosts; x++) {
			var ghost = this.s.node.cloneNode(true);
			DOM.insertAfter(ghost, this.s.node);
			ghost.style.position = 'absolute';
			Position.clone(this.s.node, ghost);
			ghost.style.zIndex = x;
			this.ghosts.push({
				node: ghost,
				zIndex: x,
				opacity: this.s.opacity
			});
		}

		this.bump(this.s.hardness);
	};

	this.bump = function(hardness) {
		for (var x=0; x<this.ghosts.length; x++) {
			Element.opacity(this.ghosts[x].node, this.ghosts[x].opacity);
			var min = 0;
			var max = hardness*2;
			var left = (Math.round((Math.random()*max)+min)) - hardness + this.homePosition[0];
			var top = (Math.round((Math.random()*max)+min)) - hardness + this.homePosition[1];

			this.ghosts[x].node.style.left = left+'px';
			this.ghosts[x].node.style.top = top+'px';
		}
		if (hardness > 0) {
			setTimeout(this.bump.bind(this, hardness-this.s.decay), 100);
		} else {
			setTimeout(this.bump.bind(this, this.s.hardness), 19700);
		}
	};

	this.initialize(s);
};
Behaviour.register({
	'.vibrate': function(el) {
		var now = new Date();
		if (now.getDate() < 11 && now.getMonth() == 10) {
			new kVibrate({
				node: el,
				hardness: 24,
				opacity: 3,
				decay: 2,
				ghosts: 10
			});
		}
	}
});
