anchor.diff:    socket.on('room details', function(change_room){
       $('#messages').empty();
       $('#roomname h6').text(change_room.room);
  +    window.socket_room = change_room.room;
     });
   
     $('form').submit(function(){
  
positive.code:   
    
    socket.emit('user config', data);
  
    $('#top').on('click', function(){
      window.location = "/";
  
negative.code:   window.socket_room = "lobby";
    window.userName = $("span.current_user").text() || "Anonymous";
  
    var socket = io("<%= Rails.configuration.socket_url %>");
  
    $('#random_chat').on('click', function(){
  