Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
jQuery.atmosphere=function(){jQuery(window).bind("unload.atmosphere",function(){jQuery.atmosphere.unsubscribe()
});
jQuery(window).bind("offline",function(){jQuery.atmosphere.unsubscribe()
});
jQuery(window).keypress(function(B){if(B.keyCode===27){B.preventDefault()
}});
var A=function(C){var B,E=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,D={};
while(B=E.exec(C)){D[B[1]]=B[2]
}return D
};
return{version:"2.0.0-jquery",requests:[],callbacks:[],onError:function(B){},onClose:function(B){},onOpen:function(B){},onMessage:function(B){},onReconnect:function(C,B){},onMessagePublished:function(B){},onTransportFailure:function(C,B){},onLocalMessage:function(B){},onFailureToReconnect:function(C,B){},AtmosphereRequest:function(f){var h={timeout:300000,method:"GET",headers:{},contentType:"",callback:null,url:"",data:"",suspend:true,maxRequest:-1,reconnect:true,maxStreamingLength:10000000,lastIndex:0,logLevel:"info",requestCount:0,fallbackMethod:"GET",fallbackTransport:"streaming",transport:"long-polling",webSocketImpl:null,webSocketBinaryType:null,dispatchUrl:null,webSocketPathDelimiter:"@@",enableXDR:false,rewriteURL:false,attachHeadersAsQueryString:true,executeCallbackBeforeReconnect:false,readyState:0,lastTimestamp:0,withCredentials:false,trackMessageLength:false,messageDelimiter:"|",connectTimeout:-1,reconnectInterval:0,dropAtmosphereHeaders:true,uuid:0,shared:false,readResponsesHeaders:false,maxReconnectOnClose:5,enableProtocol:true,onError:function(AS){},onClose:function(AS){},onOpen:function(AS){},onMessage:function(AS){},onReopen:function(AT,AS){},onReconnect:function(AT,AS){},onMessagePublished:function(AS){},onTransportFailure:function(AT,AS){},onLocalMessage:function(AS){},onFailureToReconnect:function(AT,AS){}};
var p={status:200,reasonPhrase:"OK",responseBody:"",messages:[],headers:[],state:"messageReceived",transport:"polling",error:null,request:null,partialMessage:"",errorHandled:false,id:0};
var s=null;
var I=null;
var O=null;
var X=null;
var Z=null;
var AD=true;
var F=0;
var AP=false;
var t=null;
var AK;
var K=null;
var c=jQuery.now();
var d;
AR(f);
function AL(){AD=true;
AP=false;
F=0;
s=null;
I=null;
O=null;
X=null
}function T(){AF();
AL()
}function AR(AS){T();
h=jQuery.extend(h,AS);
h.mrequest=h.reconnect;
if(!h.reconnect){h.reconnect=true
}}function J(){return h.webSocketImpl!=null||window.WebSocket||window.MozWebSocket
}function l(){return window.EventSource
}function M(){if(h.shared){K=AB(h);
if(K!=null){if(h.logLevel==="debug"){jQuery.atmosphere.debug("Storage service available. All communication will be local")
}if(K.open(h)){return 
}}if(h.logLevel==="debug"){jQuery.atmosphere.debug("No Storage service available.")
}K=null
}h.firstMessage=true;
h.isOpen=false;
h.ctime=jQuery.now();
if(h.transport!=="websocket"&&h.transport!=="sse"){L(h)
}else{if(h.transport==="websocket"){if(!J()){j("Websocket is not supported, using request.fallbackTransport ("+h.fallbackTransport+")")
}else{AE(false)
}}else{if(h.transport==="sse"){if(!l()){j("Server Side Events(SSE) is not supported, using request.fallbackTransport ("+h.fallbackTransport+")")
}else{b(false)
}}}}}function AB(AW){var AZ,AT,AV,AU="atmosphere-"+AW.url,AS={storage:function(){if(!jQuery.atmosphere.supportStorage()){return 
}var Ac=window.localStorage,Aa=function(Ad){return jQuery.parseJSON(Ac.getItem(AU+"-"+Ad))
},Ab=function(Ad,Ae){Ac.setItem(AU+"-"+Ad,jQuery.stringifyJSON(Ae))
};
return{init:function(){Ab("children",Aa("children").concat([c]));
jQuery(window).on("storage.socket",function(Ad){Ad=Ad.originalEvent;
if(Ad.key===AU&&Ad.newValue){AY(Ad.newValue)
}});
return Aa("opened")
},signal:function(Ad,Ae){Ac.setItem(AU,jQuery.stringifyJSON({target:"p",type:Ad,data:Ae}))
},close:function(){var Ad,Ae=Aa("children");
jQuery(window).off("storage.socket");
if(Ae){Ad=jQuery.inArray(AW.id,Ae);
if(Ad>-1){Ae.splice(Ad,1);
Ab("children",Ae)
}}}}
},windowref:function(){var Aa=window.open("",AU.replace(/\W/g,""));
if(!Aa||Aa.closed||!Aa.callbacks){return 
}return{init:function(){Aa.callbacks.push(AY);
Aa.children.push(c);
return Aa.opened
},signal:function(Ab,Ac){if(!Aa.closed&&Aa.fire){Aa.fire(jQuery.stringifyJSON({target:"p",type:Ab,data:Ac}))
}},close:function(){function Ab(Ae,Ad){var Ac=jQuery.inArray(Ad,Ae);
if(Ac>-1){Ae.splice(Ac,1)
}}if(!AV){Ab(Aa.callbacks,AY);
Ab(Aa.children,c)
}}}
}};
function AY(Aa){var Ac=jQuery.parseJSON(Aa),Ab=Ac.data;
if(Ac.target==="c"){switch(Ac.type){case"open":g("opening","local",h);
break;
case"close":if(!AV){AV=true;
if(Ab.reason==="aborted"){AH()
}else{if(Ab.heir===c){M()
}else{setTimeout(function(){M()
},100)
}}}break;
case"message":Y(Ab,"messageReceived",200,AW.transport);
break;
case"localMessage":w(Ab);
break
}}}function AX(){var Aa=new RegExp("(?:^|; )("+encodeURIComponent(AU)+")=([^;]*)").exec(document.cookie);
if(Aa){return jQuery.parseJSON(decodeURIComponent(Aa[2]))
}}AZ=AX();
if(!AZ||jQuery.now()-AZ.ts>1000){return 
}AT=AS.storage()||AS.windowref();
if(!AT){return 
}return{open:function(){var Aa;
d=setInterval(function(){var Ab=AZ;
AZ=AX();
if(!AZ||Ab.ts===AZ.ts){AY(jQuery.stringifyJSON({target:"c",type:"close",data:{reason:"error",heir:Ab.heir}}))
}},1000);
Aa=AT.init();
if(Aa){setTimeout(function(){g("opening","local",AW)
},50)
}return Aa
},send:function(Aa){AT.signal("send",Aa)
},localSend:function(Aa){AT.signal("localSend",jQuery.stringifyJSON({id:c,event:Aa}))
},close:function(){if(!AP){clearInterval(d);
AT.signal("close");
AT.close()
}}}
}function x(){var AT,AS="atmosphere-"+h.url,AX={storage:function(){if(!jQuery.atmosphere.supportStorage()){return 
}var AY=window.localStorage;
return{init:function(){jQuery(window).on("storage.socket",function(AZ){AZ=AZ.originalEvent;
if(AZ.key===AS&&AZ.newValue){AU(AZ.newValue)
}})
},signal:function(AZ,Aa){AY.setItem(AS,jQuery.stringifyJSON({target:"c",type:AZ,data:Aa}))
},get:function(AZ){return jQuery.parseJSON(AY.getItem(AS+"-"+AZ))
},set:function(AZ,Aa){AY.setItem(AS+"-"+AZ,jQuery.stringifyJSON(Aa))
},close:function(){jQuery(window).off("storage.socket");
AY.removeItem(AS);
AY.removeItem(AS+"-opened");
AY.removeItem(AS+"-children")
}}
},windowref:function(){var AY=AS.replace(/\W/g,""),AZ=(jQuery('iframe[name="'+AY+'"]')[0]||jQuery('<iframe name="'+AY+'" />').hide().appendTo("body")[0]).contentWindow;
return{init:function(){AZ.callbacks=[AU];
AZ.fire=function(Aa){var Ab;
for(Ab=0;
Ab<AZ.callbacks.length;
Ab++){AZ.callbacks[Ab](Aa)
}}
},signal:function(Aa,Ab){if(!AZ.closed&&AZ.fire){AZ.fire(jQuery.stringifyJSON({target:"c",type:Aa,data:Ab}))
}},get:function(Aa){return !AZ.closed?AZ[Aa]:null
},set:function(Aa,Ab){if(!AZ.closed){AZ[Aa]=Ab
}},close:function(){}}
}};
function AU(AY){var Aa=jQuery.parseJSON(AY),AZ=Aa.data;
if(Aa.target==="p"){switch(Aa.type){case"send":AG(AZ);
break;
case"localSend":w(AZ);
break;
case"close":AH();
break
}}}t=function AW(AY){AT.signal("message",AY)
};
function AV(){document.cookie=encodeURIComponent(AS)+"="+encodeURIComponent(jQuery.stringifyJSON({ts:jQuery.now()+1,heir:(AT.get("children")||[])[0]}))
}AT=AX.storage()||AX.windowref();
AT.init();
if(h.logLevel==="debug"){jQuery.atmosphere.debug("Installed StorageService "+AT)
}AT.set("children",[]);
if(AT.get("opened")!=null&&!AT.get("opened")){AT.set("opened",false)
}AV();
d=setInterval(AV,1000);
AK=AT
}function g(AU,AX,AT){if(h.shared&&AX!=="local"){x()
}if(AK!=null){AK.set("opened",true)
}AT.close=function(){AH()
};
if(F>0&&AU==="re-connecting"){AT.isReopen=true;
y(p)
}else{if(p.error==null){p.request=AT;
var AV=p.state;
p.state=AU;
var AS=p.transport;
p.transport=AX;
var AW=p.responseBody;
V();
p.responseBody=AW;
p.state=AV;
p.transport=AS
}}}function S(AU){AU.transport="jsonp";
var AT=h;
if((AU!=null)&&(typeof (AU)!=="undefined")){AT=AU
}var AS=AT.url;
if(AT.dispatchUrl!=null){AS+=AT.dispatchUrl
}var AV=AT.data;
if(AT.attachHeadersAsQueryString){AS=q(AT);
if(AV!==""){AS+="&X-Atmosphere-Post-Body="+encodeURIComponent(AV)
}AV=""
}Z=jQuery.ajax({url:AS,type:AT.method,dataType:"jsonp",error:function(AW,AY,AX){p.error=true;
if(AW.status<300){k(Z,AT,0)
}else{z(AW.status,AX)
}},jsonp:"jsonpTransport",success:function(AX){if(AT.reconnect){if(AT.maxRequest===-1||AT.requestCount++<AT.maxRequest){AA(Z,AT);
if(!AT.executeCallbackBeforeReconnect){k(Z,AT,0)
}var AZ=AX.message;
if(AZ!=null&&typeof AZ!=="string"){try{AZ=jQuery.stringifyJSON(AZ)
}catch(AY){}}var AW=Q(AZ,AT,p);
if(!AW){Y(p.responseBody,"messageReceived",200,AT.transport)
}if(AT.executeCallbackBeforeReconnect){k(Z,AT,0)
}}else{jQuery.atmosphere.log(h.logLevel,["JSONP reconnect maximum try reached "+h.requestCount]);
z(0,"maxRequest reached")
}}},data:AT.data,beforeSend:function(AW){B(AW,AT,false)
}})
}function u(AV){var AT=h;
if((AV!=null)&&(typeof (AV)!=="undefined")){AT=AV
}var AS=AT.url;
if(AT.dispatchUrl!=null){AS+=AT.dispatchUrl
}var AW=AT.data;
if(AT.attachHeadersAsQueryString){AS=q(AT);
if(AW!==""){AS+="&X-Atmosphere-Post-Body="+encodeURIComponent(AW)
}AW=""
}var AU=typeof (AT.async)!=="undefined"?AT.async:true;
Z=jQuery.ajax({url:AS,type:AT.method,error:function(AX,AZ,AY){p.error=true;
if(AX.status<300){k(Z,AT)
}else{z(AX.status,AY)
}},success:function(AZ,Aa,AY){if(AT.reconnect){if(AT.maxRequest===-1||AT.requestCount++<AT.maxRequest){if(!AT.executeCallbackBeforeReconnect){k(Z,AT,0)
}var AX=Q(AZ,AT,p);
if(!AX){Y(p.responseBody,"messageReceived",200,AT.transport)
}if(AT.executeCallbackBeforeReconnect){k(Z,AT,0)
}}else{jQuery.atmosphere.log(h.logLevel,["AJAX reconnect maximum try reached "+h.requestCount]);
z(0,"maxRequest reached")
}}},beforeSend:function(AX){B(AX,AT,false)
},crossDomain:AT.enableXDR,async:AU})
}function D(AS){if(h.webSocketImpl!=null){return h.webSocketImpl
}else{if(window.WebSocket){return new WebSocket(AS)
}else{return new MozWebSocket(AS)
}}}function E(){var AS=q(h);
return decodeURI(jQuery('<a href="'+AS+'"/>')[0].href.replace(/^http/,"ws"))
}function AQ(){var AS=q(h);
return AS
}function b(AT){p.transport="sse";
var AS=AQ(h.url);
if(h.logLevel==="debug"){jQuery.atmosphere.debug("Invoking executeSSE");
jQuery.atmosphere.debug("Using URL: "+AS)
}if(h.enableProtocol&&AT){var AV=jQuery.now()-h.ctime;
h.lastTimestamp=Number(h.stime)+Number(AV)
}if(AT&&!h.reconnect){if(I!=null){AF()
}return 
}try{I=new EventSource(AS,{withCredentials:h.withCredentials})
}catch(AU){z(0,AU);
j("SSE failed. Downgrading to fallback transport and resending");
return 
}if(h.connectTimeout>0){h.id=setTimeout(function(){if(!AT){AF()
}},h.connectTimeout)
}I.onopen=function(AW){R(h);
if(h.logLevel==="debug"){jQuery.atmosphere.debug("SSE successfully opened")
}if(!h.enableProtocol){if(!AT){g("opening","sse",h)
}else{g("re-opening","sse",h)
}}AT=true;
if(h.method==="POST"){p.state="messageReceived";
I.send(h.data)
}};
I.onmessage=function(AX){R(h);
if(!h.enableXDR&&AX.origin!==window.location.protocol+"//"+window.location.host){jQuery.atmosphere.log(h.logLevel,["Origin was not "+window.location.protocol+"//"+window.location.host]);
return 
}p.state="messageReceived";
p.status=200;
AX=AX.data;
var AW=Q(AX,h,p);
if(!AW){V();
p.responseBody="";
p.messages=[]
}};
I.onerror=function(AW){clearTimeout(h.id);
AC(AT);
AF();
if(AP){jQuery.atmosphere.log(h.logLevel,["SSE closed normally"])
}else{if(!AT){j("SSE failed. Downgrading to fallback transport and resending")
}else{if(h.reconnect&&(p.transport==="sse")){if(F++<h.maxReconnectOnClose){g("re-connecting",h.transport,h);
if(h.reconnectInterval>0){h.id=setTimeout(function(){b(true)
},h.reconnectInterval)
}else{b(true)
}p.responseBody="";
p.messages=[]
}else{jQuery.atmosphere.log(h.logLevel,["SSE reconnect maximum try reached "+F]);
z(0,"maxReconnectOnClose reached")
}}}}}
}function AE(AT){p.transport="websocket";
if(h.enableProtocol&&AT){var AU=jQuery.now()-h.ctime;
h.lastTimestamp=Number(h.stime)+Number(AU)
}var AS=E(h.url);
if(h.logLevel==="debug"){jQuery.atmosphere.debug("Invoking executeWebSocket");
jQuery.atmosphere.debug("Using URL: "+AS)
}if(AT&&!h.reconnect){if(s!=null){AF()
}return 
}s=D(AS);
if(h.webSocketBinaryType!=null){s.binaryType=h.webSocketBinaryType
}if(h.connectTimeout>0){h.id=setTimeout(function(){if(!AT){var AV={code:1002,reason:"",wasClean:false};
s.onclose(AV);
try{AF()
}catch(AW){}return 
}},h.connectTimeout)
}s.onopen=function(AV){R(h);
if(h.logLevel==="debug"){jQuery.atmosphere.debug("Websocket successfully opened")
}if(!h.enableProtocol){if(!AT){g("opening","websocket",h)
}else{g("re-opening","websocket",h)
}}AT=true;
s.webSocketOpened=AT;
if(h.method==="POST"){p.state="messageReceived";
s.send(h.data)
}};
s.onmessage=function(AX){R(h);
p.state="messageReceived";
p.status=200;
AX=AX.data;
var AV=typeof (AX)==="string";
if(AV){var AW=Q(AX,h,p);
if(!AW){V();
p.responseBody="";
p.messages=[]
}}else{if(!N(h,AX)){return 
}p.responseBody=AX;
V();
p.responseBody=null
}};
s.onerror=function(AV){clearTimeout(h.id)
};
s.onclose=function(AV){if(p.state==="closed"){return 
}clearTimeout(h.id);
var AW=AV.reason;
if(AW===""){switch(AV.code){case 1000:AW="Normal closure; the connection successfully completed whatever purpose for which it was created.";
break;
case 1001:AW="The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.";
break;
case 1002:AW="The endpoint is terminating the connection due to a protocol error.";
break;
case 1003:AW="The connection is being terminated because the endpoint received data of a type it cannot accept (for example, a text-only endpoint received binary data).";
break;
case 1004:AW="The endpoint is terminating the connection because a data frame was received that is too large.";
break;
case 1005:AW="Unknown: no status code was provided even though one was expected.";
break;
case 1006:AW="Connection was closed abnormally (that is, with no close frame being sent).";
break
}}jQuery.atmosphere.warn("Websocket closed, reason: "+AW);
jQuery.atmosphere.warn("Websocket closed, wasClean: "+AV.wasClean);
AC(AT);
p.state="closed";
if(AP){jQuery.atmosphere.log(h.logLevel,["Websocket closed normally"])
}else{if(!AT){j("Websocket failed. Downgrading to Comet and resending")
}else{if(h.reconnect&&p.transport==="websocket"){AF();
if(F++<h.maxReconnectOnClose){g("re-connecting",h.transport,h);
if(h.reconnectInterval>0){h.id=setTimeout(function(){p.responseBody="";
p.messages=[];
AE(true)
},h.reconnectInterval)
}else{p.responseBody="";
p.messages=[];
AE(true)
}}else{jQuery.atmosphere.log(h.logLevel,["Websocket reconnect maximum try reached "+h.requestCount]);
jQuery.atmosphere.warn("Websocket error, reason: "+AV.reason);
z(0,"maxReconnectOnClose reached")
}}}}};
if(s.url===undefined){s.onclose({reason:"Android 4.1 does not support websockets.",wasClean:false})
}}function N(AV,AU){var AS=true;
if(jQuery.trim(AU).length!==0&&AV.enableProtocol&&AV.firstMessage){AV.firstMessage=false;
var AT=AU.split(AV.messageDelimiter);
var AW=AT.length===2?0:1;
AV.uuid=jQuery.trim(AT[AW]);
AV.stime=jQuery.trim(AT[AW+1]);
AS=false;
if(AV.transport!=="long-polling"){AI(AV)
}}else{AI(AV)
}return AS
}function R(AS){clearTimeout(AS.id);
if(AS.timeout>0&&AS.transport!=="polling"){AS.id=setTimeout(function(){AC(true);
AF();
W()
},AS.timeout)
}}function z(AS,AT){AF();
clearTimeout(h.id);
p.state="error";
p.reasonPhrase=AT;
p.responseBody="";
p.status=AS;
p.messages=[];
V()
}function Q(AW,AV,AS){if(!N(h,AW)){return true
}if(AW.length===0){return true
}if(AV.trackMessageLength){AW=AS.partialMessage+AW.replace(/(\r\n|\n|\r)/gm,"").replace(/^\s+|\s+$/g,"");
var AU=[];
var AT=AW.indexOf(AV.messageDelimiter);
while(AT!==-1){var AY=jQuery.trim(AW.substring(0,AT));
var AX=parseInt(AY,10);
if(isNaN(AX)){throw'message length "'+AY+'" is not a number'
}AT+=AV.messageDelimiter.length;
if(AT+AX>AW.length){AT=-1
}else{AU.push(AW.substring(AT,AT+AX));
AW=AW.substring(AT+AX,AW.length);
AT=AW.indexOf(AV.messageDelimiter)
}}AS.partialMessage=AW;
if(AU.length!==0){AS.responseBody=AU.join(AV.messageDelimiter);
AS.messages=AU;
return false
}else{AS.responseBody="";
AS.messages=[];
return true
}}else{AS.responseBody=AW
}return false
}function j(AS){jQuery.atmosphere.log(h.logLevel,[AS]);
if(typeof (h.onTransportFailure)!=="undefined"){h.onTransportFailure(AS,h)
}else{if(typeof (jQuery.atmosphere.onTransportFailure)!=="undefined"){jQuery.atmosphere.onTransportFailure(AS,h)
}}h.transport=h.fallbackTransport;
var AT=h.connectTimeout===-1?0:h.connectTimeout;
if(h.reconnect&&h.transport!=="none"||h.transport==null){h.method=h.fallbackMethod;
p.transport=h.fallbackTransport;
h.fallbackTransport="none";
if(AT>0){h.id=setTimeout(function(){M()
},AT)
}else{M()
}}else{z(500,"Unable to reconnect with fallback transport")
}}function q(AU,AS){var AT=h;
if((AU!=null)&&(typeof (AU)!=="undefined")){AT=AU
}if(AS==null){AS=AT.url
}if(!AT.attachHeadersAsQueryString){return AS
}if(AS.indexOf("X-Atmosphere-Framework")!==-1){return AS
}AS+=(AS.indexOf("?")!==-1)?"&":"?";
AS+="X-Atmosphere-tracking-id="+AT.uuid;
AS+="&X-Atmosphere-Framework="+jQuery.atmosphere.version;
AS+="&X-Atmosphere-Transport="+AT.transport;
if(AT.trackMessageLength){AS+="&X-Atmosphere-TrackMessageSize=true"
}if(AT.lastTimestamp!=null){AS+="&X-Cache-Date="+AT.lastTimestamp
}else{AS+="&X-Cache-Date="+0
}if(AT.contentType!==""){AS+="&Content-Type="+AT.contentType
}if(AT.enableProtocol){AS+="&X-atmo-protocol=true"
}jQuery.each(AT.headers,function(AV,AX){var AW=jQuery.isFunction(AX)?AX.call(this,AT,AU,p):AX;
if(AW!=null){AS+="&"+encodeURIComponent(AV)+"="+encodeURIComponent(AW)
}});
return AS
}function AI(AS){if(!AS.isOpen){AS.isOpen=true;
g("opening",AS.transport,AS)
}else{if(AS.isReopen){AS.isReopen=false;
g("re-opening",AS.transport,AS)
}}}function L(AU){var AS=h;
if((AU!=null)||(typeof (AU)!=="undefined")){AS=AU
}AS.lastIndex=0;
AS.readyState=0;
if((AS.transport==="jsonp")||((AS.enableXDR)&&(jQuery.atmosphere.checkCORSSupport()))){S(AS);
return 
}if(AS.transport==="ajax"){u(AU);
return 
}if(jQuery.browser.msie&&jQuery.browser.version<10){if((AS.transport==="streaming")){if(AS.enableXDR&&window.XDomainRequest){i(AS)
}else{AO(AS)
}return 
}if((AS.enableXDR)&&(window.XDomainRequest)){i(AS);
return 
}}var AV=function(){AS.lastIndex=0;
if(AS.reconnect&&F++<AS.maxReconnectOnClose){g("re-connecting",AU.transport,AU);
k(AT,AS,AU.reconnectInterval)
}else{z(0,"maxReconnectOnClose reached")
}};
if(AS.reconnect&&(AS.maxRequest===-1||AS.requestCount++<AS.maxRequest)){var AT=jQuery.ajaxSettings.xhr();
AT.hasData=false;
B(AT,AS,true);
if(AS.suspend){O=AT
}if(AS.transport!=="polling"){p.transport=AS.transport;
AT.onabort=function(){AC(true)
};
AT.onerror=function(){p.error=true;
try{p.status=XMLHttpRequest.status
}catch(AW){p.status=500
}if(!p.status){p.status=500
}AF();
if(!p.errorHandled){AV()
}}
}AT.onreadystatechange=function(){if(AP){return 
}p.error=null;
var AX=false;
var Ac=false;
if(AS.transport==="streaming"&&AS.readyState>2&&AT.readyState===4){AF();
AV();
return 
}AS.readyState=AT.readyState;
if(AS.transport==="streaming"&&AT.readyState>=3){Ac=true
}else{if(AS.transport==="long-polling"&&AT.readyState===4){Ac=true
}}R(h);
if(AS.transport!=="polling"){if((!AS.enableProtocol||!AU.firstMessage)&&AT.readyState===2){AI(AS)
}var AW=0;
if(AT.readyState!==0){AW=AT.status>1000?0:AT.status
}if(AW>=300||AW===0){p.errorHandled=true;
AF();
AV();
return 
}}if(Ac){var Aa=AT.responseText;
if(jQuery.trim(Aa.length)===0&&AS.transport==="long-polling"){if(!AT.hasData){AV()
}else{AT.hasData=false
}return 
}AT.hasData=true;
AA(AT,h);
if(AS.transport==="streaming"){if(!jQuery.browser.opera){var AZ=Aa.substring(AS.lastIndex,Aa.length);
AX=Q(AZ,AS,p);
AS.lastIndex=Aa.length;
if(AX){return 
}}else{jQuery.atmosphere.iterate(function(){if(p.status!==500&&AT.responseText.length>AS.lastIndex){try{p.status=AT.status;
p.headers=A(AT.getAllResponseHeaders());
AA(AT,h)
}catch(Ae){p.status=404
}R(h);
p.state="messageReceived";
var Ad=AT.responseText.substring(AS.lastIndex);
AS.lastIndex=AT.responseText.length;
AX=Q(Ad,AS,p);
if(!AX){V()
}e(AT,AS)
}else{if(p.status>400){AS.lastIndex=AT.responseText.length;
return false
}}},0)
}}else{AX=Q(Aa,AS,p)
}try{p.status=AT.status;
p.headers=A(AT.getAllResponseHeaders());
AA(AT,AS)
}catch(Ab){p.status=404
}if(AS.suspend){p.state=p.status===0?"closed":"messageReceived"
}else{p.state="messagePublished"
}var AY=AU.transport!=="streaming";
if(AY&&!AS.executeCallbackBeforeReconnect){k(AT,AS,0)
}if(p.responseBody.length!==0&&!AX){V()
}if(AY&&AS.executeCallbackBeforeReconnect){k(AT,AS,0)
}e(AT,AS)
}};
AT.send(AS.data);
AD=true
}else{if(AS.logLevel==="debug"){jQuery.atmosphere.log(AS.logLevel,["Max re-connection reached."])
}z(0,"maxRequest reached")
}}function B(AU,AV,AT){var AS=AV.url;
if(AV.dispatchUrl!=null&&AV.method==="POST"){AS+=AV.dispatchUrl
}AS=q(AV,AS);
AS=jQuery.atmosphere.prepareURL(AS);
if(AT){AU.open(AV.method,AS,true);
if(AV.connectTimeout>0){AV.id=setTimeout(function(){if(AV.requestCount===0){AF();
Y("Connect timeout","closed",200,AV.transport)
}},AV.connectTimeout)
}}if(h.withCredentials){if("withCredentials" in AU){AU.withCredentials=true
}}if(!h.dropAtmosphereHeaders){AU.setRequestHeader("X-Atmosphere-Framework",jQuery.atmosphere.version);
AU.setRequestHeader("X-Atmosphere-Transport",AV.transport);
if(AV.lastTimestamp!=null){AU.setRequestHeader("X-Cache-Date",AV.lastTimestamp)
}else{AU.setRequestHeader("X-Cache-Date",0)
}if(AV.trackMessageLength){AU.setRequestHeader("X-Atmosphere-TrackMessageSize","true")
}AU.setRequestHeader("X-Atmosphere-tracking-id",AV.uuid)
}if(AV.contentType!==""){AU.setRequestHeader("Content-Type",AV.contentType)
}jQuery.each(AV.headers,function(AW,AY){var AX=jQuery.isFunction(AY)?AY.call(this,AU,AV,AT,p):AY;
if(AX!=null){AU.setRequestHeader(AW,AX)
}})
}function k(AT,AU,AV){if(AU.reconnect||(AU.suspend&&AD)){var AS=0;
if(AT.readyState!==0){AS=AT.status>1000?0:AT.status
}p.status=AS===0?204:AS;
p.reason=AS===0?"Server resumed the connection or down.":"OK";
clearTimeout(AU.id);
if(AV>0){AU.id=setTimeout(function(){L(AU)
},AV)
}else{L(AU)
}}}function y(AS){AS.state="re-connecting";
v(AS)
}function i(AS){if(AS.transport!=="polling"){X=o(AS);
X.open()
}else{o(AS).open()
}}function o(AU){var AT=h;
if((AU!=null)&&(typeof (AU)!=="undefined")){AT=AU
}var AZ=AT.transport;
var AY=0;
var AS=new window.XDomainRequest();
var AW=function(){if(AT.transport==="long-polling"&&(AT.reconnect&&(AT.maxRequest===-1||AT.requestCount++<AT.maxRequest))){AS.status=200;
i(AT)
}};
var AX=AT.rewriteURL||function(Ab){var Aa=/(?:^|;\s*)(JSESSIONID|PHPSESSID)=([^;]*)/.exec(document.cookie);
switch(Aa&&Aa[1]){case"JSESSIONID":return Ab.replace(/;jsessionid=[^\?]*|(\?)|$/,";jsessionid="+Aa[2]+"$1");
case"PHPSESSID":return Ab.replace(/\?PHPSESSID=[^&]*&?|\?|$/,"?PHPSESSID="+Aa[2]+"&").replace(/&$/,"")
}return Ab
};
AS.onprogress=function(){AV(AS)
};
AS.onerror=function(){if(AT.transport!=="polling"){AF();
if(F++<AT.maxReconnectOnClose){if(AT.reconnectInterval>0){AT.id=setTimeout(function(){g("re-connecting",AU.transport,AU);
i(AT)
},AT.reconnectInterval)
}else{g("re-connecting",AU.transport,AU);
i(AT)
}}else{z(0,"maxReconnectOnClose reached")
}}};
AS.onload=function(){};
var AV=function(Aa){clearTimeout(AT.id);
var Ac=Aa.responseText;
Ac=Ac.substring(AY);
AY+=Ac.length;
if(AZ!=="polling"){R(AT);
var Ab=Q(Ac,AT,p);
if(AZ==="long-polling"&&jQuery.trim(Ac)===0){return 
}if(AT.executeCallbackBeforeReconnect){AW()
}if(!Ab){Y(p.responseBody,"messageReceived",200,AZ)
}if(!AT.executeCallbackBeforeReconnect){AW()
}}};
return{open:function(){var Aa=AT.url;
if(AT.dispatchUrl!=null){Aa+=AT.dispatchUrl
}Aa=q(AT,Aa);
AS.open(AT.method,AX(Aa));
if(AT.method==="GET"){AS.send()
}else{AS.send(AT.data)
}if(AT.connectTimeout>0){AT.id=setTimeout(function(){if(AT.requestCount===0){AF();
Y("Connect timeout","closed",200,AT.transport)
}},AT.connectTimeout)
}},close:function(){AS.abort()
}}
}function AO(AS){X=P(AS);
X.open()
}function P(AV){var AU=h;
if((AV!=null)&&(typeof (AV)!=="undefined")){AU=AV
}var AT;
var AW=new window.ActiveXObject("htmlfile");
AW.open();
AW.close();
var AS=AU.url;
if(AU.dispatchUrl!=null){AS+=AU.dispatchUrl
}if(AU.transport!=="polling"){p.transport=AU.transport
}return{open:function(){var AX=AW.createElement("iframe");
AS=q(AU);
if(AU.data!==""){AS+="&X-Atmosphere-Post-Body="+encodeURIComponent(AU.data)
}AS=jQuery.atmosphere.prepareURL(AS);
AX.src=AS;
AW.body.appendChild(AX);
var AY=AX.contentDocument||AX.contentWindow.document;
AT=jQuery.atmosphere.iterate(function(){try{if(!AY.firstChild){return 
}if(AY.readyState==="complete"){try{jQuery.noop(AY.fileSize)
}catch(Ae){Y("Connection Failure","error",500,AU.transport);
return false
}}var Ab=AY.body?AY.body.lastChild:AY;
var Ad=function(){var Ag=Ab.cloneNode(true);
Ag.appendChild(AY.createTextNode("."));
var Af=Ag.innerText;
Af=Af.substring(0,Af.length-1);
return Af
};
if(!jQuery.nodeName(Ab,"pre")){var Aa=AY.head||AY.getElementsByTagName("head")[0]||AY.documentElement||AY;
var AZ=AY.createElement("script");
AZ.text="document.write('<plaintext>')";
Aa.insertBefore(AZ,Aa.firstChild);
Aa.removeChild(AZ);
Ab=AY.body.lastChild
}if(AU.closed){AU.isReopen=true
}AT=jQuery.atmosphere.iterate(function(){var Ag=Ad();
if(Ag.length>AU.lastIndex){R(h);
p.status=200;
p.error=null;
Ab.innerText="";
var Af=Q(Ag,AU,p);
if(Af){return""
}Y(p.responseBody,"messageReceived",200,AU.transport)
}AU.lastIndex=0;
if(AY.readyState==="complete"){AC(true);
g("re-connecting",AU.transport,AU);
if(AU.reconnectInterval>0){AU.id=setTimeout(function(){AO(AU)
},AU.reconnectInterval)
}else{AO(AU)
}return false
}},null);
return false
}catch(Ac){p.error=true;
g("re-connecting",AU.transport,AU);
if(F++<AU.maxReconnectOnClose){if(AU.reconnectInterval>0){AU.id=setTimeout(function(){AO(AU)
},AU.reconnectInterval)
}else{AO(AU)
}}else{z(0,"maxReconnectOnClose reached")
}AW.execCommand("Stop");
AW.close();
return false
}})
},close:function(){if(AT){AT()
}AW.execCommand("Stop");
AC(true)
}}
}function AG(AS){if(K!=null){G(AS)
}else{if(O!=null||I!=null){C(AS)
}else{if(X!=null){r(AS)
}else{if(Z!=null){n(AS)
}else{if(s!=null){a(AS)
}}}}}}function H(AT){var AS=AJ(AT);
AS.transport="ajax";
AS.method="GET";
AS.async=false;
AS.reconnect=false;
L(AS)
}function G(AS){K.send(AS)
}function U(AT){if(AT.length===0){return 
}try{if(K){K.localSend(AT)
}else{if(AK){AK.signal("localMessage",jQuery.stringifyJSON({id:c,event:AT}))
}}}catch(AS){jQuery.atmosphere.error(AS)
}}function C(AT){var AS=AJ(AT);
L(AS)
}function r(AT){if(h.enableXDR&&jQuery.atmosphere.checkCORSSupport()){var AS=AJ(AT);
AS.reconnect=false;
S(AS)
}else{C(AT)
}}function n(AS){C(AS)
}function m(AS){var AT=AS;
if(typeof (AT)==="object"){AT=AS.data
}return AT
}function AJ(AT){var AU=m(AT);
var AS={connected:false,timeout:60000,method:"POST",url:h.url,contentType:h.contentType,headers:h.headers,reconnect:true,callback:null,data:AU,suspend:false,maxRequest:-1,logLevel:"info",requestCount:0,withCredentials:h.withCredentials,transport:"polling",isOpen:true,attachHeadersAsQueryString:true,enableXDR:h.enableXDR,uuid:h.uuid,dispatchUrl:h.dispatchUrl,enableProtocol:false,messageDelimiter:"|",maxReconnectOnClose:h.maxReconnectOnClose};
if(typeof (AT)==="object"){AS=jQuery.extend(AS,AT)
}return AS
}function a(AS){var AV=m(AS);
var AT;
try{if(h.dispatchUrl!=null){AT=h.webSocketPathDelimiter+h.dispatchUrl+h.webSocketPathDelimiter+AV
}else{AT=AV
}s.send(AT)
}catch(AU){s.onclose=function(AW){};
AF();
j("Websocket failed. Downgrading to Comet and resending "+AT);
C(AS)
}}function w(AT){var AS=jQuery.parseJSON(AT);
if(AS.id!==c){if(typeof (h.onLocalMessage)!=="undefined"){h.onLocalMessage(AS.event)
}else{if(typeof (jQuery.atmosphere.onLocalMessage)!=="undefined"){jQuery.atmosphere.onLocalMessage(AS.event)
}}}}function Y(AV,AS,AT,AU){p.responseBody=AV;
p.transport=AU;
p.status=AT;
p.state=AS;
V()
}function AA(AS,AV){if(!AV.readResponsesHeaders&&!AV.enableProtocol){AV.lastTimestamp=jQuery.now();
AV.uuid=jQuery.atmosphere.guid();
return 
}try{var AU=AS.getResponseHeader("X-Cache-Date");
if(AU&&AU!=null&&AU.length>0){AV.lastTimestamp=AU.split(" ").pop()
}var AT=AS.getResponseHeader("X-Atmosphere-tracking-id");
if(AT&&AT!=null){AV.uuid=AT.split(" ").pop()
}if(AV.headers){jQuery.each(h.headers,function(AY){var AX=AS.getResponseHeader(AY);
if(AX){p.headers[AY]=AX
}})
}}catch(AW){}}function v(AS){AN(AS,h);
AN(AS,jQuery.atmosphere)
}function AN(AT,AU){switch(AT.state){case"messageReceived":F=0;
if(typeof (AU.onMessage)!=="undefined"){AU.onMessage(AT)
}break;
case"error":if(typeof (AU.onError)!=="undefined"){AU.onError(AT)
}break;
case"opening":if(typeof (AU.onOpen)!=="undefined"){AU.onOpen(AT)
}break;
case"messagePublished":if(typeof (AU.onMessagePublished)!=="undefined"){AU.onMessagePublished(AT)
}break;
case"re-connecting":if(typeof (AU.onReconnect)!=="undefined"){AU.onReconnect(h,AT)
}break;
case"re-opening":if(typeof (AU.onReopen)!=="undefined"){AU.onReopen(h,AT)
}break;
case"fail-to-reconnect":if(typeof (AU.onFailureToReconnect)!=="undefined"){AU.onFailureToReconnect(h,AT)
}break;
case"unsubscribe":case"closed":var AS=typeof (h.closed)!=="undefined"?h.closed:false;
if(typeof (AU.onClose)!=="undefined"&&!AS){AU.onClose(AT)
}h.closed=true;
break
}}function AC(AS){if(p.state!=="closed"){p.state="closed";
p.responseBody="";
p.messages=[];
p.status=!AS?501:200;
V()
}}function V(){var AU=function(AX,AY){AY(p)
};
if(K==null&&t!=null){t(p.responseBody)
}h.reconnect=h.mrequest;
var AS=typeof (p.responseBody)==="string";
var AV=(AS&&h.trackMessageLength)?(p.messages.length>0?p.messages:[""]):new Array(p.responseBody);
for(var AT=0;
AT<AV.length;
AT++){if(AV.length>1&&AV[AT].length===0){continue
}p.responseBody=(AS)?jQuery.trim(AV[AT]):AV[AT];
if(K==null&&t!=null){t(p.responseBody)
}if(p.responseBody.length===0&&p.state==="messageReceived"){continue
}v(p);
if(jQuery.atmosphere.callbacks.length>0){if(h.logLevel==="debug"){jQuery.atmosphere.debug("Invoking "+jQuery.atmosphere.callbacks.length+" global callbacks: "+p.state)
}try{jQuery.each(jQuery.atmosphere.callbacks,AU)
}catch(AW){jQuery.atmosphere.log(h.logLevel,["Callback exception"+AW])
}}if(typeof (h.callback)==="function"){if(h.logLevel==="debug"){jQuery.atmosphere.debug("Invoking request callbacks")
}try{h.callback(p)
}catch(AW){jQuery.atmosphere.log(h.logLevel,["Callback exception"+AW])
}}}}function e(AT,AS){if(p.partialMessage===""&&(AS.transport==="streaming")&&(AT.responseText.length>AS.maxStreamingLength)){p.messages=[];
AC(true);
W();
AF();
k(AT,AS,0)
}}function W(){if(h.enableProtocol&&!h.firstMessage){var AT="X-Atmosphere-Transport=close&X-Atmosphere-tracking-id="+h.uuid;
var AS=h.url.replace(/([?&])_=[^&]*/,AT);
AS=AS+(AS===h.url?(/\?/.test(h.url)?"&":"?")+AT:"");
if(h.connectTimeout>0){jQuery.ajax({url:AS,async:false,timeout:h.connectTimeout})
}else{jQuery.ajax({url:AS,async:false})
}}}function AH(){h.reconnect=false;
AP=true;
p.request=h;
p.state="unsubscribe";
p.responseBody="";
p.status=408;
V();
W();
AF()
}function AF(){if(h.id){clearTimeout(h.id)
}if(X!=null){X.close();
X=null
}if(Z!=null){Z.abort();
Z=null
}if(O!=null){O.abort();
O=null
}if(s!=null){if(s.webSocketOpened){s.close()
}s=null
}if(I!=null){I.close();
I=null
}AM()
}function AM(){if(AK!=null){clearInterval(d);
document.cookie=encodeURIComponent("atmosphere-"+h.url)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT";
AK.signal("close",{reason:"",heir:!AP?c:(AK.get("children")||[])[0]});
AK.close()
}if(K!=null){K.close()
}}this.subscribe=function(AS){AR(AS);
M()
};
this.execute=function(){M()
};
this.invokeCallback=function(){V()
};
this.close=function(){AH()
};
this.disconnect=function(){W()
};
this.getUrl=function(){return h.url
};
this.push=function(AU,AT){if(AT!=null){var AS=h.dispatchUrl;
h.dispatchUrl=AT;
AG(AU);
h.dispatchUrl=AS
}else{AG(AU)
}};
this.getUUID=function(){return h.uuid
};
this.pushLocal=function(AS){U(AS)
};
this.enableProtocol=function(AS){return h.enableProtocol
};
this.request=h;
this.response=p
},subscribe:function(B,E,D){if(typeof (E)==="function"){jQuery.atmosphere.addCallback(E)
}if(typeof (B)!=="string"){D=B
}else{D.url=B
}var C=new jQuery.atmosphere.AtmosphereRequest(D);
C.execute();
jQuery.atmosphere.requests[jQuery.atmosphere.requests.length]=C;
return C
},addCallback:function(B){if(jQuery.inArray(B,jQuery.atmosphere.callbacks)===-1){jQuery.atmosphere.callbacks.push(B)
}},removeCallback:function(C){var B=jQuery.inArray(C,jQuery.atmosphere.callbacks);
if(B!==-1){jQuery.atmosphere.callbacks.splice(B,1)
}},unsubscribe:function(){if(jQuery.atmosphere.requests.length>0){var B=[].concat(jQuery.atmosphere.requests);
for(var D=0;
D<B.length;
D++){var C=B[D];
C.close();
clearTimeout(C.response.request.id)
}}jQuery.atmosphere.requests=[];
jQuery.atmosphere.callbacks=[]
},unsubscribeUrl:function(C){var B=-1;
if(jQuery.atmosphere.requests.length>0){for(var E=0;
E<jQuery.atmosphere.requests.length;
E++){var D=jQuery.atmosphere.requests[E];
if(D.getUrl()===C){D.close();
clearTimeout(D.response.request.id);
B=E;
break
}}}if(B>=0){jQuery.atmosphere.requests.splice(B,1)
}},publish:function(C){if(typeof (C.callback)==="function"){jQuery.atmosphere.addCallback(C.callback)
}C.transport="polling";
var B=new jQuery.atmosphere.AtmosphereRequest(C);
jQuery.atmosphere.requests[jQuery.atmosphere.requests.length]=B;
return B
},checkCORSSupport:function(){if(jQuery.browser.msie&&!window.XDomainRequest){return true
}else{if(jQuery.browser.opera&&jQuery.browser.version<12){return true
}}var B=navigator.userAgent.toLowerCase();
var C=B.indexOf("android")>-1;
if(C){return true
}return false
},S4:function(){return(((1+Math.random())*65536)|0).toString(16).substring(1)
},guid:function(){return(jQuery.atmosphere.S4()+jQuery.atmosphere.S4()+"-"+jQuery.atmosphere.S4()+"-"+jQuery.atmosphere.S4()+"-"+jQuery.atmosphere.S4()+"-"+jQuery.atmosphere.S4()+jQuery.atmosphere.S4()+jQuery.atmosphere.S4())
},prepareURL:function(C){var D=jQuery.now();
var B=C.replace(/([?&])_=[^&]*/,"$1_="+D);
return B+(B===C?(/\?/.test(C)?"&":"?")+"_="+D:"")
},param:function(B){return jQuery.param(B,jQuery.ajaxSettings.traditional)
},supportStorage:function(){var C=window.localStorage;
if(C){try{C.setItem("t","t");
C.removeItem("t");
return window.StorageEvent&&!jQuery.browser.msie&&!(jQuery.browser.mozilla&&jQuery.browser.version.split(".")[0]==="1")
}catch(B){}}return false
},iterate:function(D,C){var E;
C=C||0;
(function B(){E=setTimeout(function(){if(D()===false){return 
}B()
},C)
})();
return function(){clearTimeout(E)
}
},log:function(D,C){if(window.console){var B=window.console[D];
if(typeof B==="function"){B.apply(window.console,C)
}}},warn:function(){jQuery.atmosphere.log("warn",arguments)
},info:function(){jQuery.atmosphere.log("info",arguments)
},debug:function(){jQuery.atmosphere.log("debug",arguments)
},error:function(){jQuery.atmosphere.log("error",arguments)
}}
}();
(function(){var A,B;
jQuery.uaMatch=function(D){D=D.toLowerCase();
var C=/(chrome)[ \/]([\w.]+)/.exec(D)||/(webkit)[ \/]([\w.]+)/.exec(D)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(D)||/(msie) ([\w.]+)/.exec(D)||D.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(D)||[];
return{browser:C[1]||"",version:C[2]||"0"}
};
A=jQuery.uaMatch(navigator.userAgent);
B={};
if(A.browser){B[A.browser]=true;
B.version=A.version
}if(B.chrome){B.webkit=true
}else{if(B.webkit){B.safari=true
}}jQuery.browser=B;
jQuery.sub=function(){function C(F,G){return new C.fn.init(F,G)
}jQuery.extend(true,C,this);
C.superclass=this;
C.fn=C.prototype=this();
C.fn.constructor=C;
C.sub=this.sub;
C.fn.init=function E(F,G){if(G&&G instanceof jQuery&&!(G instanceof C)){G=C(G)
}return jQuery.fn.init.call(this,F,G,D)
};
C.fn.init.prototype=C.fn;
var D=C(document);
return C
}
})();
(function(D){var F=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,C={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};
function A(G){return'"'+G.replace(F,function(H){var I=C[H];
return typeof I==="string"?I:"\\u"+("0000"+H.charCodeAt(0).toString(16)).slice(-4)
})+'"'
}function B(G){return G<10?"0"+G:G
}function E(L,K){var J,I,G,H,N=K[L],M=typeof N;
if(N&&typeof N==="object"&&typeof N.toJSON==="function"){N=N.toJSON(L);
M=typeof N
}switch(M){case"string":return A(N);
case"number":return isFinite(N)?String(N):"null";
case"boolean":return String(N);
case"object":if(!N){return"null"
}switch(Object.prototype.toString.call(N)){case"[object Date]":return isFinite(N.valueOf())?'"'+N.getUTCFullYear()+"-"+B(N.getUTCMonth()+1)+"-"+B(N.getUTCDate())+"T"+B(N.getUTCHours())+":"+B(N.getUTCMinutes())+":"+B(N.getUTCSeconds())+'Z"':"null";
case"[object Array]":G=N.length;
H=[];
for(J=0;
J<G;
J++){H.push(E(J,N)||"null")
}return"["+H.join(",")+"]";
default:H=[];
for(J in N){if(Object.prototype.hasOwnProperty.call(N,J)){I=E(J,N);
if(I){H.push(A(J)+":"+I)
}}}return"{"+H.join(",")+"}"
}}}D.stringifyJSON=function(G){if(window.JSON&&window.JSON.stringify){return window.JSON.stringify(G)
}return E("",{"":G})
}
}(jQuery));
New to GrepCode? Check out our FAQ X