$('#Lightwindow').html('

Email Listing To A Friend

Fill out the form below to email this listing to a friend.

'); $('#Lightwindow form.Ajax').submit(function(e) { e.preventDefault(); $.ajax({ url: $(this).attr('action'), type: $(this).attr('method'), data: $(this).serialize(), dataType: 'script' }); }); $('#Lightwindow a.Submit').click(function(e) { e.preventDefault(); $(this).closest('form').submit(); }); $('#LightwindowOverlay, #Lightwindow').show(); $('#Lightwindow form input[type="text"]:first').focus();