/**
 * Returns item N from $$ collection.
 */
Elements.implement({
	item: function(index){
		return (index > this.length) ? null : this[index];
	}
});
/**
 * Toggle display status of block level element.
 */
Element.implement({
	toggle: function() {
		if (this.getStyle('display') != 'none') {
			this.setStyle('display', 'none');
		} else {
			this.setStyle('display', 'block');
		}
	}
});
/**
 * Returns 1st item from array.
 */
Array.implement({
	getFirst: function(){
		return (this.length) ? this[0] : null;
	}
});
/**
 * Returns item N from array.
 */
Array.implement({
	item: function(index){
		return Math.abs(index) < this.length ? this[(index < 0 && this.length) + index] : null;
	}
});