	function getAnchor(url) {
		var pos = url.indexOf('#');
		return (pos >= 0) ? url.substring(pos) : false;
	}

	function showTab(id) {
		jQuery('.tab-panel').hide();
		jQuery(id).show();
		jQuery('#nav-news li a').removeClass('current');
		jQuery('a[href$=' + id +']').addClass('current');
	}

	jQuery('#nav-news li a').click(function() {
		var href = getAnchor( jQuery(this).attr('href') );
		showTab(href);
		
		return false;
	});
	
	var hash = getAnchor(document.location.href);
	if(hash) {
		showTab(hash);
		setTimeout("window.scrollTo(0,0);", 10);
	}
