jQuery.fn.appendN = function(tag, id, cl) {
    nodestr = '<'+tag;
    if (id) {nodestr += ' id="'+id+'"' };
    if (cl) {nodestr += ' class="'+cl+'"' };
    nodestr += '></'+tag+'>';
    $(this).append(nodestr);
    var newnode = $('#'+id);
    return newnode
}

