-
Notifications
You must be signed in to change notification settings - Fork 3
/
jabberwerx.js
1544 lines (1515 loc) · 331 KB
/
jabberwerx.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
*
* Copyrights
*
* Portions created or assigned to Cisco Systems, Inc. are
* Copyright (c) 2010 Cisco Systems, Inc. All Rights Reserved.
*/
/*/opt/home/ci/hudson/home/jobs/CAXL_CSG_Optimized/workspace/trunk/build/dist/CAXL-release-2.1.1.19913/src/third_party/jquery/jquery-1.4.2.js*/
/*!
* jQuery JavaScript Library v1.4.2
* http://jquery.com/
*
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2010, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Sat Feb 13 22:33:48 2010 -0500
*/
(function(window,undefined){var jQuery=function(selector,context){return new jQuery.fn.init(selector,context);},_jQuery=window.jQuery,_$=window.$,document=window.document,rootjQuery,quickExpr=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/,rnotwhite=/\S/,rtrim=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,userAgent=navigator.userAgent,browserMatch,readyBound=false,readyList=[],DOMContentLoaded,toString=Object.prototype.toString,hasOwnProperty=Object.prototype.hasOwnProperty,push=Array.prototype.push,slice=Array.prototype.slice,indexOf=Array.prototype.indexOf;jQuery.fn=jQuery.prototype={init:function(selector,context){var match,elem,ret,doc;if(!selector){return this;}
if(selector.nodeType){this.context=this[0]=selector;this.length=1;return this;}
if(selector==="body"&&!context){this.context=document;this[0]=document.body;this.selector="body";this.length=1;return this;}
if(typeof selector==="string"){match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){doc=(context?context.ownerDocument||context:document);ret=rsingleTag.exec(selector);if(ret){if(jQuery.isPlainObject(context)){selector=[document.createElement(ret[1])];jQuery.fn.attr.call(selector,context,true);}else{selector=[doc.createElement(ret[1])];}}else{ret=buildFragment([match[1]],[doc]);selector=(ret.cacheable?ret.fragment.cloneNode(true):ret.fragment).childNodes;}
return jQuery.merge(this,selector);}else{elem=document.getElementById(match[2]);if(elem){if(elem.id!==match[2]){return rootjQuery.find(selector);}
this.length=1;this[0]=elem;}
this.context=document;this.selector=selector;return this;}}else if(!context&&/^\w+$/.test(selector)){this.selector=selector;this.context=document;selector=document.getElementsByTagName(selector);return jQuery.merge(this,selector);}else if(!context||context.jquery){return(context||rootjQuery).find(selector);}else{return jQuery(context).find(selector);}}else if(jQuery.isFunction(selector)){return rootjQuery.ready(selector);}
if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context;}
return jQuery.makeArray(selector,this);},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length;},toArray:function(){return slice.call(this,0);},get:function(num){return num==null?this.toArray():(num<0?this.slice(num)[0]:this[num]);},pushStack:function(elems,name,selector){var ret=jQuery();if(jQuery.isArray(elems)){push.apply(ret,elems);}else{jQuery.merge(ret,elems);}
ret.prevObject=this;ret.context=this.context;if(name==="find"){ret.selector=this.selector+(this.selector?" ":"")+selector;}else if(name){ret.selector=this.selector+"."+name+"("+selector+")";}
return ret;},each:function(callback,args){return jQuery.each(this,callback,args);},ready:function(fn){jQuery.bindReady();if(jQuery.isReady){fn.call(document,jQuery);}else if(readyList){readyList.push(fn);}
return this;},eq:function(i){return i===-1?this.slice(i):this.slice(i,+i+1);},first:function(){return this.eq(0);},last:function(){return this.eq(-1);},slice:function(){return this.pushStack(slice.apply(this,arguments),"slice",slice.call(arguments).join(","));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},end:function(){return this.prevObject||jQuery(null);},push:push,sort:[].sort,splice:[].splice};jQuery.fn.init.prototype=jQuery.fn;jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options,name,src,copy;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2;}
if(typeof target!=="object"&&!jQuery.isFunction(target)){target={};}
if(length===i){target=this;--i;}
for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue;}
if(deep&©&&(jQuery.isPlainObject(copy)||jQuery.isArray(copy))){var clone=src&&(jQuery.isPlainObject(src)||jQuery.isArray(src))?src:jQuery.isArray(copy)?[]:{};target[name]=jQuery.extend(deep,clone,copy);}else if(copy!==undefined){target[name]=copy;}}}}
return target;};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep){window.jQuery=_jQuery;}
return jQuery;},isReady:false,ready:function(){if(!jQuery.isReady){if(!document.body){return setTimeout(jQuery.ready,13);}
jQuery.isReady=true;if(readyList){var fn,i=0;while((fn=readyList[i++])){fn.call(document,jQuery);}
readyList=null;}
if(jQuery.fn.triggerHandler){jQuery(document).triggerHandler("ready");}}},bindReady:function(){if(readyBound){return;}
readyBound=true;if(document.readyState==="complete"){return jQuery.ready();}
if(document.addEventListener){document.addEventListener("DOMContentLoaded",DOMContentLoaded,false);window.addEventListener("load",jQuery.ready,false);}else if(document.attachEvent){document.attachEvent("onreadystatechange",DOMContentLoaded);window.attachEvent("onload",jQuery.ready);var toplevel=false;try{toplevel=window.frameElement==null;}catch(e){}
if(document.documentElement.doScroll&&toplevel){doScrollCheck();}}},isFunction:function(obj){return toString.call(obj)==="[object Function]";},isArray:function(obj){return toString.call(obj)==="[object Array]";},isPlainObject:function(obj){if(!obj||toString.call(obj)!=="[object Object]"||obj.nodeType||obj.setInterval){return false;}
if(obj.constructor&&!hasOwnProperty.call(obj,"constructor")&&!hasOwnProperty.call(obj.constructor.prototype,"isPrototypeOf")){return false;}
var key;for(key in obj){}
return key===undefined||hasOwnProperty.call(obj,key);},isEmptyObject:function(obj){for(var name in obj){return false;}
return true;},error:function(msg){throw msg;},parseJSON:function(data){if(typeof data!=="string"||!data){return null;}
data=jQuery.trim(data);if(/^[\],:{}\s]*$/.test(data.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){return window.JSON&&window.JSON.parse?window.JSON.parse(data):(new Function("return "+data))();}else{jQuery.error("Invalid JSON: "+data);}},noop:function(){},globalEval:function(data){if(data&&rnotwhite.test(data)){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.support.scriptEval){script.appendChild(document.createTextNode(data));}else{script.text=data;}
head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()===name.toUpperCase();},each:function(object,callback,args){var name,i=0,length=object.length,isObj=length===undefined||jQuery.isFunction(object);if(args){if(isObj){for(name in object){if(callback.apply(object[name],args)===false){break;}}}else{for(;i<length;){if(callback.apply(object[i++],args)===false){break;}}}}else{if(isObj){for(name in object){if(callback.call(object[name],name,object[name])===false){break;}}}else{for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}}
return object;},trim:function(text){return(text||"").replace(rtrim,"");},makeArray:function(array,results){var ret=results||[];if(array!=null){if(array.length==null||typeof array==="string"||jQuery.isFunction(array)||(typeof array!=="function"&&array.setInterval)){push.call(ret,array);}else{jQuery.merge(ret,array);}}
return ret;},inArray:function(elem,array){if(array.indexOf){return array.indexOf(elem);}
for(var i=0,length=array.length;i<length;i++){if(array[i]===elem){return i;}}
return-1;},merge:function(first,second){var i=first.length,j=0;if(typeof second.length==="number"){for(var l=second.length;j<l;j++){first[i++]=second[j];}}else{while(second[j]!==undefined){first[i++]=second[j++];}}
first.length=i;return first;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++){if(!inv!==!callback(elems[i],i)){ret.push(elems[i]);}}
return ret;},map:function(elems,callback,arg){var ret=[],value;for(var i=0,length=elems.length;i<length;i++){value=callback(elems[i],i,arg);if(value!=null){ret[ret.length]=value;}}
return ret.concat.apply([],ret);},guid:1,proxy:function(fn,proxy,thisObject){if(arguments.length===2){if(typeof proxy==="string"){thisObject=fn;fn=thisObject[proxy];proxy=undefined;}else if(proxy&&!jQuery.isFunction(proxy)){thisObject=proxy;proxy=undefined;}}
if(!proxy&&fn){proxy=function(){return fn.apply(thisObject||this,arguments);};}
if(fn){proxy.guid=fn.guid=fn.guid||proxy.guid||jQuery.guid++;}
return proxy;},uaMatch:function(ua){ua=ua.toLowerCase();var match=/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||!/compatible/.test(ua)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"};},browser:{}});browserMatch=jQuery.uaMatch(userAgent);if(browserMatch.browser){jQuery.browser[browserMatch.browser]=true;jQuery.browser.version=browserMatch.version;}
if(jQuery.browser.webkit){jQuery.browser.safari=true;}
if(indexOf){jQuery.inArray=function(elem,array){return indexOf.call(array,elem);};}
rootjQuery=jQuery(document);if(document.addEventListener){DOMContentLoaded=function(){document.removeEventListener("DOMContentLoaded",DOMContentLoaded,false);jQuery.ready();};}else if(document.attachEvent){DOMContentLoaded=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",DOMContentLoaded);jQuery.ready();}};}
function doScrollCheck(){if(jQuery.isReady){return;}
try{document.documentElement.doScroll("left");}catch(error){setTimeout(doScrollCheck,1);return;}
jQuery.ready();}
function evalScript(i,elem){if(elem.src){jQuery.ajax({url:elem.src,async:false,dataType:"script"});}else{jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");}
if(elem.parentNode){elem.parentNode.removeChild(elem);}}
function access(elems,key,value,exec,fn,pass){var length=elems.length;if(typeof key==="object"){for(var k in key){access(elems,k,key[k],exec,fn,value);}
return elems;}
if(value!==undefined){exec=!pass&&exec&&jQuery.isFunction(value);for(var i=0;i<length;i++){fn(elems[i],key,exec?value.call(elems[i],i,fn(elems[i],key)):value,pass);}
return elems;}
return length?fn(elems[0],key):undefined;}
function now(){return(new Date).getTime();}
(function(){jQuery.support={};var root=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+now();div.style.display="none";div.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return;}
jQuery.support={leadingWhitespace:div.firstChild.nodeType===3,tbody:!div.getElementsByTagName("tbody").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:/^0.55$/.test(a.style.opacity),cssFloat:!!a.style.cssFloat,checkOn:div.getElementsByTagName("input")[0].value==="on",optSelected:document.createElement("select").appendChild(document.createElement("option")).selected,parentNode:div.removeChild(div.appendChild(document.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"));}catch(e){}
root.insertBefore(script,root.firstChild);if(window[id]){jQuery.support.scriptEval=true;delete window[id];}
try{delete script.test;}catch(e){jQuery.support.deleteExpando=false;}
root.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function click(){jQuery.support.noCloneEvent=false;div.detachEvent("onclick",click);});div.cloneNode(true).fireEvent("onclick");}
div=document.createElement("div");div.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var fragment=document.createDocumentFragment();fragment.appendChild(div.firstChild);jQuery.support.checkClone=fragment.cloneNode(true).cloneNode(true).lastChild.checked;jQuery(function(){var div=document.createElement("div");div.style.width=div.style.paddingLeft="1px";document.body.appendChild(div);jQuery.boxModel=jQuery.support.boxModel=div.offsetWidth===2;document.body.removeChild(div).style.display='none';div=null;});var eventSupported=function(eventName){var el=document.createElement("div");eventName="on"+eventName;var isSupported=(eventName in el);if(!isSupported){el.setAttribute(eventName,"return;");isSupported=typeof el[eventName]==="function";}
el=null;return isSupported;};jQuery.support.submitBubbles=eventSupported("submit");jQuery.support.changeBubbles=eventSupported("change");root=script=div=all=a=null;})();jQuery.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var expando="jQuery"+now(),uuid=0,windowData={};jQuery.extend({cache:{},expando:expando,noData:{"embed":true,"object":true,"applet":true},data:function(elem,name,data){if(elem.nodeName&&jQuery.noData[elem.nodeName.toLowerCase()]){return;}
elem=elem==window?windowData:elem;var id=elem[expando],cache=jQuery.cache,thisCache;if(!id&&typeof name==="string"&&data===undefined){return null;}
if(!id){id=++uuid;}
if(typeof name==="object"){elem[expando]=id;thisCache=cache[id]=jQuery.extend(true,{},name);}else if(!cache[id]){elem[expando]=id;cache[id]={};}
thisCache=cache[id];if(data!==undefined){thisCache[name]=data;}
return typeof name==="string"?thisCache[name]:thisCache;},removeData:function(elem,name){if(elem.nodeName&&jQuery.noData[elem.nodeName.toLowerCase()]){return;}
elem=elem==window?windowData:elem;var id=elem[expando],cache=jQuery.cache,thisCache=cache[id];if(name){if(thisCache){delete thisCache[name];if(jQuery.isEmptyObject(thisCache)){jQuery.removeData(elem);}}}else{if(jQuery.support.deleteExpando){delete elem[jQuery.expando];}else if(elem.removeAttribute){elem.removeAttribute(jQuery.expando);}
delete cache[id];}}});jQuery.fn.extend({data:function(key,value){if(typeof key==="undefined"&&this.length){return jQuery.data(this[0]);}else if(typeof key==="object"){return this.each(function(){jQuery.data(this,key);});}
var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length){data=jQuery.data(this[0],key);}
return data===undefined&&parts[1]?this.data(parts[0]):data;}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});}},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});}});jQuery.extend({queue:function(elem,type,data){if(!elem){return;}
type=(type||"fx")+"queue";var q=jQuery.data(elem,type);if(!data){return q||[];}
if(!q||jQuery.isArray(data)){q=jQuery.data(elem,type,jQuery.makeArray(data));}else{q.push(data);}
return q;},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),fn=queue.shift();if(fn==="inprogress"){fn=queue.shift();}
if(fn){if(type==="fx"){queue.unshift("inprogress");}
fn.call(elem,function(){jQuery.dequeue(elem,type);});}}});jQuery.fn.extend({queue:function(type,data){if(typeof type!=="string"){data=type;type="fx";}
if(data===undefined){return jQuery.queue(this[0],type);}
return this.each(function(i,elem){var queue=jQuery.queue(this,type,data);if(type==="fx"&&queue[0]!=="inprogress"){jQuery.dequeue(this,type);}});},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type);});},delay:function(time,type){time=jQuery.fx?jQuery.fx.speeds[time]||time:time;type=type||"fx";return this.queue(type,function(){var elem=this;setTimeout(function(){jQuery.dequeue(elem,type);},time);});},clearQueue:function(type){return this.queue(type||"fx",[]);}});var rclass=/[\n\t]/g,rspace=/\s+/,rreturn=/\r/g,rspecialurl=/href|src|style/,rtype=/(button|input)/i,rfocusable=/(button|input|object|select|textarea)/i,rclickable=/^(a|area)$/i,rradiocheck=/radio|checkbox/;jQuery.fn.extend({attr:function(name,value){return access(this,name,value,true,jQuery.attr);},removeAttr:function(name,fn){return this.each(function(){jQuery.attr(this,name,"");if(this.nodeType===1){this.removeAttribute(name);}});},addClass:function(value){if(jQuery.isFunction(value)){return this.each(function(i){var self=jQuery(this);self.addClass(value.call(this,i,self.attr("class")));});}
if(value&&typeof value==="string"){var classNames=(value||"").split(rspace);for(var i=0,l=this.length;i<l;i++){var elem=this[i];if(elem.nodeType===1){if(!elem.className){elem.className=value;}else{var className=" "+elem.className+" ",setClass=elem.className;for(var c=0,cl=classNames.length;c<cl;c++){if(className.indexOf(" "+classNames[c]+" ")<0){setClass+=" "+classNames[c];}}
elem.className=jQuery.trim(setClass);}}}}
return this;},removeClass:function(value){if(jQuery.isFunction(value)){return this.each(function(i){var self=jQuery(this);self.removeClass(value.call(this,i,self.attr("class")));});}
if((value&&typeof value==="string")||value===undefined){var classNames=(value||"").split(rspace);for(var i=0,l=this.length;i<l;i++){var elem=this[i];if(elem.nodeType===1&&elem.className){if(value){var className=(" "+elem.className+" ").replace(rclass," ");for(var c=0,cl=classNames.length;c<cl;c++){className=className.replace(" "+classNames[c]+" "," ");}
elem.className=jQuery.trim(className);}else{elem.className="";}}}}
return this;},toggleClass:function(value,stateVal){var type=typeof value,isBool=typeof stateVal==="boolean";if(jQuery.isFunction(value)){return this.each(function(i){var self=jQuery(this);self.toggleClass(value.call(this,i,self.attr("class"),stateVal),stateVal);});}
return this.each(function(){if(type==="string"){var className,i=0,self=jQuery(this),state=stateVal,classNames=value.split(rspace);while((className=classNames[i++])){state=isBool?state:!self.hasClass(className);self[state?"addClass":"removeClass"](className);}}else if(type==="undefined"||type==="boolean"){if(this.className){jQuery.data(this,"__className__",this.className);}
this.className=this.className||value===false?"":jQuery.data(this,"__className__")||"";}});},hasClass:function(selector){var className=" "+selector+" ";for(var i=0,l=this.length;i<l;i++){if((" "+this[i].className+" ").replace(rclass," ").indexOf(className)>-1){return true;}}
return false;},val:function(value){if(value===undefined){var elem=this[0];if(elem){if(jQuery.nodeName(elem,"option")){return(elem.attributes.value||{}).specified?elem.value:elem.text;}
if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type==="select-one";if(index<0){return null;}
for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery(option).val();if(one){return value;}
values.push(value);}}
return values;}
if(rradiocheck.test(elem.type)&&!jQuery.support.checkOn){return elem.getAttribute("value")===null?"on":elem.value;}
return(elem.value||"").replace(rreturn,"");}
return undefined;}
var isFunction=jQuery.isFunction(value);return this.each(function(i){var self=jQuery(this),val=value;if(this.nodeType!==1){return;}
if(isFunction){val=value.call(this,i,self.val());}
if(typeof val==="number"){val+="";}
if(jQuery.isArray(val)&&rradiocheck.test(this.type)){this.checked=jQuery.inArray(self.val(),val)>=0;}else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(val);jQuery("option",this).each(function(){this.selected=jQuery.inArray(jQuery(this).val(),values)>=0;});if(!values.length){this.selectedIndex=-1;}}else{this.value=val;}});}});jQuery.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(elem,name,value,pass){if(!elem||elem.nodeType===3||elem.nodeType===8){return undefined;}
if(pass&&name in jQuery.attrFn){return jQuery(elem)[name](value);}
var notxml=elem.nodeType!==1||!jQuery.isXMLDoc(elem),set=value!==undefined;name=notxml&&jQuery.props[name]||name;if(elem.nodeType===1){var special=rspecialurl.test(name);if(name==="selected"&&!jQuery.support.optSelected){var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex;}}}
if(name in elem&¬xml&&!special){if(set){if(name==="type"&&rtype.test(elem.nodeName)&&elem.parentNode){jQuery.error("type property can't be changed");}
elem[name]=value;}
if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name)){return elem.getAttributeNode(name).nodeValue;}
if(name==="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:undefined;}
return elem[name];}
if(!jQuery.support.style&¬xml&&name==="style"){if(set){elem.style.cssText=""+value;}
return elem.style.cssText;}
if(set){elem.setAttribute(name,""+value);}
var attr=!jQuery.support.hrefNormalized&¬xml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}
return jQuery.style(elem,name,value);}});var rnamespaces=/\.(.*)$/,fcleanup=function(nm){return nm.replace(/[^\w\s\.\|`]/g,function(ch){return"\\"+ch;});};jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType===3||elem.nodeType===8){return;}
if(elem.setInterval&&(elem!==window&&!elem.frameElement)){elem=window;}
var handleObjIn,handleObj;if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;}
if(!handler.guid){handler.guid=jQuery.guid++;}
var elemData=jQuery.data(elem);if(!elemData){return;}
var events=elemData.events=elemData.events||{},eventHandle=elemData.handle,eventHandle;if(!eventHandle){elemData.handle=eventHandle=function(){return typeof jQuery!=="undefined"&&!jQuery.event.triggered?jQuery.event.handle.apply(eventHandle.elem,arguments):undefined;};}
eventHandle.elem=elem;types=types.split(" ");var type,i=0,namespaces;while((type=types[i++])){handleObj=handleObjIn?jQuery.extend({},handleObjIn):{handler:handler,data:data};if(type.indexOf(".")>-1){namespaces=type.split(".");type=namespaces.shift();handleObj.namespace=namespaces.slice(0).sort().join(".");}else{namespaces=[];handleObj.namespace="";}
handleObj.type=type;handleObj.guid=handler.guid;var handlers=events[type],special=jQuery.event.special[type]||{};if(!handlers){handlers=events[type]=[];if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle,false);}else if(elem.attachEvent){elem.attachEvent("on"+type,eventHandle);}}}
if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid;}}
handlers.push(handleObj);jQuery.event.global[type]=true;}
elem=null;},global:{},remove:function(elem,types,handler,pos){if(elem.nodeType===3||elem.nodeType===8){return;}
var ret,type,fn,i=0,all,namespaces,namespace,special,eventType,handleObj,origType,elemData=jQuery.data(elem),events=elemData&&elemData.events;if(!elemData||!events){return;}
if(types&&types.type){handler=types.handler;types=types.type;}
if(!types||typeof types==="string"&&types.charAt(0)==="."){types=types||"";for(type in events){jQuery.event.remove(elem,type+types);}
return;}
types=types.split(" ");while((type=types[i++])){origType=type;handleObj=null;all=type.indexOf(".")<0;namespaces=[];if(!all){namespaces=type.split(".");type=namespaces.shift();namespace=new RegExp("(^|\\.)"+
jQuery.map(namespaces.slice(0).sort(),fcleanup).join("\\.(?:.*\\.)?")+"(\\.|$)")}
eventType=events[type];if(!eventType){continue;}
if(!handler){for(var j=0;j<eventType.length;j++){handleObj=eventType[j];if(all||namespace.test(handleObj.namespace)){jQuery.event.remove(elem,origType,handleObj.handler,j);eventType.splice(j--,1);}}
continue;}
special=jQuery.event.special[type]||{};for(var j=pos||0;j<eventType.length;j++){handleObj=eventType[j];if(handler.guid===handleObj.guid){if(all||namespace.test(handleObj.namespace)){if(pos==null){eventType.splice(j--,1);}
if(special.remove){special.remove.call(elem,handleObj);}}
if(pos!=null){break;}}}
if(eventType.length===0||pos!=null&&eventType.length===1){if(!special.teardown||special.teardown.call(elem,namespaces)===false){removeEvent(elem,type,elemData.handle);}
ret=null;delete events[type];}}
if(jQuery.isEmptyObject(events)){var handle=elemData.handle;if(handle){handle.elem=null;}
delete elemData.events;delete elemData.handle;if(jQuery.isEmptyObject(elemData)){jQuery.removeData(elem);}}},trigger:function(event,data,elem){var type=event.type||event,bubbling=arguments[3];if(!bubbling){event=typeof event==="object"?event[expando]?event:jQuery.extend(jQuery.Event(type),event):jQuery.Event(type);if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true;}
if(!elem){event.stopPropagation();if(jQuery.event.global[type]){jQuery.each(jQuery.cache,function(){if(this.events&&this.events[type]){jQuery.event.trigger(event,data,this.handle.elem);}});}}
if(!elem||elem.nodeType===3||elem.nodeType===8){return undefined;}
event.result=undefined;event.target=elem;data=jQuery.makeArray(data);data.unshift(event);}
event.currentTarget=elem;var handle=jQuery.data(elem,"handle");if(handle){handle.apply(elem,data);}
var parent=elem.parentNode||elem.ownerDocument;try{if(!(elem&&elem.nodeName&&jQuery.noData[elem.nodeName.toLowerCase()])){if(elem["on"+type]&&elem["on"+type].apply(elem,data)===false){event.result=false;}}}catch(e){}
if(!event.isPropagationStopped()&&parent){jQuery.event.trigger(event,data,parent,true);}else if(!event.isDefaultPrevented()){var target=event.target,old,isClick=jQuery.nodeName(target,"a")&&type==="click",special=jQuery.event.special[type]||{};if((!special._default||special._default.call(elem,event)===false)&&!isClick&&!(target&&target.nodeName&&jQuery.noData[target.nodeName.toLowerCase()])){try{if(target[type]){old=target["on"+type];if(old){target["on"+type]=null;}
jQuery.event.triggered=true;target[type]();}}catch(e){}
if(old){target["on"+type]=old;}
jQuery.event.triggered=false;}}},handle:function(event){var all,handlers,namespaces,namespace,events;event=arguments[0]=jQuery.event.fix(event||window.event);event.currentTarget=this;all=event.type.indexOf(".")<0&&!event.exclusive;if(!all){namespaces=event.type.split(".");event.type=namespaces.shift();namespace=new RegExp("(^|\\.)"+namespaces.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");}
var events=jQuery.data(this,"events"),handlers=events[event.type];if(events&&handlers){handlers=handlers.slice(0);for(var j=0,l=handlers.length;j<l;j++){var handleObj=handlers[j];if(all||namespace.test(handleObj.namespace)){event.handler=handleObj.handler;event.data=handleObj.data;event.handleObj=handleObj;var ret=handleObj.handler.apply(this,arguments);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}
if(event.isImmediatePropagationStopped()){break;}}}}
return event.result;},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(event){if(event[expando]){return event;}
var originalEvent=event;event=jQuery.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop];}
if(!event.target){event.target=event.srcElement||document;}
if(event.target.nodeType===3){event.target=event.target.parentNode;}
if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement===event.target?event.toElement:event.fromElement;}
if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0);}
if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode;}
if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey;}
if(!event.which&&event.button!==undefined){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));}
return event;},guid:1E8,proxy:jQuery.proxy,special:{ready:{setup:jQuery.bindReady,teardown:jQuery.noop},live:{add:function(handleObj){jQuery.event.add(this,handleObj.origType,jQuery.extend({},handleObj,{handler:liveHandler}));},remove:function(handleObj){var remove=true,type=handleObj.origType.replace(rnamespaces,"");jQuery.each(jQuery.data(this,"events").live||[],function(){if(type===this.origType.replace(rnamespaces,"")){remove=false;return false;}});if(remove){jQuery.event.remove(this,handleObj.origType,liveHandler);}}},beforeunload:{setup:function(data,namespaces,eventHandle){if(this.setInterval){this.onbeforeunload=eventHandle;}
return false;},teardown:function(namespaces,eventHandle){if(this.onbeforeunload===eventHandle){this.onbeforeunload=null;}}}}};var removeEvent=document.removeEventListener?function(elem,type,handle){elem.removeEventListener(type,handle,false);}:function(elem,type,handle){elem.detachEvent("on"+type,handle);};jQuery.Event=function(src){if(!this.preventDefault){return new jQuery.Event(src);}
if(src&&src.type){this.originalEvent=src;this.type=src.type;}else{this.type=src;}
this.timeStamp=now();this[expando]=true;};function returnFalse(){return false;}
function returnTrue(){return true;}
jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e){return;}
if(e.preventDefault){e.preventDefault();}
e.returnValue=false;},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e){return;}
if(e.stopPropagation){e.stopPropagation();}
e.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation();},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(event){var parent=event.relatedTarget;try{while(parent&&parent!==this){parent=parent.parentNode;}
if(parent!==this){event.type=event.data;jQuery.event.handle.apply(this,arguments);}}catch(e){}},delegate=function(event){event.type=event.data;jQuery.event.handle.apply(this,arguments);};jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(orig,fix){jQuery.event.special[orig]={setup:function(data){jQuery.event.add(this,fix,data&&data.selector?delegate:withinElement,orig);},teardown:function(data){jQuery.event.remove(this,fix,data&&data.selector?delegate:withinElement);}};});if(!jQuery.support.submitBubbles){jQuery.event.special.submit={setup:function(data,namespaces){if(this.nodeName.toLowerCase()!=="form"){jQuery.event.add(this,"click.specialSubmit",function(e){var elem=e.target,type=elem.type;if((type==="submit"||type==="image")&&jQuery(elem).closest("form").length){return trigger("submit",this,arguments);}});jQuery.event.add(this,"keypress.specialSubmit",function(e){var elem=e.target,type=elem.type;if((type==="text"||type==="password")&&jQuery(elem).closest("form").length&&e.keyCode===13){return trigger("submit",this,arguments);}});}else{return false;}},teardown:function(namespaces){jQuery.event.remove(this,".specialSubmit");}};}
if(!jQuery.support.changeBubbles){var formElems=/textarea|input|select/i,changeFilters,getVal=function(elem){var type=elem.type,val=elem.value;if(type==="radio"||type==="checkbox"){val=elem.checked;}else if(type==="select-multiple"){val=elem.selectedIndex>-1?jQuery.map(elem.options,function(elem){return elem.selected;}).join("-"):"";}else if(elem.nodeName.toLowerCase()==="select"){val=elem.selectedIndex;}
return val;},testChange=function testChange(e){var elem=e.target,data,val;if(!formElems.test(elem.nodeName)||elem.readOnly){return;}
data=jQuery.data(elem,"_change_data");val=getVal(elem);if(e.type!=="focusout"||elem.type!=="radio"){jQuery.data(elem,"_change_data",val);}
if(data===undefined||val===data){return;}
if(data!=null||val){e.type="change";return jQuery.event.trigger(e,arguments[1],elem);}};jQuery.event.special.change={filters:{focusout:testChange,click:function(e){var elem=e.target,type=elem.type;if(type==="radio"||type==="checkbox"||elem.nodeName.toLowerCase()==="select"){return testChange.call(this,e);}},keydown:function(e){var elem=e.target,type=elem.type;if((e.keyCode===13&&elem.nodeName.toLowerCase()!=="textarea")||(e.keyCode===32&&(type==="checkbox"||type==="radio"))||type==="select-multiple"){return testChange.call(this,e);}},beforeactivate:function(e){var elem=e.target;jQuery.data(elem,"_change_data",getVal(elem));}},setup:function(data,namespaces){if(this.type==="file"){return false;}
for(var type in changeFilters){jQuery.event.add(this,type+".specialChange",changeFilters[type]);}
return formElems.test(this.nodeName);},teardown:function(namespaces){jQuery.event.remove(this,".specialChange");return formElems.test(this.nodeName);}};changeFilters=jQuery.event.special.change.filters;}
function trigger(type,elem,args){args[0].type=type;return jQuery.event.handle.apply(elem,args);}
if(document.addEventListener){jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){jQuery.event.special[fix]={setup:function(){this.addEventListener(orig,handler,true);},teardown:function(){this.removeEventListener(orig,handler,true);}};function handler(e){e=jQuery.event.fix(e);e.type=fix;return jQuery.event.handle.call(this,e);}});}
jQuery.each(["bind","one"],function(i,name){jQuery.fn[name]=function(type,data,fn){if(typeof type==="object"){for(var key in type){this[name](key,data,type[key],fn);}
return this;}
if(jQuery.isFunction(data)){fn=data;data=undefined;}
var handler=name==="one"?jQuery.proxy(fn,function(event){jQuery(this).unbind(event,handler);return fn.apply(this,arguments);}):fn;if(type==="unload"&&name!=="one"){this.one(type,data,fn);}else{for(var i=0,l=this.length;i<l;i++){jQuery.event.add(this[i],type,handler,data);}}
return this;};});jQuery.fn.extend({unbind:function(type,fn){if(typeof type==="object"&&!type.preventDefault){for(var key in type){this.unbind(key,type[key]);}}else{for(var i=0,l=this.length;i<l;i++){jQuery.event.remove(this[i],type,fn);}}
return this;},delegate:function(selector,types,data,fn){return this.live(types,data,fn,selector);},undelegate:function(selector,types,fn){if(arguments.length===0){return this.unbind("live");}else{return this.die(types,null,fn,selector);}},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},triggerHandler:function(type,data){if(this[0]){var event=jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event,data,this[0]);return event.result;}},toggle:function(fn){var args=arguments,i=1;while(i<args.length){jQuery.proxy(fn,args[i++]);}
return this.click(jQuery.proxy(fn,function(event){var lastToggle=(jQuery.data(this,"lastToggle"+fn.guid)||0)%i;jQuery.data(this,"lastToggle"+fn.guid,lastToggle+1);event.preventDefault();return args[lastToggle].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver);}});var liveMap={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};jQuery.each(["live","die"],function(i,name){jQuery.fn[name]=function(types,data,fn,origSelector){var type,i=0,match,namespaces,preType,selector=origSelector||this.selector,context=origSelector?this:jQuery(this.context);if(jQuery.isFunction(data)){fn=data;data=undefined;}
types=(types||"").split(" ");while((type=types[i++])!=null){match=rnamespaces.exec(type);namespaces="";if(match){namespaces=match[0];type=type.replace(rnamespaces,"");}
if(type==="hover"){types.push("mouseenter"+namespaces,"mouseleave"+namespaces);continue;}
preType=type;if(type==="focus"||type==="blur"){types.push(liveMap[type]+namespaces);type=type+namespaces;}else{type=(liveMap[type]||type)+namespaces;}
if(name==="live"){context.each(function(){jQuery.event.add(this,liveConvert(type,selector),{data:data,selector:selector,handler:fn,origType:type,origHandler:fn,preType:preType});});}else{context.unbind(liveConvert(type,selector),fn);}}
return this;}});function liveHandler(event){var stop,elems=[],selectors=[],args=arguments,related,match,handleObj,elem,j,i,l,data,events=jQuery.data(this,"events");if(event.liveFired===this||!events||!events.live||event.button&&event.type==="click"){return;}
event.liveFired=this;var live=events.live.slice(0);for(j=0;j<live.length;j++){handleObj=live[j];if(handleObj.origType.replace(rnamespaces,"")===event.type){selectors.push(handleObj.selector);}else{live.splice(j--,1);}}
match=jQuery(event.target).closest(selectors,event.currentTarget);for(i=0,l=match.length;i<l;i++){for(j=0;j<live.length;j++){handleObj=live[j];if(match[i].selector===handleObj.selector){elem=match[i].elem;related=null;if(handleObj.preType==="mouseenter"||handleObj.preType==="mouseleave"){related=jQuery(event.relatedTarget).closest(handleObj.selector)[0];}
if(!related||related!==elem){elems.push({elem:elem,handleObj:handleObj});}}}}
for(i=0,l=elems.length;i<l;i++){match=elems[i];event.currentTarget=match.elem;event.data=match.handleObj.data;event.handleObj=match.handleObj;if(match.handleObj.origHandler.apply(match.elem,args)===false){stop=false;break;}}
return stop;}
function liveConvert(type,selector){return"live."+(type&&type!=="*"?type+".":"")+selector.replace(/\./g,"`").replace(/ /g,"&");}
jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup error").split(" "),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};if(jQuery.attrFn){jQuery.attrFn[name]=true;}});if(window.attachEvent&&!window.addEventListener){window.attachEvent("onunload",function(){for(var id in jQuery.cache){if(jQuery.cache[id].handle){try{jQuery.event.remove(jQuery.cache[id].handle.elem);}catch(e){}}}});}
(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,done=0,toString=Object.prototype.toString,hasDuplicate=false,baseHasDuplicate=true;[0,0].sort(function(){baseHasDuplicate=false;return 0;});var Sizzle=function(selector,context,results,seed){results=results||[];var origContext=context=context||document;if(context.nodeType!==1&&context.nodeType!==9){return[];}
if(!selector||typeof selector!=="string"){return results;}
var parts=[],m,set,checkSet,extra,prune=true,contextXML=isXML(context),soFar=selector;while((chunker.exec(""),m=chunker.exec(soFar))!==null){soFar=m[3];parts.push(m[1]);if(m[2]){extra=m[3];break;}}
if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context);}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector]){selector+=parts.shift();}
set=posProcess(selector,set);}}}else{if(!seed&&parts.length>1&&context.nodeType===9&&!contextXML&&Expr.match.ID.test(parts[0])&&!Expr.match.ID.test(parts[parts.length-1])){var ret=Sizzle.find(parts.shift(),context,contextXML);context=ret.expr?Sizzle.filter(ret.expr,ret.set)[0]:ret.set[0];}
if(context){var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&(parts[0]==="~"||parts[0]==="+")&&context.parentNode?context.parentNode:context,contextXML);set=ret.expr?Sizzle.filter(ret.expr,ret.set):ret.set;if(parts.length>0){checkSet=makeArray(set);}else{prune=false;}
while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur="";}else{pop=parts.pop();}
if(pop==null){pop=context;}
Expr.relative[cur](checkSet,pop,contextXML);}}else{checkSet=parts=[];}}
if(!checkSet){checkSet=set;}
if(!checkSet){Sizzle.error(cur||selector);}
if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet);}else if(context&&context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i]);}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i]);}}}}else{makeArray(checkSet,results);}
if(extra){Sizzle(extra,origContext,results,seed);Sizzle.uniqueSort(results);}
return results;};Sizzle.uniqueSort=function(results){if(sortOrder){hasDuplicate=baseHasDuplicate;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1);}}}}
return results;};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set);};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[];}
for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.leftMatch[type].exec(expr))){var left=match[1];match.splice(1,1);if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break;}}}}
if(!set){set=context.getElementsByTagName("*");}
return{set:set,expr:expr};};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.leftMatch[type].exec(expr))!=null&&match[2]){var filter=Expr.filter[type],found,item,left=match[1];anyFound=false;match.splice(1,1);if(left.substr(left.length-1)==="\\"){continue;}
if(curLoop===result){result=[];}
if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true;}else if(match===true){continue;}}
if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true;}else{curLoop[i]=false;}}else if(pass){result.push(item);anyFound=true;}}}}
if(found!==undefined){if(!inplace){curLoop=result;}
expr=expr.replace(Expr.match[type],"");if(!anyFound){return[];}
break;}}}
if(expr===old){if(anyFound==null){Sizzle.error(expr);}else{break;}}
old=expr;}
return curLoop;};Sizzle.error=function(msg){throw"Syntax error, unrecognized expression: "+msg;};var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href");}},relative:{"+":function(checkSet,part){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag){part=part.toLowerCase();}
for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}
checkSet[i]=isPartStrNotTag||elem&&elem.nodeName.toLowerCase()===part?elem||false:elem===part;}}
if(isPartStrNotTag){Sizzle.filter(part,checkSet,true);}},">":function(checkSet,part){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=part.toLowerCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName.toLowerCase()===part?parent:false;}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part;}}
if(isPartStr){Sizzle.filter(part,checkSet,true);}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!/\W/.test(part)){var nodeCheck=part=part.toLowerCase();checkFn=dirNodeCheck;}
checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML);},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!/\W/.test(part)){var nodeCheck=part=part.toLowerCase();checkFn=dirNodeCheck;}
checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML);}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[];}},NAME:function(match,context){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i]);}}
return ret.length===0?null:ret;}},TAG:function(match,context){return context.getElementsByTagName(match[1]);}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match;}
for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").replace(/[\t\n]/g," ").indexOf(match)>=0)){if(!inplace){result.push(elem);}}else if(inplace){curLoop[i]=false;}}}
return false;},ID:function(match){return match[1].replace(/\\/g,"");},TAG:function(match,curLoop){return match[1].toLowerCase();},CHILD:function(match){if(match[1]==="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]==="even"&&"2n"||match[2]==="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0;}
match[0]=done++;return match;},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name];}
if(match[2]==="~="){match[4]=" "+match[4]+" ";}
return match;},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if((chunker.exec(match[3])||"").length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop);}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret);}
return false;}}else if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true;}
return match;},POS:function(match){match.unshift(true);return match;}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden";},disabled:function(elem){return elem.disabled===true;},checked:function(elem){return elem.checked===true;},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true;},parent:function(elem){return!!elem.firstChild;},empty:function(elem){return!elem.firstChild;},has:function(elem,i,match){return!!Sizzle(match[3],elem).length;},header:function(elem){return/h\d/i.test(elem.nodeName);},text:function(elem){return"text"===elem.type;},radio:function(elem){return"radio"===elem.type;},checkbox:function(elem){return"checkbox"===elem.type;},file:function(elem){return"file"===elem.type;},password:function(elem){return"password"===elem.type;},submit:function(elem){return"submit"===elem.type;},image:function(elem){return"image"===elem.type;},reset:function(elem){return"reset"===elem.type;},button:function(elem){return"button"===elem.type||elem.nodeName.toLowerCase()==="button";},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName);}},setFilters:{first:function(elem,i){return i===0;},last:function(elem,i,match,array){return i===array.length-1;},even:function(elem,i){return i%2===0;},odd:function(elem,i){return i%2===1;},lt:function(elem,i,match){return i<match[3]-0;},gt:function(elem,i,match){return i>match[3]-0;},nth:function(elem,i,match){return match[3]-0===i;},eq:function(elem,i,match){return match[3]-0===i;}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array);}else if(name==="contains"){return(elem.textContent||elem.innerText||getText([elem])||"").indexOf(match[3])>=0;}else if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false;}}
return true;}else{Sizzle.error("Syntax error, unrecognized expression: "+name);}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case'only':case'first':while((node=node.previousSibling)){if(node.nodeType===1){return false;}}
if(type==="first"){return true;}
node=elem;case'last':while((node=node.nextSibling)){if(node.nodeType===1){return false;}}
return true;case'nth':var first=match[2],last=match[3];if(first===1&&last===0){return true;}
var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count;}}
parent.sizcache=doneName;}
var diff=elem.nodeIndex-last;if(first===0){return diff===0;}else{return(diff%first===0&&diff/first>=0);}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match;},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName.toLowerCase()===match;},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1;},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!==check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false;},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array);}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=new RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);Expr.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source+Expr.match[type].source.replace(/\\(\d+)/g,function(all,num){return"\\"+(num-0+1);}));}
var makeArray=function(array,results){array=Array.prototype.slice.call(array,0);if(results){results.push.apply(results,array);return results;}
return array;};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType;}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array);}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i]);}}else{for(var i=0;array[i];i++){ret.push(array[i]);}}}
return ret;};}
var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){if(!a.compareDocumentPosition||!b.compareDocumentPosition){if(a==b){hasDuplicate=true;}
return a.compareDocumentPosition?-1:1;}
var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true;}
return ret;};}else if("sourceIndex"in document.documentElement){sortOrder=function(a,b){if(!a.sourceIndex||!b.sourceIndex){if(a==b){hasDuplicate=true;}
return a.sourceIndex?-1:1;}
var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true;}
return ret;};}else if(document.createRange){sortOrder=function(a,b){if(!a.ownerDocument||!b.ownerDocument){if(a==b){hasDuplicate=true;}
return a.ownerDocument?-1:1;}
var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.setStart(a,0);aRange.setEnd(a,0);bRange.setStart(b,0);bRange.setEnd(b,0);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true;}
return ret;};}
function getText(elems){var ret="",elem;for(var i=0;elems[i];i++){elem=elems[i];if(elem.nodeType===3||elem.nodeType===4){ret+=elem.nodeValue;}else if(elem.nodeType!==8){ret+=getText(elem.childNodes);}}
return ret;}
(function(){var form=document.createElement("div"),id="script"+(new Date).getTime();form.innerHTML="<a name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[];}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match;};}
root.removeChild(form);root=form=null;})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i]);}}
results=tmp;}
return results;};}
div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2);};}
div=null;})();if(document.querySelectorAll){(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return;}
Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra);}catch(e){}}
return oldSizzle(query,context,extra,seed);};for(var prop in oldSizzle){Sizzle[prop]=oldSizzle[prop];}
div=null;})();}
(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(!div.getElementsByClassName||div.getElementsByClassName("e").length===0){return;}
div.lastChild.className="e";if(div.getElementsByClassName("e").length===1){return;}
Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1]);}};div=null;})();function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i;}
if(elem.nodeName.toLowerCase()===cur){match=elem;break;}
elem=elem[dir];}
checkSet[i]=match;}}}
function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i;}
if(typeof cur!=="string"){if(elem===cur){match=true;break;}}else if(Sizzle.filter(cur,[elem]).length>0){match=elem;break;}}
elem=elem[dir];}
checkSet[i]=match;}}}
var contains=document.compareDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16);}:function(a,b){return a!==b&&(a.contains?a.contains(b):true);};var isXML=function(elem){var documentElement=(elem?elem.ownerDocument||elem:0).documentElement;return documentElement?documentElement.nodeName!=="HTML":false;};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"");}
selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet);}
return Sizzle.filter(later,tmpSet);};jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.filters;jQuery.unique=Sizzle.uniqueSort;jQuery.text=getText;jQuery.isXMLDoc=isXML;jQuery.contains=contains;return;window.Sizzle=Sizzle;})();var runtil=/Until$/,rparentsprev=/^(?:parents|prevUntil|prevAll)/,rmultiselector=/,/,slice=Array.prototype.slice;var winnow=function(elements,qualifier,keep){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)===keep;});}else if(qualifier.nodeType){return jQuery.grep(elements,function(elem,i){return(elem===qualifier)===keep;});}else if(typeof qualifier==="string"){var filtered=jQuery.grep(elements,function(elem){return elem.nodeType===1;});if(isSimple.test(qualifier)){return jQuery.filter(qualifier,filtered,!keep);}else{qualifier=jQuery.filter(qualifier,filtered);}}
return jQuery.grep(elements,function(elem,i){return(jQuery.inArray(elem,qualifier)>=0)===keep;});};jQuery.fn.extend({find:function(selector){var ret=this.pushStack("","find",selector),length=0;for(var i=0,l=this.length;i<l;i++){length=ret.length;jQuery.find(selector,this[i],ret);if(i>0){for(var n=length;n<ret.length;n++){for(var r=0;r<length;r++){if(ret[r]===ret[n]){ret.splice(n--,1);break;}}}}}
return ret;},has:function(target){var targets=jQuery(target);return this.filter(function(){for(var i=0,l=targets.length;i<l;i++){if(jQuery.contains(this,targets[i])){return true;}}});},not:function(selector){return this.pushStack(winnow(this,selector,false),"not",selector);},filter:function(selector){return this.pushStack(winnow(this,selector,true),"filter",selector);},is:function(selector){return!!selector&&jQuery.filter(selector,this).length>0;},closest:function(selectors,context){if(jQuery.isArray(selectors)){var ret=[],cur=this[0],match,matches={},selector;if(cur&&selectors.length){for(var i=0,l=selectors.length;i<l;i++){selector=selectors[i];if(!matches[selector]){matches[selector]=jQuery.expr.match.POS.test(selector)?jQuery(selector,context||this.context):selector;}}
while(cur&&cur.ownerDocument&&cur!==context){for(selector in matches){match=matches[selector];if(match.jquery?match.index(cur)>-1:jQuery(cur).is(match)){ret.push({selector:selector,elem:cur});delete matches[selector];}}
cur=cur.parentNode;}}
return ret;}
var pos=jQuery.expr.match.POS.test(selectors)?jQuery(selectors,context||this.context):null;return this.map(function(i,cur){while(cur&&cur.ownerDocument&&cur!==context){if(pos?pos.index(cur)>-1:jQuery(cur).is(selectors)){return cur;}
cur=cur.parentNode;}
return null;});},index:function(elem){if(!elem||typeof elem==="string"){return jQuery.inArray(this[0],elem?jQuery(elem):this.parent().children());}
return jQuery.inArray(elem.jquery?elem[0]:elem,this);},add:function(selector,context){var set=typeof selector==="string"?jQuery(selector,context||this.context):jQuery.makeArray(selector),all=jQuery.merge(this.get(),set);return this.pushStack(isDisconnected(set[0])||isDisconnected(all[0])?all:jQuery.unique(all));},andSelf:function(){return this.add(this.prevObject);}});function isDisconnected(node){return!node||!node.parentNode||node.parentNode.nodeType===11;}
jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null;},parents:function(elem){return jQuery.dir(elem,"parentNode");},parentsUntil:function(elem,i,until){return jQuery.dir(elem,"parentNode",until);},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},nextUntil:function(elem,i,until){return jQuery.dir(elem,"nextSibling",until);},prevUntil:function(elem,i,until){return jQuery.dir(elem,"previousSibling",until);},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(until,selector){var ret=jQuery.map(this,fn,until);if(!runtil.test(name)){selector=until;}
if(selector&&typeof selector==="string"){ret=jQuery.filter(selector,ret);}
ret=this.length>1?jQuery.unique(ret):ret;if((this.length>1||rmultiselector.test(selector))&&rparentsprev.test(name)){ret=ret.reverse();}
return this.pushStack(ret,name,slice.call(arguments).join(","));};});jQuery.extend({filter:function(expr,elems,not){if(not){expr=":not("+expr+")";}
return jQuery.find.matches(expr,elems);},dir:function(elem,dir,until){var matched=[],cur=elem[dir];while(cur&&cur.nodeType!==9&&(until===undefined||cur.nodeType!==1||!jQuery(cur).is(until))){if(cur.nodeType===1){matched.push(cur);}
cur=cur[dir];}
return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType===1&&++num===result){break;}}
return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){r.push(n);}}
return r;}});var rinlinejQuery=/ jQuery\d+="(?:\d+|null)"/g,rleadingWhitespace=/^\s+/,rxhtmlTag=/(<([\w:]+)[^>]*?)\/>/g,rselfClosing=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,rtagName=/<([\w:]+)/,rtbody=/<tbody/i,rhtml=/<|&#?\w+;/,rnocache=/<script|<object|<embed|<option|<style/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,fcloseTag=function(all,front,tag){return rselfClosing.test(tag)?all:front+"></"+tag+">";},wrapMap={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;if(!jQuery.support.htmlSerialize){wrapMap._default=[1,"div<div>","</div>"];}
jQuery.fn.extend({text:function(text){if(jQuery.isFunction(text)){return this.each(function(i){var self=jQuery(this);self.text(text.call(this,i,self.text()));});}
if(typeof text!=="object"&&text!==undefined){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));}
return jQuery.text(this);},wrapAll:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapAll(html.call(this,i));});}
if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0]);}
wrap.map(function(){var elem=this;while(elem.firstChild&&elem.firstChild.nodeType===1){elem=elem.firstChild;}
return elem;}).append(this);}
return this;},wrapInner:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i));});}
return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html);}else{self.append(html);}});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},unwrap:function(){return this.parent().each(function(){if(!jQuery.nodeName(this,"body")){jQuery(this).replaceWith(this.childNodes);}}).end();},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType===1){this.appendChild(elem);}});},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType===1){this.insertBefore(elem,this.firstChild);}});},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this);});}else if(arguments.length){var set=jQuery(arguments[0]);set.push.apply(set,this.toArray());return this.pushStack(set,"before",arguments);}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});}else if(arguments.length){var set=this.pushStack(this,"after",arguments);set.push.apply(set,jQuery(arguments[0]).toArray());return set;}},remove:function(selector,keepData){for(var i=0,elem;(elem=this[i])!=null;i++){if(!selector||jQuery.filter(selector,[elem]).length){if(!keepData&&elem.nodeType===1){jQuery.cleanData(elem.getElementsByTagName("*"));jQuery.cleanData([elem]);}
if(elem.parentNode){elem.parentNode.removeChild(elem);}}}
return this;},empty:function(){for(var i=0,elem;(elem=this[i])!=null;i++){if(elem.nodeType===1){jQuery.cleanData(elem.getElementsByTagName("*"));}
while(elem.firstChild){elem.removeChild(elem.firstChild);}}
return this;},clone:function(events){var ret=this.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLDoc(this)){var html=this.outerHTML,ownerDocument=this.ownerDocument;if(!html){var div=ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML;}
return jQuery.clean([html.replace(rinlinejQuery,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(rleadingWhitespace,"")],ownerDocument)[0];}else{return this.cloneNode(true);}});if(events===true){cloneCopyEvent(this,ret);cloneCopyEvent(this.find("*"),ret.find("*"));}
return ret;},html:function(value){if(value===undefined){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(rinlinejQuery,""):null;}else if(typeof value==="string"&&!rnocache.test(value)&&(jQuery.support.leadingWhitespace||!rleadingWhitespace.test(value))&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,fcloseTag);try{for(var i=0,l=this.length;i<l;i++){if(this[i].nodeType===1){jQuery.cleanData(this[i].getElementsByTagName("*"));this[i].innerHTML=value;}}}catch(e){this.empty().append(value);}}else if(jQuery.isFunction(value)){this.each(function(i){var self=jQuery(this),old=self.html();self.empty().append(function(){return value.call(this,i,old);});});}else{this.empty().append(value);}
return this;},replaceWith:function(value){if(this[0]&&this[0].parentNode){if(jQuery.isFunction(value)){return this.each(function(i){var self=jQuery(this),old=self.html();self.replaceWith(value.call(this,i,old));});}
if(typeof value!=="string"){value=jQuery(value).detach();}
return this.each(function(){var next=this.nextSibling,parent=this.parentNode;jQuery(this).remove();if(next){jQuery(next).before(value);}else{jQuery(parent).append(value);}});}else{return this.pushStack(jQuery(jQuery.isFunction(value)?value():value),"replaceWith",value);}},detach:function(selector){return this.remove(selector,true);},domManip:function(args,table,callback){var results,first,value=args[0],scripts=[],fragment,parent;if(!jQuery.support.checkClone&&arguments.length===3&&typeof value==="string"&&rchecked.test(value)){return this.each(function(){jQuery(this).domManip(args,table,callback,true);});}
if(jQuery.isFunction(value)){return this.each(function(i){var self=jQuery(this);args[0]=value.call(this,i,table?self.html():undefined);self.domManip(args,table,callback);});}
if(this[0]){parent=value&&value.parentNode;if(jQuery.support.parentNode&&parent&&parent.nodeType===11&&parent.childNodes.length===this.length){results={fragment:parent};}else{results=buildFragment(args,this,scripts);}
fragment=results.fragment;if(fragment.childNodes.length===1){first=fragment=fragment.firstChild;}else{first=fragment.firstChild;}
if(first){table=table&&jQuery.nodeName(first,"tr");for(var i=0,l=this.length;i<l;i++){callback.call(table?root(this[i],first):this[i],i>0||results.cacheable||this.length>1?fragment.cloneNode(true):fragment);}}
if(scripts.length){jQuery.each(scripts,evalScript);}}
return this;function root(elem,cur){return jQuery.nodeName(elem,"table")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem;}}});function cloneCopyEvent(orig,ret){var i=0;ret.each(function(){if(this.nodeName!==(orig[i]&&orig[i].nodeName)){return;}
var oldData=jQuery.data(orig[i++]),curData=jQuery.data(this,oldData),events=oldData&&oldData.events;if(events){delete curData.handle;curData.events={};for(var type in events){for(var handler in events[type]){jQuery.event.add(this,type,events[type][handler],events[type][handler].data);}}}});}
function buildFragment(args,nodes,scripts){var fragment,cacheable,cacheresults,doc=(nodes&&nodes[0]?nodes[0].ownerDocument||nodes[0]:document);if(args.length===1&&typeof args[0]==="string"&&args[0].length<512&&doc===document&&!rnocache.test(args[0])&&(jQuery.support.checkClone||!rchecked.test(args[0]))){cacheable=true;cacheresults=jQuery.fragments[args[0]];if(cacheresults){if(cacheresults!==1){fragment=cacheresults;}}}
if(!fragment){fragment=doc.createDocumentFragment();jQuery.clean(args,doc,fragment,scripts);}
if(cacheable){jQuery.fragments[args[0]]=cacheresults?fragment:1;}
return{fragment:fragment,cacheable:cacheable};}
jQuery.fragments={};jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[],insert=jQuery(selector),parent=this.length===1&&this[0].parentNode;if(parent&&parent.nodeType===11&&parent.childNodes.length===1&&insert.length===1){insert[original](this[0]);return this;}else{for(var i=0,l=insert.length;i<l;i++){var elems=(i>0?this.clone(true):this).get();jQuery.fn[original].apply(jQuery(insert[i]),elems);ret=ret.concat(elems);}
return this.pushStack(ret,name,insert.selector);}};});jQuery.extend({clean:function(elems,context,fragment,scripts){context=context||document;if(typeof context.createElement==="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;}
var ret=[];for(var i=0,elem;(elem=elems[i])!=null;i++){if(typeof elem==="number"){elem+="";}
if(!elem){continue;}
if(typeof elem==="string"&&!rhtml.test(elem)){elem=context.createTextNode(elem);}else if(typeof elem==="string"){elem=elem.replace(rxhtmlTag,fcloseTag);var tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,depth=wrap[0],div=context.createElement("div");div.innerHTML=wrap[1]+elem+wrap[2];while(depth--){div=div.lastChild;}
if(!jQuery.support.tbody){var hasBody=rtbody.test(elem),tbody=tag==="table"&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]==="<table>"&&!hasBody?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j]);}}}
if(!jQuery.support.leadingWhitespace&&rleadingWhitespace.test(elem)){div.insertBefore(context.createTextNode(rleadingWhitespace.exec(elem)[0]),div.firstChild);}
elem=div.childNodes;}
if(elem.nodeType){ret.push(elem);}else{ret=jQuery.merge(ret,elem);}}
if(fragment){for(var i=0;ret[i];i++){if(scripts&&jQuery.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i]);}else{if(ret[i].nodeType===1){ret.splice.apply(ret,[i+1,0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))));}
fragment.appendChild(ret[i]);}}}
return ret;},cleanData:function(elems){var data,id,cache=jQuery.cache,special=jQuery.event.special,deleteExpando=jQuery.support.deleteExpando;for(var i=0,elem;(elem=elems[i])!=null;i++){id=elem[jQuery.expando];if(id){data=cache[id];if(data.events){for(var type in data.events){if(special[type]){jQuery.event.remove(elem,type);}else{removeEvent(elem,type,data.handle);}}}
if(deleteExpando){delete elem[jQuery.expando];}else if(elem.removeAttribute){elem.removeAttribute(jQuery.expando);}
delete cache[id];}}}});var rexclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,ralpha=/alpha\([^)]*\)/,ropacity=/opacity=([^)]*)/,rfloat=/float/i,rdashAlpha=/-([a-z])/ig,rupper=/([A-Z])/g,rnumpx=/^-?\d+(?:px)?$/i,rnum=/^-?\d/,cssShow={position:"absolute",visibility:"hidden",display:"block"},cssWidth=["Left","Right"],cssHeight=["Top","Bottom"],getComputedStyle=document.defaultView&&document.defaultView.getComputedStyle,styleFloat=jQuery.support.cssFloat?"cssFloat":"styleFloat",fcamelCase=function(all,letter){return letter.toUpperCase();};jQuery.fn.css=function(name,value){return access(this,name,value,true,function(elem,name,value){if(value===undefined){return jQuery.curCSS(elem,name);}
if(typeof value==="number"&&!rexclude.test(name)){value+="px";}
jQuery.style(elem,name,value);});};jQuery.extend({style:function(elem,name,value){if(!elem||elem.nodeType===3||elem.nodeType===8){return undefined;}
if((name==="width"||name==="height")&&parseFloat(value)<0){value=undefined;}
var style=elem.style||elem,set=value!==undefined;if(!jQuery.support.opacity&&name==="opacity"){if(set){style.zoom=1;var opacity=parseInt(value,10)+""==="NaN"?"":"alpha(opacity="+value*100+")";var filter=style.filter||jQuery.curCSS(elem,"filter")||"";style.filter=ralpha.test(filter)?filter.replace(ralpha,opacity):opacity;}
return style.filter&&style.filter.indexOf("opacity=")>=0?(parseFloat(ropacity.exec(style.filter)[1])/100)+"":"";}
if(rfloat.test(name)){name=styleFloat;}
name=name.replace(rdashAlpha,fcamelCase);if(set){style[name]=value;}
return style[name];},css:function(elem,name,force,extra){if(name==="width"||name==="height"){var val,props=cssShow,which=name==="width"?cssWidth:cssHeight;function getWH(){val=name==="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border"){return;}
jQuery.each(which,function(){if(!extra){val-=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;}
if(extra==="margin"){val+=parseFloat(jQuery.curCSS(elem,"margin"+this,true))||0;}else{val-=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;}});}
if(elem.offsetWidth!==0){getWH();}else{jQuery.swap(elem,props,getWH);}
return Math.max(0,Math.round(val));}
return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style,filter;if(!jQuery.support.opacity&&name==="opacity"&&elem.currentStyle){ret=ropacity.test(elem.currentStyle.filter||"")?(parseFloat(RegExp.$1)/100)+"":"";return ret===""?"1":ret;}
if(rfloat.test(name)){name=styleFloat;}
if(!force&&style&&style[name]){ret=style[name];}else if(getComputedStyle){if(rfloat.test(name)){name="float";}
name=name.replace(rupper,"-$1").toLowerCase();var defaultView=elem.ownerDocument.defaultView;if(!defaultView){return null;}
var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle){ret=computedStyle.getPropertyValue(name);}
if(name==="opacity"&&ret===""){ret="1";}}else if(elem.currentStyle){var camelCase=name.replace(rdashAlpha,fcamelCase);ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!rnumpx.test(ret)&&rnum.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=camelCase==="fontSize"?"1em":(ret||0);ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}
return ret;},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}
callback.call(elem);for(var name in options){elem.style[name]=old[name];}}});if(jQuery.expr&&jQuery.expr.filters){jQuery.expr.filters.hidden=function(elem){var width=elem.offsetWidth,height=elem.offsetHeight,skip=elem.nodeName.toLowerCase()==="tr";return width===0&&height===0&&!skip?true:width>0&&height>0&&!skip?false:jQuery.curCSS(elem,"display")==="none";};jQuery.expr.filters.visible=function(elem){return!jQuery.expr.filters.hidden(elem);};}
var jsc=now(),rscript=/<script(.|\s)*?\/script>/gi,rselectTextarea=/select|textarea/i,rinput=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,jsre=/=\?(&|$)/,rquery=/\?/,rts=/(\?|&)_=.*?(&|$)/,rurl=/^(\w+:)?\/\/([^\/?#]+)/,r20=/%20/g,_load=jQuery.fn.load;jQuery.fn.extend({load:function(url,params,callback){if(typeof url!=="string"){return _load.call(this,url);}else if(!this.length){return this;}
var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}
var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=null;}else if(typeof params==="object"){params=jQuery.param(params,jQuery.ajaxSettings.traditional);type="POST";}}
var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status==="success"||status==="notmodified"){self.html(selector?jQuery("<div />").append(res.responseText.replace(rscript,"")).find(selector):res.responseText);}
if(callback){self.each(callback,[res.responseText,status,res]);}}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||rselectTextarea.test(this.nodeName)||rinput.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){type=type||callback;callback=data;data=null;}
return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){type=type||callback;callback=data;data={};}
return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:window.XMLHttpRequest&&(window.location.protocol!=="file:"||!window.ActiveXObject)?function(){return new window.XMLHttpRequest();}:function(){try{return new window.ActiveXObject("Microsoft.XMLHTTP");}catch(e){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(origSettings){var s=jQuery.extend(true,{},jQuery.ajaxSettings,origSettings);var jsonp,status,data,callbackContext=origSettings&&origSettings.context||s,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data,s.traditional);}
if(s.dataType==="jsonp"){if(type==="GET"){if(!jsre.test(s.url)){s.url+=(rquery.test(s.url)?"&":"?")+(s.jsonp||"callback")+"=?";}}else if(!s.data||!jsre.test(s.data)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";}
s.dataType="json";}
if(s.dataType==="json"&&(s.data&&jsre.test(s.data)||jsre.test(s.url))){jsonp=s.jsonpCallback||("jsonp"+jsc++);if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");}
s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=window[jsonp]||function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}
if(head){head.removeChild(script);}};}
if(s.dataType==="script"&&s.cache===null){s.cache=false;}
if(s.cache===false&&type==="GET"){var ts=now();var ret=s.url.replace(rts,"$1_="+ts+"$2");s.url=ret+((ret===s.url)?(rquery.test(s.url)?"&":"?")+"_="+ts:"");}
if(s.data&&type==="GET"){s.url+=(rquery.test(s.url)?"&":"?")+s.data;}
if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart");}
var parts=rurl.exec(s.url),remote=parts&&(parts[1]&&parts[1]!==location.protocol||parts[2]!==location.host);if(s.dataType==="script"&&type==="GET"&&remote){var head=document.getElementsByTagName("head")[0]||document.documentElement;var script=document.createElement("script");script.src=s.url;if(s.scriptCharset){script.charset=s.scriptCharset;}
if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){done=true;success();complete();script.onload=script.onreadystatechange=null;if(head&&script.parentNode){head.removeChild(script);}}};}
head.insertBefore(script,head.firstChild);return undefined;}
var requestDone=false;var xhr=s.xhr();if(!xhr){return;}
if(s.username){xhr.open(type,s.url,s.async,s.username,s.password);}else{xhr.open(type,s.url,s.async);}
try{if(s.data||origSettings&&origSettings.contentType){xhr.setRequestHeader("Content-Type",s.contentType);}
if(s.ifModified){if(jQuery.lastModified[s.url]){xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]);}
if(jQuery.etag[s.url]){xhr.setRequestHeader("If-None-Match",jQuery.etag[s.url]);}}
if(!remote){xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");}
xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}
if(s.beforeSend&&s.beforeSend.call(callbackContext,xhr,s)===false){if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop");}
xhr.abort();return false;}
if(s.global){trigger("ajaxSend",[xhr,s]);}
var onreadystatechange=xhr.onreadystatechange=function(isTimeout){if(!xhr||xhr.readyState===0||isTimeout==="abort"){if(!requestDone){complete();}
requestDone=true;if(xhr){xhr.onreadystatechange=jQuery.noop;}}else if(!requestDone&&xhr&&(xhr.readyState===4||isTimeout==="timeout")){requestDone=true;xhr.onreadystatechange=jQuery.noop;status=isTimeout==="timeout"?"timeout":!jQuery.httpSuccess(xhr)?"error":s.ifModified&&jQuery.httpNotModified(xhr,s.url)?"notmodified":"success";var errMsg;if(status==="success"){try{data=jQuery.httpData(xhr,s.dataType,s);}catch(err){status="parsererror";errMsg=err;}}
if(status==="success"||status==="notmodified"){if(!jsonp){success();}}else{jQuery.handleError(s,xhr,status,errMsg);}
complete();if(isTimeout==="timeout"){xhr.abort();}
if(s.async){xhr=null;}}};try{var oldAbort=xhr.abort;xhr.abort=function(){if(xhr){oldAbort.call(xhr);}
onreadystatechange("abort");};}catch(e){}
if(s.async&&s.timeout>0){setTimeout(function(){if(xhr&&!requestDone){onreadystatechange("timeout");}},s.timeout);}
try{xhr.send(type==="POST"||type==="PUT"||type==="DELETE"?s.data:null);}catch(e){jQuery.handleError(s,xhr,null,e);complete();}
if(!s.async){onreadystatechange();}
function success(){if(s.success){s.success.call(callbackContext,data,status,xhr);}
if(s.global){trigger("ajaxSuccess",[xhr,s]);}}
function complete(){if(s.complete){s.complete.call(callbackContext,xhr,status);}
if(s.global){trigger("ajaxComplete",[xhr,s]);}
if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop");}}
function trigger(type,args){(s.context?jQuery(s.context):jQuery.event).trigger(type,args);}
return xhr;},handleError:function(s,xhr,status,e){if(s.error){s.error.call(s.context||s,xhr,status,e);}
if(s.global){(s.context?jQuery(s.context):jQuery.event).trigger("ajaxError",[xhr,s,e]);}},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol==="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status===304||xhr.status===1223||xhr.status===0;}catch(e){}
return false;},httpNotModified:function(xhr,url){var lastModified=xhr.getResponseHeader("Last-Modified"),etag=xhr.getResponseHeader("Etag");if(lastModified){jQuery.lastModified[url]=lastModified;}
if(etag){jQuery.etag[url]=etag;}
return xhr.status===304||xhr.status===0;},httpData:function(xhr,type,s){var ct=xhr.getResponseHeader("content-type")||"",xml=type==="xml"||!type&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.nodeName==="parsererror"){jQuery.error("parsererror");}
if(s&&s.dataFilter){data=s.dataFilter(data,type);}
if(typeof data==="string"){if(type==="json"||!type&&ct.indexOf("json")>=0){data=jQuery.parseJSON(data);}else if(type==="script"||!type&&ct.indexOf("javascript")>=0){jQuery.globalEval(data);}}
return data;},param:function(a,traditional){var s=[];if(traditional===undefined){traditional=jQuery.ajaxSettings.traditional;}
if(jQuery.isArray(a)||a.jquery){jQuery.each(a,function(){add(this.name,this.value);});}else{for(var prefix in a){buildParams(prefix,a[prefix]);}}
return s.join("&").replace(r20,"+");function buildParams(prefix,obj){if(jQuery.isArray(obj)){jQuery.each(obj,function(i,v){if(traditional||/\[\]$/.test(prefix)){add(prefix,v);}else{buildParams(prefix+"["+(typeof v==="object"||jQuery.isArray(v)?i:"")+"]",v);}});}else if(!traditional&&obj!=null&&typeof obj==="object"){jQuery.each(obj,function(k,v){buildParams(prefix+"["+k+"]",v);});}else{add(prefix,obj);}}
function add(key,value){value=jQuery.isFunction(value)?value():value;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value);}}});var elemdisplay={},rfxtypes=/toggle|show|hide/,rfxnum=/^([+-]=)?([\d+-.]+)(.*)$/,timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];jQuery.fn.extend({show:function(speed,callback){if(speed||speed===0){return this.animate(genFx("show",3),speed,callback);}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");this[i].style.display=old||"";if(jQuery.css(this[i],"display")==="none"){var nodeName=this[i].nodeName,display;if(elemdisplay[nodeName]){display=elemdisplay[nodeName];}else{var elem=jQuery("<"+nodeName+" />").appendTo("body");display=elem.css("display");if(display==="none"){display="block";}
elem.remove();elemdisplay[nodeName]=display;}
jQuery.data(this[i],"olddisplay",display);}}
for(var j=0,k=this.length;j<k;j++){this[j].style.display=jQuery.data(this[j],"olddisplay")||"";}
return this;}},hide:function(speed,callback){if(speed||speed===0){return this.animate(genFx("hide",3),speed,callback);}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");if(!old&&old!=="none"){jQuery.data(this[i],"olddisplay",jQuery.css(this[i],"display"));}}
for(var j=0,k=this.length;j<k;j++){this[j].style.display="none";}
return this;}},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){var bool=typeof fn==="boolean";if(jQuery.isFunction(fn)&&jQuery.isFunction(fn2)){this._toggle.apply(this,arguments);}else if(fn==null||bool){this.each(function(){var state=bool?fn:jQuery(this).is(":hidden");jQuery(this)[state?"show":"hide"]();});}else{this.animate(genFx("toggle",3),fn,fn2);}
return this;},fadeTo:function(speed,to,callback){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);if(jQuery.isEmptyObject(prop)){return this.each(optall.complete);}
return this[optall.queue===false?"each":"queue"](function(){var opt=jQuery.extend({},optall),p,hidden=this.nodeType===1&&jQuery(this).is(":hidden"),self=this;for(p in prop){var name=p.replace(rdashAlpha,fcamelCase);if(p!==name){prop[name]=prop[p];delete prop[p];p=name;}
if(prop[p]==="hide"&&hidden||prop[p]==="show"&&!hidden){return opt.complete.call(this);}
if((p==="height"||p==="width")&&this.style){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}
if(jQuery.isArray(prop[p])){(opt.specialEasing=opt.specialEasing||{})[p]=prop[p][1];prop[p]=prop[p][0];}}
if(opt.overflow!=null){this.style.overflow="hidden";}
opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(rfxtypes.test(val)){e[val==="toggle"?hidden?"show":"hide":val](prop);}else{var parts=rfxnum.exec(val),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!=="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}
if(parts[1]){end=((parts[1]==="-="?-1:1)*end)+start;}
e.custom(start,end,unit);}else{e.custom(start,val,"");}}});return true;});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue){this.queue([]);}
this.each(function(){for(var i=timers.length-1;i>=0;i--){if(timers[i].elem===this){if(gotoEnd){timers[i](true);}
timers.splice(i,1);}}});if(!gotoEnd){this.dequeue();}
return this;}});jQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(name,props){jQuery.fn[name]=function(speed,callback){return this.animate(props,speed,callback);};});jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&typeof speed==="object"?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:jQuery.fx.speeds[opt.duration]||jQuery.fx.speeds._default;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue();}
if(jQuery.isFunction(opt.old)){opt.old.call(this);}};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig){options.orig={};}}});jQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this);}
(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style){this.elem.style.display="block";}},cur:function(force){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];}
var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;var self=this;function t(gotoEnd){return self.step(gotoEnd);}
t.elem=this.elem;if(t()&&jQuery.timers.push(t)&&!timerId){timerId=setInterval(jQuery.fx.tick,13);}},show:function(){this.options.orig[this.prop]=jQuery.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now(),done=true;if(gotoEnd||t>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false;}}
if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;var old=jQuery.data(this.elem,"olddisplay");this.elem.style.display=old?old:this.options.display;if(jQuery.css(this.elem,"display")==="none"){this.elem.style.display="block";}}
if(this.options.hide){jQuery(this.elem).hide();}
if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jQuery.style(this.elem,p,this.options.orig[p]);}}
this.options.complete.call(this.elem);}
return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;var specialEasing=this.options.specialEasing&&this.options.specialEasing[this.prop];var defaultEasing=this.options.easing||(jQuery.easing.swing?"swing":"linear");this.pos=jQuery.easing[specialEasing||defaultEasing](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}
return true;}};jQuery.extend(jQuery.fx,{tick:function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++){if(!timers[i]()){timers.splice(i--,1);}}
if(!timers.length){jQuery.fx.stop();}},stop:function(){clearInterval(timerId);timerId=null;},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){jQuery.style(fx.elem,"opacity",fx.now);},_default:function(fx){if(fx.elem.style&&fx.elem.style[fx.prop]!=null){fx.elem.style[fx.prop]=(fx.prop==="width"||fx.prop==="height"?Math.max(0,fx.now):fx.now)+fx.unit;}else{fx.elem[fx.prop]=fx.now;}}}});if(jQuery.expr&&jQuery.expr.filters){jQuery.expr.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem;}).length;};}
function genFx(type,num){var obj={};jQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type;});return obj;}
if("getBoundingClientRect"in document.documentElement){jQuery.fn.offset=function(options){var elem=this[0];if(options){return this.each(function(i){jQuery.offset.setOffset(this,options,i);});}
if(!elem||!elem.ownerDocument){return null;}
if(elem===elem.ownerDocument.body){return jQuery.offset.bodyOffset(elem);}
var box=elem.getBoundingClientRect(),doc=elem.ownerDocument,body=doc.body,docElem=doc.documentElement,clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,top=box.top+(self.pageYOffset||jQuery.support.boxModel&&docElem.scrollTop||body.scrollTop)-clientTop,left=box.left+(self.pageXOffset||jQuery.support.boxModel&&docElem.scrollLeft||body.scrollLeft)-clientLeft;return{top:top,left:left};};}else{jQuery.fn.offset=function(options){var elem=this[0];if(options){return this.each(function(i){jQuery.offset.setOffset(this,options,i);});}
if(!elem||!elem.ownerDocument){return null;}
if(elem===elem.ownerDocument.body){return jQuery.offset.bodyOffset(elem);}
jQuery.offset.initialize();var offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,computedStyle,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle,top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){if(jQuery.offset.supportsFixedPosition&&prevComputedStyle.position==="fixed"){break;}
computedStyle=defaultView?defaultView.getComputedStyle(elem,null):elem.currentStyle;top-=elem.scrollTop;left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop;left+=elem.offsetLeft;if(jQuery.offset.doesNotAddBorder&&!(jQuery.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(elem.nodeName))){top+=parseFloat(computedStyle.borderTopWidth)||0;left+=parseFloat(computedStyle.borderLeftWidth)||0;}
prevOffsetParent=offsetParent,offsetParent=elem.offsetParent;}
if(jQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible"){top+=parseFloat(computedStyle.borderTopWidth)||0;left+=parseFloat(computedStyle.borderLeftWidth)||0;}
prevComputedStyle=computedStyle;}
if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static"){top+=body.offsetTop;left+=body.offsetLeft;}
if(jQuery.offset.supportsFixedPosition&&prevComputedStyle.position==="fixed"){top+=Math.max(docElem.scrollTop,body.scrollTop);left+=Math.max(docElem.scrollLeft,body.scrollLeft);}
return{top:top,left:left};};}
jQuery.offset={initialize:function(){var body=document.body,container=document.createElement("div"),innerDiv,checkDiv,table,td,bodyMarginTop=parseFloat(jQuery.curCSS(body,"marginTop",true))||0,html="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";jQuery.extend(container.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});container.innerHTML=html;body.insertBefore(container,body.firstChild);innerDiv=container.firstChild;checkDiv=innerDiv.firstChild;td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5);checkDiv.style.position="fixed",checkDiv.style.top="20px";this.supportsFixedPosition=(checkDiv.offsetTop===20||checkDiv.offsetTop===15);checkDiv.style.position=checkDiv.style.top="";innerDiv.style.overflow="hidden",innerDiv.style.position="relative";this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);this.doesNotIncludeMarginInBodyOffset=(body.offsetTop!==bodyMarginTop);body.removeChild(container);body=container=innerDiv=checkDiv=table=td=null;jQuery.offset.initialize=jQuery.noop;},bodyOffset:function(body){var top=body.offsetTop,left=body.offsetLeft;jQuery.offset.initialize();if(jQuery.offset.doesNotIncludeMarginInBodyOffset){top+=parseFloat(jQuery.curCSS(body,"marginTop",true))||0;left+=parseFloat(jQuery.curCSS(body,"marginLeft",true))||0;}
return{top:top,left:left};},setOffset:function(elem,options,i){if(/static/.test(jQuery.curCSS(elem,"position"))){elem.style.position="relative";}
var curElem=jQuery(elem),curOffset=curElem.offset(),curTop=parseInt(jQuery.curCSS(elem,"top",true),10)||0,curLeft=parseInt(jQuery.curCSS(elem,"left",true),10)||0;if(jQuery.isFunction(options)){options=options.call(elem,i,curOffset);}
var props={top:(options.top-curOffset.top)+curTop,left:(options.left-curOffset.left)+curLeft};if("using"in options){options.using.call(elem,props);}else{curElem.css(props);}}};jQuery.fn.extend({position:function(){if(!this[0]){return null;}
var elem=this[0],offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].nodeName)?{top:0,left:0}:offsetParent.offset();offset.top-=parseFloat(jQuery.curCSS(elem,"marginTop",true))||0;offset.left-=parseFloat(jQuery.curCSS(elem,"marginLeft",true))||0;parentOffset.top+=parseFloat(jQuery.curCSS(offsetParent[0],"borderTopWidth",true))||0;parentOffset.left+=parseFloat(jQuery.curCSS(offsetParent[0],"borderLeftWidth",true))||0;return{top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};},offsetParent:function(){return this.map(function(){var offsetParent=this.offsetParent||document.body;while(offsetParent&&(!/^body|html$/i.test(offsetParent.nodeName)&&jQuery.css(offsetParent,"position")==="static")){offsetParent=offsetParent.offsetParent;}
return offsetParent;});}});jQuery.each(["Left","Top"],function(i,name){var method="scroll"+name;jQuery.fn[method]=function(val){var elem=this[0],win;if(!elem){return null;}
if(val!==undefined){return this.each(function(){win=getWindow(this);if(win){win.scrollTo(!i?val:jQuery(win).scrollLeft(),i?val:jQuery(win).scrollTop());}else{this[method]=val;}});}else{win=getWindow(elem);return win?("pageXOffset"in win)?win[i?"pageYOffset":"pageXOffset"]:jQuery.support.boxModel&&win.document.documentElement[method]||win.document.body[method]:elem[method];}};});function getWindow(elem){return("scrollTo"in elem&&elem.document)?elem:elem.nodeType===9?elem.defaultView||elem.parentWindow:false;}
jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn["inner"+name]=function(){return this[0]?jQuery.css(this[0],type,false,"padding"):null;};jQuery.fn["outer"+name]=function(margin){return this[0]?jQuery.css(this[0],type,false,margin?"margin":"border"):null;};jQuery.fn[type]=function(size){var elem=this[0];if(!elem){return size==null?null:this;}
if(jQuery.isFunction(size)){return this.each(function(i){var self=jQuery(this);self[type](size.call(this,i,self[type]()));});}
return("scrollTo"in elem&&elem.document)?elem.document.compatMode==="CSS1Compat"&&elem.document.documentElement["client"+name]||elem.document.body["client"+name]:(elem.nodeType===9)?Math.max(elem.documentElement["client"+name],elem.body["scroll"+name],elem.documentElement["scroll"+name],elem.body["offset"+name],elem.documentElement["offset"+name]):size===undefined?jQuery.css(elem,type):this.css(type,typeof size==="string"?size:size+"px");};});window.jQuery=window.$=jQuery;})(window);
/*/opt/home/ci/hudson/home/jobs/CAXL_CSG_Optimized/workspace/trunk/build/dist/CAXL-release-2.1.1.19913/src/third_party/jquery/jquery.jstore-all.js*/
/*!*
* jStore - Persistent Client-Side Storage
*
* Copyright (c) 2009 Eric Garside (http://eric.garside.name)
*
* Dual licensed under:
* MIT: http://www.opensource.org/licenses/mit-license.php
* GPLv3: http://www.opensource.org/licenses/gpl-3.0.html
*/
(function($){$.jStore={Availability:{},Engines:{},Instances:{},CurrentEngine:null,defaults:{project:null,engine:null,autoload:true,flash:'jStore.swf'},isReady:false,isFlashReady:false,delegate:$('<a></a>').bind('jStore-ready',function(e,engine){$.jStore.isReady=true;if($.jStore.defaults.autoload)
engine.connect();}).bind('flash-ready',function(){$.jStore.isFlashReady=true;})}
$.jStore.ready=function(callback){if($.jStore.isReady)callback({},$.jStore.CurrentEngine);else $.jStore.delegate.bind('jStore-ready',callback);}
$.jStore.flashReady=function(callback){if($.jStore.isFlashReady)callback({},$.jStore.CurrentEngine);else $.jStore.delegate.bind('flash-ready',callback);}
$.jStore.use=function(engine,project,identifier){project=project||$.jStore.defaults.project||location.hostname.replace(/\./,'-')||'unknown';var e=$.jStore.Engines[engine.toLowerCase()]||null,name=(identifier?identifier+'.':'')+project+'.'+engine;if(!e)throw'JSTORE_ENGINE_UNDEFINED';e=new e(project,name);if($.jStore.Instances[name])throw'JSTORE_JRI_CONFLICT';if(e.isAvailable()){$.jStore.Instances[name]=e;if(!$.jStore.CurrentEngine){$.jStore.CurrentEngine=e;}
$.jStore.delegate.triggerHandler('jStore-ready',[e]);}else{if(!e.autoload)
throw'JSTORE_ENGINE_UNAVILABLE';else{e.included(function(){if(e.isAvailable()){$.jStore.Instances[name]=e;if(!$.jStore.CurrentEngine){$.jStore.CurrentEngine=e;}
$.jStore.delegate.triggerHandler('jStore-ready',[e]);}
else throw'JSTORE_ENGINE_ACTIVATION_FAILURE';}).include();}}}
$.jStore.setCurrentEngine=function(name){if(!$.jStore.Instances.length)
return $.jStore.FindEngine();if(!name&&$.jStore.Instances.length>=1){$.jStore.delegate.triggerHandler('jStore-ready',[$.jStore.Instances[0]]);return $.jStore.CurrentEngine=$.jStore.Instances[0];}
if(name&&$.jStore.Instances[name]){$.jStore.delegate.triggerHandler('jStore-ready',[$.jStore.Instances[name]]);return $.jStore.CurrentEngine=$.jStore.Instances[name];}
throw'JSTORE_JRI_NO_MATCH';}
$.jStore.FindEngine=function(){$.each($.jStore.Availability,function(k){if(this()){$.jStore.use(k,$.jStore.defaults.project,'default');return false;}})}
$.store=function(key,value){if(!$.jStore.CurrentEngine)return false;if(!value)
return $.jStore.CurrentEngine.get(key);return $.jStore.CurrentEngine.set(key,value);}
$.remove=function(key){if(!$.jStore.CurrentEngine)return false;return $.jStore.CurrentEngine.rem(key);}
$.fn.store=function(key,value){if(!$.jStore.CurrentEngine)return this;var result=$.store(key,value);return!value?result:this;}
$.fn.removeStore=function(key){$.remove(key);return this;}
$(function(){if($.jStore.defaults.engine)
return $.jStore.use($.jStore.defaults.engine,$.jStore.defaults.project,'default');var attrload=$('[engine]:first');if(attrload.length)
return $.jStore.use(attrload.attr('engine'),attrload.attr('project'),attrload.attr('identifier'));try{$.jStore.FindEngine();}catch(e){}})})(jQuery);(function(){var initializing=false,fnTest=/xyz/.test(function(){xyz;})?/\b_super\b/:/.*/;this.Class=function(){};Class.extend=function(prop){var _super=this.prototype;initializing=true;var prototype=new this();initializing=false;for(var name in prop){prototype[name]=typeof prop[name]=="function"&&typeof _super[name]=="function"&&fnTest.test(prop[name])?(function(name,fn){return function(){var tmp=this._super;this._super=_super[name];var ret=fn.apply(this,arguments);this._super=tmp;return ret;};})(name,prop[name]):prop[name];}
function Class(){if(!initializing&&this.init)
this.init.apply(this,arguments);}
Class.prototype=prototype;Class.constructor=Class;Class.extend=arguments.callee;return Class;};})();(function($){this.StorageEngine=Class.extend({init:function(project,name){this.project=project;this.jri=name;this.data={};this.limit=-1;this.includes=[];this.delegate=$('<a></a>').bind('engine-ready',function(e,self){self.isReady=true;}).bind('engine-included',function(e,self){self.hasIncluded=true;});this.autoload=false;this.isReady=false;this.hasIncluded=false;},include:function(){var self=this,total=this.includes.length,count=0;$.each(this.includes,function(){$.ajax({type:'get',url:this,dataType:'script',cache:true,success:function(){count++;if(count==total)self.delegate.triggerHandler('engine-included',[self]);}})});},isAvailable:function(){return false;},ready:function(callback){if(this.isReady)callback({},this);else this.delegate.bind('engine-ready',callback);return this;},included:function(callback){if(this.hasIncluded)callback({},this);else this.delegate.bind('engine-included',callback);return this;},get:function(key){return this.data[key]||null;},set:function(key,value){this.data[key]=value;return value;},rem:function(key){var beforeDelete=this.data[key];this.data[key]=null;return beforeDelete;}});})(jQuery);(function($){var sessionAvailability=$.jStore.Availability.session=function(){return!!window.sessionStorage;},localAvailability=$.jStore.Availability.local=function(){return!!(window.localStorage||window.globalStorage);};this.jStoreDom=StorageEngine.extend({init:function(project,name){this._super(project,name);this.type='DOM';this.limit=5*1024*1024;},connect:function(){this.delegate.triggerHandler('engine-ready',[this]);},get:function(key){var out=this.db.getItem(key);return out&&out.value?out.value:out},set:function(key,value){this.db.setItem(key,value);return value;},rem:function(key){var out=this.get(key);this.db.removeItem(key);return out}})
this.jStoreLocal=jStoreDom.extend({connect:function(){this.db=!window.globalStorage?window.localStorage:window.globalStorage[location.hostname];this._super();},isAvailable:localAvailability})
this.jStoreSession=jStoreDom.extend({connect:function(){this.db=sessionStorage;this._super();},isAvailable:sessionAvailability})
$.jStore.Engines.local=jStoreLocal;$.jStore.Engines.session=jStoreSession;})(jQuery);(function($){var avilability=$.jStore.Availability.flash=function(){return!!(window.swfobject&&jQuery.hasFlash('8.0.0'));}
this.jStoreFlash=StorageEngine.extend({init:function(project,name){this._super(project,name);this.type='Flash';var self=this;$.jStore.flashReady(function(){self.flashReady()});},connect:function(){var name='jstore-flash-'+this.project;$('<div></div>').css({position:'absolute',left:-1e5}).attr('id',name).appendTo(document.body).flash({src:$.jStore.defaults.flash,width:1,height:1},{version:'8.0.0'});},flashReady:function(e){this.db=$('embed','#jstore-flash-'+this.project)[0];this.delegate.triggerHandler('engine-ready',[this]);},isAvailable:avilability,get:function(key){var out=this.db.f_get_cookie(key);return out=='null'?null:out;},set:function(key,value){this.db.f_set_cookie(key,value);return value;},rem:function(key){var beforeDelete=this.get(key);this.db.f_delete_cookie(key);return beforeDelete;}})
$.jStore.Engines.flash=jStoreFlash;})(jQuery);function flash_ready(){$.jStore.delegate.triggerHandler('flash-ready');}
(function(){var B;B=jQuery.fn.flash=function(G,F,D,I){var H=D||B.replace;F=B.copy(B.pluginOptions,F);if(!B.hasFlash(F.version)){if(F.expressInstall&&B.hasFlash(6,0,65)){var E={flashvars:{MMredirectURL:location,MMplayerType:"PlugIn",MMdoctitle:jQuery("title").text()}}}else{if(F.update){H=I||B.update}else{return this}}}G=B.copy(B.htmlOptions,E,G);return this.each(function(){H.call(this,B.copy(G))})};B.copy=function(){var F={},E={};for(var G=0;G<arguments.length;G++){var D=arguments[G];if(D==undefined){continue}jQuery.extend(F,D);if(D.flashvars==undefined){continue}jQuery.extend(E,D.flashvars)}F.flashvars=E;return F};jQuery.hasFlash=B.hasFlash=function(){if(/hasFlash\=true/.test(location)){return true}if(/hasFlash\=false/.test(location)){return false}var E=B.hasFlash.playerVersion().match(/\d+/g);var F=String([arguments[0],arguments[1],arguments[2]]).match(/\d+/g)||String(B.pluginOptions.version).match(/\d+/g);for(var D=0;D<3;D++){E[D]=parseInt(E[D]||0);F[D]=parseInt(F[D]||0);if(E[D]<F[D]){return false}if(E[D]>F[D]){return true}}return true};B.hasFlash.playerVersion=function(){try{try{var D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");try{D.AllowScriptAccess="always"}catch(E){return"6,0,0"}}catch(E){}return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(E){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){return(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}}catch(E){}}return"0,0,0"};B.htmlOptions={height:240,flashvars:{},pluginspage:"http://www.adobe.com/go/getflashplayer",src:"#",type:"application/x-shockwave-flash",width:320};B.pluginOptions={expressInstall:false,update:true,version:"6.0.65"};B.replace=function(D){this.innerHTML='<div class="alt">'+this.innerHTML+"</div>";jQuery(this).addClass("flash-replaced").prepend(B.transform(D))};B.update=function(E){var D=String(location).split("?");D.splice(1,0,"?hasFlash=true&");D=D.join("");var F='<p>This content requires the Flash Player. <a href="http://www.adobe.com/go/getflashplayer">Download Flash Player</a>. Already have Flash Player? <a href="'+D+'">Click here.</a></p>';this.innerHTML='<span class="alt">'+this.innerHTML+"</span>";jQuery(this).addClass("flash-update").prepend(F)};function A(){var E="";for(var D in this){if(typeof this[D]!="function"){E+=D+'="'+this[D]+'" '}}return E}function C(){var E="";for(var D in this){if(typeof this[D]!="function"){E+=D+"="+encodeURIComponent(this[D])+"&"}}return E.replace(/&$/,"")}B.transform=function(D){D.toString=A;if(D.flashvars){D.flashvars.toString=C}return"<embed "+String(D)+"/>"};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}})();(function($){var avilability=$.jStore.Availability.gears=function(){return!!(window.google&&window.google.gears)}
this.jStoreGears=StorageEngine.extend({init:function(project,name){this._super(project,name);this.type='Google Gears';this.includes.push('http://code.google.com/apis/gears/gears_init.js');this.autoload=true;},connect:function(){var db=this.db=google.gears.factory.create('beta.database');db.open('jstore-'+this.project);db.execute('CREATE TABLE IF NOT EXISTS jstore (k TEXT UNIQUE NOT NULL PRIMARY KEY, v TEXT NOT NULL)');this.updateCache();},updateCache:function(){var result=this.db.execute('SELECT k,v FROM jstore');while(result.isValidRow()){this.data[result.field(0)]=result.field(1);result.next();}result.close();this.delegate.triggerHandler('engine-ready',[this]);},isAvailable:avilability,set:function(key,value){var db=this.db;db.execute('BEGIN');db.execute('INSERT OR REPLACE INTO jstore(k, v) VALUES (?, ?)',[key,value]);db.execute('COMMIT');return this._super(key,value);},rem:function(key){var db=this.db;db.execute('BEGIN');db.execute('DELETE FROM jstore WHERE k = ?',[key]);db.execute('COMMIT');return this._super(key);}})
$.jStore.Engines.gears=jStoreGears;})(jQuery);(function($){var avilability=$.jStore.Availability.html5=function(){return!!window.openDatabase}
this.jStoreHtml5=StorageEngine.extend({init:function(project,name){this._super(project,name);this.type='HTML5';this.limit=1024*200;},connect:function(){var db=this.db=openDatabase('jstore-'+this.project,'1.0',this.project,this.limit);if(!db)throw'JSTORE_ENGINE_HTML5_NODB';db.transaction(function(db){db.executeSql('CREATE TABLE IF NOT EXISTS jstore (k TEXT UNIQUE NOT NULL PRIMARY KEY, v TEXT NOT NULL)');});this.updateCache();},updateCache:function(){var self=this;this.db.transaction(function(db){db.executeSql('SELECT k,v FROM jstore',[],function(db,result){rows=result.rows;for(var i=0;i<rows.length;++i){var row=rows.item(i);self.data[row.k]=row.v;}
self.delegate.triggerHandler('engine-ready',[self]);});});},isAvailable:avilability,set:function(key,value){this.db.transaction(function(db){db.executeSql('INSERT OR REPLACE INTO jstore(k, v) VALUES (?, ?)',[key,value]);});return this._super(key,value);},rem:function(key){this.db.transaction(function(db){db.executeSql('DELETE FROM jstore WHERE k = ?',[key])})
return this._super(key);}})
$.jStore.Engines.html5=jStoreHtml5;})(jQuery);(function($){var avilability=$.jStore.Availability.ie=function(){return!!window.ActiveXObject;}
this.jStoreIE=StorageEngine.extend({init:function(project,name){this._super(project,name);this.type='IE';this.limit=64*1024;},connect:function(){this.db=$('<div style="display:none;behavior:url(\'#default#userData\')" id="jstore-'+this.project+'"></div>').appendTo(document.body).get(0);this.delegate.triggerHandler('engine-ready',[this]);},isAvailable:avilability,get:function(key){this.db.load(this.project);return this.db.getAttribute(key);},set:function(key,value){this.db.setAttribute(key,value);this.db.save(this.project);return value;},rem:function(key){var beforeDelete=this.get(key);this.db.removeAttribute(key);this.db.save(this.project);return beforeDelete;}})
$.jStore.Engines.ie=jStoreIE;})(jQuery);
/*/opt/home/ci/hudson/home/jobs/CAXL_CSG_Optimized/workspace/trunk/build/dist/CAXL-release-2.1.1.19913/src/jabberwerx.js*/
;(function(){if('jabberwerx'in window){return;}
var jabberwerx;jabberwerx={version:'2.1.1.19913',_config:{persistDuration:30,unsecureAllowed:false,capabilityFeatures:[],httpBindingURL:"/httpbinding",baseReconnectCountdown:30,enabledMechanisms:["DIGEST-MD5","PLAIN"]},getInstallURL:function(){return this.getInstallPath();},getInstallPath:function(){var p=this._config.installPath;if(!p){var target=String(arguments[0]||"jabberwerx")+".js";p=jabberwerx.$("script[src$="+target+"]").slice(0,1).attr("src");p=p.substring(0,p.indexOf(target));}
return p.charAt(p.length-1)=='/'?p:p+'/';},parseTimestamp:function(timestamp){var result=/^([0-9]{4})(?:-?)([0-9]{2})(?:-?)([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2}(?:\.([0-9]+))?)(?:(Z|[-+]?[0-9]{2}:[0-9]{2})?)$/.exec(timestamp);if(!result){throw new TypeError("timestamp string not recognized");}
var ts,offset=0;ts=Date.UTC(Number(result[1]),Number(result[2])-1,Number(result[3]),Number(result[4]),Number(result[5]),Number(result[6]),Number(result[7]||"0"));if(result[8]&&result[8]!="Z"){result=/^([-+]?[0-9]{2}):([0-9]{2})$/.exec(result[8]);if(result){offset+=Number(result[1])*3600000;offset+=Number(result[2])*60000;}}
return new Date(ts-offset);},generateTimestamp:function(ts,legacy){var padFN=function(val,amt){var result="";if(amt>1){result=arguments.callee(parseInt(val/10),amt-1);}
return result+String(parseInt(val%10));};if(!(ts&&ts instanceof Date)){throw new TypeError("Expected Date object");}
var date=[padFN(ts.getUTCFullYear(),4),padFN(ts.getUTCMonth()+1,2),padFN(ts.getUTCDate(),2)];var time=[padFN(ts.getUTCHours(),2),padFN(ts.getUTCMinutes(),2),padFN(ts.getUTCSeconds(),2)];if(legacy){return date.join("")+"T"+time.join(":");}else{return date.join("-")+"T"+time.join(":")+"Z";}},_init:function(){this._inited=true;if(typeof jabberwerx_config!='undefined'){for(var name in jabberwerx_config){var val=jabberwerx_config[name];if(jabberwerx.$.isArray(val)&&val.concat){val=val.concat();}
this._config[name]=val;}}
jabberwerx.InsufficientServerDetailsError=jabberwerx.util.Error.extend('A server name and HTTP proxy address are needed to connect.');jabberwerx.$(document).ready(function(){if(!jabberwerx.$.jStore.isReady){jabberwerx.$.jStore.ready(window.jabberwerx._handleStorageReady);}
else{window.jabberwerx._handleStorageReady(null,jabberwerx.$.jStore.CurrentEngine);}});},_handleStorageReady:function(evt,engine){if(this._storageReady){return;}
if(engine&&!engine.isReady){engine.ready(this._handleStorageReady);}
this._storageReady=true;if(!this._deferredCalls){this._deferredCalls=[];}
for(var i=0;i<this._deferredCalls.length;i++){var info=this._deferredCalls[i];var target=info.target||this;target[info.methodName].apply(target,info.arguments);}
this._deferredCalls=[];},reset:function(){if(this.client){this.client.disconnect();}
if(jabberwerx._config.persistSessions){jabberwerx.util.clearGraph();}},reduce:function(obj,fn,value){if(!jabberwerx.$.isFunction(fn)){throw new TypeError("expected function object");}
jabberwerx.$.each(obj,function(idx,item){value=fn(item,value);return true;});return value;},unique:function(arr){if(!jabberwerx.$.isArray(arr)){return arr;}
var specified={};for(var idx=arr.length-1;idx>=0;idx--){var item=arr[idx];if(!specified[item]){specified[item]=true;}else{arr.splice(idx,1);}}
return arr;},isText:function(o){return(o&&o.ownerDocument&&o.nodeType==3&&typeof o.nodeName=="string");},isElement:function(o){return(o&&(o.ownerDocument!==undefined)&&(o.nodeType==1)&&(typeof o.nodeName=="string"));},isDocument:function(o){return(o&&(o.documentElement!==undefined)&&(o.nodeType==9)&&(typeof o.nodeName=="string"));},client:null,_inited:false,_deferredCalls:[],_storageReady:false};jabberwerx._config.debug={on:true};jabberwerx.NodeBuilder=function(data){var parent,doc,ns=null;if(data instanceof jabberwerx.NodeBuilder){this.parent=parent=arguments[0];data=arguments[1];doc=parent.document;ns=parent.namespaceURI;}
if(jabberwerx.isDocument(data)){doc=data;data=doc.documentElement;ns=data.namespaceURI||data.getAttribute("xmlns")||ns;}else if(jabberwerx.isElement(data)){if(!doc){doc=data.ownerDocument;}else if(data.ownerDocument!==doc){data=(doc.importNode)?doc.importNode(data,true):data.cloneNode(true);}
if(parent&&parent.data){parent.data.appendChild(data);}
if(!doc.documentElement){doc.appendChild(data);}
ns=data.namespaceURI||data.getAttribute("xmlns")||ns;}else if(data){if(!doc){doc=this._createDoc();}
var ename,ln,pre;ename=this._parseName(data,ns);ns=ename.namespaceURI;data=this._createElem(doc,ns,ename.localName,ename.prefix);}else if(!parent){doc=this._createDoc();}
this.document=doc;this.data=data;this.namespaceURI=ns;};jabberwerx.NodeBuilder.prototype={attribute:function(name,val){var ename=this._parseName(name);if(ename.prefix&&ename.prefix!="xml"&&ename.prefix!="xmlns"){var xmlns="xmlns:"+ename.prefix;if(this.data.getAttribute(xmlns)===null){this.data.setAttribute(xmlns,ename.namespaceURI||"");}}else if(ename.prefix!="xml"&&ename.prefix!="xmlns"&&ename.namespaceURI!==null){throw new TypeError("namespaced attributes not supported");}
this.data.setAttribute(ename.qualifiedName,val);return this;},text:function(val){if(!val){return this;}
var txt=this.document.createTextNode(val);this.data.appendChild(txt);return this;},element:function(name,attrs){if(!attrs){attrs={};}
if(typeof(name)!="string"){throw new TypeError("name is not a valid expanded name");}
var builder=new jabberwerx.NodeBuilder(this,name);for(var key in attrs){if(key=='xmlns'){continue;}
builder.attribute(key,attrs[key]);}
return builder;},node:function(n){if(!n){throw new TypeError("node must exist");}
if(jabberwerx.isDocument(n)){n=n.documentElement;}
if(jabberwerx.isElement(n)){return new jabberwerx.NodeBuilder(this,n);}else if(jabberwerx.isText(n)){return this.text(n.nodeValue);}else{throw new TypeError("Node must be an XML node");}
return this;},xml:function(val){var wrapper=(this.namespaceURI)?"<wrapper xmlns='"+this.namespaceURI+"'>":"<wrapper>";wrapper+=val+"</wrapper>";var parsed=this._parseXML(wrapper);var that=this;jabberwerx.$(parsed).contents().each(function(){if(jabberwerx.isElement(this)){new jabberwerx.NodeBuilder(that,this);}else if(jabberwerx.isText(this)){that.text(this.nodeValue);}});return this;},_parseName:function(name,ns){var ptn=/^(?:\{(.*)\})?(?:([^\s{}:]+):)?([^\s{}:]+)$/;var m=name.match(ptn);if(!m){throw new TypeError("name '"+name+"' is not a valid ename");}
var retval={namespaceURI:m[1],localName:m[3],prefix:m[2]};if(!retval.localName){throw new TypeError("local-name not value");}
retval.qualifiedName=(retval.prefix)?retval.prefix+":"+retval.localName:retval.localName;if(!retval.namespaceURI){if(name.indexOf("{}")==0){retval.namespaceURI="";}else{retval.namespaceURI=ns||null;}}
return retval;},_createDoc:function(){var doc;try{if(document.implementation&&document.implementation.createDocument){doc=document.implementation.createDocument(null,null,null);}else{doc=new ActiveXObject("Msxml2.DOMDocument");doc.async=false;}}catch(ex){jabberwerx.util.debug.log("could not create XML Document: "+ex);throw ex;}
return doc;},_parseXML:function(xmlstr){var tmp;try{tmp=this._createDoc();tmp.loadXML(xmlstr);}catch(ex){try{tmp=(new DOMParser()).parseFromString(xmlstr,"text/xml");}
catch(ex){jabberwerx.util.debug.log("exception: "+ex+" trying to parse xml: '"+xmlstr+"'");throw new TypeError("Exception trying to parse xml: '"+xmlstr+"'");}}
var ret=tmp.documentElement;if(!ret||(ret.nodeName=="parsererror")||(jabberwerx.$("parsererror",ret).length>0)){jabberwerx.util.debug.log("parse error trying to parse xml: '"+xmlstr+"'");throw new TypeError("Parse error trying to parse: "+xmlstr);}
return ret;},_createElem:function(doc,ns,ln,pre){var parent=this.parent;var elem;var qn=pre?(pre+":"+ln):ln;var str;if(pre){str="xmlns:"+pre+"='"+(ns||"")+"'";}else{str=(ns!==undefined&&ns!==null)?"xmlns='"+ns+"'":"";}
str="<"+qn+" "+str+"/>";elem=this._parseXML(str);if(doc.importNode){elem=doc.importNode(elem,true);}
if(parent&&parent.data){if(parent.namespaceURI==ns){elem.removeAttribute("xmlns");}
parent.data.appendChild(elem);}else if(!doc.documentElement){doc.appendChild(elem);}
return elem;}};jabberwerx.xhtmlim={};jabberwerx.xhtmlim.allowedStyles=["background-color","color","font-family","font-size","font-style","font-weight","margin-left","margin-right","text-align","text-decoration"];jabberwerx.xhtmlim.allowedTags={br:[],em:[],strong:[],a:["style","href","type"],blockquote:["style"],cite:["style"],img:["style","alt","height","src","width"],li:["style"],ol:["style"],p:["style"],span:["style"],ul:["style"],body:["style","xmlns","xml:lang"]}
jabberwerx.xhtmlim.sanitize=function(xhtmlNode){var filterNodes=function(fNode){var myKids=fNode.children();var fDOM=fNode.get(0);if(jabberwerx.xhtmlim.allowedTags[fDOM.nodeName]===undefined){fNode.replaceWith(fDOM.childNodes);fNode.remove();}else{var i=0;while(i<fDOM.attributes.length){var aName=fDOM.attributes[i].nodeName;if(jabberwerx.$.inArray(aName,jabberwerx.xhtmlim.allowedTags[fDOM.nodeName])==-1){fNode.removeAttr(aName);}else{if(aName=="href"||aName=="src"){var aValue=fDOM.attributes[i].nodeValue;if(aValue.indexOf("javascript:")==0){fNode.replaceWith(fDOM.childNodes);fNode.remove();}}else if(aName=="style"){var rProps=jabberwerx.$.map(fDOM.attributes[i].value.split(';'),function(oneStyle,idx){return jabberwerx.$.inArray(oneStyle.split(':')[0],jabberwerx.xhtmlim.allowedStyles)!=-1?oneStyle:null;});fNode.attr("style",rProps.join(';'));}
++i;}}}
for(var i=0;i<myKids.length;++i){if(jabberwerx.isElement(myKids[i])){filterNodes(jabberwerx.$(myKids[i]));}}}
if(!jabberwerx.isElement(xhtmlNode)){throw new TypeError("xhtmlNode must be a DOM");}
if(jabberwerx.xhtmlim.allowedTags[xhtmlNode.nodeName]===undefined){throw new TypeError("xhtmlNode must be an allowed tag")}
filterNodes(jabberwerx.$(xhtmlNode));return xhtmlNode;}
jabberwerx.$=jQuery.noConflict(true);window.jabberwerx=jabberwerx;jabberwerx.$(document).ready(function(){jabberwerx._init();});})();
/*/opt/home/ci/hudson/home/jobs/CAXL_CSG_Optimized/workspace/trunk/build/dist/CAXL-release-2.1.1.19913/src/util/crypt.js*/
if(window.jabberwerx){window.jabberwerx.util=window.jabberwerx.util||{};window.jabberwerx.util.crypto=window.jabberwerx.util.crypto||{};jabberwerx.util.crypto.b64Encode=function(input){var table="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";for(var idx=0;idx<input.length;idx+=3){var data=input.charCodeAt(idx)<<16|input.charCodeAt(idx+1)<<8|input.charCodeAt(idx+2);output+=table.charAt((data>>>18)&0x003f)+
table.charAt((data>>>12)&0x003f);output+=((idx+1)<input.length)?table.charAt((data>>>6)&0x003f):"=";output+=((idx+2)<input.length)?table.charAt(data&0x003f):"=";}
return output;};jabberwerx.util.crypto.b64Decode=function(input){var table="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";for(var idx=0;idx<input.length;idx+=4){var h=[table.indexOf(input.charAt(idx)),table.indexOf(input.charAt(idx+1)),table.indexOf(input.charAt(idx+2)),table.indexOf(input.charAt(idx+3))];var data=(h[0]<<18)|(h[1]<<12)|(h[2]<<6)|h[3];if(input.charAt(idx+2)=='='){data=String.fromCharCode((data>>>16)&0x00ff);}else if(input.charAt(idx+3)=='='){data=String.fromCharCode((data>>>16)&0x00ff,(data>>>8)&0x00ff);}else{data=String.fromCharCode((data>>>16)&0x00ff,(data>>>8)&0x00ff,data&0x00ff);}
output+=data;}
return output;};jabberwerx.util.crypto.utf8Encode=function(input){var output="";var i=-1;var x,y;while(++i<input.length){x=input.charCodeAt(i);y=i+1<input.length?input.charCodeAt(i+1):0;if(0xD800<=x&&x<=0xDBFF&&0xDC00<=y&&y<=0xDFFF){x=0x10000+((x&0x03FF)<<10)+(y&0x03FF);i++;}
if(x<=0x7F)
output+=String.fromCharCode(x);else if(x<=0x7FF)
output+=String.fromCharCode(0xC0|((x>>>6)&0x1F),0x80|(x&0x3F));else if(x<=0xFFFF)
output+=String.fromCharCode(0xE0|((x>>>12)&0x0F),0x80|((x>>>6)&0x3F),0x80|(x&0x3F));else if(x<=0x1FFFFF)
output+=String.fromCharCode(0xF0|((x>>>18)&0x07),0x80|((x>>>12)&0x3F),0x80|((x>>>6)&0x3F),0x80|(x&0x3F));}
return output;}
jabberwerx.util.crypto.utf8Decode=function(input){var output="";for(idx=0;idx<input.length;idx++){var c=[input.charCodeAt(idx),input.charCodeAt(idx+1),input.charCodeAt(idx+2)];var pt;if(c[0]<128){pt=c[0];}else if(c[0]>191&&c[0]<224){pt=((c[0]&0x001f)<<6)|(c[1]&0x003f);idx+=1;}else{pt=((c[0]&0x000f)<<12)|((c[1]&0x001f)<<6)|(c[2]&0x003f);idx+=2;}
output+=String.fromCharCode(pt);}
return output;};jabberwerx.util.crypto.str2hex=function(input,useUpperCase){var hex_tab=useUpperCase?"0123456789ABCDEF":"0123456789abcdef";var output="";var x;for(var i=0;i<input.length;i++){x=input.charCodeAt(i);output+=hex_tab.charAt((x>>>4)&0x0F)
+hex_tab.charAt(x&0x0F);}
return output;}
jabberwerx.util.crypto.b64_sha1=function(input){return jabberwerx.util.crypto.b64Encode(jabberwerx.util.crypto.str_sha1(input));}
jabberwerx.util.crypto.str_sha1=function(input){var rstr2binb=function(input){var output=Array(input.length>>2);for(var i=0;i<output.length;i++)
output[i]=0;for(var i=0;i<input.length*8;i+=8)
output[i>>5]|=(input.charCodeAt(i/8)&0xFF)<<(24-i%32);return output;}
var binb2rstr=function(input){var output="";for(var i=0;i<input.length*32;i+=8){output+=String.fromCharCode((input[i>>5]>>>(24-i%32))&0xFF);}
return output;}
var safe_add=function(x,y){var lsw=(x&0xFFFF)+(y&0xFFFF);var msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF);}
var bit_rol=function(num,cnt){return(num<<cnt)|(num>>>(32-cnt));}
var sha1_ft=function(t,b,c,d){if(t<20)return(b&c)|((~b)&d);if(t<40)return b^c^d;if(t<60)return(b&c)|(b&d)|(c&d);return b^c^d;}
var sha1_kt=function(t){return(t<20)?1518500249:(t<40)?1859775393:(t<60)?-1894007588:-899497514;}
var binb_sha1=function(x,len){x[len>>5]|=0x80<<(24-len%32);x[((len+64>>9)<<4)+15]=len;var w=Array(80);var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;var e=-1009589776;for(var i=0;i<x.length;i+=16){var olda=a;var oldb=b;var oldc=c;var oldd=d;var olde=e;for(var j=0;j<80;j++){if(j<16){w[j]=x[i+j];}else{w[j]=bit_rol(w[j-3]^w[j-8]^w[j-14]^w[j-16],1);}
var t=safe_add(safe_add(bit_rol(a,5),sha1_ft(j,b,c,d)),safe_add(safe_add(e,w[j]),sha1_kt(j)));e=d;d=c;c=bit_rol(b,30);b=a;a=t;}
a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd);e=safe_add(e,olde);}
return Array(a,b,c,d,e);}
return binb2rstr(binb_sha1(rstr2binb(input),input.length*8));}
jabberwerx.util.crypto.hex_md5=function(input){return jabberwerx.util.crypto.str2hex(jabberwerx.util.crypto.rstr_md5(input));}
jabberwerx.util.crypto.rstr_md5=function(input){function md5_cmn(q,a,b,x,s,t){return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b);}
function md5_ff(a,b,c,d,x,s,t){return md5_cmn((b&c)|((~b)&d),a,b,x,s,t);}
function md5_gg(a,b,c,d,x,s,t){return md5_cmn((b&d)|(c&(~d)),a,b,x,s,t);}
function md5_hh(a,b,c,d,x,s,t){return md5_cmn(b^c^d,a,b,x,s,t);}
function md5_ii(a,b,c,d,x,s,t){return md5_cmn(c^(b|(~d)),a,b,x,s,t);}
var safe_add=function(x,y){var lsw=(x&0xFFFF)+(y&0xFFFF);var msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF);}
var bit_rol=function(num,cnt){return(num<<cnt)|(num>>>(32-cnt));}
var rstr2binl=function(input){var output=Array(input.length>>2);for(var i=0;i<output.length;i++){output[i]=0;}
for(var i=0;i<input.length*8;i+=8){output[i>>5]|=(input.charCodeAt(i/8)&0xFF)<<(i%32);}
return output;}
var binl2rstr=function(input){var output="";for(var i=0;i<input.length*32;i+=8){output+=String.fromCharCode((input[i>>5]>>>(i%32))&0xFF);}
return output;}
var binl_md5=function(x,len){x[len>>5]|=0x80<<((len)%32);x[(((len+64)>>>9)<<4)+14]=len;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(var i=0;i<x.length;i+=16){var olda=a;var oldb=b;var oldc=c;var oldd=d;a=md5_ff(a,b,c,d,x[i+0],7,-680876936);d=md5_ff(d,a,b,c,x[i+1],12,-389564586);c=md5_ff(c,d,a,b,x[i+2],17,606105819);b=md5_ff(b,c,d,a,x[i+3],22,-1044525330);a=md5_ff(a,b,c,d,x[i+4],7,-176418897);d=md5_ff(d,a,b,c,x[i+5],12,1200080426);c=md5_ff(c,d,a,b,x[i+6],17,-1473231341);b=md5_ff(b,c,d,a,x[i+7],22,-45705983);a=md5_ff(a,b,c,d,x[i+8],7,1770035416);d=md5_ff(d,a,b,c,x[i+9],12,-1958414417);c=md5_ff(c,d,a,b,x[i+10],17,-42063);b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);a=md5_ff(a,b,c,d,x[i+12],7,1804603682);d=md5_ff(d,a,b,c,x[i+13],12,-40341101);c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);b=md5_ff(b,c,d,a,x[i+15],22,1236535329);a=md5_gg(a,b,c,d,x[i+1],5,-165796510);d=md5_gg(d,a,b,c,x[i+6],9,-1069501632);c=md5_gg(c,d,a,b,x[i+11],14,643717713);b=md5_gg(b,c,d,a,x[i+0],20,-373897302);a=md5_gg(a,b,c,d,x[i+5],5,-701558691);d=md5_gg(d,a,b,c,x[i+10],9,38016083);c=md5_gg(c,d,a,b,x[i+15],14,-660478335);b=md5_gg(b,c,d,a,x[i+4],20,-405537848);a=md5_gg(a,b,c,d,x[i+9],5,568446438);d=md5_gg(d,a,b,c,x[i+14],9,-1019803690);c=md5_gg(c,d,a,b,x[i+3],14,-187363961);b=md5_gg(b,c,d,a,x[i+8],20,1163531501);a=md5_gg(a,b,c,d,x[i+13],5,-1444681467);d=md5_gg(d,a,b,c,x[i+2],9,-51403784);c=md5_gg(c,d,a,b,x[i+7],14,1735328473);b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);a=md5_hh(a,b,c,d,x[i+5],4,-378558);d=md5_hh(d,a,b,c,x[i+8],11,-2022574463);c=md5_hh(c,d,a,b,x[i+11],16,1839030562);b=md5_hh(b,c,d,a,x[i+14],23,-35309556);a=md5_hh(a,b,c,d,x[i+1],4,-1530992060);d=md5_hh(d,a,b,c,x[i+4],11,1272893353);c=md5_hh(c,d,a,b,x[i+7],16,-155497632);b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);a=md5_hh(a,b,c,d,x[i+13],4,681279174);d=md5_hh(d,a,b,c,x[i+0],11,-358537222);c=md5_hh(c,d,a,b,x[i+3],16,-722521979);b=md5_hh(b,c,d,a,x[i+6],23,76029189);a=md5_hh(a,b,c,d,x[i+9],4,-640364487);d=md5_hh(d,a,b,c,x[i+12],11,-421815835);c=md5_hh(c,d,a,b,x[i+15],16,530742520);b=md5_hh(b,c,d,a,x[i+2],23,-995338651);a=md5_ii(a,b,c,d,x[i+0],6,-198630844);d=md5_ii(d,a,b,c,x[i+7],10,1126891415);c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);b=md5_ii(b,c,d,a,x[i+5],21,-57434055);a=md5_ii(a,b,c,d,x[i+12],6,1700485571);d=md5_ii(d,a,b,c,x[i+3],10,-1894986606);c=md5_ii(c,d,a,b,x[i+10],15,-1051523);b=md5_ii(b,c,d,a,x[i+1],21,-2054922799);a=md5_ii(a,b,c,d,x[i+8],6,1873313359);d=md5_ii(d,a,b,c,x[i+15],10,-30611744);c=md5_ii(c,d,a,b,x[i+6],15,-1560198380);b=md5_ii(b,c,d,a,x[i+13],21,1309151649);a=md5_ii(a,b,c,d,x[i+4],6,-145523070);d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);c=md5_ii(c,d,a,b,x[i+2],15,718787259);b=md5_ii(b,c,d,a,x[i+9],21,-343485551);a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd);}
return Array(a,b,c,d);}
return binl2rstr(binl_md5(rstr2binl(input),input.length*8));}
jabberwerx.util.crypto.generateUUID=function(){var parts=[];for(var idx=0;idx<16;idx++){parts[idx]=Math.floor(Math.random()*256);}
parts[6]=(parts[6]&0x0f)|0x40;parts[8]=(parts[8]&0x3f)|0x80;var result="";for(var idx=0;idx<parts.length;idx++){var val=parts[idx];if(idx==4||idx==6||idx==8||idx==10){result+="-";}
result+=((val>>>4)&0x0f).toString(16);result+=(val&0x0f).toString(16);}
return result;}}
/*/opt/home/ci/hudson/home/jobs/CAXL_CSG_Optimized/workspace/trunk/build/dist/CAXL-release-2.1.1.19913/src/jwapp/JWCore.js*/
;if(jabberwerx){if(!jabberwerx.util){jabberwerx.util={}}
jabberwerx.util.config={maxGraphAge:30};jabberwerx.util._markGraph=function(tag,root){if(jabberwerx.util._graphRegistry){if(root&&(!root.shouldBeSerializedInline||!root.shouldBeSerializedInline())){jabberwerx.util._graphRegistry[tag]={timestamp:new Date(),value:root,graph:jabberwerx.util.findReachableGUIDs(root)};}else{delete jabberwerx.util._graphRegistry[tag];}}};if(jabberwerx){(function(){var initializing=false;jabberwerx.JWBase=function(){};jabberwerx.JWBase.prototype.init=function(){};jabberwerx.JWBase.prototype.destroy=function(){return null;};jabberwerx.JWBase.prototype.getClassName=function(){return this._className||'';};jabberwerx.JWBase.prototype.toString=function(){return'['+this.getClassName()+']';};jabberwerx.JWBase.prototype.shouldBeSavedWithGraph=function(){return false;};jabberwerx.JWBase.prototype.shouldBeSerializedInline=function(){return false;};jabberwerx.JWBase.prototype.willBeSerialized=function(){};jabberwerx.JWBase.prototype.wasUnserialized=function(){jabberwerx.$.each(this._observerInfo,function(eventName,info){info.observers=jabberwerx.$.grep(info.observers,function(observer,i){return typeof observer.target!='undefined';});});};jabberwerx.JWBase.prototype.graphUnserialized=function(){}
jabberwerx.JWBase.prototype.invocation=function(methodName,boundArguments){return jabberwerx.util.generateInvocation(this,methodName,boundArguments);};var __jwa__createOverrideChain=function(base,override){if(base!==undefined&&override===undefined){return base;}
if(!jabberwerx.$.isFunction(base)||!jabberwerx.$.isFunction(override)){return override;}
return function(){var tmp=this._super;this._super=base;var retval=override.apply(this,arguments);this._super=tmp;return retval;};};jabberwerx.JWBase.mixin=function(prop){prop=jabberwerx.$.extend(true,{},prop);for(var name in prop){this.prototype[name]=__jwa__createOverrideChain(prop[name],this.prototype[name]);}};jabberwerx.JWBase.extend=function(prop,className){var _super=this.prototype;initializing=true;var prototype=new this();initializing=false;for(var name in prop){prototype[name]=__jwa__createOverrideChain(_super[name],prop[name]);};var _superClass=jabberwerx.$.extend({},this);function JWBase(){if(!initializing){if(arguments.length==2&&typeof arguments[0]=='string'&&arguments[0]=='__jw_rehydrate__'){var obj=arguments[1];for(var p in obj){this[p]=obj[p];}}
else{this._guid=jabberwerx.util.newObjectGUID(className||"");this._jwobj_=true;this._className=(typeof className=='undefined'?null:className);this._observerInfo={};for(var p in this){if(typeof this[p]!='function'){this[p]=jabberwerx.util.clone(this[p]);}}
if(this.init){this.init.apply(this,arguments);}}}};for(var name in _superClass){JWBase[name]=_superClass[name];}
JWBase.prototype=prototype;prototype.constructor=JWBase;return JWBase;};})();}
jabberwerx.util.Error=function(message){this.message=message;};jabberwerx.util.Error.prototype=new jabberwerx.util.Error();jabberwerx.util.Error.extend=function(message,extension){var f=function(message,extension){this.message=message||this.message;for(var p in extension){this[p]=extension[p];}};f.prototype=new this(message);for(var p in extension){f.prototype[p]=extension[p];}
return f;}
jabberwerx.util.NotSupportedError=jabberwerx.util.Error.extend("This operation is not supported");jabberwerx.util._invocations={};jabberwerx.util.generateInvocation=function(object,methodName,boundArguments){var objectTag='_global_';if(jabberwerx.util.isJWObjRef(object)){objectTag=object._guid;}
var f=jabberwerx.util._invocations[objectTag+'.'+methodName]
if(typeof f!='undefined'){return f;}
if(typeof boundArguments!='undefined'){if(typeof boundArguments!='object'||!(boundArguments instanceof Array)){boundArguments=[boundArguments];}}
else{boundArguments=[];}
var f=function(){return jabberwerx.util.invoke.apply(arguments.callee,[arguments.callee].concat(boundArguments,Array.prototype.slice.call(arguments)));};f.object=object;f.methodName=methodName;f._jwinvocation_=true;jabberwerx.util._invocations[objectTag+'.'+methodName]=f;return f;};jabberwerx.util.invoke=function(){var invocation=arguments[0];var args=Array.prototype.slice.call(arguments,1);if(typeof invocation.object=='undefined'||!invocation.object){return window[invocation.methodName].apply(window,args);}
else{return invocation.object[invocation.methodName].apply(invocation.object,args);}};jabberwerx.util.eventNames=['jw_valueChanged','jw_collectionChanged',];jabberwerx.util.registerEventName=function(name){if(jabberwerx.util.eventNames.indexOf(name)==-1){jabberwerx.util.eventNames.push(name);}
else{throw new jabberwerx.util.EventNameAlreadyRegisteredError('JW event name '+name+' already registered!');}};jabberwerx.util.EventNameAlreadyRegisteredError=jabberwerx.util.Error.extend('That event name is already registered!');jabberwerx.util._objectUIDCounter=0;jabberwerx.util.newObjectGUID=function(className){jabberwerx.util._objectUIDCounter=(jabberwerx.util._objectUIDCounter+1==Number.MAX_VALUE)?0:jabberwerx.util._objectUIDCounter+1;return'_jwobj_'+className.replace(/\./g,"_")+'_'+(new Date().valueOf()+jabberwerx.util._objectUIDCounter).toString();};jabberwerx.util._escapeString=function(str){return('"'+str.replace(/(["\\])/g,'\\$1')+'"').replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");};jabberwerx.util.isString=function(it){return!!arguments.length&&it!=null&&(typeof it=="string"||it instanceof String);};jabberwerx.util.isArray=function(it){return it&&(it instanceof Array||typeof it=="array");};jabberwerx.util._getParts=function(arr,obj,cb){return[jabberwerx.util.isString(arr)?arr.split(""):arr,obj||window,jabberwerx.util.isString(cb)?new Function("item","index","array",cb):cb];};jabberwerx.util.map=function(arr,callback,thisObject){var _p=jabberwerx.util._getParts(arr,thisObject,callback);arr=_p[0];var outArr=(arguments[3]?(new arguments[3]()):[]);for(var i=0;i<arr.length;++i){outArr.push(_p[2].call(_p[1],arr[i],i,arr));}
return outArr;};jabberwerx.util.serialize=function(it,prettyPrint,_indentStr){var f=function(it,prettyPrint,_indentStr){if(it===undefined){return"undefined";}
var objtype=typeof it;if(objtype=="number"||objtype=="boolean"){return it+"";}
if(it===null){return"null";}
if(jabberwerx.util.isString(it)){return jabberwerx.util._escapeString(it);}
if((typeof it.nodeType=='number')&&(typeof it.cloneNode=='function')){return'{}';}
var recurse=arguments.callee;var newObj;_indentStr=_indentStr||"";var nextIndent=prettyPrint?_indentStr+"\t":"";if(typeof it.__json__=="function"){newObj=it.__json__();if(it!==newObj){return recurse(newObj,prettyPrint,nextIndent);}}
if(typeof it.json=="function"){newObj=it.json();if(it!==newObj){return recurse(newObj,prettyPrint,nextIndent);}}
var sep=prettyPrint?" ":"";var newLine=prettyPrint?"\n":"";var val;if(jabberwerx.util.isArray(it)){var res=jabberwerx.util.map(it,function(obj){if(jabberwerx.util.isJWObjRef(obj)){val=jabberwerx.util._escapeString(obj._guid);}
else{val=recurse(obj,prettyPrint,nextIndent);}
if(typeof val!="string"){val="undefined";}
return newLine+nextIndent+val;});return"["+res.join(","+sep)+newLine+_indentStr+"]";}
if(objtype=="function"){if(jabberwerx.util.isJWInvocation(it)){return recurse({object:it.object,methodName:it.methodName,_jwinvocation_:true},prettyPrint,nextIndent);}
else{return null;}}
var output=[];if(!('responseText'in it)&&!('responseXML'in it)){try{for(var key in it){break;}}
catch(e){return"null";}
for(var key in it){var keyStr;if(typeof key=="number"){keyStr='"'+key+'"';}else if(typeof key=="string"){keyStr=jabberwerx.util._escapeString(key);}else{continue;}
if(jabberwerx.util.isJWObjRef(it[key])){if(!it[key].shouldBeSerializedInline||!it[key].shouldBeSerializedInline()){val=jabberwerx.util._escapeString(it[key]._guid);}else{if(it[key].willBeSerialized){it[key].willBeSerialized();}
val=recurse(it[key],prettyPrint,nextIndent);}}
else{val=recurse(it[key],prettyPrint,nextIndent);}
if(typeof val!="string"){continue;}
output.push(newLine+nextIndent+keyStr+":"+sep+val);}}
return"{"+output.join(","+sep)+newLine+_indentStr+"}";};return f(it,prettyPrint,_indentStr);}
jabberwerx.util.isJWObjGUID=function(ref){return(typeof ref=='string'&&(ref.indexOf('_jwobj_')==0||ref.indexOf('"_jwobj_')==0));}
jabberwerx.util.isJWObjRef=function(ref){return(ref&&typeof ref=='object'&&typeof ref._jwobj_=='boolean'&&ref._jwobj_);}
jabberwerx.util.isJWInvocation=function(ref){return(ref&&(typeof ref._jwinvocation_!='undefined'));};jabberwerx.util.findReachableGUIDs=function(start){var traversedGUIDs={};(function f(root,depth){if(typeof root=='object'&&root!=null){var s='';for(var p=0;p<depth;p++){s+=' ';}
if(jabberwerx.util.isArray(root)){for(var i=0;i<root.length;i++){if(root[i]){f(root[i],depth+1);}}}
else if(jabberwerx.util.isJWObjRef(root)){if(traversedGUIDs[root._guid]===undefined){traversedGUIDs[root._guid]=root;for(var p in root){if(root[p]){f(root[p],depth+1);}}}}
else if(root.constructor==Object){for(var p in root){if(root[p]&&typeof root[p]=='object'){f(root[p],depth+1);}}}}})(start,0);return traversedGUIDs;};jabberwerx.util.saveGraph=function(root,tag,callback){if(!jabberwerx.$.jStore||!jabberwerx.$.jStore.isReady){throw new jabberwerx.util.JWStorageRequiresjQueryjStoreError();}
var reachableGUIDs=jabberwerx.util.findReachableGUIDs(root);if(!reachableGUIDs[tag]){root=jabberwerx.util.isJWObjRef(root)?{reference:root,timestamp:new Date().getTime()}:root;reachableGUIDs[tag]=root;}
var serialization={};for(var key in reachableGUIDs){var val=reachableGUIDs[key];if(val.shouldBeSavedWithGraph&&!val.shouldBeSavedWithGraph()){continue;}
if(val.willBeSerialized){val.willBeSerialized();}
var json=jabberwerx.util.serialize(val,false);jabberwerx.$.store('_jw_store_.'+key,json);serialization[key]=json;jabberwerx.util._markGraph(key,val);}
jabberwerx.$.store('_jw_store_timestamp_.'+tag,new Date().getTime());if(callback){callback(serialization);}
return serialization;};jabberwerx.util.loadGraph=function(tag){if(!jabberwerx.$.jStore||!jabberwerx.$.jStore.isReady){throw new jabberwerx.util.JWStorageRequiresjQueryjStoreError();}
var reg={};var loader,knitter;knitter=function(arg){if(!arg){return arg;}
switch(typeof arg){case'string':if(jabberwerx.util.isJWObjGUID(arg)){var tmp=(reg[arg])?reg[arg]:loader(arg);if(tmp){return tmp;}}
break;case'object':if(jabberwerx.util.isJWInvocation(arg)){var typeObject=knitter(arg.object);arg=jabberwerx.util.generateInvocation(typeObject,arg.methodName);}else if(arg._className){var tmp=reg[arg._guid];if(tmp){return tmp;}if(arg instanceof jabberwerx.JWBase){reg[arg._guid]=arg;}else{arg=eval('new '+
arg._className+'("__jw_rehydrate__", arg)');reg[arg._guid]=arg;}}
for(var key in arg){if(key=='_guid'){continue;}
arg[key]=knitter(arg[key]);}
if(arg.wasUnserialized){arg.wasUnserialized();}
break;case'array':for(var i in val){val[i]=knitter(val[i]);}
break;}
return arg;};loader=function(ltag){var graph;if(reg[ltag]){return reg[ltag];}
graph=jabberwerx.$.store('_jw_store_.'+ltag);if(!graph){return graph;}
try{graph=eval('('+graph+')');graph=knitter(graph);}
catch(e){jabberwerx.util.debug.log('exception evalualuating '+ltag+": "+e);throw e;}
reg[ltag]=graph;jabberwerx.util._markGraph(ltag,graph);return graph;};var ts=jabberwerx.util.getLoadedGraphAge(tag);if(ts&&(ts.getTime()>jabberwerx.util.getMaxGraphAge()*1000)){return null;}
loader(tag);var key;for(key in reg){if(reg[key]&®[key].graphUnserialized){reg[key].graphUnserialized();}}
var retval=reg[tag];if(retval&&!jabberwerx.util.isJWObjRef(retval)&&jabberwerx.util.isJWObjRef(retval.reference)){retval=retval.reference;}
return retval;};jabberwerx.util.isGraphSaved=function(tag){if(!jabberwerx.$.jStore||!jabberwerx.$.jStore.isReady){throw new jabberwerx.util.JWStorageRequiresjQueryjStoreError();}
return jabberwerx.$.store('_jw_store_.'+tag)!=null;};jabberwerx.util.clearGraph=function(tag){if(!tag&&!jabberwerx.util._graphRegistry)return;var guids={};if(tag&&(!jabberwerx.util._graphRegistry||!jabberwerx.util._graphRegistry[tag])){guids=jabberwerx.util.findReachableGUIDs(jabberwerx.util.loadGraph(tag));}else{var gnode=tag?jabberwerx.util._graphRegistry[tag]:jabberwerx.util._graphRegistry;guids=gnode.graph;if(tag&&!guids[tag]){guids[tag]=gnode.value;}}
for(var key in guids){jabberwerx.$.remove('_jw_store_.'+key);jabberwerx.util._markGraph(key);}};jabberwerx.util.getLoadedGraphTimestamp=function(tag){if(tag){var ts=jabberwerx.$.store('_jw_store_timestamp_.'+tag);if(ts){var rd=new Date();rd.setTime(ts);return rd;}}
return null;};jabberwerx.util.getLoadedGraphAge=function(tag){var t=jabberwerx.util.getLoadedGraphTimestamp(tag);if(t){return new Date(new Date().getTime()-t.getTime());}
return null;};jabberwerx.util.getMaxGraphAge=function(){if(typeof(jabberwerx._config.persistDuration)!="number"){jabberwerx._config.persistDuration=parseInt(jabberwerx._config.persistDuration);}
return jabberwerx._config.persistDuration;}
jabberwerx.util.setMaxGraphAge=function(age){if(age&&typeof age=="number"&&age>0){jabberwerx._config.persistDuration=age;}
return jabberwerx.util.getMaxGraphAge();}
jabberwerx.util.clone=function(arg){if(typeof arg=='object'&&arg!=null){if(arg instanceof Array){var copy=[];for(var i=0;i<arg.length;i++){copy.push(jabberwerx.util.clone(arg[i]));}}
if(typeof copy=='undefined'){var copy={};}
for(var p in arg){copy[p]=jabberwerx.util.clone(arg[p]);}
if(typeof arg.prototype!='undefined'){copy.prototype=arg.prototype;}}
else{var copy=arg;}
return copy;};jabberwerx.util.slugify=function(string,separator){return string.toLowerCase().replace('-',separator).replace(/[^%a-z0-9 _-]/g,'').replace(/\s+/g,(typeof separator!='undefined'?separator:'-'));};jabberwerx.util.encodeSerialization=function(s){if(s){return jabberwerx.util.crypto.b64Encode(jabberwerx.util.crypto.utf8Encode(s));}
return'';}
jabberwerx.util.decodeSerialization=function(s){if(s){return jabberwerx.util.crypto.utf8Decode(jabberwerx.util.crypto.b64Decode(s));}
return'';}
if(!Array.prototype.indexOf){Array.prototype.indexOf=function(elt){var len=this.length;var from=Number(arguments[1])||0;from=(from<0)?Math.ceil(from):Math.floor(from);if(from<0)
from+=len;for(;from<len;from++){if(from in this&&this[from]===elt)return from;}
return-1;};}
jabberwerx.util.unserializeXMLDoc=function(s,wrap){if(!s&&!wrap){return null;}
if(typeof wrap=='string'){s='<'+wrap+'>'+s+'</'+wrap+'>';}
var builder=new jabberwerx.NodeBuilder("nbwrapper");builder.xml(s);var unwrapped=builder.data.childNodes[0];builder.data.removeChild(unwrapped);builder.document.removeChild(builder.data);builder.document.appendChild(unwrapped);return builder.document;};jabberwerx.util.unserializeXML=function(s,wrap){var d=jabberwerx.util.unserializeXMLDoc(s,wrap);return(d?d.documentElement:d);};jabberwerx.util.serializeXML=function(n){if(typeof(XMLSerializer)!="undefined"){return new XMLSerializer().serializeToString(n);}else if(n.xml){return n.xml;}
return null;};if(typeof(XMLSerializer)!="undefined"&&typeof(Node)!="undefined"&&Node.prototype&&Node.prototype.__defineGetter__){Node.prototype.__defineGetter__("xml",function(){return jabberwerx.util.serializeXML(this);});}
jabberwerx.util.debug={consoleDelegate:null,console:window.console||null}
jabberwerx.$.each(['log','dir','warn','error','info','debug'],function(i,e){jabberwerx.util.debug[e]=function(a,streamName){if(!jabberwerx._config.debug.on||(jabberwerx.util.isString(streamName)&&!jabberwerx._config.debug[streamName])){return;}
if(jabberwerx.util.isString(streamName)){a='['+streamName+'] '+a;}
try{jabberwerx.util.debug.console[e](a);}catch(ex){}
if(jabberwerx.util.debug.consoleDelegate){jabberwerx.util.debug.consoleDelegate[e](a);}}});jabberwerx.util.setDebugStream=function(streamName,value){jabberwerx._config.debug[streamName]=(typeof value=='undefined'?true:value);};jabberwerx.util.JWStorageRequiresjQueryjStoreError=jabberwerx.util.Error.extend('JW storage features require jQuery-jStore.');jabberwerx.util._graphRegistry=null;}
/*/opt/home/ci/hudson/home/jobs/CAXL_CSG_Optimized/workspace/trunk/build/dist/CAXL-release-2.1.1.19913/src/jwapp/JWModel.js*/
if(jabberwerx){jabberwerx.JWModel=jabberwerx.JWBase.extend({init:function(){},shouldBeSavedWithGraph:function(){return true;}},'JWModel');};
/*/opt/home/ci/hudson/home/jobs/CAXL_CSG_Optimized/workspace/trunk/build/dist/CAXL-release-2.1.1.19913/src/model/SASL.js*/
if(jabberwerx){jabberwerx.SASLMechanism=jabberwerx.JWBase.extend({init:function(client,encoded){this._super();this.mechanismName=this.constructor.mechanismName;this._encoded=Boolean(encoded);if(!(client&&client instanceof jabberwerx.Client)){throw new TypeError("client must be a jabberwerx.Client");}
this.client=client;},evaluate:function(input){if(input&&!jabberwerx.isElement(input)){throw new TypeError("input must be undefined or an element");}
var output=null;var failure=null;var data;if(!input){if(this.started){jabberwerx.util.debug.log("SASL mechanism already started!");throw this._handleFailure();}
this.started=true;try{data=this.evaluateStart();data=this._encodeData(data);output=new jabberwerx.NodeBuilder("{urn:ietf:params:xml:ns:xmpp-sasl}auth").attribute("mechanism",this.mechanismName).text(data).data;}catch(ex){jabberwerx.util.debug.log("SASL failed to initialize: "+ex);throw this._handleFailure(ex);}}else{if(!this.started){jabberwerx.util.debug.log("SASL mechanism not yet started!");throw this._handleFailure();}
switch(input.nodeName){case"success":try{if(!this.complete){data=jabberwerx.$(input).text();data=this._decodeData(data);data=this.evaluateChallenge(data);}}catch(ex){jabberwerx.util.debug.log("SASL failed to evaluate success data: "+ex);throw this._handleFailure(ex);}
if(data||!this.complete){jabberwerx.util.debug.log("SASL failed to complete upon <success/>");throw this._handleFailure();}
break;case"failure":{var failure=this._handleFailure(jabberwerx.$(input).children().get(0));jabberwerx.util.debug.log("SASL failure from server: "+failure.message);throw failure;}
break;case"challenge":if(this.complete){jabberwerx.util.debug.log("SASL received challenge after completion!");throw this._handleFailure();}
try{data=jabberwerx.$(input).text();data=this._decodeData(data);data=this.evaluateChallenge(data);data=this._encodeData(data);output=new jabberwerx.NodeBuilder("{urn:ietf:params:xml:ns:xmpp-sasl}response").text(data).data;}catch(ex){jabberwerx.util.debug.log("SASL failed to evaluate challenge data: "+ex);throw this._handleFailure(ex);}
break;default:jabberwerx.util.debug.log("unexpected stanza received!");throw this._handleFailure();break;}}
return output;},_decodeData:function(data){if(!data){return"";}
if(!this._encoded){return jabberwerx.util.crypto.utf8Decode(jabberwerx.util.crypto.b64Decode(data));}
return data;},_encodeData:function(data){if(!data){return"";}
if(!this._encoded){return jabberwerx.util.crypto.b64Encode(jabberwerx.util.crypto.utf8Encode(data));}
return data;},evaluateStart:function(){throw new Error("not implemented!");},evaluateChallenge:function(inb){throw new Error("not implemented!");},_handleFailure:function(cond){this.complete=true;if(cond instanceof jabberwerx.SASLMechanism.SASLAuthFailure){return cond;}else if(jabberwerx.isElement(cond)){var msg="{urn:ietf:params:xml:ns:xmpp-sasl}"+cond.nodeName;return new jabberwerx.SASLMechanism.SASLAuthFailure(msg);}else{return new jabberwerx.SASLMechanism.SASLAuthFailure();}},getProperties:function(){return(this.client&&this.client._connectParams)||{};},client:null,mechanismName:"",complete:false,started:false},"jabberwerx.SASLMechanism");jabberwerx.SASLMechanism.SASLAuthFailure=jabberwerx.util.Error.extend("{urn:ietf:params:xml:ns:xmpp-sasl}temporary-auth-failure");jabberwerx.SASLMechanism._baseExtend=jabberwerx.SASLMechanism.extend;jabberwerx.SASLMechanism.extend=function(props,type,mechname){if(!(mechname&&typeof(mechname)=="string")){throw new TypeError("name must be a non-empty string");}
var subtype=jabberwerx.SASLMechanism._baseExtend(props,type);subtype.mechanismName=mechname.toUpperCase();if(jabberwerx.sasl&&jabberwerx.sasl instanceof jabberwerx.SASLMechanismFactory){jabberwerx.sasl.addMechanism(subtype);}
return subtype;};jabberwerx.SASLMechanismFactory=jabberwerx.JWBase.extend({init:function(mechs){this._super();if(!mechs){if(jabberwerx._config.enabledMechanisms){mechs=jabberwerx._config.enabledMechanisms;}else{mechs=[];}}
this.mechanisms=mechs.concat();},createMechanismFor:function(client,mechs){if(!jabberwerx.$.isArray(mechs)){throw new TypeError("mechs must be an array of mechanism names");}
if(!(client&&client instanceof jabberwerx.Client)){throw new TypeError("client must be an isntance of jabberwerx.Client");}
mechs=mechs.concat();for(var idx=0;idx<mechs.length;idx++){mechs[idx]=String(mechs[idx]).toUpperCase();}
var selected=null;for(var idx=0;!selected&&idx<this.mechanisms.length;idx++){var candidate=this._mechsAvail[this.mechanisms[idx]];if(!candidate){continue;}
for(var jdx=0;!selected&&jdx<mechs.length;jdx++){if(mechs[jdx]!=candidate.mechanismName){continue;}
try{selected=new candidate(client);}catch(ex){jabberwerx.util.debug.log("could not create SASLMechanism for "+
candidate.mechanismName+": "+ex);selected=null;}}}
return selected;},addMechanism:function(type){if(!(jabberwerx.$.isFunction(type)&&type.mechanismName)){throw new TypeError("type must be the constructor for a SASLMechanism type");}
this._mechsAvail[type.mechanismName]=type;},removeMechanism:function(type){if(!(jabberwerx.$.isFunction(type)&&type.mechanismName)){throw new TypeError("type must be the constructor for a SASLMechanism type");}
this._mechsAvail[type.mechanismName]=undefined;delete this._mechsAvail[type.mechanismName];},_mechsAvail:{},mechanisms:[]},"jabberwerx.SASLMechanismFactory");if(!(jabberwerx.sasl&&jabberwerx.sasl instanceof jabberwerx.SASLMechanismFactory)){jabberwerx.sasl=new jabberwerx.SASLMechanismFactory([]);jabberwerx.$(document).ready(function(){if(jabberwerx.sasl.mechanisms.length==0){jabberwerx.sasl.mechanisms=jabberwerx._config.enabledMechanisms.concat();}});}}
/*/opt/home/ci/hudson/home/jobs/CAXL_CSG_Optimized/workspace/trunk/build/dist/CAXL-release-2.1.1.19913/src/model/SASLMechs.js*/
if(jabberwerx&&jabberwerx.SASLMechanism){jabberwerx.SASLPlainMechanism=jabberwerx.SASLMechanism.extend({init:function(client){this._super(client);},evaluateStart:function(){var params=this.getProperties();if(!this.client.isSecure()){throw new jabberwerx.SASLMechanism.SASLAuthFailure("{urn:ietf:params:xml:ns:xmpp-sasl}mechanism-too-weak");}
var nilChar=String.fromCharCode(0);var usr=(params&¶ms.jid&¶ms.jid.getNode())||"";var pwd=(params&¶ms.password)||"";return nilChar+usr+nilChar+pwd;},evaluateChallenge:function(inb){if(inb||this.complete){throw new jabberwerx.SASLMechanism.SASLAuthFailure();}
this.complete=true;}},"jabberwerx.SASLPlainMechanism","PLAIN");jabberwerx.SASLDigestMd5Mechanism=jabberwerx.SASLMechanism.extend({init:function(client){this._super(client);},evaluateStart:function(){this._stage=this._generateResponse;return null;},evaluateChallenge:function(inb){var inprops,outprops;if(this.complete&&!this._stage){return;}
if(!this._stage){jabberwerx.util.debug.log("DIGEST-MD5 in bad stage");throw new jabberwerx.SASLMechanism.SASLAuthFailure();}
inprops=this._decodeProperties(inb);outprops=this._stage(inprops);return this._encodeProperties(outprops);},_generateResponse:function(inprops){var params=this.getProperties();var user,pass,domain;user=(params.jid&¶ms.jid.getNode())||"";domain=(params.jid&¶ms.jid.getDomain())||"";pass=params.password||"";var realm=inprops.realm||domain;var nonce=inprops.nonce;var nc=inprops.nc||"00000001";var cnonce=this._cnonce((user+"@"+realm).length);var uri="xmpp/"+domain;var qop="auth";var A1;A1=jabberwerx.util.crypto.rstr_md5(jabberwerx.util.crypto.utf8Encode(user+":"+realm+":"+pass));A1=A1+jabberwerx.util.crypto.utf8Encode(":"+nonce+":"+cnonce);var A2;A2=jabberwerx.util.crypto.utf8Encode("AUTHENTICATE:"+uri);var rsp=[jabberwerx.util.crypto.str2hex(jabberwerx.util.crypto.rstr_md5(A1)),nonce,nc,cnonce,qop,jabberwerx.util.crypto.str2hex(jabberwerx.util.crypto.rstr_md5(A2))].join(":");rsp=jabberwerx.util.crypto.hex_md5(jabberwerx.util.crypto.utf8Encode(rsp));var outprops={"charset":"utf-8","digest-uri":uri,"cnonce":cnonce,"nonce":nonce,"nc":nc,"qop":qop,"username":user,"realm":realm,"response":rsp};this._authProps=outprops;this._stage=this._verifyRspAuth;return outprops;},_verifyRspAuth:function(inprops){if(inprops){inprops=jabberwerx.$.extend({},inprops,this._authProps||{});var params=this.getProperties();var user,pass,domain;user=(params.jid&¶ms.jid.getNode())||"";domain=(params.jid&¶ms.jid.getDomain())||"";pass=params.password||"";var realm=inprops.realm||domain;var nonce=inprops.nonce;var nc=inprops.nc||"00000001";var cnonce=inprops.cnonce;var uri="xmpp/"+domain;var qop="auth";var A1;A1=jabberwerx.util.crypto.rstr_md5(jabberwerx.util.crypto.utf8Encode(user+":"+realm+":"+pass));A1=A1+jabberwerx.util.crypto.utf8Encode(":"+nonce+":"+cnonce);var A2;A2=jabberwerx.util.crypto.utf8Encode(":"+uri);var rsp=[jabberwerx.util.crypto.str2hex(jabberwerx.util.crypto.rstr_md5(A1)),nonce,nc,cnonce,qop,jabberwerx.util.crypto.str2hex(jabberwerx.util.crypto.rstr_md5(A2))].join(":");rsp=jabberwerx.util.crypto.hex_md5(jabberwerx.util.crypto.utf8Encode(rsp));if(rsp!=inprops.rspauth){jabberwerx.util.debug.log("response auth values do not match");throw new jabberwerx.SASLMechanism.SASLAuthFailure();}}
this.complete=true;this._stage=null;},_decodeProperties:function(str){var ptn=/([^"()<>\{\}\[\]@,;:\\\/?= \t]+)=(?:([^"()<>\{\}\[\]@,;:\\\/?= \t]+)|(?:"([^"]+)"))/g;var props={};var field;if(!str){str="";}
while(field=ptn.exec(str)){props[field[1]]=field[2]||field[3]||"";}
return props;},_encodeProperties:function(props){var quoted={"username":true,"realm":true,"nonce":true,"cnonce":true,"digest-uri":true,"response":true};var tmp=[];for(var name in props){var val=quoted[name]?'"'+props[name]+'"':props[name];tmp.push(name+"="+val);}
return tmp.join(",");},_stage:null,_cnonce:function(size){var data="";for(var idx=0;idx<size;idx++){data+=String.fromCharCode(Math.random()*256);}
return jabberwerx.util.crypto.b64Encode(data);}},"jabberwerx.SASLDigestMd5Mechanism","DIGEST-MD5");}
/*/opt/home/ci/hudson/home/jobs/CAXL_CSG_Optimized/workspace/trunk/build/dist/CAXL-release-2.1.1.19913/src/model/JID.js*/
if(jabberwerx){jabberwerx.JID=jabberwerx.JWModel.extend({init:function(arg){if(arg instanceof jabberwerx.JID){arg={"node":arg.getNode()||null,"domain":arg.getDomain()||null,"resource":arg.getResource()||null};}else if(typeof(arg)=="string"){var result=/^(?:([^\/]+)@)?([^@\/]+)(?:\/(.+))?$/.exec(arg);if(!result){throw new jabberwerx.JID.InvalidJIDError("JID did not match the form 'node@domain/resource'");}
full=arg.toString();arg={"node":(result[1]||undefined),"domain":result[2],"resource":(result[3]||undefined)};}else if(!arg){throw new jabberwerx.JID.InvalidJIDError("argument must be defined and not null");}else{arg=jabberwerx.$.extend({},arg);}
var prepFN=function(test){if(/[ \t\n\r@\:\<\>\&'"\/]/.test(test)){throw new jabberwerx.JID.InvalidJIDError("invalid characters found");}
return test.toLowerCase();};if(!arg.domain){throw new jabberwerx.JID.InvalidJIDError("'' or null or undefined domain not allowed");}else{arg.domain=prepFN(arg.domain,true);}
if(arg.node==""){throw new jabberwerx.JID.InvalidJIDError("'' node with @ not allowed");}else if(arg.node){if(arg.unescaped){arg.node=jabberwerx.JID.escapeNode(arg.node);}
arg.node=prepFN(arg.node,true);}
if(arg.resouce==""){throw new jabberwerx.JID.InvalidJIDError("'' resource with / not allowed");}
this._domain=arg.domain;this._node=arg.node||"";this._resource=arg.resource||"";this._full=""+
(arg.node?arg.node+"@":"")+
arg.domain+
(arg.resource?"/"+arg.resource:"");if(jabberwerx.$.browser.msie){this.toString=function(){return this._full;}}},getBareJID:function(){if(!this.getResource()){return this;}else{return new jabberwerx.JID({"node":this.getNode(),"domain":this.getDomain()});}},getBareJIDString:function(){return this.getBareJID().toString();},getDomain:function(){return this._domain;},getNode:function(){return this._node;},getResource:function(){return this._resource;},toString:function(){return this._full;},toDisplayString:function(){var result=this.getDomain();var part;part=this.getNode();if(part){result=jabberwerx.JID.unescapeNode(part)+"@"+result;}
part=this.getResource();if(part){result=result+"/"+part;}
return result;},equals:function(jid){try{jid=jabberwerx.JID.asJID(jid);return this.toString()==jid.toString();}catch(ex){return false;}},compareTo:function(jid){jid=jabberwerx.JID.asJID(jid);var cmp=function(v1,v2){if(v1<v2){return-1;}else if(v1>v2){return 1;}
return 0;};var result;if((result=cmp(this.getDomain(),jid.getDomain()))!=0){return result;}
if((result=cmp(this.getNode(),jid.getNode()))!=0){return result;}
if((result=cmp(this.getResource(),jid.getResource()))!=0){return result;}
return 0;},shouldBeSavedWithGraph:function(){return false;},shouldBeSerializedInline:function(){return true;},wasUnserialized:function(){if(jabberwerx.$.browser.msie){this.toString=function(){return this._full;}}},_node:"",_domain:"",_resource:"",_full:""},'jabberwerx.JID');jabberwerx.JID.InvalidJIDError=jabberwerx.util.Error.extend.call(TypeError,"The JID is invalid");jabberwerx.JID.asJID=function(val){if(val instanceof jabberwerx.JID){return val;}else{return new jabberwerx.JID(val);}};jabberwerx.JID.escapeNode=function(input){if(typeof(input)!="string"){throw new TypeError("input must be a string");}
if(input.charAt(0)==' '||input.charAt(input.length-1)==' '){throw new TypeError("input cannot start or end with ' '");}
var ptn=/([ "&'\/:<>@])|(\\)(20|22|26|27|2f|3a|3c|3e|40|5c)/gi;var repFN=function(found,m1,m2,m3){switch(m1||m2){case' ':return"\\20";case'"':return"\\22";case'&':return"\\26";case'\'':return"\\27";case'/':return"\\2f";case':':return"\\3a";case'<':return"\\3c";case'>':return"\\3e";case'@':return"\\40";case'\\':return"\\5c"+m3;}
return found;};return input.replace(ptn,repFN);};jabberwerx.JID.unescapeNode=function(input){if(typeof(input)!="string"){throw new TypeError("input must be a string");}
var ptn=/(\\20|\\22|\\26|\\27|\\2f|\\3a|\\3c|\\3e|\\40)|(\\5c)(20|22|26|27|2f|3a|3c|3e|40|5c)/gi;var repFN=function(found,m1,m2,m3){switch(m1||m2){case"\\20":return' ';case"\\22":return'"';case"\\26":return'&';case"\\27":return'\'';case"\\2f":return'/';case"\\3a":return':';case"\\3c":return'<';case"\\3e":return'>';case"\\40":return'@';case"\\5c":return'\\'+m3;}
return found;};return input.replace(ptn,repFN);};}
/*/opt/home/ci/hudson/home/jobs/CAXL_CSG_Optimized/workspace/trunk/build/dist/CAXL-release-2.1.1.19913/src/model/Events.js*/
if(jabberwerx){(function(){var _jwaNotifierBinding=function(dispatch,name,mode){var key='on:'+name.toLowerCase();var notifier=dispatch[key];if(!notifier&&(mode=='create')){notifier=new jabberwerx.EventNotifier(dispatch,name);dispatch[key]=notifier;}else if(notifier&&(mode=='destroy')){delete dispatch[key];}
return notifier;};var _jwaDispatchBinding=function(src,name,mode){var dispatch=(src instanceof jabberwerx.EventDispatcher)?src:src._eventDispatch;if(!(dispatch&&dispatch instanceof jabberwerx.EventDispatcher)){if(mode!='create'){return;}
dispatch=new jabberwerx.EventDispatcher(src);src._eventDispatch=dispatch;}
return _jwaNotifierBinding(dispatch,name,mode);};jabberwerx.EventObject=function(notifier,data){this.notifier=notifier;this.name=notifier.name;this.source=notifier.dispatcher.source;this.data=data;this.selected=undefined;};jabberwerx.EventNotifier=jabberwerx.JWBase.extend({init:function(dispatcher,name){this._super();this.dispatcher=dispatcher;this.name=name.toLowerCase();this._callbacks=[];},bind:function(cb){this.bindWhen(undefined,cb);},bindWhen:function(selector,cb){if(!jabberwerx.$.isFunction(cb)){new TypeError("callback must be a function");}
this.unbind(cb);switch(typeof selector){case'undefined':break;case'function':break;case'string':var filter=selector;selector=function(data,evt){var node;if(data instanceof jabberwerx.Stanza){node=data.getDoc();}else{node=data;}
var selected=jabberwerx.$(filter,node);switch(selected.length){case 0:return false;case 1:return selected[0];default:return selected;}
return false;};break;default:throw new TypeError("selector must be undefined or function or string");}
this._callbacks.push({'filter':filter,'selector':selector,'cb':cb});},unbind:function(cb){this._callbacks=jabberwerx.$.grep(this._callbacks,function(value){return value['cb']!==cb;});},trigger:function(data,delegated){var evt;if(data instanceof jabberwerx.EventObject){evt=data;evt.notifier=this;}else{evt=new jabberwerx.EventObject(this,data);}
var results=[];jabberwerx.reduce(this._callbacks,function(item){var cb=item['cb'];var filter=item['selector'];var retval;if(!cb||!jabberwerx.$.isFunction(cb)){return;}
var selected=undefined;if(filter){selected=filter(evt.data);if(!selected){return;}}
try{evt.selected=selected;retval=cb.call(cb,evt);}catch(ex){}
if(retval!==undefined){results.push(retval);}});if(!delegated){delegated=_jwaNotifierBinding(jabberwerx.globalEvents,this.name);}else if(!(delegated instanceof jabberwerx.EventNotifier)){throw new TypeError("delegated must be a EventNotifier");}
if(delegated&&delegated!==this){results=results.concat(delegated.trigger(evt));}
return results;},shouldBeSavedWithGraph:function(){return true;},wasUnserialized:function(){var callbacks=this._callbacks;callbacks=jabberwerx.$.map(callbacks,function(oneCB,oneKey){if(jabberwerx.util.isJWInvocation(oneCB.cb)){var method=oneCB.cb.methodName,target=oneCB.cb.object;if(!(target&&method&&target[method])){jabberwerx.util.debug.log("throwing out bad callback: "+target+"["+method+"]");return null;}}
if(oneCB.filter&&!oneCB.selector&&(typeof oneCB.filter=='string')){var oneFilter=oneCB.filter;oneCB.selector=function(data,evt){var node;if(data instanceof jabberwerx.Stanza){node=data.getDoc();}else{node=data;}
var selected=jabberwerx.$(oneFilter,node);switch(selected.length){case 0:return false;case 1:return selected[0];default:return selected;}
return false;};}
return oneCB;});this._callbacks=callbacks;}},"jabberwerx.EventNotifier");jabberwerx.EventDispatcher=jabberwerx.JWBase.extend({init:function(src){this._super();this.source=src;if(src!==jabberwerx&&jabberwerx.globalEvents){this.globalEvents=jabberwerx.globalEvents;}},shouldBeSavedWithGraph:function(){return true;},wasUnserialized:function(){jabberwerx.globalEvents=this.globalEvents;}},"jabberwerx.EventDispatcher");jabberwerx.GlobalEventDispatcher=jabberwerx.EventDispatcher.extend({init:function(){this._super(jabberwerx);if(jabberwerx.globalEvents&&jabberwerx.globalEvents!==this){throw new Error("only one global events dispatcher can exist!");}},bind:function(name,cb){var notifier=_jwaNotifierBinding(this,name,'create');notifier.bind(cb);},bindWhen:function(name,selector,cb){var notifier=_jwaNotifierBinding(this,name,'create');notifier.bindWhen(selector,cb);},unbind:function(name,cb){var notifier=_jwaNotifierBinding(this,name);if(notifier){notifier.unbind(cb);}},shouldBeSerializedInline:function(){return false;},shouldBeSavedWithGraph:function(){return true;},willBeSerialized:function(){this.source=undefined;},wasUnserialized:function(){this.source=jabberwerx;}},"jabberwerx.GlobalEventDispatcher");if(!(jabberwerx.globalEvents&&jabberwerx.globalEvents instanceof jabberwerx.GlobalEventDispatcher)){jabberwerx.globalEvents=new jabberwerx.GlobalEventDispatcher();}
jabberwerx.JWModel.prototype.event=function(name){return _jwaDispatchBinding(this,name);};jabberwerx.JWModel.prototype.applyEvent=function(name){return _jwaDispatchBinding(this,name,'create');};})();}
/*/opt/home/ci/hudson/home/jobs/CAXL_CSG_Optimized/workspace/trunk/build/dist/CAXL-release-2.1.1.19913/src/model/Entity.js*/
if(jabberwerx){(function(){var __jwesAsKey=function(jid,node){return"["+(jid||"")+"]:["+(node||"")+"]";};jabberwerx.Entity=jabberwerx.JWModel.extend({init:function(key,ctrl){this._super();if(!key&&!(key.jid||key.node)){throw new TypeError("key must contain a jid and/or a node");}
if(key.jid){this.jid=jabberwerx.JID.asJID(key.jid);}
if(key.node){this.node=key.node;}
this._mapKey=__jwesAsKey(this.jid,this.node);var cache;if(ctrl instanceof jabberwerx.Controller){this.controller=ctrl;cache=ctrl.client&&ctrl.client.entitySet;}else if(ctrl&&ctrl.register&&ctrl.unregister&&ctrl.entity){cache=ctrl;}
if(cache){this.cache=cache;this._eventing={"added":cache.event("entityCreated"),"updated":cache.event("entityUpdated"),"deleted":cache.event("entityDestroyed")};}else{this._eventing={"added":null,"updated":null,"deleted":null};}
this.applyEvent('primaryPresenceChanged');this.applyEvent("resourcePresenceChanged");if(jabberwerx.$.browser.msie){this.toString=function(){return this.__toStringValue();}}},destroy:function(){if(this.cache){this.cache.unregister(this);}
this._super();},apply:function(entity,noupdate){if(!(entity&&entity instanceof jabberwerx.Entity)){throw new TypeError("entity is not valid");}
jabberwerx.$.extend(this,{_displayName:entity._displayName,_groups:jabberwerx.$.extend([],entity._groups),_presenceList:jabberwerx.$.extend([],entity._presenceList),properties:jabberwerx.$.extend(true,{},entity.properties),features:jabberwerx.$.extend([],entity.features),identities:jabberwerx.$.extend([],entity.identities)});if(!noupdate){this.update();}
return this;},__toStringValue:function(){return"entity<"+this.getClassName()+">["+
this._mapKey+"]: "+
this.getDisplayName();},matches:function(entity){if(entity===this){return true;}
if(!entity){return false;}
return this._mapKey==entity._mapKey;},isActive:function(){return(this._presenceList.length>0&&this._presenceList[0].getType()!="unavailable");},getPrimaryPresence:function(){return this._presenceList[0]||null;},getAllPresence:function(){return this._presenceList;},getResourcePresence:function(resource){var fullJid=this.jid.getBareJIDString()+'/'+resource;var presence=null;jabberwerx.$.each(this._presenceList,function(){if(this.getFrom()==fullJid){presence=this;return false;}
return true;});return presence;},updatePresence:function(presence){var retVal=false;if(!presence){if(this.getPrimaryPresence()){var len=this._presenceList.length;for(var i=0;i<len;i++){var presence=this._presenceList.pop();this.event("resourcePresenceChanged").trigger({fullJid:presence.getFromJID(),presence:null,nowAvailable:false});}
this.event("primaryPresenceChanged").trigger({presence:null,fullJid:this.jid.getBareJID()});retVal=true;}}else{if(!(presence instanceof jabberwerx.Presence)){throw new TypeError("presence is not a valid type");}
var jid=presence.getFromJID();if(jid.getBareJIDString()!=this.jid.getBareJIDString()){throw new jabberwerx.Entity.InvalidPresenceError("presence is not for this entity: "+this);}
if(presence.getType()&&presence.getType()!="unavailable"){throw new jabberwerx.Entity.InvalidPresenceError("presence is not the correct type");}
var resPresence=this.getResourcePresence(jid.getResource());var nowAvailable;if(!resPresence||resPresence.getType()=="unavailable"){nowAvailable=Boolean(!presence.getType());}else{nowAvailable=false;}
var primaryPresence=this._presenceList[0]||null;this._removePresenceFromList(jid.toString());if(presence.getType()!="unavailable"){if(!this.isActive()){this._clearPresenceList();}
this._insertPresence(presence);}else{this._handleUnavailable(presence);}
this.event("resourcePresenceChanged").trigger({fullJid:jid,presence:presence,nowAvailable:nowAvailable});if(primaryPresence!==this._presenceList[0]){var primaryJid;primaryPresence=this._presenceList[0]||null;primaryJid=primaryPresence?primaryPresence.getFromJID():jid.getBareJID();this.event("primaryPresenceChanged").trigger({presence:primaryPresence,fullJid:primaryJid});retVal=true;}}
return retVal;},_handleUnavailable:function(presence){},_insertPresence:function(presence){this._presenceList.push(presence);this._presenceList.sort(function(a,b){return b.compareTo(a);});},_clearPresenceList:function(){this._presenceList=[];},_removePresenceFromList:function(jid){for(var i=0;i<this._presenceList.length;i++){if(this._presenceList[i].getFrom()==jid){this._presenceList.splice(i,1);return true;}}
return false;},getDisplayName:function(){var name=this._displayName;if(!name){var jid=(this.jid&&this.jid.toDisplayString());name=(this.node&&"{"+this.node+"}")+(jid||"");}
return name;},setDisplayName:function(name){var nval=(String(name)||"");var oval=this._displayName;if(oval!=nval){this._displayName=nval;this.update();}},_displayName:"",getGroups:function(){return this._groups;},setGroups:function(groups){if(jabberwerx.$.isArray(groups)){groups=jabberwerx.unique(groups.concat([]));}else if(groups){groups=[groups.toString()];}else{groups=[];}
this._groups=groups;this.update();},_groups:[],update:function(){if(this.controller&&this.controller.updateEntity){this.controller.updateEntity(this);}else if(this._eventing["updated"]){this._eventing["updated"].trigger(this);}},remove:function(){if(this.controller&&this.controller.removeEntity){this.controller.removeEntity(this);}else{this.destroy();}},hasFeature:function(feat){if(!feat){return false;}
var result=false;jabberwerx.$.each(this.features,function(){result=String(this)==feat;return!result;});return result;},hasIdentity:function(id){if(!id){return false;}
var result=false;jabberwerx.$.each(this.identities,function(){result=String(this)==id;return!result;});return result;},toString:function(){return this.__toStringValue();},jid:null,node:"",properties:{},features:[],identities:[],_presenceList:[]},'jabberwerx.Entity');jabberwerx.Entity.InvalidPresenceError=jabberwerx.util.Error.extend("The provided presence is not valid for this entity");jabberwerx.EntitySet=jabberwerx.JWModel.extend({init:function(){this._super();this.applyEvent("entityCreated");this.applyEvent("entityDestroyed");this.applyEvent("entityUpdated");this.applyEvent("entityRenamed");this.applyEvent("entityAdded");this.applyEvent("entityRemoved");this.applyEvent("batchUpdateStarted");this.applyEvent("batchUpdateEnded");},entity:function(jid,node){return this._map[__jwesAsKey(jid,node)];},register:function(entity){if(!(entity&&entity instanceof jabberwerx.Entity)){throw new TypeError("entity is not an Entity");}
var prev=this.entity(entity.jid,entity.node);if(prev===entity){return false;}
if(prev){this.unregister(prev);}
this._updateToMap(entity);this.event("entityAdded").trigger(entity);return true;},unregister:function(entity){var present=(this.entity(entity.jid,entity.node)!==undefined);this._removeFromMap(entity);if(present){this.event("entityRemoved").trigger(entity);}
return present;},_renameEntity:function(entity,njid,nnode){var ojid=entity.jid;var onode=entity.node;this._removeFromMap(entity);if(njid){njid=jabberwerx.JID.asJID(njid);}else{njid=undefined;}
entity.jid=njid;if(nnode){nnode=String(nnode);}else{nnode=undefined;}
entity.node=nnode;this._updateToMap(entity);var data={entity:entity,jid:ojid,node:nnode};this.event("entityRenamed").trigger(data);},each:function(op){if(!jabberwerx.$.isFunction(op)){throw new TypeError('operator must be a function');}
var that=this;jabberwerx.$.each(this._map,function(){var retcode;if(this instanceof jabberwerx.Entity){retcode=op(this);}
return(retcode!==false);});},toArray:function(){var arr=[];this.each(function(entity){arr.push(entity);});return arr;},getAllGroups:function(){var groups=[];this.each(function(entity){jabberwerx.$.merge(groups,entity.getGroups());});return jabberwerx.unique(groups);},_map:{},_updateToMap:function(ent){this._map[__jwesAsKey(ent.jid,ent.node)]=ent;},_removeFromMap:function(ent){delete this._map[__jwesAsKey(ent.jid,ent.node)];}},'jabberwerx.EntitySet');jabberwerx.EntitySet.EntityAlreadyExistsError=jabberwerx.util.Error.extend('That JID is already taken!.');})();}
/*/opt/home/ci/hudson/home/jobs/CAXL_CSG_Optimized/workspace/trunk/build/dist/CAXL-release-2.1.1.19913/src/model/Stanza.js*/
if(jabberwerx){jabberwerx.Stanza=jabberwerx.JWModel.extend({init:function(root){this._super();var builder=new jabberwerx.NodeBuilder();if(jabberwerx.isElement(root)){builder=builder.node(root);}else if(typeof(root)=="string"){if(!(/^\{[^\}]*\}/.test(root))){root="{jabber:client}"+root;}
builder=builder.element(root);}else{throw new TypeError("root must be an element or expanded-name");}
this._DOM=builder.data;var date=new Date();var dateString=jabberwerx.$(builder.data).find("x[xmlns='jabber:x:delay'][stamp]").attr("stamp");if(!dateString){dateString=jabberwerx.$(builder.data).find("delay[xmlns='urn:xmpp:delay'][stamp]").attr("stamp");}
if(dateString){try{date=jabberwerx.parseTimestamp(dateString);}catch(ex){jabberwerx.util.debug.log("could not parse delay: "+ex);}}
this.timestamp=date;},getNode:function(){return this._DOM;},getDoc:function(){return this.getNode().ownerDocument;},xml:function(){return jabberwerx.util.serializeXML(this._DOM);},pType:function(){return this.getNode().nodeName;},_getAttrValue:function(name){return this.getNode().getAttribute(name);},_setAttrValue:function(name,val){if(val===undefined||val===null){this.getNode().removeAttribute(name);}else{this.getNode().setAttribute(name,val);}},_getChildText:function(name){var nnode=new jabberwerx.NodeBuilder(name).data;var nodens=(nnode.namespaceURI)?nnode.namespaceURI:this.getNode().namespaceURI;var matches=jabberwerx.$(this.getNode()).children(nnode.nodeName).map(function(idx,child){return child.namespaceURI==nodens?child:null;});return matches.length?jabberwerx.$(matches[0]).text():null;},_setChildText:function(name,val){var n=jabberwerx.$(this.getNode()).children(name);if(val===undefined||val===null){n.remove();}else{if(!n.length){n=jabberwerx.$(new jabberwerx.NodeBuilder(this.getNode()).element(name).data);}
n.text(val);}},getType:function(){return this._getAttrValue("type");},setType:function(type){this._setAttrValue("type",type||undefined);},getID:function(){return this._getAttrValue("id");},setID:function(id){this._setAttrValue("id",id||undefined);},getFrom:function(){return this._getAttrValue("from")||null;},getFromJID:function(){var addr=this.getFrom();if(addr){try{addr=jabberwerx.JID.asJID(addr);}catch(ex){jabberwerx.util.debug.log("could not parse 'from' address: "+ex);addr=null;}}
return addr;},setFrom:function(addr){addr=(addr)?jabberwerx.JID.asJID(addr):undefined;this._setAttrValue("from",addr);},getTo:function(){return this._getAttrValue("to")||null;},getToJID:function(){var addr=this.getTo();if(addr){try{addr=jabberwerx.JID.asJID(addr);}catch(ex){jabberwerx.util.debug.log("could not parse 'to' address: "+ex);addr=null;}}
return addr;},setTo:function(addr){addr=(addr)?jabberwerx.JID.asJID(addr):undefined;this._setAttrValue("to",addr);},isError:function(){return this.getType()=="error";},getErrorInfo:function(){var err=jabberwerx.$(this.getNode()).children("error");if(this.isError()&&err.length){err=jabberwerx.Stanza.ErrorInfo.createWithNode(err.get(0));}else{err=null;}
return err;},clone:function(){var cpy=jabberwerx.Stanza.createWithNode(this.getNode());cpy.timestamp=this.timestamp;return cpy;},swap:function(include_from){var cpy=this.clone();cpy.setTo(this.getFromJID());cpy.setFrom(include_from?this.getToJID():null);return cpy;},errorReply:function(err){if(!(err&&err instanceof jabberwerx.Stanza.ErrorInfo)){throw new TypeError("err must be an ErrorInfo");}
var retval=this.swap();retval.setType("error");var builder=new jabberwerx.NodeBuilder(retval.getNode()).xml(err.getNode().xml);return retval;},willBeSerialized:function(){this.timestamp=this.timestamp.getTime();this._serializedXML=this._DOM.xml;delete this._DOM;},wasUnserialized:function(){if(this._serializedXML&&this._serializedXML.length){this._DOM=jabberwerx.util.unserializeXML(this._serializedXML);delete this._serializedXML;}
this.timestamp=this.timestamp?new Date(this.timestamp):new Date();},timestamp:null,_DOM:null},"jabberwerx.Stanza");jabberwerx.Stanza.ErrorInfo=jabberwerx.JWModel.extend({init:function(type,cond,text){this._super();this.type=type||"wait";this.condition=cond||"{urn:ietf:params:xml:ns:xmpp-stanzas}internal-server-error";this.text=text||"";this.toString=this._toErrString;},getNode:function(){var builder=new jabberwerx.NodeBuilder("error");builder.attribute("type",this.type);builder.element(this.condition);if(this.text){builder.element("{urn:ietf:params:xml:ns:xmpp-stanzas}text").text(this.text);}
return builder.data;},wasUnserialized:function(){this.toString=this._toErrString;},_toErrString:function(){return this.condition;},type:"",condition:"",text:""},"jabberwerx.Stanza.ErrorInfo");jabberwerx.Stanza.ErrorInfo.createWithNode=function(node){if(!jabberwerx.isElement(node)){throw new TypeError("node must be an Element");}
node=jabberwerx.$(node);var type=node.attr("type");var cond=node.children("[xmlns=urn:ietf:params:xml:ns:xmpp-stanzas]:not(text)").map(function(){return"{urn:ietf:params:xml:ns:xmpp-stanzas}"+this.nodeName;}).get(0);var text=node.children("text[xmlns=urn:ietf:params:xml:ns:xmpp-stanzas]").text();return new jabberwerx.Stanza.ErrorInfo(type,cond,text);};jabberwerx.Stanza.ERR_BAD_REQUEST=new jabberwerx.Stanza.ErrorInfo("modify","{urn:ietf:params:xml:ns:xmpp-stanzas}bad-request");jabberwerx.Stanza.ERR_CONFLICT=new jabberwerx.Stanza.ErrorInfo("modify","{urn:ietf:params:xml:ns:xmpp-stanzas}conflict");jabberwerx.Stanza.ERR_FEATURE_NOT_IMPLEMENTED=new jabberwerx.Stanza.ErrorInfo("cancel","{urn:ietf:params:xml:ns:xmpp-stanzas}feature-not-implemented");jabberwerx.Stanza.ERR_FORBIDDEN=new jabberwerx.Stanza.ErrorInfo("auth","{urn:ietf:params:xml:ns:xmpp-stanzas}forbidden");jabberwerx.Stanza.ERR_INTERNAL_SERVER_ERROR=new jabberwerx.Stanza.ErrorInfo("wait","{urn:ietf:params:xml:ns:xmpp-stanzas}internal-server-error");jabberwerx.Stanza.ERR_ITEM_NOT_FOUND=new jabberwerx.Stanza.ErrorInfo("cancel","{urn:ietf:params:xml:ns:xmpp-stanzas}item-not-found");jabberwerx.Stanza.ERR_JID_MALFORMED=new jabberwerx.Stanza.ErrorInfo("modify","{urn:ietf:params:xml:ns:xmpp-stanzas}jid-malformed");jabberwerx.Stanza.ERR_NOT_ACCEPTABLE=new jabberwerx.Stanza.ErrorInfo("modify","{urn:ietf:params:xml:ns:xmpp-stanzas}not-acceptable");jabberwerx.Stanza.ERR_NOT_ALLOWED=new jabberwerx.Stanza.ErrorInfo("cancel","{urn:ietf:params:xml:ns:xmpp-stanzas}not-allowed");jabberwerx.Stanza.ERR_NOT_AUTHORIZED=new jabberwerx.Stanza.ErrorInfo("auth","{urn:ietf:params:xml:ns:xmpp-stanzas}not-authorized");jabberwerx.Stanza.ERR_SERVICE_UNAVAILABLE=new jabberwerx.Stanza.ErrorInfo("wait","{urn:ietf:params:xml:ns:xmpp-stanzas}service-unavailable");jabberwerx.Stanza.ERR_REMOTE_SERVER_TIMEOUT=new jabberwerx.Stanza.ErrorInfo("wait","{urn:ietf:params:xml:ns:xmpp-stanzas}remote-server-timeout");jabberwerx.Stanza.createWithNode=function(node){if(!jabberwerx.isElement(node)){throw new TypeError("node must be an element");}
var stanza;switch(node.nodeName){case"iq":stanza=new jabberwerx.IQ(node);break;case"message":stanza=new jabberwerx.Message(node);break;case"presence":stanza=new jabberwerx.Presence(node);break;default:stanza=new jabberwerx.Stanza(node);break;}
return stanza;};jabberwerx.IQ=jabberwerx.Stanza.extend({init:function(packet){if(packet){if(!jabberwerx.isElement(packet)){throw new TypeError("packet must be an <iq/> Element");}
if(packet.nodeName!="iq"){throw new TypeError("packet must be an <iq/> Element");}}
this._super(packet||"{jabber:client}iq");},getQuery:function(){return jabberwerx.$(this.getNode()).children(":not(error)").get(0);},setQuery:function(payload){if(payload&&!jabberwerx.isElement(payload)){throw new TypeError("Node must be an element");}
var q=jabberwerx.$(this.getNode()).children(":not(error)");q.remove();if(payload){new jabberwerx.NodeBuilder(this.getNode()).node(payload);}},reply:function(payload){var retval=this.swap();try{jabberwerx.$(retval.getNode()).empty();}catch(ex){var n=retval.getNode();for(var idx=0;idx<n.childNodes.length;idx++){n.removeChild(n.childNodes[idx]);}}
if(payload){var builder=new jabberwerx.NodeBuilder(retval.getNode());if(jabberwerx.isElement(payload)){builder.node(payload);}else if(typeof(payload)=="string"){builder.xml(payload);}else{throw new TypeError("payload must be an Element or XML representation of an Element");}}
retval.setType("result");return retval;}},"jabberwerx.IQ");jabberwerx.Message=jabberwerx.Stanza.extend({init:function(packet){if(packet){if(!jabberwerx.isElement(packet)){throw new TypeError("Must be a <message/> element");}
if(packet.nodeName!="message"){throw new TypeError("Must be a <message/> element");}}
this._super(packet||"{jabber:client}message");},getBody:function(){return this._getChildText("body");},setBody:function(body){this.setHTML();this._setChildText("body",body||undefined);},getHTML:function(){var ret=jabberwerx.$(this.getNode()).find("html[xmlns=http://jabber.org/protocol/xhtml-im]>body[xmlns=http://www.w3.org/1999/xhtml]:first");if(ret.length&&!this._isSanitized){this.setHTML(ret.children().get());return this.getHTML();}
return ret.length?ret.get(0):null;},setHTML:function(html){if(html&&!jabberwerx.util.isString(html)&&!jabberwerx.isElement(html)&&(!jabberwerx.$.isArray(html)||!html.length)){throw new TypeError("html must be a string, DOM or an array");}
this._isSanitized=false;var htmlNode=jabberwerx.$(this.getNode()).find("html[xmlns=http://jabber.org/protocol/xhtml-im]");if(htmlNode){htmlNode.remove();}
this._setChildText("body");if(html){if(jabberwerx.util.isString(html)){html=jabberwerx.util.unserializeXML(html);}
if(jabberwerx.$.isArray(html)){var newBodyBuilder=new jabberwerx.NodeBuilder("{http://www.w3.org/1999/xhtml}body");jabberwerx.$.each(html,function(index,item){newBodyBuilder.node(item);});html=newBodyBuilder.data;}else if(html.nodeName!="body"){html=jabberwerx.util.unserializeXML("<body xmlns='http://www.w3.org/1999/xhtml'>"+html.xml+"</body>");}
jabberwerx.xhtmlim.sanitize(html);htmlNode=new jabberwerx.NodeBuilder("{http://jabber.org/protocol/xhtml-im}html").node(html).parent.data;jabberwerx.$(this.getNode()).append(htmlNode.cloneNode(true));this._setChildText("body",jabberwerx.$(htmlNode).text());this._isSanitized=true;}},getSubject:function(){return this._getChildText("subject");},setSubject:function(subject){this._setChildText("subject",subject||undefined);},getThread:function(){return this._getChildText("thread")||null;},setThread:function(thread){this._setChildText("thread",thread||undefined);},_isSanitized:false},"jabberwerx.Message");jabberwerx.Message.translate=function(content,displayName){var xep0245Found=false;var textNodeFound=false;var translatedContent=null;var findTextNodes=function(element,displayName){if(!xep0245Found&&!textNodeFound){if(jabberwerx.isText(element)){var replace=translateSlashMe(jabberwerx.$(element).text(),displayName);if(xep0245Found){jabberwerx.$(element).replaceWith(replace);}else{textNodeFound=true;}}else if(element.hasChildNodes()){for(var i=0;i<element.childNodes.length;i++){findTextNodes(element.childNodes[i],displayName);}}}};var translateSlashMe=function(rawText,displayName){var slashMe="/me ";if(rawText.substring(0,slashMe.length).toLowerCase()==slashMe){xep0245Found=true;return("* "+displayName+" "+rawText.substring(slashMe.length));}
return rawText;};if(typeof content=="string"){content=translateSlashMe(content,displayName);}else if(jabberwerx.isElement(content)){for(var i=0;i<content.childNodes.length;i++){if(!xep0245Found&&!textNodeFound){findTextNodes(content.childNodes[i],displayName);}else{break;}}}else{throw new jabberwerx.Message.InvalidContentFormat();}
if(xep0245Found){translatedContent=content;}
return translatedContent;};jabberwerx.Message.InvalidContentFormat=jabberwerx.util.Error.extend('The content parameter must be of type string or a jQuery object.');jabberwerx.Presence=jabberwerx.Stanza.extend({init:function(packet){if(packet){if(!jabberwerx.isElement(packet)){throw new TypeError("packet must be a <presence/> Element");}
if(packet.nodeName!="presence"){throw new TypeError("packet must be a <presence/> Element");}}
this._super(packet||"{jabber:client}presence");},getPriority:function(){var pri=this._getChildText("priority");pri=(pri)?parseInt(pri):0;return!isNaN(pri)?pri:0;},setPriority:function(pri){if(pri!==undefined&&pri!==null&&typeof(pri)!="number"){throw new TypeError("new priority must be a number or undefined");}
this._setChildText("priority",pri);},getShow:function(){return this._getChildText("show")||jabberwerx.Presence.SHOW_NORMAL;},setShow:function(show){if(show&&(show!=jabberwerx.Presence.SHOW_AWAY&&show!=jabberwerx.Presence.SHOW_CHAT&&show!=jabberwerx.Presence.SHOW_DND&&show!=jabberwerx.Presence.SHOW_XA)){throw new TypeError("show must be undefined or one of 'away', 'chat', 'dnd', or 'xa'");}
this._setChildText("show",show||undefined);},getStatus:function(){return this._getChildText("status")||null;},setStatus:function(status){this._setChildText("status",status||undefined);},compareTo:function(presence){if(!(presence&&presence instanceof jabberwerx.Presence)){throw new TypeError("presence must be an instanceof jabberwerx.Presence");}
var p1,p2;p1=this.getPriority()||0;p2=presence.getPriority()||0;if(p1>p2){return 1;}else if(p1<p2){return-1;}
p1=this._showStrToInt(this.getType()||this.getShow());p2=this._showStrToInt(presence.getType()||presence.getShow());if(p1>p2){return 1;}else if(p1<p2){return-1;}
p1=this.timestamp;p2=presence.timestamp;if(p1>p2){return 1;}else if(p1<p2){return-1;}
return 0;},_showStrToInt:function(showStr){showStr=(showStr?showStr:"");switch(showStr){case'chat':return 5;case'':return 4;case'away':return 3;case'xa':return 2;case'dnd':return 1;case'unavailable':return 0;default:return-1;}},setPresence:function(show,status,priority){if(show){this.setShow(show);}
if(status){this.setStatus(status);}
if(priority!==undefined&&priority!==null){this.setPriority(priority);}
return this;}},"jabberwerx.Presence");jabberwerx.Presence.SHOW_AWAY="away";jabberwerx.Presence.SHOW_CHAT="chat";jabberwerx.Presence.SHOW_DND="dnd";jabberwerx.Presence.SHOW_NORMAL="";jabberwerx.Presence.SHOW_XA="xa";}
/*/opt/home/ci/hudson/home/jobs/CAXL_CSG_Optimized/workspace/trunk/build/dist/CAXL-release-2.1.1.19913/src/model/User.js*/
if(jabberwerx){jabberwerx.User=jabberwerx.Entity.extend({init:function(jid,cache){this._super({jid:jid},cache);}},'jabberwerx.User');jabberwerx.LocalUser=jabberwerx.User.extend({getDisplayName:function(){return this._displayName||jabberwerx.JID.unescapeNode(this.jid.getNode());}},'jabberwerx.LocalUser');}
/*/opt/home/ci/hudson/home/jobs/CAXL_CSG_Optimized/workspace/trunk/build/dist/CAXL-release-2.1.1.19913/src/model/Stream.js*/
if(jabberwerx){jabberwerx.Stream=jabberwerx.JWModel.extend({init:function(){this.applyEvent("streamOpened");this.applyEvent("streamClosed");this.applyEvent("streamElementsReceived");this.applyEvent("streamElementsSent");this._recvQ=new jabberwerx.Stream.Queue();this._sendQ=new jabberwerx.Stream.Queue();this._xhrs=new jabberwerx.Stream.Queue();this._xhrSetup={cache:false,complete:this.invocation("_handleXHR"),contentType:"text/xml",dataType:"text",global:false,processData:false,type:"POST"};},getProperties:function(){return jabberwerx.$.extend(true,{},this._boshProps);},isOpen:function(){return this._opened;},isSecure:function(){return this._boshProps.secure||false;},getDomain:function(){return this._boshProps.domain||null;},getSessionID:function(){return this._boshProps.sid||null;},getTimeout:function(){return this._boshProps.timeout||60;},open:function(params){if(this.isOpen()){throw new jabberwerx.Stream.AlreadyOpenError();}
this._reset();this._boshProps=jabberwerx.$.extend({},params||{});if(!this._boshProps.domain){throw new TypeError("domain must be specified");}
if(!this._boshProps.timeout){this._boshProps.timeout=jabberwerx.Stream.DEFAULT_TIMEOUT;}
if(!this._boshProps.wait){this._boshProps.wait=jabberwerx.Stream.DEFAULT_WAIT;}
var url=/^(?:(?:([0-9a-zA-Z]+\:)\/\/)?([0-9a-zA-Z\.\-]+(?:\:[0-9]+)?))?(?:\/(.*))?$/.exec(this._boshProps.httpBindingURL||"");if(!url){throw new TypeError("httpBindingURL not specified correctly");}
if(!url[1]){url[1]=document.location.protocol;}
if(!url[2]){url[2]=document.location.host;}
if(!url[3]){url[3]="";}
this._boshProps.httpBindingURL=url[1]+"//"+url[2]+"/"+url[3];this._boshProps.secure=this._boshProps.secure||(url[1]=="https:");this._boshProps.networkAttempts=0;this._boshProps.operation="open";this._sendRequest();this._boshProps.heartbeat=setInterval(this.invocation("_heartbeat"),jabberwerx.Stream.HEARTBEAT_INTERVAL);},reopen:function(){if(!this.isOpen()){throw new jabberwerx.Stream.NotOpenError();}
this._boshProps.opening=setTimeout(this.invocation("_handleOpen"),2000);this._boshProps.operation="reopen";this._sendRequest({restart:true});},close:function(){if(this.isOpen()){this._sendRequest({type:"terminate"});}
this._reset();},send:function(elem){if(!jabberwerx.isElement(elem)){throw new TypeError("elem must be a DOM element");}
if(!this.isOpen()){throw new jabberwerx.Stream.NotOpenError();}
this._sendQ.enque(elem);},_sendRequest:function(props,data){props=jabberwerx.$.extend({},this._boshProps,props);data=data||[];var rid=0,body;var resend=false;if(props.resend){rid=props.resend.id;body=jabberwerx.util.unserializeXML(props.resend.body);resend=true;data=jabberwerx.$(body).children();this._boshProps.rid=rid+1;delete this._boshProps.resend;}else{if(this._xhrs.size()>1&&data.length){this._sendQ.enque(data);return;}
if(!this._boshProps.rid){var initial;initial=Math.floor(Math.random()*4294967296);initial=(initial<=32768)?initial+32768:initial;this._boshProps.rid=initial;}else if(this._boshProps.rid>=9007199254740991){var err=new jabberwerx.Stream.ErrorInfo("{urn:ietf:params:xml:ns:xmpp-streams}policy-violation","BOSH maximum rid exceeded");this._handleClose(er.getNode());return;}
rid=this._boshProps.rid++;body=new jabberwerx.NodeBuilder("{http://jabber.org/protocol/httpbind}body");if(props.type){body.attribute("type",props.type);this._boshProps.type=props.type;}
if(!this._boshProps.sid){if(data.length){this._sendQ.enque(data);data=[];}
body.attribute("xmlns:xmpp","urn:xmpp:xbosh").attribute("hold","1").attribute("ver","1.9").attribute("to",props.domain).attribute("secure",props.secure).attribute("wait",props.wait||30).attribute("{urn:xmpp:xbosh}xmpp:version","1.0");}else{body.attribute("sid",this._boshProps.sid);if(props.restart){body.attribute("{urn:xmpp:xbosh}xmpp:restart","true").attribute("to",props.domain);this._boshProps.restart=true;}}
body.attribute("rid",rid);if(data.length){for(var idx=0;idx<data.length;idx++){body.node(data[idx]);}}
body=body.data;}
if(!this._boshProps.requests){this._boshProps.requests=new jabberwerx.Stream.Queue();}
this._boshProps.requests.enque({id:rid,body:body.xml});var setup={async:!(props.type=="terminate"),data:this._boshProps.requests.tail().body,timeout:this._boshProps.wait*1000+5000,url:this._boshProps.httpBindingURL};setup=jabberwerx.$.extend(setup,this._xhrSetup);var xhr=jabberwerx.$.ajax(setup);if(setup.async){this._xhrs.enque(xhr);}
if(!resend&&data.length){this.event("streamElementsSent").trigger(jabberwerx.$(data));}},_heartbeat:function(){var elems=this._recvQ.empty();if(elems.length){elems=jabberwerx.$(elems);this.event("streamElementsReceived").trigger(elems);}
if(!this.isOpen()&&!this._boshProps.operation){return;}
if(!this._sendQ.size()&&this._xhrs.size()){return;}
this._sendRequest({},this._sendQ.empty());},_handleXHR:function(xhr,status){if(this._dehydrated){return;}
this._xhrs.deque(xhr);var failFn=function(err,resend){if(!this._boshProps){return;}
if(this._boshProps.type=="terminate"){return;}
if(this._boshProps.networkAttempts++<3){jabberwerx.util.debug.log("network timeout retry "+
this._boshProps.networkAttempts);if(resend){resend=this._boshProps.requests.deque();}
if(resend){this._boshProps.resend=resend;}
return;}
this._handleClose(err&&err.getNode());};if(status!="success"){var err;switch(status){case"timeout":err=jabberwerx.Stream.ERR_REMOTE_SERVER_TIMEOUT;break;case"error":err=jabberwerx.Stream.ERR_SERVICE_UNAVAILABLE;break;case"parseerror":err=jabberwerx.Stream.ERR_XML_NOT_WELL_FORMED;break;default:err=jabberwerx.Stream.ERR_UNDEFINED_CONDITION;break;}
failFn.call(this,err,true);return;}
var dom=xhr.responseText;if(!dom){failFn.call(this,jabberwerx.Stream.ERR_XML_NOT_WELL_FORMED);return;}
try{dom=jabberwerx.util.unserializeXML(dom);}catch(ex){failFn.call(this,jabberwerx.Stream.ERR_XML_NOT_WELL_FORMED);return;}
if(!dom){failFn.call(this,jabberwerx.Stream.ERR_XML_NOT_WELL_FORMED);return;}
dom=jabberwerx.$(dom);if(!dom.is("body[xmlns='http://jabber.org/protocol/httpbind']")){failFn.call(this,jabberwerx.Stream.ERR_SERVICE_UNAVAILABLE);return;}
this._boshProps.networkAttempts=0;if(this._boshProps&&this._boshProps.requests){this._boshProps.requests.deque();}
var content=dom.children();if(!this._boshProps.sid){var attr;attr=dom.attr("sid");if(attr){this._boshProps.sid=attr;}
attr=dom.attr("wait");if(attr){this._boshProps.wait=parseInt(attr);}
attr=dom.attr("inactivity");if(attr){this._boshProps.timeout=parseInt(attr);}}else if(!this._boshProps.restart&&dom.attr("ack")){var rid=this._boshProps.rid-1;var ack=parseInt(dom.attr("ack"));var resend=this._boshProps.requests.find(function(item){return(item.id==ack)?item:null;});var err;if(rid!=ack&&(rid+1)!=ack){if(resend){jabberwerx.util.debug.log("resending unacknowledged rid "+ack);this._boshProps.requests.deque(resend);this._sendRequest({resend:resend});}else{jabberwerx.util.debug.log("acknowledged rid "+ack+" outside accepted window ("+
rid+".."+(rid+1)+")!");this._handleClose(jabberwerx.Stream.ERR_REMOTE_CONNECTION_FAILED.getNode());return;}}}
if(content.length){var feats=null,err=null;content=content.map(function(){switch(this.nodeName){case"stream:features":feats=this;break;case"stream:error":err=this;break;default:return this;}
return null;});if(feats){this._handleOpen(feats);}
if(content.length){this._recvQ.enque(content.get());}
if(err){this._handleClose(err);return;}}
var err;switch(dom.attr("type")||this._boshProps.type){case"terminate":if(!this._boshProps.type){switch(dom.attr("condition")||""){case"":err=null;break;case"bad-request":err=jabberwerx.Stream.ERR_BAD_REQUEST;break;case"host-gone":err=jabberwerx.Stream.ERR_SERVICE_UNAVAILABLE;break;case"other-request":err=jabberwerx.Stream.ERR_CONFLICT;break;case"policy-violation":err=jabberwerx.Stream.ERR_POLICY_VIOLATION;break;case"system-shutdown":err=jabberwerx.Stream.ERR_SYSTEM_SHUTDOWN;break;default:err=jabberwerx.Stream.ERR_UNDEFINED_CONDITION;break;}}
this._handleClose(err&&err.getNode());return;case"error":break;}},_handleOpen:function(feats){if(this._boshProps.opening){clearTimeout(this._boshProps.opening);delete this._boshProps.opening;}
delete this._boshProps.restart;delete this._boshProps.operation;if(!jabberwerx.isElement(feats)){feats=new jabberwerx.NodeBuilder("{http://etherx.jabber.org/streams}stream:features");feats.element("{urn:ietf:params:xml:ns:xmpp-bind}bind");feats.element("{urn:ietf:params:xml:ns:xmpp-session}session");feats=feats.data;}
var that=this;setTimeout(function(){that._opened=true;that.event("streamOpened").trigger(feats);},1);},_handleClose:function(err){var open=this.isOpen();var oper=this._boshProps.operation;this._reset();if(open||oper){var that=this;setTimeout(function(){that.event("streamClosed").trigger(err);},1);}},_reset:function(){clearInterval(this._boshProps.heartbeat);this._opened=false;this._boshProps={};this._sendQ.empty();this._xhrs.empty();},willBeSerialized:function(){this._dehydrated=true;if(this._boshProps&&this._boshProps.networkAttempts){this._boshProps.networkAttempts--;}
if(this.isOpen()){clearInterval(this._boshProps.heartbeat);}
var elems;elems=this._sendQ.empty();elems=jabberwerx.$.map(elems,function(){return this.xml;});this._sendQ.enque(elems);elems=this._recvQ.empty();elems=jabberwerx.$.map(elems,function(){return this.xml;});this._recvQ.empty();delete this._xhrs;},wasUnserialized:function(){this._xhrs=new jabberwerx.Stream.Queue();var elems;elems=this._sendQ.empty();elems=jabberwerx.$.map(elems,function(){return jabberwerx.util.unserializeXML(String(this));});this._sendQ.enque(elems);delete this._dehydrated;if(this.isOpen()){this._boshProps.resend=this._boshProps.requests.deque();this._boshProps.heartbeat=setInterval(this.invocation("_heartbeat"),jabberwerx.Stream.HEARTBEAT_INTERVAL);}},_opened:false,_boshProps:{},_xhrSetup:{},_xhrs:null,_sendQ:null,_recvQ:null},"jabberwerx.Stream");jabberwerx.Stream.Queue=jabberwerx.JWModel.extend({init:function(){this._super();},head:function(){return this._q||null;},tail:function(){return this._q[this._q.length-1]||null;},enque:function(item){for(var idx=0;idx<arguments.length;idx++){item=arguments[idx];var tmp=[this._q.length,0].concat(item);this._q.splice.apply(this._q,tmp);}
return this.size();},deque:function(item){if(item!==undefined){var idx=jabberwerx.$.inArray(item,this._q);if(idx!=-1){this._q.splice(idx,1);}else{item=null;}}else{item=this._q.shift()||null;}
return item;},find:function(cmp){if(!jabberwerx.$.isFunction(cmp)){throw new TypeError("comparator must be a function");}
var result=null;jabberwerx.$.each(this._q,function(){result=cmp(this);return(result!==undefined);});return result;},empty:function(){var q=this._q;this._q=[];return q;},size:function(){return this._q.length;},_q:[]},"jabberwerx.Stream.Queue");jabberwerx.Stream.DEFAULT_TIMEOUT=300;jabberwerx.Stream.DEFAULT_WAIT=30;jabberwerx.Stream.HEARTBEAT_INTERVAL=10;jabberwerx.Stream.NotOpenError=jabberwerx.util.Error.extend("Stream not open");jabberwerx.Stream.AlreadyOpenedError=jabberwerx.util.Error.extend("Stream is already open");jabberwerx.Stream.ErrorInfo=jabberwerx.JWModel.extend({init:function(cond,text){this._super();this.condition=cond||"{urn:ietf:params:xml:ns:xmpp-streams}undefined-condition";this.text=text||"";this.toString=this._toErrString;},getNode:function(){var builder=new jabberwerx.NodeBuilder("{http://etherx.jabber.org/streams}stream:error");builder.element(this.condition);if(this.text){builder.element("{urn:ietf:params:xml:ns:xmpp-streams}text").text(this.text);}
return builder.data;},wasUnserialized:function(){this.toString=this._toErrString;},_toErrString:function(){return this.condition;},condition:"",text:""},"jabberwerx.Stream.ErrorInfo");jabberwerx.Stream.ErrorInfo.createWithNode=function(node){if(!jabberwerx.isElement(node)){throw new TypeError("node must be an Element");}
node=jabberwerx.$(node);var cond=node.children("[xmlns=urn:ietf:params:xml:ns:xmpp-streams]:not(text)").map(function(){return"{urn:ietf:params:xml:ns:xmpp-streams}"+this.nodeName;}).get(0);var text=node.children("text[xmlns=urn:ietf:params:xml:ns:xmpp-streams]").text();return new jabberwerx.Stream.ErrorInfo(cond,text);};jabberwerx.Stream.ERR_BAD_REQUEST=new jabberwerx.Stream.ErrorInfo("{urn:ietf:params:xml:ns:xmpp-streams}bad-request");jabberwerx.Stream.ERR_CONFLICT=new jabberwerx.Stream.ErrorInfo("{urn:ietf:params:xml:ns:xmpp-streams}conflict");jabberwerx.Stream.ERR_POLICY_VIOLATION=new jabberwerx.Stream.ErrorInfo("{urn:ietf:params:xml:ns:xmpp-streams}policy-violation");jabberwerx.Stream.ERR_REMOTE_CONNECTION_FAILED=new jabberwerx.Stream.ErrorInfo("{urn:ietf:params:xml:ns:xmpp-streams}remote-connection-failed");jabberwerx.Stream.ERR_REMOTE_SERVER_TIMEOUT=new jabberwerx.Stream.ErrorInfo("{urn:ietf:params:xml:ns:xmpp-streams}remote-server-timeout");jabberwerx.Stream.ERR_SERVICE_UNAVAILABLE=new jabberwerx.Stream.ErrorInfo("{urn:ietf:params:xml:ns:xmpp-streams}service-unavailable");jabberwerx.Stream.ERR_SYSTEM_SHUTDOWN=new jabberwerx.Stream.ErrorInfo("{urn:ietf:params:xml:ns:xmpp-streams}system-shutdown");jabberwerx.Stream.ERR_UNDEFINED_CONDITION=new jabberwerx.Stream.ErrorInfo("{urn:ietf:params:xml:ns:xmpp-streams}undefined-condition");jabberwerx.Stream.ERR_XML_NOT_WELL_FORMED=new jabberwerx.Stream.ErrorInfo("{urn:ietf:params:xml:ns:xmpp-streams}xml-not-well-formed");}
/*/opt/home/ci/hudson/home/jobs/CAXL_CSG_Optimized/workspace/trunk/build/dist/CAXL-release-2.1.1.19913/src/model/Client.js*/
if(jabberwerx){jabberwerx.ClientEntityCache=jabberwerx.EntitySet.extend({init:function(){this._super();},_batchCount:0,startBatch:function(){var count=this._batchCount;this._batchCount++;if(count==0){this.event("batchUpdateStarted").trigger();}
return(count!=0);},endBatch:function(){var running=true;switch(this._batchCount){case 0:running=false;break;case 1:running=false;this.event("batchUpdateEnded").trigger();default:this._batchCount--;break;}
return running;},register:function(entity){if(!(entity&&entity instanceof jabberwerx.Entity)){throw new TypeError("entity is not an Entity");}
var prev=this.entity(entity.jid,entity.node);if(prev&&prev!==entity){throw new jabberwerx.EntitySet.EntityAlreadyExistsError();}else if(!prev){this.event("entityCreated").trigger(entity);}
return this._super(entity);},unregister:function(entity){var result=this._super(entity);if(result){this.event("entityDestroyed").trigger(entity);}
return result;},localUser:function(jid){var ent=this.entity(jid);if(!(ent&&ent instanceof jabberwerx.LocalUser)){ent=new jabberwerx.LocalUser(jid,this);this.register(ent);}
return ent;},server:function(serverDomain){var ent=this.entity(serverDomain);if(!ent||!(ent instanceof jabberwerx.Server)){ent=new jabberwerx.Server(serverDomain,this);this.register(ent);}
return ent;},temporaryEntity:function(jid){var ent=this.entity(jid);if(!(ent&&ent instanceof jabberwerx.TemporaryEntity)){ent=new jabberwerx.TemporaryEntity(jid,this);this.register(ent);}
return ent;}},"jabberwerx.ClientEntityCache");jabberwerx.Client=jabberwerx.JWModel.extend({init:function(resourceName){this._super();this.applyEvent('clientStatusChanged');this.applyEvent('beforeIqSent');this.applyEvent('iqSent');this.applyEvent('beforeIqReceived');this.applyEvent('iqReceived');this.applyEvent('afterIqReceived');this.applyEvent('beforeMessageSent');this.applyEvent('messageSent');this.applyEvent('beforeMessageReceived');this.applyEvent('messageReceived');this.applyEvent('afterMessageReceived');this.applyEvent('beforePresenceSent');this.applyEvent('presenceSent');this.applyEvent('beforePresenceReceived');this.applyEvent('presenceReceived');this.applyEvent('afterPresenceReceived');this.applyEvent('reconnectCountdownStarted');this.applyEvent('reconnectCancelled');this.entitySet=new jabberwerx.ClientEntityCache();if(resourceName&&typeof resourceName=='string'){this.resourceName=resourceName;}
else{this._autoResourceName=true;}
this._stream=new jabberwerx.Stream();with(this.event('afterIqReceived')){bindWhen('iq[type="get"] *[xmlns="urn:xmpp:time"]',this.invocation('_handleEntityTime'));bindWhen('iq[type="get"] *[xmlns="jabber:iq:time"]',this.invocation('_handleIqTime'));}
this.event('presenceReceived').bind(this.invocation('_handlePresenceIn'));var discoController=new jabberwerx.DiscoController(this);var capController=new jabberwerx.CapabilitiesController(this);if(jabberwerx._config.capabilityFeatures){for(var i=0;i<jabberwerx._config.capabilityFeatures.length;i++){capController.addFeature(jabberwerx._config.capabilityFeatures[i]);}}
if(jabberwerx._config.capabilityIdentity){capController.identity.category=jabberwerx._config.capabilityIdentity.category;capController.identity.type=jabberwerx._config.capabilityIdentity.type;capController.identity.name=jabberwerx._config.capabilityIdentity.name;capController.node=jabberwerx._config.capabilityIdentity.node;}},destroy:function(){jabberwerx.$.each(this.controllers,function(){this.destroy();});this._super();},_setStreamHandler:function(evt,funcName){this._clearStreamHandler(evt);this._streamHandlers[evt]=funcName;this._stream.event(evt).bind(this.invocation(this._streamHandlers[evt]));},_clearStreamHandler:function(evt){if(this._streamHandlers[evt]!==undefined){this._stream.event(evt).unbind(this.invocation(this._streamHandlers[evt]));delete this._streamHandlers[evt];}},_clearStreamHandlers:function(){this._clearStreamHandler('streamOpened');this._clearStreamHandler('streamClosed');this._clearStreamHandler('streamElementsReceived');this._clearStreamHandler('streamElementsSent');this._streamHandlers={};},connect:function(jid,password,arg){var inProgress=arguments.callee.inProgress||{};if(inProgress[this]){jabberwerx.util.debug.log("client.connect already in progress!");return;}
inProgress[this]=true;arguments.callee.inProgress=inProgress;var __createEntities=function(client){var user;jabberwerx.$.each(client.entitySet.toArray(),function(){if(this instanceof jabberwerx.LocalUser){if(client._connectParams.jid.equals(this.jid)){user=this;}else{this.remove();}}});client.connectedUser=user||client.entitySet.localUser(client._connectParams.jid);var server;jabberwerx.$.each(client.entitySet.toArray(),function(){if(this instanceof jabberwerx.Server){if(client._connectParams.jid.getDomain()==this.jid.getDomain()){server=this;}else{this.remove();}}});client.connectedServer=server||client.entitySet.server(client._connectParams.jid.getDomain());}
var __bindCallbacks=function(client){var successCB=client._connectParams.arg.successCallback;var errorCB=client._connectParams.arg.errorCallback;if(successCB||errorCB){var fn=function(evt){var evtCon=(evt.data.next==jabberwerx.Client.status_connected);var evtDiscon=(evt.data.next==jabberwerx.Client.status_disconnected);if(evtCon||evtDiscon){client.event('clientStatusChanged').unbind(fn);if(successCB&&evtCon){successCB(client);}else if(errorCB&&evt.data.error&&evtDiscon){errorCB(evt.data.error);}}};client.event('clientStatusChanged').bind(fn);}}
if(this.clientStatus!=jabberwerx.Client.status_disconnected){jabberwerx.util.debug.log("client not disconnected!");delete inProgress[this];return;}
if(!arg){arg={};}
this.cancelReconnect();this._clearStreamHandlers();this._stream.close();try{var cjid=jabberwerx.JID.asJID(jid);if(!cjid.getNode()){arg.register=true;cjid=new jabberwerx.JID({domain:cjid.getDomain(),node:"CAXL_"+jabberwerx.util.crypto.generateUUID()});if(!password){password=jabberwerx.util.crypto.b64_sha1(jabberwerx.util.crypto.generateUUID());}}
this._connectParams={jid:cjid,password:password,username:cjid.getNode(),domain:cjid.getDomain(),resource:this.resourceName,httpBindingURL:arg.httpBindingURL||jabberwerx._config.httpBindingURL,secure:arg.unsecureAllowed||jabberwerx._config.unsecureAllowed||false,timeout:arg.timeout||null,wait:arg.wait||null,arg:arg};this._openStream();__createEntities(this);__bindCallbacks(this);if(this._connectParams.arg.reconnecting){this.setClientStatus(jabberwerx.Client.status_reconnecting);this._connectParams.arg.reconnecting=false;}else{this.setClientStatus(jabberwerx.Client.status_connecting);}
this._connectionAttempts++;}catch(ex){this._connectParams={};throw new jabberwerx.Client.ConnectionError(ex.message||'invalid connection information');}finally{delete inProgress[this];}},_openStream:function(){if(this._connectParams.arg.register){this._setStreamHandler('streamOpened','_handleRegistrationOpened');}else{this._setStreamHandler('streamOpened','_handleAuthOpened');}
this._setStreamHandler('streamClosed','_handleClosed');var streamOpts={domain:this._connectParams.domain,timeout:this._connectParams.timeout,wait:this._connectParams.wait,secure:this._connectParams.secure,httpBindingURL:this._connectParams.httpBindingURL}
try{this._stream.open(streamOpts);}catch(ex){this._clearStreamHandlers();throw ex;}},_handleRegistrationOpened:function(){try{this._clearStreamHandler('streamOpened');var registerIQ=new jabberwerx.IQ();registerIQ.setType("set");registerIQ.setID("register");var builder=new jabberwerx.NodeBuilder('{jabber:iq:register}query');builder=builder.element("username").text(this._connectParams.username).parent;builder=builder.element("password").text(this._connectParams.password).parent;registerIQ.setQuery(builder.data);this._setStreamHandler('streamElementsReceived','_handleRegisterElements');this._stream.send(registerIQ.getNode());}catch(ex){this._handleConnectionException(ex);}},_handleRegisterElements:function(elem){try{this._clearStreamHandler('streamElementsReceived');var errNode=jabberwerx.$(elem.data).find("error");if(errNode&&errNode.length!=0){this._connectParams.arg.register=false;this._handleConnectionException(errNode);}