function resetName() {
  if (Cookies.get('name') != null) {
    var time = new Date();
    time.setTime( time.getTime() + ( 60 * 1000 ));
    Cookies.set('name', Cookies.get('name'), { expires: time });
  }
  setInterval('resetName()', 50 * 1000);
}

$(document).ready(function() {
  resetName();
});
function updateNameExpires() {
  if (Cookies.get('name') != null) {
    var time = new Date();
    time.setTime( time.getTime() + ( 60 * 1000 ));
    Cookies.set('name', Cookies.get('name'), { expires: time });
  }
}

$(document).ready(function() {
  setInterval('updateNameExpires()', 50 * 1000);
});
Fix keep random guest name
Fix keep random guest name

Before fix, use setInterval() in function, the function will be called many times like recursive. I moved that code to document.read(), and it run properly.

Rename the function when fix this bug.
