var navTabs = new Class({
	togglers:[],
	elements: [],
	
	initialize: function(togglers, elements) {
		this.togglers = $$(togglers);
		this.elements = $$(elements);
		
		togglers.each(function(el, index){
			el.addEvent('click', function(e) {
				var e = new Event(e);
				this.show(index);
				e.stop();
			}.bind(this));
		}.bind(this));
		
		
		if (window.location.hash.length>1) {
			var idancre=window.location.hash.substr(1,window.location.hash.length-1);
		}
		if (idancre>0) {
			if (this.togglers[idancre]) {
				this.show(idancre);
			}else {
				if (this.togglers[0]) {
					this.show(0);
				}
			}
		} else {
			if (this.togglers[0]) {
				this.show(0);
			}
		}
		
		
	},
	
	hideAll: function(){
		this.togglers.removeClass('box2_on');
		this.elements.setStyle('display', 'none');
	},
	
	show: function(index) {
		this.hideAll();
		if (this.togglers[index]) {
			this.togglers[index].addClass('box2_on');
			this.elements[index].setStyle('display', 'block');
		}
	}
});