[jQuery] jquery doesn't work, when loaded with ajax

[jQuery] jquery doesn't work, when loaded with ajax


Hello.
I'm building a wab page with ajax. Well, everything was fine, before i
needed to create a form for file uploading.
Basicaly it works this way:
User loads webpage (www.exmpl.com)
click "upload" - a form is placed into div, using ajax. That form
contains jquery code for form handling/file uploading
and it doesn't work. When i load form directly, with an url - it
works. When form is placed into div with AJAX-nothing works
Is there a way to do what i want?
here's the source..
<table width="600" border="0" height="100%" cellpadding="0"
cellspacing="0">
<tr>
<td height="6" style="background-image:url(images/k_v.jpg);height:
6px;"></td>
<td height="6" style="background-image:url(images/v.jpg);height:
6px;"></td>
<td width="6" height="6" style="background-image:url(images/
d_v.jpg);height:6px;"></td>
</tr>
<tr>
<td width="5" style="background-image:url(images/k.jpg)">&nbsp;</
td>
<td bgcolor="#edf2f8" valign="top" height="100%">Array
(
)
<div id="adding_ad">
<link rel="stylesheet" type="text/css" media="screen" href="http://
malsup.com/jquery/form/form.css" />
<script type="text/javascript" src="http://malsup.com/jquery/
jquery-1.2.3.js"></script>
<script type="text/javascript" src="http://malsup.com/jquery/block/
jquery.blockUI.js"></script>
<script type="text/javascript" src="http://malsup.com/jquery/firebug/
firebug.js"></script>
<script type="text/javascript" src="http://malsup.com/jquery/form/
jquery.form.js"></script>
<script type="text/javascript">
$(function() {
$('form').ajaxForm({
beforeSubmit: clearOutput,
success: writeOutput
});
// normal activity indicator (ala gmail)
$('<div id="busy">Loading...</div>')
.ajaxStart(function() {$(this).show();})
.ajaxStop(function() {$(this).hide();})
.appendTo('#main');
});
$().ajaxError(function(ev, opts, xhr, msg, ex) {
//window.console.error(msg + ': ' + ex);
alert(msg + ': ' + ex);
});
// blockUI activity indicator
$.extend($.blockUI.defaults.overlayCSS, { backgroundColor: '#00f' });
$.blockUI.defaults.pageMessage = '<h1><img src="../../block/busy.gif" /