I trying to get a DIV to show up, after the timeout disappear, and when it disappears, the user gets redirected to another page. I need the redirection to page to be setup on the DIV HTML line. The script can be called from there to.
This is what I have. It is a collection of ideas from different authors:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title></title>

<script type="text/javascript">

$('#msg').ready(function () {
setTimeout(function () {
$('#msg').hide();
window.location.href = 'index.php';
}, 3000);
});

</script>

<style>
.hide {
display:none;
}

.show {
display:block;
}
/* Information-Success */
.infobox{
position: absolute;
top:50%;
bottom: 0;
margin-left: 30%;
margin-right: 30%;
width: 40%;
height:50px;
padding-top: 5px;
border:solid 1px #008800;
background:#D5FFC6;
color:#48A41C;
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
font-weight:normal;
text-align:center;
}

/* Error */
.errorbox{
position: absolute;
top:50%;
bottom: 0;
margin-left: 30%;
margin-right: 30%;
width: 40%;
height:50px;
padding-top: 5px;
border:solid 1px #880000;
background:#FDE4E1;
color:#CB4721;
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
font-weight:normal;
text-align:center;
}
</style>

</head>
<body>
<div id="msg" class = "infobox">You have selected The Info Box</div>
</body>
</html>

Right now the way it is, is not hiding and not redirecting. Can someone help?

Thank You