             success: (data, textStatus, jqXHR) ->
                 window.location.href = "/dashboard" + window.location.hash
                 do window.location.reload
+=======
+        $.ajax '/friend',
+            type: 'POST'
+            dataType: 'json'
+            error: (jqXHR, textStatus, errorThrown) ->
+                do window.location.href = "/dashboard"
+            success: (data, textStatus, jqXHR) ->
+                do window.location.href = "/dashboard"
+>>>>>>> Add and Get Friends
 
 init = () ->
     do configureForm
     options = ($ 'li.options')
+<<<<<<< HEAD
     hash = undefined
     do $('.content').hide
 

        ($ this).click () ->
            roomID = ($ this).attr "data-rid"
            window.location.href = "/room/" + roomID

($ document).ready () =>
    do init

configureForm = ()  ->
    ($ "#addFriend").submit (event) ->
        do event.preventDefault
<<<<<<< HEAD
        console.log ($ ($ this).find('input[name=name]')[0]).val()
        $.ajax '/friend',
            type: 'POST'
