I'm sorry if this is not exactly what you asked but I'm going to try and point out a few problems and see if that answers your question.
Firstly you cannot declare a src attribute and put javascript in the same <script> tag
You do not need to re-extend the variable "t" after you have created a new Element - it is already extended.
You have your statements out of order which is why it is probably not working. You are adding "t" to $('div') immediately instead of building the entire contents of "t" then inserting into "cont"
Try this
<div id='div'></div>
<script src="javascript/ie7.js"></script>
<script>