 
     else
       composing = $(message).find 'composing'
-
       if composing.length > 0
         if $('#chat-' + jid_id).size()
           $('#chat-' + jid_id + ' #content-chat #message-area .chat-messages').append("<div class='chat-event'>" + name + " " + I18n.t("chat.typing") +  "</div>")
           Chat.scroll_chat jid_id
 
       body = $(message).find "html > body"
-
       if body.length == 0
         body = $(message).find 'body'
         if body.length > 0

        if pres > cmp_pres
          $(element).before elem
          inserted = true
        else
          if pres is cmp_pres
            if jid < cmp_jid
              $(element).before elem
              inserted = true
        return

      if not inserted then $('#roster-area ul').append elem

    else $('#roster-area ul').append elem


  insertChatArea: (jid,jid_id,status,name) ->
    $("#chat-bar").append(

  presence_value: (elem) ->
    if elem.hasClass 'online' then 3 else
      if elem.hasClass 'dnd' then  2 else
        if elem.hasClass 'away' then 1 else
          if elem.hasClass 'offline' then 0

  insert_contact: (elem) ->
    jid = elem.find('.roster-jid').text()
