text: $(function(){function a(){for(var a="",b=0,c=Math.floor,d=Math.random;s=String.fromCharCode,b<8;b++)a+=s(c(d()*26)+(c(d()*2)?97:65));return a}function b(b){window.WebSocket=function(c,d,e,f,g){var h=this;do h.__id=a();while(WebSocket.__instances[h.__id]);WebSocket.__instances[h.__id]=h,b.debug&&b.logger.log("__instances: "+JSON.stringify(WebSocket.__instances)),h.readyState=WebSocket.CONNECTING,h.bufferedAmount=0,h.__events={},d?typeof d=="string"&&(d=[d]):d=[],h.__createTask=setTimeout(function(){WebSocket.__addTask(function(){h.__createTask=null,WebSocket.__flash.create(h.__id,c,d,e||null,f||0,g||null)})},0)},WebSocket.prototype.send=function(a){if(this.readyState==WebSocket.CONNECTING)throw"INVALID_STATE_ERR: Web Socket connection has not been established";var b=WebSocket.__flash.send(this.__id,encodeURIComponent(a));return b<0?!0:(this.bufferedAmount+=b,!1)},WebSocket.prototype.close=function(){if(this.__createTask){clearTimeout(this.__createTask),this.__createTask=null,this.readyState=WebSocket.CLOSED;return}if(this.readyState==WebSocket.CLOSED||this.readyState==WebSocket.CLOSING)return;this.readyState=WebSocket.CLOSING,WebSocket.__flash.close(this.__id)},WebSocket.prototype.addEventListener=function(a,b,c){a in this.__events||(this.__events[a]=[]),this.__events[a].push(b)},WebSocket.prototype.removeEventListener=function(a,b,c){if(!(a in this.__events))return;var d=this.__events[a];for(var e=d.length-1;e>=0;--e)if(d[e]===b){d.splice(e,1);break}},WebSocket.prototype.dispatchEvent=function(a){var b=this.__events[a.type]||[];for(var c=0;c<b.length;++c)b[c](a);var d=this["on"+a.type];d&&d.apply(this,[a]),a.type==="close"&&this.destroy()},WebSocket.prototype.destroy=function(){this.__events=null,this.onopen&&delete this.onopen,this.onerror&&delete this.onerror,this.onclose&&delete this.onclose,WebSocket.__flash.destroy(this.__id),b.debug&&b.logger.log("removing "+this.__id+" from __instances"),delete WebSocket.__instances[this.__id]},WebSocket.prototype.__handleEvent=function(a){"readyState"in a&&(this.readyState=a.readyState),"protocol"in a&&(this.protocol=a.protocol);var b;if(a.type=="open"||a.type=="error")b=this.__createSimpleEvent(a.type);else if(a.type=="close")b=this.__createSimpleEvent("close"),b.wasClean=a.wasClean?!0:!1,b.code=a.code,b.reason=a.reason;else{if(a.type!="message")throw"unknown event type: "+a.type;var c=decodeURIComponent(a.message);b=this.__createMessageEvent("message",c)}this.dispatchEvent(b)},WebSocket.prototype.__createSimpleEvent=function(a){if(document.createEvent&&window.Event){var b=document.createEvent("Event");return b.initEvent(a,!1,!1),b}return{type:a,bubbles:!1,cancelable:!1}},WebSocket.prototype.__createMessageEvent=function(a,b){if(document.createEvent&&window.MessageEvent&&!window.opera){var c=document.createEvent("MessageEvent");return c.initMessageEvent("message",!1,!1,b,null,null,window,null),c}return{type:a,data:b,bubbles:!1,cancelable:!1}},WebSocket.CONNECTING=0,WebSocket.OPEN=1,WebSocket.CLOSING=2,WebSocket.CLOSED=3,WebSocket.__initialized=!1,WebSocket.__flash=null,WebSocket.__instances={},WebSocket.__tasks=[],WebSocket.loadFlashPolicyFile=function(a){WebSocket.__addTask(function(){WebSocket.__flash.loadManualPolicyFile(a)})},WebSocket.__onFlashInitialized=function(){setTimeout(function(){WebSocket.__flash=$("#webSocketFlash")[0],WebSocket.__flash.setCallerUrl(location.href),WebSocket.__flash.setDebug(b.debug);for(var a=0;a<WebSocket.__tasks.length;++a)WebSocket.__tasks[a]();WebSocket.__tasks=[]},0)},WebSocket.__onFlashEvent=function(){return setTimeout(function(){try{var a=WebSocket.__flash.receiveEvents();for(var c=0;c<a.length;++c)WebSocket.__instances[a[c].webSocketId].__handleEvent(a[c])}catch(d){b.logger.error(d)}},0),!0},WebSocket.__log=function(a){b.logger.log(decodeURIComponent(a))},WebSocket.__error=function(a){b.logger.error(decodeURIComponent(a))},WebSocket.__addTask=function(a){WebSocket.__flash?a():WebSocket.__tasks.push(a)},WebSocket.__isFlashLite=function(){if(!window.navigator||!window.navigator.mimeTypes)return!1;var a=window.navigator.mimeTypes["application/x-shockwave-flash"];return!a||!a.enabledPlugin||!a.enabledPlugin.filename?!1:a.enabledPlugin.filename.match(/flashlite/i)?!0:!1}}$.extend({wsFlashInitShim:function(a){function f(a){if(a==0)return e("timeout");setTimeout(function(){WebSocket.__flash?e():f(--a)},50)}b(a),WebSocket.__initialized=!0;var c=WebSocket.__isFlashLite()?"0px":"-100px";$('<div id="webSocketContainer" style="position:absolute;left:'+c+";top:"+c+'"><div id="webSocketFlash"/></div>').appendTo(document.body);var d={hasPriority:!0,swliveconnect:!0,allowScriptAccess:"always",insecure:!!a.crossDomainInsecureSupport},e=function(b){b?(a.chromeFrameFallback&&$.getScriptCached("//ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js",function(){CFInstall.check({mode:"overlay"})}),a.callback(b)):(a.policyFile&&WebSocket.loadFlashPolicyFile(a.policyFile),a.callback())};swfobject.embedSWF(a.swfLocation,"webSocketFlash","1","1","10.0.0",null,null,d,null),f(100)}})});