function __tabMenu(init,speed){


	var d = document,
		get = 'getElementById',
		tags = 'getElementsByTagName',
		items = d[get]('tabmenu')[tags]('a'),
		anchor,
		show = function(id,speed){

			for(var i=0; i<items.length; i++){

				anchor = items[i].href.split('#')[1];
				if(!d[get](anchor))
					continue;
				if(id == anchor){
					items[i].className = 'active';
					$('#'+anchor).slideDown(speed);

				} else {
					items[i].className = '';
					$('#'+anchor).slideUp(speed);

				}

			}

		};

	if(/^#.+/.test(location.hash))
		show(location.hash.slice(1,location.hash.length));
	else
		show(init);

 	for(var i=0; i<items.length; i++){

		items[i].onclick = function(){
			anchor = this.href.split('#')[1];
			show(anchor,'fast');
			return false;
		}
	}
}
$(
function(){
	$("#tabmenu div").hide();
	$("#f1").show();
	__tabMenu('f1',0);
}
);
