[jQuery] How can I code this func fully jQuery compatible

[jQuery] How can I code this func fully jQuery compatible


Hi;
function showReplyBox(itemId,parentId)
{
var box = document.getElementById('comment-reply-box');
var itemBox = document.getElementById('comment-item-'+itemId);
var parent_id = document.getElementById('parent_id');



parent_id.value= parentId ? parentId : itemId;
$("#box").hide()
$('#replybox').remove()



var replyDiv = document.createElement('div');

replyDiv.setAttribute('id','replybox');
$('#replybox').hide()
replyDiv.innerHTML = box.innerHTML;
itemBox.appendChild(replyDiv);
$('#replybox').slideDown("slow");
}
I got a func like above, as you I am a newbie in jquery ;)
I try to do that like below but I cannot succeed it
function showReplyBox(itemId,parentId)
{
var box = $('#comment-reply-box');
var itemBox = $('#comment-item-'+itemId);
var parent_id = $('#parent_id');


parent_id.val(parentId ? parentId : itemId);
$("#box").hide()
$('#replybox').remove()

$('<div />').attr("id","replybox")
$('#comment-reply-box').appendTo('#replybox')
$('#replybox').append('#comment-item-'+itemId)
}
tHanks for any help