var openId = "";

function init() {
	
	var curURL = window.location.href;
	
	//works in python
	//re = new RegExp("\w*://[^/]*/what/[index.html]?[/]?#(.*)'");
	var re = new RegExp(".*#(.*)");
	var result = re.exec( curURL );
	
	if( result != null && result.length > 1 ) {
		var elementId = result[1];
		openId = elementId;
		$("#" + elementId ).show();
	}
}

function showLink( elementId ) {
	if( openId != null && openId != '' ) {
		$("#" + openId ).hide();
	}
	openId = elementId;
	$("#" + elementId ).toggle('fast');
}

$( document ).ready( init );




