I would recommend using a css selector for hiding your answers. In order to do so you would have to add a class attribute to your answer.
<div class="questions_main_box">
<h2>common questions:</h2>
<ul>
<li>
<h3 id="question1">question number 1</h3>
<div id="answer1" class="answer">answer number 1</div>
</li>
<li>
<h3 id="question2">question number 2</h3>
<div id="answer2" class="answer">answer number 2</div>
</li>
etc etc...
</ul>
</div>
Then using jquery you could hide all answers using this
$('.answer').hide();
So, put together with your other question JQuery if then else using URL parser plugin, there must be a more elegant solution! it would be:
var match = jQuery.url.attr('anchor').match(/^question([0-9]+)$/);
if (match && match.length > 0) {
$('.answer').hide();
$('#answer' + match[1] ).show();
}
Or on a single line like this.
$('.answer').hide().is('#answer' + match[1]).show();