function SocketManager(){var n=socketUrl,o=null,t=!1,e=!1,c=[],i=[],r={};function a(n,o){if(null!=c[n])for(var t in c[n])c[n][t](o)}function f(n,t){null==r[n]&&(e?(o.on(n,t),r[n]=!0):i[n]=t)}function u(){for(var n in i)f(n,i[n]);i=[]}function l(){o=io.connect(n+"/floormanager",{reconnect:!0,"reconnection delay":2e3,"max reconnection attempts":999999999,"reconnection limit":1e4}),o.on("connect",(function(){e=!0,u(),a("connect")})),o.on("disconnect",(function(){r={},e=!1,a("disconnect")}))}function s(){if(!t){t=!0;var o=document.createElement("script");o.src=n+"/socket.io/socket.io.js",o.type="text/javascript",o.onload=l,document.body.appendChild(o)}}this.on=function(n,o){null==c[n]&&(c[n]=[]),c[n].push(o)},this.off=function(n,o){for(var t in c)if(t==n){var e=c[t],i=-1;for(var r in e)if(e[r]==o){i=r;break}if(-1!=i){e.splice(i,1);break}}},this.listen=function(n,o){null==r[n]&&f(n,o)},this.emit=function(n,t){return!!e&&(o.emit(n,t),!0)},$(document).ready((function(){setTimeout((function(){s()}),500)}))}var socketManager=new SocketManager;