You can fix it using a custom function:
Code:
<script type="text/javascript">
$(function() {
$('a#home').click(function() {
showContent('#box');
});
$('a#news').click(function() {
showContent('#box2');
});
$('a#about').click(function() {
showContent('#box3');
});
$('a#link').click(function() {
showContent('#box4');
});
});
function showContent(box) {
// Hide all of the boxes
$('.content').hide();
// Fade in the specified box
$(box).fadeIn(4000);
}
</script>
You will need to add a class to all of the divs in the body so they can be hidden with a single selector:
Code:
<div id="box" class="content">
<div id="box2" class="content">
<div id="box3" class="content">
<div id="box4" class="content">