[jQuery] Unexpected call to method or property access

[jQuery] Unexpected call to method or property access


I am working on code that will dynamically add some controls to a
form. As these controls are meant to be unobtrusive (they add an
address lookup field to the form that won't work without javascript)
the HTRML code is to be left out of the form itself and added by the
script. A (cut down) versio nof the HTML looks like this:
<form action="#" method="post">
<fieldset>
blah blah blah
</fieldset>
<fieldset class="alt" id="addinfo-address">
<legend>Address</legend>

Address


<input type="hidden" id="address-prefix" value="card." />
<label for="line-1">
<span class="label">Address (1): <span>Required</span></span>
<input class="fvRequired" type="text" name="card.line-1" id="line-1"
value="" />
</label>
<label for="line-2">
<span class="label">Address (2):</span>
<input class="fvOptional" type="text" name="card.line-2" id="line-2"
value="" />
</label>
<label for="line-3">
<span class="label">Address (3): </span>
<input class="fvOptional" type="text" name="card.line-3" id="line-3"
value="" />
</label>
<label for="line-4">
<span class="label">Address (4): </span>
<input class="fvOptional" type="text" name="card.line-4" id="line-4"
value="" />
</label>
<label for="postcode">
<span class="label">Postcode: <span>Required</span></span>
<input class="fvRequired" type="text" name="card.postcode"
id="postcode" value="" />
</label>
<label><input type="submit" value="Choose Delivery Address &#187;"
class="button" /></label>
</fieldset>
</form>
My Javascript looks like this:
function addLookupFields ()
{
    $('#addinfo-address').before ("<fieldset style=\"display: none;\"
class=\"highlight\" id=\"address-lookup\"><legend>Address Finder</
legend>

Address Finder

<label for=\"address-info\"><span class=
\"label\">Postcode: </span><input id=\"address-info\" maxlength=
\"255\" type=\"text\" /></label><label><input id=\"find-address\" type=
\"button\" class=\"button\" value=\"Find Address\" /></label></
fieldset>");
    return ($('#address-lookup'));
}
$(document).ready (function ()
{
    addLookupFields ().slideDown ('slow');
});
This works in FireFox, Opera, Safari but in Internet Explorer it
causes a script error, Unexpected call to method or property access.
Can anyone help with this?