function Arcfour(){this.j=this.i=0;this.S=[]}function ARC4init(b){var a,c,d;for(a=0;a<256;++a)this.S[a]=a;for(a=c=0;a<256;++a){c=c+this.S[a]+b[a%b.length]&255;d=this.S[a];this.S[a]=this.S[c];this.S[c]=d}this.j=this.i=0}function ARC4next(){var b;this.i=this.i+1&255;this.j=this.j+this.S[this.i]&255;b=this.S[this.i];this.S[this.i]=this.S[this.j];this.S[this.j]=b;return this.S[b+this.S[this.i]&255]}Arcfour.prototype.init=ARC4init;Arcfour.prototype.next=ARC4next;
function prng_newstate(){return new Arcfour}var rng_psize=256;
var rng_state,rng_pool,rng_pptr;function rng_seed_int(a){rng_pool[rng_pptr++]^=a&255;rng_pool[rng_pptr++]^=a>>8&255;rng_pool[rng_pptr++]^=a>>16&255;rng_pool[rng_pptr++]^=a>>24&255;if(rng_pptr>=rng_psize)rng_pptr-=rng_psize}function rng_seed_time(){rng_seed_int((new Date).getTime())}
if(rng_pool==null){rng_pool=[];rng_pptr=0;var t;if(navigator.appName=="Netscape"&&navigator.appVersion<"5"&&window.crypto){var z=window.crypto.random(32);for(t=0;t<z.length;++t)rng_pool[rng_pptr++]=z.charCodeAt(t)&255}for(;rng_pptr<rng_psize;){t=Math.floor(65536*Math.random());rng_pool[rng_pptr++]=t>>>8;rng_pool[rng_pptr++]=t&255}rng_pptr=0;rng_seed_time()}
function rng_get_byte(){if(rng_state==null){rng_seed_time();rng_state=prng_newstate();rng_state.init(rng_pool);for(rng_pptr=0;rng_pptr<rng_pool.length;++rng_pptr)rng_pool[rng_pptr]=0;rng_pptr=0}return rng_state.next()}function rng_get_bytes(a){var b;for(b=0;b<a.length;++b)a[b]=rng_get_byte()}function SecureRandom(){}SecureRandom.prototype.nextBytes=rng_get_bytes;
var a,dbits,canary=244837814094590,j_lm=(canary&16777215)==15715070;function BigInteger(b,c,d){if(b!=null)if("number"==typeof b)this.fromNumber(b,c,d);else c==null&&"string"!=typeof b?this.fromString(b,256):this.fromString(b,c)}function nbi(){return new BigInteger(null)}function am1(b,c,d,e,f,g){for(;--g>=0;){var h=c*this[b++]+d[e]+f;f=Math.floor(h/67108864);d[e++]=h&67108863}return f}
function am2(b,c,d,e,f,g){var h=c&32767;for(c=c>>15;--g>=0;){var i=this[b]&32767,j=this[b++]>>15,l=c*i+j*h;i=h*i+((l&32767)<<15)+d[e]+(f&1073741823);f=(i>>>30)+(l>>>15)+c*j+(f>>>30);d[e++]=i&1073741823}return f}function am3(b,c,d,e,f,g){var h=c&16383;for(c=c>>14;--g>=0;){var i=this[b]&16383,j=this[b++]>>14,l=c*i+j*h;i=h*i+((l&16383)<<14)+d[e]+f;f=(i>>28)+(l>>14)+c*j;d[e++]=i&268435455}return f}
if(j_lm&&navigator.appName=="Microsoft Internet Explorer"){BigInteger.prototype.am=am2;dbits=30}else if(j_lm&&navigator.appName!="Netscape"){BigInteger.prototype.am=am1;dbits=26}else{BigInteger.prototype.am=am3;dbits=28}BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=(1<<dbits)-1;BigInteger.prototype.DV=1<<dbits;var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP);BigInteger.prototype.F1=BI_FP-dbits;BigInteger.prototype.F2=2*dbits-BI_FP;
var BI_RM="0123456789abcdefghijklmnopqrstuvwxyz",BI_RC=[],rr,vv;rr="0".charCodeAt(0);for(vv=0;vv<=9;++vv)BI_RC[rr++]=vv;rr="a".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;rr="A".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;function int2char(b){return BI_RM.charAt(b)}function intAt(b,c){b=BI_RC[b.charCodeAt(c)];return b==null?-1:b}function bnpCopyTo(b){for(var c=this.t-1;c>=0;--c)b[c]=this[c];b.t=this.t;b.s=this.s}
function bnpFromInt(b){this.t=1;this.s=b<0?-1:0;if(b>0)this[0]=b;else if(b<-1)this[0]=b+DV;else this.t=0}function nbv(b){var c=nbi();c.fromInt(b);return c}
function bnpFromString(b,c){if(c==16)c=4;else if(c==8)c=3;else if(c==256)c=8;else if(c==2)c=1;else if(c==32)c=5;else if(c==4)c=2;else{this.fromRadix(b,c);return}this.s=this.t=0;for(var d=b.length,e=false,f=0;--d>=0;){var g=c==8?b[d]&255:intAt(b,d);if(g<0){if(b.charAt(d)=="-")e=true}else{e=false;if(f==0)this[this.t++]=g;else if(f+c>this.DB){this[this.t-1]|=(g&(1<<this.DB-f)-1)<<f;this[this.t++]=g>>this.DB-f}else this[this.t-1]|=g<<f;f+=c;if(f>=this.DB)f-=this.DB}}if(c==8&&(b[0]&128)!=0){this.s=-1;
if(f>0)this[this.t-1]|=(1<<this.DB-f)-1<<f}this.clamp();e&&BigInteger.ZERO.subTo(this,this)}function bnpClamp(){for(var b=this.s&this.DM;this.t>0&&this[this.t-1]==b;)--this.t}
function bnToString(b){if(this.s<0)return"-"+this.negate().toString(b);if(b==16)b=4;else if(b==8)b=3;else if(b==2)b=1;else if(b==32)b=5;else if(b==4)b=2;else return this.toRadix(b);var c=(1<<b)-1,d,e=false,f="",g=this.t,h=this.DB-g*this.DB%b;if(g-- >0){if(h<this.DB&&(d=this[g]>>h)>0){e=true;f=int2char(d)}for(;g>=0;){if(h<b){d=(this[g]&(1<<h)-1)<<b-h;d|=this[--g]>>(h+=this.DB-b)}else{d=this[g]>>(h-=b)&c;if(h<=0){h+=this.DB;--g}}if(d>0)e=true;if(e)f+=int2char(d)}}return e?f:"0"}
function bnNegate(){var b=nbi();BigInteger.ZERO.subTo(this,b);return b}function bnAbs(){return this.s<0?this.negate():this}function bnCompareTo(b){var c=this.s-b.s;if(c!=0)return c;var d=this.t;c=d-b.t;if(c!=0)return c;for(;--d>=0;)if((c=this[d]-b[d])!=0)return c;return 0}function nbits(b){var c=1,d;if((d=b>>>16)!=0){b=d;c+=16}if((d=b>>8)!=0){b=d;c+=8}if((d=b>>4)!=0){b=d;c+=4}if((d=b>>2)!=0){b=d;c+=2}if(b>>1!=0)c+=1;return c}
function bnBitLength(){if(this.t<=0)return 0;return this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}function bnpDLShiftTo(b,c){var d;for(d=this.t-1;d>=0;--d)c[d+b]=this[d];for(d=b-1;d>=0;--d)c[d]=0;c.t=this.t+b;c.s=this.s}function bnpDRShiftTo(b,c){for(var d=b;d<this.t;++d)c[d-b]=this[d];c.t=Math.max(this.t-b,0);c.s=this.s}
function bnpLShiftTo(b,c){var d=b%this.DB,e=this.DB-d,f=(1<<e)-1;b=Math.floor(b/this.DB);var g=this.s<<d&this.DM,h;for(h=this.t-1;h>=0;--h){c[h+b+1]=this[h]>>e|g;g=(this[h]&f)<<d}for(h=b-1;h>=0;--h)c[h]=0;c[b]=g;c.t=this.t+b+1;c.s=this.s;c.clamp()}
function bnpRShiftTo(b,c){c.s=this.s;var d=Math.floor(b/this.DB);if(d>=this.t)c.t=0;else{b=b%this.DB;var e=this.DB-b,f=(1<<b)-1;c[0]=this[d]>>b;for(var g=d+1;g<this.t;++g){c[g-d-1]|=(this[g]&f)<<e;c[g-d]=this[g]>>b}if(b>0)c[this.t-d-1]|=(this.s&f)<<e;c.t=this.t-d;c.clamp()}}
function bnpSubTo(b,c){for(var d=0,e=0,f=Math.min(b.t,this.t);d<f;){e+=this[d]-b[d];c[d++]=e&this.DM;e>>=this.DB}if(b.t<this.t){for(e-=b.s;d<this.t;){e+=this[d];c[d++]=e&this.DM;e>>=this.DB}e+=this.s}else{for(e+=this.s;d<b.t;){e-=b[d];c[d++]=e&this.DM;e>>=this.DB}e-=b.s}c.s=e<0?-1:0;if(e<-1)c[d++]=this.DV+e;else if(e>0)c[d++]=e;c.t=d;c.clamp()}
function bnpMultiplyTo(b,c){var d=this.abs(),e=b.abs(),f=d.t;for(c.t=f+e.t;--f>=0;)c[f]=0;for(f=0;f<e.t;++f)c[f+d.t]=d.am(0,e[f],c,f,0,d.t);c.s=0;c.clamp();this.s!=b.s&&BigInteger.ZERO.subTo(c,c)}function bnpSquareTo(b){for(var c=this.abs(),d=b.t=2*c.t;--d>=0;)b[d]=0;for(d=0;d<c.t-1;++d){var e=c.am(d,c[d],b,2*d,0,1);if((b[d+c.t]+=c.am(d+1,2*c[d],b,2*d+1,e,c.t-d-1))>=c.DV){b[d+c.t]-=c.DV;b[d+c.t+1]=1}}if(b.t>0)b[b.t-1]+=c.am(d,c[d],b,2*d,0,1);b.s=0;b.clamp()}
function bnpDivRemTo(b,c,d){var e=b.abs();if(!(e.t<=0)){var f=this.abs();if(f.t<e.t){c!=null&&c.fromInt(0);d!=null&&this.copyTo(d)}else{if(d==null)d=nbi();var g=nbi(),h=this.s;b=b.s;var i=this.DB-nbits(e[e.t-1]);if(i>0){e.lShiftTo(i,g);f.lShiftTo(i,d)}else{e.copyTo(g);f.copyTo(d)}e=g.t;f=g[e-1];if(f!=0){var j=f*(1<<this.F1)+(e>1?g[e-2]>>this.F2:0),l=this.FV/j;j=(1<<this.F1)/j;var p=1<<this.F2,m=d.t,n=m-e,k=c==null?nbi():c;g.dlShiftTo(n,k);if(d.compareTo(k)>=0){d[d.t++]=1;d.subTo(k,d)}BigInteger.ONE.dlShiftTo(e,
k);for(k.subTo(g,g);g.t<e;)g[g.t++]=0;for(;--n>=0;){var o=d[--m]==f?this.DM:Math.floor(d[m]*l+(d[m-1]+p)*j);if((d[m]+=g.am(0,o,d,n,0,e))<o){g.dlShiftTo(n,k);for(d.subTo(k,d);d[m]<--o;)d.subTo(k,d)}}if(c!=null){d.drShiftTo(e,c);h!=b&&BigInteger.ZERO.subTo(c,c)}d.t=e;d.clamp();i>0&&d.rShiftTo(i,d);h<0&&BigInteger.ZERO.subTo(d,d)}}}}function bnMod(b){var c=nbi();this.abs().divRemTo(b,null,c);this.s<0&&c.compareTo(BigInteger.ZERO)>0&&b.subTo(c,c);return c}function Classic(b){this.m=b}
function cConvert(b){return b.s<0||b.compareTo(this.m)>=0?b.mod(this.m):b}function cRevert(b){return b}function cReduce(b){b.divRemTo(this.m,null,b)}function cMulTo(b,c,d){b.multiplyTo(c,d);this.reduce(d)}function cSqrTo(b,c){b.squareTo(c);this.reduce(c)}a=Classic.prototype;a.convert=cConvert;a.revert=cRevert;a.reduce=cReduce;a.mulTo=cMulTo;a.sqrTo=cSqrTo;
function bnpInvDigit(){if(this.t<1)return 0;var b=this[0];if((b&1)==0)return 0;var c=b&3;c=c*(2-(b&15)*c)&15;c=c*(2-(b&255)*c)&255;c=c*(2-((b&65535)*c&65535))&65535;c=c*(2-b*c%this.DV)%this.DV;return c>0?this.DV-c:-c}function Montgomery(b){this.m=b;this.mp=b.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<b.DB-15)-1;this.mt2=2*b.t}
function montConvert(b){var c=nbi();b.abs().dlShiftTo(this.m.t,c);c.divRemTo(this.m,null,c);b.s<0&&c.compareTo(BigInteger.ZERO)>0&&this.m.subTo(c,c);return c}function montRevert(b){var c=nbi();b.copyTo(c);this.reduce(c);return c}
function montReduce(b){for(;b.t<=this.mt2;)b[b.t++]=0;for(var c=0;c<this.m.t;++c){var d=b[c]&32767,e=d*this.mpl+((d*this.mph+(b[c]>>15)*this.mpl&this.um)<<15)&b.DM;d=c+this.m.t;for(b[d]+=this.m.am(0,e,b,c,0,this.m.t);b[d]>=b.DV;){b[d]-=b.DV;b[++d]++}}b.clamp();b.drShiftTo(this.m.t,b);b.compareTo(this.m)>=0&&b.subTo(this.m,b)}function montSqrTo(b,c){b.squareTo(c);this.reduce(c)}function montMulTo(b,c,d){b.multiplyTo(c,d);this.reduce(d)}a=Montgomery.prototype;a.convert=montConvert;a.revert=montRevert;
a.reduce=montReduce;a.mulTo=montMulTo;a.sqrTo=montSqrTo;function bnpIsEven(){return(this.t>0?this[0]&1:this.s)==0}function bnpExp(b,c){if(b>4294967295||b<1)return BigInteger.ONE;var d=nbi(),e=nbi(),f=c.convert(this),g=nbits(b)-1;for(f.copyTo(d);--g>=0;){c.sqrTo(d,e);if((b&1<<g)>0)c.mulTo(e,f,d);else{var h=d;d=e;e=h}}return c.revert(d)}function bnModPowInt(b,c){c=b<256||c.isEven()?new Classic(c):new Montgomery(c);return this.exp(b,c)}a=BigInteger.prototype;a.copyTo=bnpCopyTo;a.fromInt=bnpFromInt;
a.fromString=bnpFromString;a.clamp=bnpClamp;a.dlShiftTo=bnpDLShiftTo;a.drShiftTo=bnpDRShiftTo;a.lShiftTo=bnpLShiftTo;a.rShiftTo=bnpRShiftTo;a.subTo=bnpSubTo;a.multiplyTo=bnpMultiplyTo;a.squareTo=bnpSquareTo;a.divRemTo=bnpDivRemTo;a.invDigit=bnpInvDigit;a.isEven=bnpIsEven;a.exp=bnpExp;a.toString=bnToString;a.negate=bnNegate;a.abs=bnAbs;a.compareTo=bnCompareTo;a.bitLength=bnBitLength;a.mod=bnMod;a.modPowInt=bnModPowInt;BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1);
function parseBigInt(a,b){return new BigInteger(a,b)}function linebrk(a,b){for(var d="",c=0;c+b<a.length;){d+=a.substring(c,c+b)+"\n";c+=b}return d+a.substring(c,a.length)}function byte2Hex(a){return a<16?"0"+a.toString(16):a.toString(16)}
function pkcs1pad2(a,b){if(b<a.length+11){alert("Message too long for RSA");return null}for(var d=[],c=a.length-1;c>=0&&b>0;)d[--b]=a.charCodeAt(c--);d[--b]=0;a=new SecureRandom;for(c=[];b>2;){for(c[0]=0;c[0]==0;)a.nextBytes(c);d[--b]=c[0]}d[--b]=2;d[--b]=0;return new BigInteger(d)}function RSAKey(){this.n=null;this.e=0;this.coeff=this.dmq1=this.dmp1=this.q=this.p=this.d=null}
function RSASetPublic(a,b){if(a!=null&&b!=null&&a.length>0&&b.length>0){this.n=parseBigInt(a,16);this.e=parseInt(b,16)}else alert("Invalid RSA public key")}function RSADoPublic(a){return a.modPowInt(this.e,this.n)}function RSAEncrypt(a){a=pkcs1pad2(a,this.n.bitLength()+7>>3);if(a==null)return null;a=this.doPublic(a);if(a==null)return null;a=a.toString(16);return(a.length&1)==0?a:"0"+a}RSAKey.prototype.doPublic=RSADoPublic;RSAKey.prototype.setPublic=RSASetPublic;RSAKey.prototype.encrypt=RSAEncrypt;
var isIE=navigator.appVersion.indexOf("MSIE")!=-1?true:false,isWin=navigator.appVersion.toLowerCase().indexOf("win")!=-1?true:false,isOpera=navigator.userAgent.indexOf("Opera")!=-1?true:false,request_flash_plugin="<p align='center'><br/><br/><br/><br/>You should <a href='http://www.macromedia.com/go/getflashplayer' style='text-decoration:underline;'>download</a> and install  macromedia flash player</p>";
function ControlVersion(){var a,c;try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");a=c.GetVariable("$version")}catch(g){}if(!a)try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a="WIN 6,0,21,0";c.AllowScriptAccess="always";a=c.GetVariable("$version")}catch(b){}if(!a)try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a=c.GetVariable("$version")}catch(d){}if(!a)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a="WIN 3,0,18,0"}catch(f){}if(!a)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
a="WIN 2,0,0,11"}catch(e){a=-1}return a}
function GetSwfVer(){var a=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){a=navigator.plugins["Shockwave Flash"+(navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"")].description.split(" ");var c=a[2].split("."),g=c[0];c=c[1];var b=a[3];if(b=="")b=a[4];if(b[0]=="d")b=b.substring(1);else if(b[0]=="r"){b=b.substring(1);if(b.indexOf("d")>0)b=b.substring(0,b.indexOf("d"))}a=g+"."+c+"."+b}}else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=
-1)a=4;else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1)a=3;else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1)a=2;else if(isIE&&isWin&&!isOpera)a=ControlVersion();return a}
function DetectFlashVer(a,c,g){versionStr=GetSwfVer();if(versionStr==-1)return false;else if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else versionArray=versionStr.split(".");var b=versionArray[0],d=versionArray[1],f=versionArray[2];if(b>parseFloat(a))return true;else if(b==parseFloat(a))if(d>parseFloat(c))return true;else if(d==parseFloat(c))if(f>=parseFloat(g))return true;return false}}
function AC_AddExtension(a,c){return a.indexOf("?")!=-1?a.replace(/\?/,c+"?"):a+c}function AC_Generateobj(a,c,g){var b="";if(isIE&&isWin&&!isOpera){b+="<object ";for(var d in a)b+=d+'="'+a[d]+'" ';b+=">";for(d in c)b+='<param name="'+d+'" value="'+c[d]+'" /> ';b+="</object>"}else{b+="<embed ";for(d in g)b+=d+'="'+g[d]+'" ';b+="> </embed>"}document.write(b)}
function AC_Generatestr(a,c,g){var b="";if(isIE&&isWin&&!isOpera){b+="<object ";for(var d in a)b+=d+'="'+a[d]+'" ';b+=">";for(d in c)b+='<param name="'+d+'" value="'+c[d]+'" /> ';b+="</object>"}else{b+="<embed ";for(d in g)b+=d+'="'+g[d]+'" ';b+="> </embed>"}return b}function AC_FL_UpdateContent(){var a=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");return AC_Generatestr(a.objAttrs,a.params,a.embedAttrs)}
function AC_FL_RunContent(){var a=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)}function AC_SW_RunContent(){var a=AC_GetArgs(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)}
function AC_GetArgs(a,c,g,b,d){var f={};f.embedAttrs={};f.params={};f.objAttrs={};for(var e=0;e<a.length;e+=2)switch(a[e].toLowerCase()){case "classid":break;case "pluginspage":f.embedAttrs[a[e]]=a[e+1];break;case "src":case "movie":a[e+1]=AC_AddExtension(a[e+1],c);f.embedAttrs.src=a[e+1];f.params[g]=a[e+1];break;case "onafterupdate":case "onbeforeupdate":case "onblur":case "oncellchange":case "onclick":case "ondblClick":case "ondrag":case "ondragend":case "ondragenter":case "ondragleave":case "ondragover":case "ondrop":case "onfinish":case "onfocus":case "onhelp":case "onmousedown":case "onmouseup":case "onmouseover":case "onmousemove":case "onmouseout":case "onkeypress":case "onkeydown":case "onkeyup":case "onload":case "onlosecapture":case "onpropertychange":case "onreadystatechange":case "onrowsdelete":case "onrowenter":case "onrowexit":case "onrowsinserted":case "onstart":case "onscroll":case "onbeforeeditfocus":case "onactivate":case "onbeforedeactivate":case "ondeactivate":case "type":case "codebase":f.objAttrs[a[e]]=
a[e+1];break;case "id":case "width":case "height":case "align":case "vspace":case "hspace":case "class":case "title":case "accesskey":case "name":case "tabindex":f.embedAttrs[a[e]]=f.objAttrs[a[e]]=a[e+1];break;default:f.embedAttrs[a[e]]=f.params[a[e]]=a[e+1]}f.objAttrs.classid=b;if(d)f.embedAttrs.type=d;return f};
(function(I,z){function ta(a,b,d){if(d===z&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Xa.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=z}return d}function ka(a){for(var b in a)if(b!=="toJSON")return false;return true}function W(){return false}function aa(){return true}function ua(a,b,d){var e=c.extend({},d[0]);e.type=a;e.originalEvent={};e.liveFired=z;c.event.handle.call(b,e);e.isDefaultPrevented()&&
d[0].preventDefault()}function Ya(a){var b,d,e,f,g,j,o,n,l,r,y,C=[];f=[];g=c._data(this,"events");if(!(a.liveFired===this||!g||!g.live||a.target.disabled||a.button&&a.type==="click")){if(a.namespace)y=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var B=g.live.slice(0);for(o=0;o<B.length;o++){g=B[o];g.origType.replace(ba,"")===a.type?f.push(g.selector):B.splice(o--,1)}f=c(a.target).closest(f,a.currentTarget);n=0;for(l=f.length;n<l;n++){r=f[n];for(o=0;o<
B.length;o++){g=B[o];if(r.selector===g.selector&&(!y||y.test(g.namespace))&&!r.elem.disabled){j=r.elem;e=null;if(g.preType==="mouseenter"||g.preType==="mouseleave"){a.type=g.preType;e=c(a.relatedTarget).closest(g.selector)[0]}if(!e||e!==j)C.push({elem:j,handleObj:g,level:r.level})}}}n=0;for(l=C.length;n<l;n++){f=C[n];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;y=f.handleObj.origHandler.apply(f.elem,arguments);if(y===false||a.isPropagationStopped()){d=
f.level;if(y===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function ca(a,b){return(a&&a!=="*"?a+".":"")+b.replace(Za,"`").replace($a,"&")}function va(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function wa(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,g){return!!b.call(f,g,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(ab.test(b))return c.filter(b,
e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function bb(a){return c.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a,b){if(!(b.nodeType!==1||!c.hasData(a))){var d=c.expando,e=c.data(a),f=c.data(b,e);if(e=e[d]){a=e.events;f=f[d]=c.extend({},e);if(a){delete f.handle;f.events={};for(var g in a){d=0;for(e=a[g].length;d<e;d++)c.event.add(b,g+(a[g][d].namespace?".":"")+a[g][d].namespace,
a[g][d],a[g][d].data)}}}}}function ya(a,b){if(b.nodeType===1){var d=b.nodeName.toLowerCase();b.clearAttributes();b.mergeAttributes(a);if(d==="object")b.outerHTML=a.outerHTML;else if(d==="input"&&(a.type==="checkbox"||a.type==="radio")){if(a.checked)b.defaultChecked=b.checked=a.checked;if(b.value!==a.value)b.value=a.value}else if(d==="option")b.selected=a.defaultSelected;else if(d==="input"||d==="textarea")b.defaultValue=a.defaultValue;b.removeAttribute(c.expando)}}function da(a){return"getElementsByTagName"in
a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function cb(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function za(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?db:eb,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,"margin"+this))||0;else e-=parseFloat(c.css(a,
"border"+this+"Width"))||0});return e}function Aa(a){return function(b,d){if(typeof b!=="string"){d=b;b="*"}if(c.isFunction(d)){b=b.toLowerCase().split(Ba);for(var e=0,f=b.length,g,j;e<f;e++){g=b[e];if(j=/^\+/.test(g))g=g.substr(1)||"*";g=a[g]=a[g]||[];g[j?"unshift":"push"](d)}}}}function ea(a,b,d,e,f,g){f=f||b.dataTypes[0];g=g||{};g[f]=true;f=a[f];for(var j=0,o=f?f.length:0,n=a===la,l;j<o&&(n||!l);j++){l=f[j](b,d,e);if(typeof l==="string")if(!n||g[l])l=z;else{b.dataTypes.unshift(l);l=ea(a,b,d,e,
l,g)}}if((n||!l)&&!g["*"])l=ea(a,b,d,e,"*",g);return l}function ma(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(g,j){d||fb.test(a)?e(a,j):ma(a+"["+(typeof j==="object"||c.isArray(j)?g:"")+"]",j,d,e)});else if(!d&&b!=null&&typeof b==="object")if(c.isArray(b)||c.isEmptyObject(b))e(a,"");else for(var f in b)ma(a+"["+f+"]",b[f],d,e);else e(a,b)}function gb(a,b,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,j,o,n,l;for(o in g)if(o in d)b[g[o]]=d[o];for(;f[0]==="*";){f.shift();if(j===z)j=
a.mimeType||b.getResponseHeader("content-type")}if(j)for(o in e)if(e[o]&&e[o].test(j)){f.unshift(o);break}if(f[0]in d)n=f[0];else{for(o in d){if(!f[0]||a.converters[o+" "+f[0]]){n=o;break}l||(l=o)}n=n||l}if(n){n!==f[0]&&f.unshift(n);return d[n]}}function hb(a,b){if(a.dataFilter)b=a.dataFilter(b,a.dataType);var d=a.dataTypes,e={},f,g,j=d.length,o,n=d[0],l,r,y,C,B;for(f=1;f<j;f++){if(f===1)for(g in a.converters)if(typeof g==="string")e[g.toLowerCase()]=a.converters[g];l=n;n=d[f];if(n==="*")n=l;else if(l!==
"*"&&l!==n){r=l+" "+n;y=e[r]||e["* "+n];if(!y){B=z;for(C in e){o=C.split(" ");if(o[0]===l||o[0]==="*")if(B=e[o[1]+" "+n]){C=e[C];if(C===true)y=B;else if(B===true)y=C;break}}}y||B||c.error("No conversion from "+r.replace(" "," to "));if(y!==true)b=y?y(b):B(C(b))}}return b}function ib(){c(I).unload(function(){for(var a in X)X[a](0,1)})}function Ca(){try{return new I.XMLHttpRequest}catch(a){}}function jb(){try{return new I.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}}function Y(a,b){var d={};c.each(Da.concat.apply([],
Da.slice(0,b)),function(){d[this]=a});return d}function Ea(a){if(!na[a]){var b=c("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";na[a]=d}return na[a]}function oa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var v=I.document,c=function(){function a(){if(!b.isReady){try{v.documentElement.doScroll("left")}catch(i){setTimeout(a,1);return}b.ready()}}var b=function(i,q){return new b.fn.init(i,q,f)},d=I.jQuery,e=I.$,f,g=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,
j=/\S/,o=/^\s+/,n=/\s+$/,l=/\d/,r=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,y=/^[\],:{}\s]*$/,C=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,B=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,H=/(?:^|:|,)(?:\s*\[)+/g,K=/(webkit)[ \/]([\w.]+)/,L=/(opera)(?:.*version)?[ \/]([\w.]+)/,P=/(msie) ([\w.]+)/,G=/(mozilla)(?:.*? rv:([\w.]+))?/,h=navigator.userAgent,k=false,m,p="then done fail isResolved isRejected promise".split(" "),s,t=Object.prototype.toString,A=Object.prototype.hasOwnProperty,w=Array.prototype.push,
E=Array.prototype.slice,Q=String.prototype.trim,N=Array.prototype.indexOf,O={};b.fn=b.prototype={constructor:b,init:function(i,q,u){var x;if(!i)return this;if(i.nodeType){this.context=this[0]=i;this.length=1;return this}if(i==="body"&&!q&&v.body){this.context=v;this[0]=v.body;this.selector="body";this.length=1;return this}if(typeof i==="string")if((x=g.exec(i))&&(x[1]||!q))if(x[1]){u=(q=q instanceof b?q[0]:q)?q.ownerDocument||q:v;if(i=r.exec(i))if(b.isPlainObject(q)){i=[v.createElement(i[1])];b.fn.attr.call(i,
q,true)}else i=[u.createElement(i[1])];else{i=b.buildFragment([x[1]],[u]);i=(i.cacheable?b.clone(i.fragment):i.fragment).childNodes}return b.merge(this,i)}else{if((q=v.getElementById(x[2]))&&q.parentNode){if(q.id!==x[2])return u.find(i);this.length=1;this[0]=q}this.context=v;this.selector=i;return this}else return!q||q.jquery?(q||u).find(i):this.constructor(q).find(i);else if(b.isFunction(i))return u.ready(i);if(i.selector!==z){this.selector=i.selector;this.context=i.context}return b.makeArray(i,
this)},selector:"",jquery:"1.5.1",length:0,size:function(){return this.length},toArray:function(){return E.call(this,0)},get:function(i){return i==null?this.toArray():i<0?this[this.length+i]:this[i]},pushStack:function(i,q,u){var x=this.constructor();b.isArray(i)?w.apply(x,i):b.merge(x,i);x.prevObject=this;x.context=this.context;if(q==="find")x.selector=this.selector+(this.selector?" ":"")+u;else if(q)x.selector=this.selector+"."+q+"("+u+")";return x},each:function(i,q){return b.each(this,i,q)},ready:function(i){b.bindReady();
m.done(i);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(E.apply(this,arguments),"slice",E.call(arguments).join(","))},map:function(i){return this.pushStack(b.map(this,function(q,u){return i.call(q,u,q)}))},end:function(){return this.prevObject||this.constructor(null)},push:w,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var i,
q,u,x,F,D=arguments[0]||{},J=1,M=arguments.length,S=false;if(typeof D==="boolean"){S=D;D=arguments[1]||{};J=2}if(typeof D!=="object"&&!b.isFunction(D))D={};if(M===J){D=this;--J}for(;J<M;J++)if((i=arguments[J])!=null)for(q in i){u=D[q];x=i[q];if(D!==x)if(S&&x&&(b.isPlainObject(x)||(F=b.isArray(x)))){if(F){F=false;u=u&&b.isArray(u)?u:[]}else u=u&&b.isPlainObject(u)?u:{};D[q]=b.extend(S,u,x)}else if(x!==z)D[q]=x}return D};b.extend({noConflict:function(i){I.$=e;if(i)I.jQuery=d;return b},isReady:false,
readyWait:1,ready:function(i){i===true&&b.readyWait--;if(!b.readyWait||i!==true&&!b.isReady){if(!v.body)return setTimeout(b.ready,1);b.isReady=true;if(!(i!==true&&--b.readyWait>0)){m.resolveWith(v,[b]);b.fn.trigger&&b(v).trigger("ready").unbind("ready")}}},bindReady:function(){if(!k){k=true;if(v.readyState==="complete")return setTimeout(b.ready,1);if(v.addEventListener){v.addEventListener("DOMContentLoaded",s,false);I.addEventListener("load",b.ready,false)}else if(v.attachEvent){v.attachEvent("onreadystatechange",
s);I.attachEvent("onload",b.ready);var i=false;try{i=I.frameElement==null}catch(q){}v.documentElement.doScroll&&i&&a()}}},isFunction:function(i){return b.type(i)==="function"},isArray:Array.isArray||function(i){return b.type(i)==="array"},isWindow:function(i){return i&&typeof i==="object"&&"setInterval"in i},isNaN:function(i){return i==null||!l.test(i)||isNaN(i)},type:function(i){return i==null?String(i):O[t.call(i)]||"object"},isPlainObject:function(i){if(!i||b.type(i)!=="object"||i.nodeType||b.isWindow(i))return false;
if(i.constructor&&!A.call(i,"constructor")&&!A.call(i.constructor.prototype,"isPrototypeOf"))return false;var q;for(q in i);return q===z||A.call(i,q)},isEmptyObject:function(i){for(var q in i)return false;return true},error:function(i){throw i;},parseJSON:function(i){if(typeof i!=="string"||!i)return null;i=b.trim(i);if(y.test(i.replace(C,"@").replace(B,"]").replace(H,"")))return I.JSON&&I.JSON.parse?I.JSON.parse(i):(new Function("return "+i))();else b.error("Invalid JSON: "+i)},parseXML:function(i,
q,u){if(I.DOMParser){u=new DOMParser;q=u.parseFromString(i,"text/xml")}else{q=new ActiveXObject("Microsoft.XMLDOM");q.async="false";q.loadXML(i)}u=q.documentElement;if(!u||!u.nodeName||u.nodeName==="parsererror")b.error("Invalid XML: "+i);return q},noop:function(){},globalEval:function(i){if(i&&j.test(i)){var q=v.head||v.getElementsByTagName("head")[0]||v.documentElement,u=v.createElement("script");if(b.support.scriptEval())u.appendChild(v.createTextNode(i));else u.text=i;q.insertBefore(u,q.firstChild);
q.removeChild(u)}},nodeName:function(i,q){return i.nodeName&&i.nodeName.toUpperCase()===q.toUpperCase()},each:function(i,q,u){var x,F=0,D=i.length,J=D===z||b.isFunction(i);if(u)if(J)for(x in i){if(q.apply(i[x],u)===false)break}else for(;F<D;){if(q.apply(i[F++],u)===false)break}else if(J)for(x in i){if(q.call(i[x],x,i[x])===false)break}else for(u=i[0];F<D&&q.call(u,F,u)!==false;u=i[++F]);return i},trim:Q?function(i){return i==null?"":Q.call(i)}:function(i){return i==null?"":i.toString().replace(o,
"").replace(n,"")},makeArray:function(i,q){q=q||[];if(i!=null){var u=b.type(i);i.length==null||u==="string"||u==="function"||u==="regexp"||b.isWindow(i)?w.call(q,i):b.merge(q,i)}return q},inArray:function(i,q){if(q.indexOf)return q.indexOf(i);for(var u=0,x=q.length;u<x;u++)if(q[u]===i)return u;return-1},merge:function(i,q){var u=i.length,x=0;if(typeof q.length==="number")for(var F=q.length;x<F;x++)i[u++]=q[x];else for(;q[x]!==z;)i[u++]=q[x++];i.length=u;return i},grep:function(i,q,u){var x=[],F;u=
!!u;for(var D=0,J=i.length;D<J;D++){F=!!q(i[D],D);u!==F&&x.push(i[D])}return x},map:function(i,q,u){for(var x=[],F,D=0,J=i.length;D<J;D++){F=q(i[D],D,u);if(F!=null)x[x.length]=F}return x.concat.apply([],x)},guid:1,proxy:function(i,q,u){if(arguments.length===2)if(typeof q==="string"){u=i;i=u[q];q=z}else if(q&&!b.isFunction(q)){u=q;q=z}if(!q&&i)q=function(){return i.apply(u||this,arguments)};if(i)q.guid=i.guid=i.guid||q.guid||b.guid++;return q},access:function(i,q,u,x,F,D){var J=i.length;if(typeof q===
"object"){for(var M in q)b.access(i,M,q[M],x,F,u);return i}if(u!==z){x=!D&&x&&b.isFunction(u);for(M=0;M<J;M++)F(i[M],q,x?u.call(i[M],M,F(i[M],q)):u,D);return i}return J?F(i[0],q):z},now:function(){return(new Date).getTime()},_Deferred:function(){var i=[],q,u,x,F={done:function(){if(!x){var D=arguments,J,M,S,pa,fa;if(q){fa=q;q=0}J=0;for(M=D.length;J<M;J++){S=D[J];pa=b.type(S);if(pa==="array")F.done.apply(F,S);else pa==="function"&&i.push(S)}fa&&F.resolveWith(fa[0],fa[1])}return this},resolveWith:function(D,
J){if(!x&&!q&&!u){u=1;try{for(;i[0];)i.shift().apply(D,J)}catch(M){throw M;}finally{q=[D,J];u=0}}return this},resolve:function(){F.resolveWith(b.isFunction(this.promise)?this.promise():this,arguments);return this},isResolved:function(){return!!(u||q)},cancel:function(){x=1;i=[];return this}};return F},Deferred:function(i){var q=b._Deferred(),u=b._Deferred(),x;b.extend(q,{then:function(F,D){q.done(F).fail(D);return this},fail:u.done,rejectWith:u.resolveWith,reject:u.resolve,isRejected:u.isResolved,
promise:function(F){if(F==null){if(x)return x;x=F={}}for(var D=p.length;D--;)F[p[D]]=q[p[D]];return F}});q.done(u.cancel).fail(q.cancel);delete q.cancel;i&&i.call(q,q);return q},when:function(i){var q=arguments.length,u=q<=1&&i&&b.isFunction(i.promise)?i:b.Deferred(),x=u.promise();if(q>1){for(var F=E.call(arguments,0),D=q,J=function(M){return function(S){F[M]=arguments.length>1?E.call(arguments,0):S;--D||u.resolveWith(x,F)}};q--;)if((i=F[q])&&b.isFunction(i.promise))i.promise().then(J(q),u.reject);
else--D;D||u.resolveWith(x,F)}else u!==i&&u.resolve(i);return x},uaMatch:function(i){i=i.toLowerCase();i=K.exec(i)||L.exec(i)||P.exec(i)||i.indexOf("compatible")<0&&G.exec(i)||[];return{browser:i[1]||"",version:i[2]||"0"}},sub:function(){function i(u,x){return new i.fn.init(u,x)}b.extend(true,i,this);i.superclass=this;i.fn=i.prototype=this();i.fn.constructor=i;i.subclass=this.subclass;i.fn.init=function(u,x){if(x&&x instanceof b&&!(x instanceof i))x=i(x);return b.fn.init.call(this,u,x,q)};i.fn.init.prototype=
i.fn;var q=i(v);return i},browser:{}});m=b._Deferred();b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(i,q){O["[object "+q+"]"]=q.toLowerCase()});h=b.uaMatch(h);if(h.browser){b.browser[h.browser]=true;b.browser.version=h.version}if(b.browser.webkit)b.browser.safari=true;if(N)b.inArray=function(i,q){return N.call(q,i)};if(j.test("\u00a0")){o=/^[\s\xA0]+/;n=/[\s\xA0]+$/}f=b(v);if(v.addEventListener)s=function(){v.removeEventListener("DOMContentLoaded",s,false);b.ready()};
else if(v.attachEvent)s=function(){if(v.readyState==="complete"){v.detachEvent("onreadystatechange",s);b.ready()}};return b}();(function(){c.support={};var a=v.createElement("div");a.style.display="none";a.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var b=a.getElementsByTagName("*"),d=a.getElementsByTagName("a")[0],e=v.createElement("select"),f=e.appendChild(v.createElement("option")),g=a.getElementsByTagName("input")[0];
if(!(!b||!b.length||!d)){c.support={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/red/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.55$/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:g.value==="on",optSelected:f.selected,deleteExpando:true,optDisabled:false,checkClone:false,noCloneEvent:true,noCloneChecked:true,boxModel:null,inlineBlockNeedsLayout:false,
shrinkWrapBlocks:false,reliableHiddenOffsets:true};g.checked=true;c.support.noCloneChecked=g.cloneNode(true).checked;e.disabled=true;c.support.optDisabled=!f.disabled;var j=null;c.support.scriptEval=function(){if(j===null){var n=v.documentElement,l=v.createElement("script"),r="script"+c.now();try{l.appendChild(v.createTextNode("window."+r+"=1;"))}catch(y){}n.insertBefore(l,n.firstChild);if(I[r]){j=true;delete I[r]}else j=false;n.removeChild(l)}return j};try{delete a.test}catch(o){c.support.deleteExpando=
false}if(!a.addEventListener&&a.attachEvent&&a.fireEvent){a.attachEvent("onclick",function n(){c.support.noCloneEvent=false;a.detachEvent("onclick",n)});a.cloneNode(true).fireEvent("onclick")}a=v.createElement("div");a.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";b=v.createDocumentFragment();b.appendChild(a.firstChild);c.support.checkClone=b.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var n=v.createElement("div"),l=v.getElementsByTagName("body")[0];if(l){n.style.width=
n.style.paddingLeft="1px";l.appendChild(n);c.boxModel=c.support.boxModel=n.offsetWidth===2;if("zoom"in n.style){n.style.display="inline";n.style.zoom=1;c.support.inlineBlockNeedsLayout=n.offsetWidth===2;n.style.display="";n.innerHTML="<div style='width:4px;'></div>";c.support.shrinkWrapBlocks=n.offsetWidth!==2}n.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";var r=n.getElementsByTagName("td");c.support.reliableHiddenOffsets=r[0].offsetHeight===0;r[0].style.display=
"";r[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&r[0].offsetHeight===0;n.innerHTML="";l.removeChild(n).style.display="none"}});b=function(n){var l=v.createElement("div");n="on"+n;if(!l.attachEvent)return true;var r=n in l;if(!r){l.setAttribute(n,"return;");r=typeof l[n]==="function"}return r};c.support.submitBubbles=b("submit");c.support.changeBubbles=b("change");a=b=d=null}})();var Xa=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+(c.fn.jquery+
Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(a){a=a.nodeType?c.cache[a[c.expando]]:a[c.expando];return!!a&&!ka(a)},data:function(a,b,d,e){if(c.acceptData(a)){var f=c.expando,g=typeof b==="string",j=a.nodeType,o=j?c.cache:a,n=j?a[c.expando]:a[c.expando]&&c.expando;if(!((!n||e&&n&&!o[n][f])&&g&&d===z)){if(!n)if(j)a[c.expando]=n=++c.uuid;else n=c.expando;if(!o[n]){o[n]={};if(!j)o[n].toJSON=c.noop}if(typeof b==="object"||
typeof b==="function")if(e)o[n][f]=c.extend(o[n][f],b);else o[n]=c.extend(o[n],b);a=o[n];if(e){a[f]||(a[f]={});a=a[f]}if(d!==z)a[b]=d;if(b==="events"&&!a[b])return a[f]&&a[f].events;return g?a[b]:a}}},removeData:function(a,b,d){if(c.acceptData(a)){var e=c.expando,f=a.nodeType,g=f?c.cache:a,j=f?a[c.expando]:c.expando;if(g[j]){if(b){var o=d?g[j][e]:g[j];if(o){delete o[b];if(!ka(o))return}}if(d){delete g[j][e];if(!ka(g[j]))return}b=g[j][e];if(c.support.deleteExpando||g!=I)delete g[j];else g[j]=null;
if(b){g[j]={};if(!f)g[j].toJSON=c.noop;g[j][e]=b}else if(f)if(c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);else a[c.expando]=null}}},_data:function(a,b,d){return c.data(a,b,d,true)},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){d=c.data(this[0]);if(this[0].nodeType===
1)for(var e=this[0].attributes,f,g=0,j=e.length;g<j;g++){f=e[g].name;if(f.indexOf("data-")===0){f=f.substr(5);ta(this[0],f,d[f])}}}return d}else if(typeof a==="object")return this.each(function(){c.data(this,a)});var o=a.split(".");o[1]=o[1]?"."+o[1]:"";if(b===z){d=this.triggerHandler("getData"+o[1]+"!",[o[0]]);if(d===z&&this.length){d=c.data(this[0],a);d=ta(this[0],a,d)}return d===z&&o[1]?this.data(o[0]):d}else return this.each(function(){var n=c(this),l=[o[0],b];n.triggerHandler("setData"+o[1]+
"!",l);c.data(this,a,b);n.triggerHandler("changeData"+o[1]+"!",l)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var e=c._data(a,b);if(!d)return e||[];if(!e||c.isArray(d))e=c._data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}d.length||c.removeData(a,
b+"queue",true)}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===z)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Fa=
/[\n\t\r]/g,qa=/\s+/,kb=/\r/g,lb=/^(?:href|src|style)$/,mb=/^(?:button|input)$/i,nb=/^(?:button|input|object|select|textarea)$/i,ob=/^a(?:rea)?$/i,Ga=/^(?:radio|checkbox)$/i;c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,
a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(l){var r=c(this);r.addClass(a.call(this,l,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(qa),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1)if(f.className){for(var g=" "+f.className+" ",j=f.className,o=0,n=b.length;o<n;o++)if(g.indexOf(" "+b[o]+" ")<0)j+=" "+b[o];f.className=c.trim(j)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(n){var l=
c(this);l.removeClass(a.call(this,n,l.attr("class")))});if(a&&typeof a==="string"||a===z)for(var b=(a||"").split(qa),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var g=(" "+f.className+" ").replace(Fa," "),j=0,o=b.length;j<o;j++)g=g.replace(" "+b[j]+" "," ");f.className=c.trim(g)}else f.className=""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var g=c(this);g.toggleClass(a.call(this,
f,g.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var f,g=0,j=c(this),o=b,n=a.split(qa);f=n[g++];){o=e?o:!j.hasClass(f);j[o?"addClass":"removeClass"](f)}else if(d==="undefined"||d==="boolean"){this.className&&c._data(this,"__className__",this.className);this.className=this.className||a===false?"":c._data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Fa," ").indexOf(a)>-1)return true;return false},
val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){d=b.selectedIndex;var e=[],f=b.options;b=b.type==="select-one";if(d<0)return null;for(var g=b?d:0,j=b?d+1:f.length;g<j;g++){var o=f[g];if(o.selected&&(c.support.optDisabled?!o.disabled:o.getAttribute("disabled")===null)&&(!o.parentNode.disabled||!c.nodeName(o.parentNode,"optgroup"))){a=c(o).val();if(b)return a;e.push(a)}}if(b&&
!e.length&&f.length)return c(f[d]).val();return e}if(Ga.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(kb,"")}return z}var n=c.isFunction(a);return this.each(function(l){var r=c(this),y=a;if(this.nodeType===1){if(n)y=a.call(this,l,r.val());if(y==null)y="";else if(typeof y==="number")y+="";else if(c.isArray(y))y=c.map(y,function(B){return B==null?"":B+""});if(c.isArray(y)&&Ga.test(this.type))this.checked=c.inArray(r.val(),y)>=0;else if(c.nodeName(this,
"select")){var C=c.makeArray(y);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),C)>=0});if(!C.length)this.selectedIndex=-1}else this.value=y}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return z;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==z;b=e&&c.props[b]||b;if(a.nodeType===1){var g=lb.test(b);if((b in
a||a[b]!==z)&&e&&!g){if(f){b==="type"&&mb.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:nb.test(a.nodeName)||ob.test(a.nodeName)&&a.href?0:z;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,
""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return z;a=!c.support.hrefNormalized&&e&&g?a.getAttribute(b,2):a.getAttribute(b);return a===null?z:a}if(f)a[b]=d;return a[b]}});var ba=/\.(.*)$/,ra=/^(?:textarea|input|select)$/i,Za=/\./g,$a=/ /g,pb=/[^\w\s.|`]/g,qb=function(a){return a.replace(pb,"\\$&")};c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){try{if(c.isWindow(a)&&a!==I&&!a.frameElement)a=I}catch(f){}if(d===false)d=W;else if(!d)return;var g,j;if(d.handler){g=
d;d=g.handler}if(!d.guid)d.guid=c.guid++;if(j=c._data(a)){var o=j.events,n=j.handle;if(!o)j.events=o={};if(!n)j.handle=n=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(n.elem,arguments):z};n.elem=a;b=b.split(" ");for(var l,r=0,y;l=b[r++];){j=g?c.extend({},g):{handler:d,data:e};if(l.indexOf(".")>-1){y=l.split(".");l=y.shift();j.namespace=y.slice(0).sort().join(".")}else{y=[];j.namespace=""}j.type=l;if(!j.guid)j.guid=d.guid;var C=o[l],B=c.event.special[l]||{};if(!C){C=
o[l]=[];if(!B.setup||B.setup.call(a,e,y,n)===false)if(a.addEventListener)a.addEventListener(l,n,false);else a.attachEvent&&a.attachEvent("on"+l,n)}if(B.add){B.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}C.push(j);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=W;var f,g,j=0,o,n,l,r,y,C,B=c.hasData(a)&&c._data(a),H=B&&B.events;if(B&&H){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=
b||"";for(f in H)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[j++];){r=f;o=f.indexOf(".")<0;n=[];if(!o){n=f.split(".");f=n.shift();l=new RegExp("(^|\\.)"+c.map(n.slice(0).sort(),qb).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(y=H[f])if(d){r=c.event.special[f]||{};for(g=e||0;g<y.length;g++){C=y[g];if(d.guid===C.guid){if(o||l.test(C.namespace)){e==null&&y.splice(g--,1);r.remove&&r.remove.call(a,C)}if(e!=null)break}}if(y.length===0||e!=null&&y.length===1){if(!r.teardown||r.teardown.call(a,n)===false)c.removeEvent(a,
f,B.handle);delete H[f]}}else for(g=0;g<y.length;g++){C=y[g];if(o||l.test(C.namespace)){c.event.remove(a,r,C.handler,g);y.splice(g--,1)}}}if(c.isEmptyObject(H)){if(b=B.handle)b.elem=null;delete B.events;delete B.handle;c.isEmptyObject(B)&&c.removeData(a,z,true)}}}}},trigger:function(a,b,d,e){var f=a.type||a;if(!e){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,
function(){var y=this[c.expando];y&&y.events&&y.events[f]&&c.event.trigger(a,b,y.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return z;a.result=z;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=c._data(d,"handle"))&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(g){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var j;
e=a.target;var o=f.replace(ba,""),n=c.nodeName(e,"a")&&o==="click",l=c.event.special[o]||{};if((!l._default||l._default.call(d,a)===false)&&!n&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[o]){if(j=e["on"+o])e["on"+o]=null;c.event.triggered=true;e[o]()}}catch(r){}if(j)e["on"+o]=j;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var g=c.makeArray(arguments);a=g[0]=c.event.fix(a||I.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");
a.type=e.shift();d=e.slice(0).sort();e=new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c._data(this,"events");d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var j=d.length;f<j;f++){var o=d[f];if(b||e.test(o.namespace)){a.handler=o.handler;a.data=o.data;a.handleObj=o;o=o.handler.apply(this,g);if(o!==z){a.result=o;if(o===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.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 pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(a){if(a[c.expando])return a;var b=a;a=c.Event(b);for(var d=this.props.length,e;d;){e=this.props[--d];a[e]=b[e]}if(!a.target)a.target=a.srcElement||v;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=v.documentElement;d=v.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==z)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,ca(a.origType,a.selector),c.extend({},a,{handler:Ya,guid:a.handler.guid}))},remove:function(a){c.event.remove(this,
ca(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=v.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type;this.isDefaultPrevented=a.defaultPrevented||
a.returnValue===false||a.getPreventDefault&&a.getPreventDefault()?aa:W}else this.type=a;this.timeStamp=c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=aa;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=aa;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=
aa;this.stopPropagation()},isDefaultPrevented:W,isPropagationStopped:W,isImmediatePropagationStopped:W};var Ha=function(a){var b=a.relatedTarget;try{if(!(b!==v&&!b.parentNode)){for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}}catch(d){}},Ia=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ia:Ha,a)},
teardown:function(d){c.event.remove(this,b,d&&d.selector?Ia:Ha)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName&&this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)ua("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===
13)ua("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var Z,Ja=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},ga=function(a,b){var d=a.target,e,f;if(!(!ra.test(d.nodeName)||d.readOnly)){e=c._data(d,"_change_data");
f=Ja(d);if(a.type!=="focusout"||d.type!=="radio")c._data(d,"_change_data",f);if(!(e===z||f===e))if(e!=null||f){a.type="change";a.liveFired=z;c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:ga,beforedeactivate:ga,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")ga.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||
d==="select-multiple")ga.call(this,a)},beforeactivate:function(a){a=a.target;c._data(a,"_change_data",Ja(a))}},setup:function(){if(this.type==="file")return false;for(var a in Z)c.event.add(this,a+".specialChange",Z[a]);return ra.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ra.test(this.nodeName)}};Z=c.event.special.change.filters;Z.focus=Z.beforeactivate}v.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);
e.type=b;return c.event.handle.call(this,e)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var g in d)this[b](g,e,d[g],f);return this}if(c.isFunction(e)||e===false){f=e;e=z}var j=b==="one"?c.proxy(f,function(n){c(this).unbind(n,j);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{g=0;for(var o=this.length;g<
o;g++)c.event.add(this[g],d,j,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=
c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(e){var f=(c._data(this,"lastToggle"+a.guid)||0)%d;c._data(this,"lastToggle"+a.guid,f+1);e.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ka={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};
c.each(["live","die"],function(a,b){c.fn[b]=function(d,e,f,g){var j,o=0,n,l,r=g||this.selector;g=g?this:c(this.context);if(typeof d==="object"&&!d.preventDefault){for(j in d)g[b](j,e,d[j],r);return this}if(c.isFunction(e)){f=e;e=z}for(d=(d||"").split(" ");(j=d[o++])!=null;){n=ba.exec(j);l="";if(n){l=n[0];j=j.replace(ba,"")}if(j==="hover")d.push("mouseenter"+l,"mouseleave"+l);else{n=j;if(j==="focus"||j==="blur"){d.push(Ka[j]+l);j+=l}else j=(Ka[j]||j)+l;if(b==="live"){l=0;for(var y=g.length;l<y;l++)c.event.add(g[l],
"live."+ca(j,r),{data:e,selector:r,handler:f,origType:j,origHandler:f,preType:n})}else g.unbind("live."+ca(j,r),f)}}return this}});c.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(a,b){c.fn[b]=function(d,e){if(e==null){e=d;d=null}return arguments.length>0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});(function(){function a(h,
k,m,p,s,t){s=0;for(var A=p.length;s<A;s++){var w=p[s];if(w){var E=false;for(w=w[h];w;){if(w.sizcache===m){E=p[w.sizset];break}if(w.nodeType===1&&!t){w.sizcache=m;w.sizset=s}if(w.nodeName.toLowerCase()===k){E=w;break}w=w[h]}p[s]=E}}}function b(h,k,m,p,s,t){s=0;for(var A=p.length;s<A;s++){var w=p[s];if(w){var E=false;for(w=w[h];w;){if(w.sizcache===m){E=p[w.sizset];break}if(w.nodeType===1){if(!t){w.sizcache=m;w.sizset=s}if(typeof k!=="string"){if(w===k){E=true;break}}else if(l.filter(k,[w]).length>0){E=
w;break}}w=w[h]}p[s]=E}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=false,j=true,o=/\\/g,n=/\W/;[0,0].sort(function(){j=false;return 0});var l=function(h,k,m,p){m=m||[];var s=k=k||v;if(k.nodeType!==1&&k.nodeType!==9)return[];if(!h||typeof h!=="string")return m;var t,A,w,E,Q,N=true,O=l.isXML(k),i=[],q=h;do{d.exec("");if(t=d.exec(q)){q=t[3];i.push(t[1]);if(t[2]){E=t[3];
break}}}while(t);if(i.length>1&&y.exec(h))if(i.length===2&&r.relative[i[0]])A=G(i[0]+i[1],k);else for(A=r.relative[i[0]]?[k]:l(i.shift(),k);i.length;){h=i.shift();if(r.relative[h])h+=i.shift();A=G(h,A)}else{if(!p&&i.length>1&&k.nodeType===9&&!O&&r.match.ID.test(i[0])&&!r.match.ID.test(i[i.length-1])){t=l.find(i.shift(),k,O);k=t.expr?l.filter(t.expr,t.set)[0]:t.set[0]}if(k){t=p?{expr:i.pop(),set:H(p)}:l.find(i.pop(),i.length===1&&(i[0]==="~"||i[0]==="+")&&k.parentNode?k.parentNode:k,O);A=t.expr?l.filter(t.expr,
t.set):t.set;if(i.length>0)w=H(A);else N=false;for(;i.length;){t=Q=i.pop();if(r.relative[Q])t=i.pop();else Q="";if(t==null)t=k;r.relative[Q](w,t,O)}}else w=[]}w||(w=A);w||l.error(Q||h);if(f.call(w)==="[object Array]")if(N)if(k&&k.nodeType===1)for(h=0;w[h]!=null;h++){if(w[h]&&(w[h]===true||w[h].nodeType===1&&l.contains(k,w[h])))m.push(A[h])}else for(h=0;w[h]!=null;h++)w[h]&&w[h].nodeType===1&&m.push(A[h]);else m.push.apply(m,w);else H(w,m);if(E){l(E,s,m,p);l.uniqueSort(m)}return m};l.uniqueSort=function(h){if(L){g=
j;h.sort(L);if(g)for(var k=1;k<h.length;k++)h[k]===h[k-1]&&h.splice(k--,1)}return h};l.matches=function(h,k){return l(h,null,null,k)};l.matchesSelector=function(h,k){return l(k,null,null,[h]).length>0};l.find=function(h,k,m){var p;if(!h)return[];for(var s=0,t=r.order.length;s<t;s++){var A,w=r.order[s];if(A=r.leftMatch[w].exec(h)){var E=A[1];A.splice(1,1);if(E.substr(E.length-1)!=="\\"){A[1]=(A[1]||"").replace(o,"");p=r.find[w](A,k,m);if(p!=null){h=h.replace(r.match[w],"");break}}}}p||(p=typeof k.getElementsByTagName!==
"undefined"?k.getElementsByTagName("*"):[]);return{set:p,expr:h}};l.filter=function(h,k,m,p){for(var s,t,A=h,w=[],E=k,Q=k&&k[0]&&l.isXML(k[0]);h&&k.length;){for(var N in r.filter)if((s=r.leftMatch[N].exec(h))!=null&&s[2]){var O,i,q=r.filter[N];i=s[1];t=false;s.splice(1,1);if(i.substr(i.length-1)!=="\\"){if(E===w)w=[];if(r.preFilter[N])if(s=r.preFilter[N](s,E,m,w,p,Q)){if(s===true)continue}else t=O=true;if(s)for(var u=0;(i=E[u])!=null;u++)if(i){O=q(i,s,u,E);var x=p^!!O;if(m&&O!=null)if(x)t=true;else E[u]=
false;else if(x){w.push(i);t=true}}if(O!==z){m||(E=w);h=h.replace(r.match[N],"");if(!t)return[];break}}}if(h===A)if(t==null)l.error(h);else break;A=h}return E};l.error=function(h){throw"Syntax error, unrecognized expression: "+h;};var r=l.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|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(h){return h.getAttribute("href")},type:function(h){return h.getAttribute("type")}},relative:{"+":function(h,k){var m=
typeof k==="string",p=m&&!n.test(k);m=m&&!p;if(p)k=k.toLowerCase();p=0;for(var s=h.length,t;p<s;p++)if(t=h[p]){for(;(t=t.previousSibling)&&t.nodeType!==1;);h[p]=m||t&&t.nodeName.toLowerCase()===k?t||false:t===k}m&&l.filter(k,h,true)},">":function(h,k){var m,p=typeof k==="string",s=0,t=h.length;if(p&&!n.test(k))for(k=k.toLowerCase();s<t;s++){if(m=h[s]){m=m.parentNode;h[s]=m.nodeName.toLowerCase()===k?m:false}}else{for(;s<t;s++)if(m=h[s])h[s]=p?m.parentNode:m.parentNode===k;p&&l.filter(k,h,true)}},
"":function(h,k,m){var p,s=e++,t=b;if(typeof k==="string"&&!n.test(k)){p=k=k.toLowerCase();t=a}t("parentNode",k,s,h,p,m)},"~":function(h,k,m){var p,s=e++,t=b;if(typeof k==="string"&&!n.test(k)){p=k=k.toLowerCase();t=a}t("previousSibling",k,s,h,p,m)}},find:{ID:function(h,k,m){if(typeof k.getElementById!=="undefined"&&!m)return(h=k.getElementById(h[1]))&&h.parentNode?[h]:[]},NAME:function(h,k){if(typeof k.getElementsByName!=="undefined"){var m=[];k=k.getElementsByName(h[1]);for(var p=0,s=k.length;p<
s;p++)k[p].getAttribute("name")===h[1]&&m.push(k[p]);return m.length===0?null:m}},TAG:function(h,k){if(typeof k.getElementsByTagName!=="undefined")return k.getElementsByTagName(h[1])}},preFilter:{CLASS:function(h,k,m,p,s,t){h=" "+h[1].replace(o,"")+" ";if(t)return h;t=0;for(var A;(A=k[t])!=null;t++)if(A)if(s^(A.className&&(" "+A.className+" ").replace(/[\t\n\r]/g," ").indexOf(h)>=0))m||p.push(A);else if(m)k[t]=false;return false},ID:function(h){return h[1].replace(o,"")},TAG:function(h){return h[1].replace(o,
"").toLowerCase()},CHILD:function(h){if(h[1]==="nth"){h[2]||l.error(h[0]);h[2]=h[2].replace(/^\+|\s*/g,"");var k=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(h[2]==="even"&&"2n"||h[2]==="odd"&&"2n+1"||!/\D/.test(h[2])&&"0n+"+h[2]||h[2]);h[2]=k[1]+(k[2]||1)-0;h[3]=k[3]-0}else h[2]&&l.error(h[0]);h[0]=e++;return h},ATTR:function(h,k,m,p,s,t){k=h[1]=h[1].replace(o,"");if(!t&&r.attrMap[k])h[1]=r.attrMap[k];h[4]=(h[4]||h[5]||"").replace(o,"");if(h[2]==="~=")h[4]=" "+h[4]+" ";return h},PSEUDO:function(h,k,m,p,s){if(h[1]===
"not")if((d.exec(h[3])||"").length>1||/^\w/.test(h[3]))h[3]=l(h[3],null,null,k);else{h=l.filter(h[3],k,m,true^s);m||p.push.apply(p,h);return false}else if(r.match.POS.test(h[0])||r.match.CHILD.test(h[0]))return true;return h},POS:function(h){h.unshift(true);return h}},filters:{enabled:function(h){return h.disabled===false&&h.type!=="hidden"},disabled:function(h){return h.disabled===true},checked:function(h){return h.checked===true},selected:function(h){return h.selected===true},parent:function(h){return!!h.firstChild},
empty:function(h){return!h.firstChild},has:function(h,k,m){return!!l(m[3],h).length},header:function(h){return/h\d/i.test(h.nodeName)},text:function(h){return"text"===h.getAttribute("type")},radio:function(h){return"radio"===h.type},checkbox:function(h){return"checkbox"===h.type},file:function(h){return"file"===h.type},password:function(h){return"password"===h.type},submit:function(h){return"submit"===h.type},image:function(h){return"image"===h.type},reset:function(h){return"reset"===h.type},button:function(h){return"button"===
h.type||h.nodeName.toLowerCase()==="button"},input:function(h){return/input|select|textarea|button/i.test(h.nodeName)}},setFilters:{first:function(h,k){return k===0},last:function(h,k,m,p){return k===p.length-1},even:function(h,k){return k%2===0},odd:function(h,k){return k%2===1},lt:function(h,k,m){return k<m[3]-0},gt:function(h,k,m){return k>m[3]-0},nth:function(h,k,m){return m[3]-0===k},eq:function(h,k,m){return m[3]-0===k}},filter:{PSEUDO:function(h,k,m,p){var s=k[1],t=r.filters[s];if(t)return t(h,
m,k,p);else if(s==="contains")return(h.textContent||h.innerText||l.getText([h])||"").indexOf(k[3])>=0;else if(s==="not"){k=k[3];m=0;for(p=k.length;m<p;m++)if(k[m]===h)return false;return true}else l.error(s)},CHILD:function(h,k){var m=k[1],p=h;switch(m){case "only":case "first":for(;p=p.previousSibling;)if(p.nodeType===1)return false;if(m==="first")return true;p=h;case "last":for(;p=p.nextSibling;)if(p.nodeType===1)return false;return true;case "nth":m=k[2];var s=k[3];if(m===1&&s===0)return true;
k=k[0];var t=h.parentNode;if(t&&(t.sizcache!==k||!h.nodeIndex)){var A=0;for(p=t.firstChild;p;p=p.nextSibling)if(p.nodeType===1)p.nodeIndex=++A;t.sizcache=k}h=h.nodeIndex-s;return m===0?h===0:h%m===0&&h/m>=0}},ID:function(h,k){return h.nodeType===1&&h.getAttribute("id")===k},TAG:function(h,k){return k==="*"&&h.nodeType===1||h.nodeName.toLowerCase()===k},CLASS:function(h,k){return(" "+(h.className||h.getAttribute("class"))+" ").indexOf(k)>-1},ATTR:function(h,k){var m=k[1];h=r.attrHandle[m]?r.attrHandle[m](h):
h[m]!=null?h[m]:h.getAttribute(m);m=h+"";var p=k[2];k=k[4];return h==null?p==="!=":p==="="?m===k:p==="*="?m.indexOf(k)>=0:p==="~="?(" "+m+" ").indexOf(k)>=0:!k?m&&h!==false:p==="!="?m!==k:p==="^="?m.indexOf(k)===0:p==="$="?m.substr(m.length-k.length)===k:p==="|="?m===k||m.substr(0,k.length+1)===k+"-":false},POS:function(h,k,m,p){var s=r.setFilters[k[2]];if(s)return s(h,m,k,p)}}},y=r.match.POS,C=function(h,k){return"\\"+(k-0+1)};for(var B in r.match){r.match[B]=new RegExp(r.match[B].source+/(?![^\[]*\])(?![^\(]*\))/.source);
r.leftMatch[B]=new RegExp(/(^(?:.|\r|\n)*?)/.source+r.match[B].source.replace(/\\(\d+)/g,C))}var H=function(h,k){h=Array.prototype.slice.call(h,0);if(k){k.push.apply(k,h);return k}return h};try{Array.prototype.slice.call(v.documentElement.childNodes,0)}catch(K){H=function(h,k){var m=0;k=k||[];if(f.call(h)==="[object Array]")Array.prototype.push.apply(k,h);else if(typeof h.length==="number")for(var p=h.length;m<p;m++)k.push(h[m]);else for(;h[m];m++)k.push(h[m]);return k}}var L,P;if(v.documentElement.compareDocumentPosition)L=
function(h,k){if(h===k){g=true;return 0}if(!h.compareDocumentPosition||!k.compareDocumentPosition)return h.compareDocumentPosition?-1:1;return h.compareDocumentPosition(k)&4?-1:1};else{L=function(h,k){var m,p,s=[],t=[];m=h.parentNode;p=k.parentNode;var A=m;if(h===k){g=true;return 0}else if(m===p)return P(h,k);else if(m){if(!p)return 1}else return-1;for(;A;){s.unshift(A);A=A.parentNode}for(A=p;A;){t.unshift(A);A=A.parentNode}m=s.length;p=t.length;for(A=0;A<m&&A<p;A++)if(s[A]!==t[A])return P(s[A],t[A]);
return A===m?P(h,t[A],-1):P(s[A],k,1)};P=function(h,k,m){if(h===k)return m;for(h=h.nextSibling;h;){if(h===k)return-1;h=h.nextSibling}return 1}}l.getText=function(h){for(var k="",m,p=0;h[p];p++){m=h[p];if(m.nodeType===3||m.nodeType===4)k+=m.nodeValue;else if(m.nodeType!==8)k+=l.getText(m.childNodes)}return k};(function(){var h=v.createElement("div"),k="script"+(new Date).getTime(),m=v.documentElement;h.innerHTML="<a name='"+k+"'/>";m.insertBefore(h,m.firstChild);if(v.getElementById(k)){r.find.ID=function(p,
s,t){if(typeof s.getElementById!=="undefined"&&!t)return(s=s.getElementById(p[1]))?s.id===p[1]||typeof s.getAttributeNode!=="undefined"&&s.getAttributeNode("id").nodeValue===p[1]?[s]:z:[]};r.filter.ID=function(p,s){var t=typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id");return p.nodeType===1&&t&&t.nodeValue===s}}m.removeChild(h);m=h=null})();(function(){var h=v.createElement("div");h.appendChild(v.createComment(""));if(h.getElementsByTagName("*").length>0)r.find.TAG=function(k,m){m=
m.getElementsByTagName(k[1]);if(k[1]==="*"){k=[];for(var p=0;m[p];p++)m[p].nodeType===1&&k.push(m[p]);m=k}return m};h.innerHTML="<a href='#'></a>";if(h.firstChild&&typeof h.firstChild.getAttribute!=="undefined"&&h.firstChild.getAttribute("href")!=="#")r.attrHandle.href=function(k){return k.getAttribute("href",2)};h=null})();v.querySelectorAll&&function(){var h=l,k=v.createElement("div");k.innerHTML="<p class='TEST'></p>";if(!(k.querySelectorAll&&k.querySelectorAll(".TEST").length===0)){l=function(p,
s,t,A){s=s||v;if(!A&&!l.isXML(s)){var w=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(p);if(w&&(s.nodeType===1||s.nodeType===9))if(w[1])return H(s.getElementsByTagName(p),t);else if(w[2]&&r.find.CLASS&&s.getElementsByClassName)return H(s.getElementsByClassName(w[2]),t);if(s.nodeType===9){if(p==="body"&&s.body)return H([s.body],t);else if(w&&w[3]){var E=s.getElementById(w[3]);if(E&&E.parentNode){if(E.id===w[3])return H([E],t)}else return H([],t)}try{return H(s.querySelectorAll(p),t)}catch(Q){}}else if(s.nodeType===
1&&s.nodeName.toLowerCase()!=="object"){w=s;var N=(E=s.getAttribute("id"))||"__sizzle__",O=s.parentNode,i=/^\s*[+~]/.test(p);if(E)N=N.replace(/'/g,"\\$&");else s.setAttribute("id",N);if(i&&O)s=s.parentNode;try{if(!i||O)return H(s.querySelectorAll("[id='"+N+"'] "+p),t)}catch(q){}finally{E||w.removeAttribute("id")}}}return h(p,s,t,A)};for(var m in h)l[m]=h[m];k=null}}();(function(){var h=v.documentElement,k=h.matchesSelector||h.mozMatchesSelector||h.webkitMatchesSelector||h.msMatchesSelector,m=false;
try{k.call(v.documentElement,"[test!='']:sizzle")}catch(p){m=true}if(k)l.matchesSelector=function(s,t){t=t.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!l.isXML(s))try{if(m||!r.match.PSEUDO.test(t)&&!/!=/.test(t))return k.call(s,t)}catch(A){}return l(t,null,null,[s]).length>0}})();(function(){var h=v.createElement("div");h.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!h.getElementsByClassName||h.getElementsByClassName("e").length===0)){h.lastChild.className="e";if(h.getElementsByClassName("e").length!==
1){r.order.splice(1,0,"CLASS");r.find.CLASS=function(k,m,p){if(typeof m.getElementsByClassName!=="undefined"&&!p)return m.getElementsByClassName(k[1])};h=null}}})();l.contains=v.documentElement.contains?function(h,k){return h!==k&&(h.contains?h.contains(k):true)}:v.documentElement.compareDocumentPosition?function(h,k){return!!(h.compareDocumentPosition(k)&16)}:function(){return false};l.isXML=function(h){return(h=(h?h.ownerDocument||h:0).documentElement)?h.nodeName!=="HTML":false};var G=function(h,
k){var m,p=[],s="";for(k=k.nodeType?[k]:k;m=r.match.PSEUDO.exec(h);){s+=m[0];h=h.replace(r.match.PSEUDO,"")}h=r.relative[h]?h+"*":h;m=0;for(var t=k.length;m<t;m++)l(h,k[m],p);return l.filter(s,p)};c.find=l;c.expr=l.selectors;c.expr[":"]=c.expr.filters;c.unique=l.uniqueSort;c.text=l.getText;c.isXMLDoc=l.isXML;c.contains=l.contains})();var rb=/Until$/,sb=/^(?:parents|prevUntil|prevAll)/,tb=/,/,ab=/^.[^:#\[\.,]*$/,ub=Array.prototype.slice,vb=c.expr.match.POS,wb={children:true,contents:true,next:true,
prev:true};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,e=0,f=this.length;e<f;e++){d=b.length;c.find(a,this[e],b);if(e>0)for(var g=d;g<b.length;g++)for(var j=0;j<d;j++)if(b[j]===b[g]){b.splice(g--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,e=b.length;d<e;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(wa(this,a,false),"not",a)},filter:function(a){return this.pushStack(wa(this,a,true),"filter",
a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){var d=[],e,f,g=this[0];if(c.isArray(a)){var j,o={},n=1;if(g&&a.length){e=0;for(f=a.length;e<f;e++){j=a[e];o[j]||(o[j]=c.expr.match.POS.test(j)?c(j,b||this.context):j)}for(;g&&g.ownerDocument&&g!==b;){for(j in o){a=o[j];if(a.jquery?a.index(g)>-1:c(g).is(a))d.push({selector:j,elem:g,level:n})}g=g.parentNode;n++}}return d}j=vb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e<f;e++)for(g=this[e];g;)if(j?j.index(g)>
-1:c.find.matchesSelector(g,a)){d.push(g);break}else{g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(va(a[0])||va(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});
c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",
d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,e){var f=c.map(this,b,d),g=ub.call(arguments);rb.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1&&!wb[a]?c.unique(f):f;if((this.length>1||tb.test(e))&&sb.test(a))f=f.reverse();return this.pushStack(f,
a,g.join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===z||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var xb=/ jQuery\d+="(?:\d+|null)"/g,
sa=/^\s+/,La=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ma=/<([\w:]+)/,yb=/<tbody/i,zb=/<|&#?\w+;/,Na=/<(?:script|object|embed|option|style)/i,Oa=/checked\s*(?:[^=]|=\s*.checked.)/i,R={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,"",""]};R.optgroup=R.option;R.tbody=R.tfoot=R.colgroup=R.caption=R.thead;R.th=R.td;if(!c.support.htmlSerialize)R._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==z)return this.empty().append((this[0]&&this[0].ownerDocument||v).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,
d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},
unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=
c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));
c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);return this},clone:function(a,b){a=a==null?false:a;b=b==null?a:b;return this.map(function(){return c.clone(this,a,b)})},html:function(a){if(a===z)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(xb,""):null;else if(typeof a==="string"&&!Na.test(a)&&(c.support.leadingWhitespace||
!sa.test(a))&&!R[(Ma.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(La,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(e){this.empty().append(a)}}else c.isFunction(a)?this.each(function(f){var g=c(this);g.html(a.call(this,f,g.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),e=d.html();
d.replaceWith(a.call(this,b,e))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){var e,f,g,j=a[0],o=[];if(!c.support.checkClone&&arguments.length===3&&typeof j==="string"&&Oa.test(j))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(j))return this.each(function(y){var C=
c(this);a[0]=j.call(this,y,b?C.html():z);C.domManip(a,b,d)});if(this[0]){e=j&&j.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:c.buildFragment(a,this,o);g=e.fragment;if(f=g.childNodes.length===1?(g=g.firstChild):g.firstChild){b=b&&c.nodeName(f,"tr");for(var n=0,l=this.length,r=l-1;n<l;n++)d.call(b?bb(this[n],f):this[n],e.cacheable||l>1&&n<r?c.clone(g,true,true):g)}o.length&&c.each(o,cb)}return this}});c.buildFragment=function(a,b,d){var e,f,g;
b=b&&b[0]?b[0].ownerDocument||b[0]:v;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===v&&a[0].charAt(0)==="<"&&!Na.test(a[0])&&(c.support.checkClone||!Oa.test(a[0]))){f=true;if(g=c.fragments[a[0]])if(g!==1)e=g}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=g?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=
[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var g=d.length;f<g;f++){var j=(f>0?this.clone(true):this).get();c(d[f])[b](j);e=e.concat(j)}return this.pushStack(e,a,d.selector)}}});c.extend({clone:function(a,b,d){var e=a.cloneNode(true),f,g,j;if((!c.support.noCloneEvent||!c.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!c.isXMLDoc(a)){ya(a,e);f=da(a);g=da(e);for(j=0;f[j];++j)ya(f[j],
g[j])}if(b){xa(a,e);if(d){f=da(a);g=da(e);for(j=0;f[j];++j)xa(f[j],g[j])}}return e},clean:function(a,b,d,e){b=b||v;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||v;for(var f=[],g=0,j;(j=a[g])!=null;g++){if(typeof j==="number")j+="";if(j){if(typeof j==="string"&&!zb.test(j))j=b.createTextNode(j);else if(typeof j==="string"){j=j.replace(La,"<$1></$2>");var o=(Ma.exec(j)||["",""])[1].toLowerCase(),n=R[o]||R._default,l=n[0],r=b.createElement("div");for(r.innerHTML=
n[1]+j+n[2];l--;)r=r.lastChild;if(!c.support.tbody){l=yb.test(j);o=o==="table"&&!l?r.firstChild&&r.firstChild.childNodes:n[1]==="<table>"&&!l?r.childNodes:[];for(n=o.length-1;n>=0;--n)c.nodeName(o[n],"tbody")&&!o[n].childNodes.length&&o[n].parentNode.removeChild(o[n])}!c.support.leadingWhitespace&&sa.test(j)&&r.insertBefore(b.createTextNode(sa.exec(j)[0]),r.firstChild);j=r.childNodes}if(j.nodeType)f.push(j);else f=c.merge(f,j)}}if(d)for(g=0;f[g];g++)if(e&&c.nodeName(f[g],"script")&&(!f[g].type||f[g].type.toLowerCase()===
"text/javascript"))e.push(f[g].parentNode?f[g].parentNode.removeChild(f[g]):f[g]);else{f[g].nodeType===1&&f.splice.apply(f,[g+1,0].concat(c.makeArray(f[g].getElementsByTagName("script"))));d.appendChild(f[g])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.expando,g=c.event.special,j=c.support.deleteExpando,o=0,n;(n=a[o])!=null;o++)if(!(n.nodeName&&c.noData[n.nodeName.toLowerCase()]))if(d=n[c.expando]){if((b=e[d]&&e[d][f])&&b.events){for(var l in b.events)g[l]?c.event.remove(n,l):c.removeEvent(n,
l,b.handle);if(b.handle)b.handle.elem=null}if(j)delete n[c.expando];else n.removeAttribute&&n.removeAttribute(c.expando);delete e[d]}}});var Pa=/alpha\([^)]*\)/i,Ab=/opacity=([^)]*)/,Bb=/-([a-z])/ig,Cb=/([A-Z])/g,Qa=/^-?\d+(?:px)?$/i,Db=/^-?\d/,Eb={position:"absolute",visibility:"hidden",display:"block"},db=["Left","Right"],eb=["Top","Bottom"],$,T,ha,Fb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===z)return this;return c.access(this,a,b,true,function(d,
e,f){return f!==z?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){a=$(a,"opacity","opacity");return a===""?"1":a}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,g=c.camelCase(b),j=a.style,o=c.cssHooks[g];b=c.cssProps[g]||g;if(d!==z){if(!(typeof d==="number"&&isNaN(d)||
d==null)){if(typeof d==="number"&&!c.cssNumber[g])d+="px";if(!o||!("set"in o)||(d=o.set(a,d))!==z)try{j[b]=d}catch(n){}}}else{if(o&&"get"in o&&(f=o.get(a,false,e))!==z)return f;return j[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),g=c.cssHooks[f];b=c.cssProps[f]||f;if(g&&"get"in g&&(e=g.get(a,true,d))!==z)return e;else if($)return $(a,b,f)},swap:function(a,b,d){var e={};for(var f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(Bb,
Fb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var g;if(e){if(d.offsetWidth!==0)g=za(d,b,f);else c.swap(d,Eb,function(){g=za(d,b,f)});if(g<=0){g=$(d,b,b);if(g==="0px"&&ha)g=ha(d,b,b);if(g!=null)return g===""||g==="auto"?"0px":g}if(g<0||g==null){g=d.style[b];return g===""||g==="auto"?"0px":g}return typeof g==="string"?g:g+"px"}},set:function(d,e){if(Qa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity=
{get:function(a,b){return Ab.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){a=a.style;a.zoom=1;b=c.isNaN(b)?"":"alpha(opacity="+b*100+")";var d=a.filter||"";a.filter=Pa.test(d)?d.replace(Pa,b):a.filter+" "+b}};if(v.defaultView&&v.defaultView.getComputedStyle)T=function(a,b,d){var e;d=d.replace(Cb,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return z;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===
""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(v.documentElement.currentStyle)ha=function(a,b){var d,e=a.currentStyle&&a.currentStyle[b],f=a.runtimeStyle&&a.runtimeStyle[b],g=a.style;if(!Qa.test(e)&&Db.test(e)){d=g.left;if(f)a.runtimeStyle.left=a.currentStyle.left;g.left=b==="fontSize"?"1em":e||0;e=g.pixelLeft+"px";g.left=d;if(f)a.runtimeStyle.left=f}return e===""?"auto":e};$=T||ha;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===
0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var Gb=/%20/g,fb=/\[\]$/,Ra=/\r?\n/g,Hb=/#.*$/,Ib=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Jb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Kb=/^(?:GET|HEAD)$/,Lb=/^\/\//,Sa=/\?/,Mb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Nb=/^(?:select|textarea)/i,Ba=/\s+/,Ob=/([?&])_=[^&]*/,Pb=/(^|\-)([a-z])/g,
Qb=function(a,b,d){return b+d.toUpperCase()},Ta=/^([\w\+\.\-]+:)\/\/([^\/?#:]*)(?::(\d+))?/,Ua=c.fn.load,la={},Va={},U,V;try{U=v.location.href}catch(Wb){U=v.createElement("a");U.href="";U=U.href}V=Ta.exec(U.toLowerCase());c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ua)return Ua.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=z}else if(typeof b==="object"){b=c.param(b,
c.ajaxSettings.traditional);e="POST"}var g=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(j,o,n){n=j.responseText;if(j.isResolved()){j.done(function(l){n=l});g.html(f?c("<div>").append(n.replace(Mb,"")).find(f):n)}d&&g.each(d,[n,o,j])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||
Nb.test(this.nodeName)||Jb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d.replace(Ra,"\r\n")}}):{name:b.name,value:a.replace(Ra,"\r\n")}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.each(["get","post"],function(a,b){c[b]=function(d,e,f,g){if(c.isFunction(e)){g=g||f;f=e;e=z}return c.ajax({type:b,url:d,data:e,
success:f,dataType:g})}});c.extend({getScript:function(a,b){return c.get(a,z,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},ajaxSetup:function(a,b){if(b)c.extend(true,a,c.ajaxSettings,b);else{b=a;a=c.extend(true,c.ajaxSettings,b)}for(var d in{context:1,url:1})if(d in b)a[d]=b[d];else if(d in c.ajaxSettings)a[d]=c.ajaxSettings[d];return a},ajaxSettings:{url:U,isLocal:/(?:^file|^widget|\-extension):$/.test(V[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",
processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:new RegExp(eval("'html'")),json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":I.String,"text html":true,"text json":c.parseJSON,"text xml":c.parseXML}},ajaxPrefilter:Aa(la),ajaxTransport:Aa(Va),ajax:function(a,b){function d(m,p,s,t){if(K!==2){K=2;H&&clearTimeout(H);B=z;y=t||"";G.readyState=
m?4:0;var A,w,E;s=s?gb(e,G,s):z;if(m>=200&&m<300||m===304){if(e.ifModified){if(t=G.getResponseHeader("Last-Modified"))c.lastModified[l]=t;if(t=G.getResponseHeader("Etag"))c.etag[l]=t}if(m===304){p="notmodified";A=true}else try{w=hb(e,s);p="success";A=true}catch(Q){p="parsererror";E=Q}}else{E=p;if(!p||m){p="error";if(m<0)m=0}}G.status=m;G.statusText=p;A?j.resolveWith(f,[w,p,G]):j.rejectWith(f,[G,p,E]);G.statusCode(n);n=z;if(L)g.trigger("ajax"+(A?"Success":"Error"),[G,e,A?w:E]);o.resolveWith(f,[G,p]);
if(L){g.trigger("ajaxComplete",[G,e]);--c.active||c.event.trigger("ajaxStop")}}}if(typeof a==="object"){b=a;a=z}b=b||{};var e=c.ajaxSetup({},b),f=e.context||e,g=f!==e&&(f.nodeType||f instanceof c)?c(f):c.event,j=c.Deferred(),o=c._Deferred(),n=e.statusCode||{},l,r={},y,C,B,H,K=0,L,P,G={readyState:0,setRequestHeader:function(m,p){K||(r[m.toLowerCase().replace(Pb,Qb)]=p);return this},getAllResponseHeaders:function(){return K===2?y:null},getResponseHeader:function(m){var p;if(K===2){if(!C)for(C={};p=
Ib.exec(y);)C[p[1].toLowerCase()]=p[2];p=C[m.toLowerCase()]}return p===z?null:p},overrideMimeType:function(m){if(!K)e.mimeType=m;return this},abort:function(m){m=m||"abort";B&&B.abort(m);d(0,m);return this}};j.promise(G);G.success=G.done;G.error=G.fail;G.complete=o.done;G.statusCode=function(m){if(m){var p;if(K<2)for(p in m)n[p]=[n[p],m[p]];else{p=m[G.status];G.then(p,p)}}return this};e.url=((a||e.url)+"").replace(Hb,"").replace(Lb,V[1]+"//");e.dataTypes=c.trim(e.dataType||"*").toLowerCase().split(Ba);
if(!e.crossDomain){a=Ta.exec(e.url.toLowerCase());e.crossDomain=!!(a&&(a[1]!=V[1]||a[2]!=V[2]||(a[3]||(a[1]==="http:"?80:443))!=(V[3]||(V[1]==="http:"?80:443))))}if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);ea(la,e,b,G);if(K===2)return false;L=e.global;e.type=e.type.toUpperCase();e.hasContent=!Kb.test(e.type);L&&c.active++===0&&c.event.trigger("ajaxStart");if(!e.hasContent){if(e.data)e.url+=(Sa.test(e.url)?"&":"?")+e.data;l=e.url;if(e.cache===false){a=c.now();
var h=e.url.replace(Ob,"$1_="+a);e.url=h+(h===e.url?(Sa.test(e.url)?"&":"?")+"_="+a:"")}}if(e.data&&e.hasContent&&e.contentType!==false||b.contentType)r["Content-Type"]=e.contentType;if(e.ifModified){l=l||e.url;if(c.lastModified[l])r["If-Modified-Since"]=c.lastModified[l];if(c.etag[l])r["If-None-Match"]=c.etag[l]}r.Accept=e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+(e.dataTypes[0]!=="*"?", */*; q=0.01":""):e.accepts["*"];for(P in e.headers)G.setRequestHeader(P,e.headers[P]);
if(e.beforeSend&&(e.beforeSend.call(f,G,e)===false||K===2)){G.abort();return false}for(P in{success:1,error:1,complete:1})G[P](e[P]);if(B=ea(Va,e,b,G)){G.readyState=1;L&&g.trigger("ajaxSend",[G,e]);if(e.async&&e.timeout>0)H=setTimeout(function(){G.abort("timeout")},e.timeout);try{K=1;B.send(r,d)}catch(k){status<2?d(-1,k):c.error(k)}}else d(-1,"No Transport");return G},param:function(a,b){var d=[],e=function(g,j){j=c.isFunction(j)?j():j;d[d.length]=encodeURIComponent(g)+"="+encodeURIComponent(j)};
if(b===z)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery&&!c.isPlainObject(a))c.each(a,function(){e(this.name,this.value)});else for(var f in a)ma(f,a[f],b,e);return d.join("&").replace(Gb,"+")}});c.extend({active:0,lastModified:{},etag:{}});var Rb=c.now(),ia=/(\=)\?(&|$)|()\?\?()/i;c.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return c.expando+"_"+Rb++}});c.ajaxPrefilter("json jsonp",function(a,b,d){var e=typeof a.data==="string";if(a.dataTypes[0]==="jsonp"||b.jsonpCallback||b.jsonp!=
null||a.jsonp!==false&&(ia.test(a.url)||e&&ia.test(a.data))){var f,g=a.jsonpCallback=c.isFunction(a.jsonpCallback)?a.jsonpCallback():a.jsonpCallback,j=I[g];b=a.url;var o=a.data,n="$1"+g+"$2",l=function(){I[g]=j;f&&c.isFunction(j)&&I[g](f[0])};if(a.jsonp!==false){b=b.replace(ia,n);if(a.url===b){if(e)o=o.replace(ia,n);if(a.data===o)b+=(/\?/.test(b)?"&":"?")+a.jsonp+"="+g}}a.url=b;a.data=o;I[g]=function(r){f=[r]};d.then(l,l);a.converters["script json"]=function(){f||c.error(g+" was not called");return f[0]};
a.dataTypes[0]="json";return"script"}});c.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){c.globalEval(a);return a}}});c.ajaxPrefilter("script",function(a){if(a.cache===z)a.cache=false;if(a.crossDomain){a.type="GET";a.global=false}});c.ajaxTransport("script",function(a){if(a.crossDomain){var b,d=v.head||v.getElementsByTagName("head")[0]||v.documentElement;
return{send:function(e,f){b=v.createElement("script");b.async="async";if(a.scriptCharset)b.charset=a.scriptCharset;b.src=a.url;b.onload=b.onreadystatechange=function(g,j){if(!b.readyState||/loaded|complete/.test(b.readyState)){b.onload=b.onreadystatechange=null;d&&b.parentNode&&d.removeChild(b);b=z;j||f(200,"success")}};d.insertBefore(b,d.firstChild)},abort:function(){b&&b.onload(0,1)}}}});var Sb=c.now(),X;c.ajaxSettings.xhr=I.ActiveXObject?function(){return!this.isLocal&&Ca()||jb()}:Ca;T=c.ajaxSettings.xhr();
c.support.ajax=!!T;c.support.cors=T&&"withCredentials"in T;T=z;c.support.ajax&&c.ajaxTransport(function(a){if(!a.crossDomain||c.support.cors){var b;return{send:function(d,e){var f=a.xhr(),g,j;a.username?f.open(a.type,a.url,a.async,a.username,a.password):f.open(a.type,a.url,a.async);if(a.xhrFields)for(j in a.xhrFields)f[j]=a.xhrFields[j];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType);if(!(a.crossDomain&&!a.hasContent)&&!d["X-Requested-With"])d["X-Requested-With"]="XMLHttpRequest";try{for(j in d)f.setRequestHeader(j,
d[j])}catch(o){}f.send(a.hasContent&&a.data||null);b=function(n,l){var r,y,C,B,H;try{if(b&&(l||f.readyState===4)){b=z;if(g){f.onreadystatechange=c.noop;delete X[g]}if(l)f.readyState!==4&&f.abort();else{r=f.status;C=f.getAllResponseHeaders();B={};if((H=f.responseXML)&&H.documentElement)B.xml=H;B.text=f.responseText;try{y=f.statusText}catch(K){y=""}if(!r&&a.isLocal&&!a.crossDomain)r=B.text?200:404;else if(r===1223)r=204}}}catch(L){l||e(-1,L)}B&&e(r,y,B,C)};if(!a.async||f.readyState===4)b();else{if(!X){X=
{};ib()}g=Sb++;f.onreadystatechange=X[g]=b}},abort:function(){b&&b(0,1)}}}});var na={},Tb=/^(?:toggle|show|hide)$/,Ub=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,ja,Da=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(Y("show",3),a,b,d);else{d=0;for(var e=this.length;d<e;d++){a=this[d];b=a.style.display;if(!c._data(a,"olddisplay")&&b==="none")b=
a.style.display="";b===""&&c.css(a,"display")==="none"&&c._data(a,"olddisplay",Ea(a.nodeName))}for(d=0;d<e;d++){a=this[d];b=a.style.display;if(b===""||b==="none")a.style.display=c._data(a,"olddisplay")||""}return this}},hide:function(a,b,d){if(a||a===0)return this.animate(Y("hide",3),a,b,d);else{a=0;for(b=this.length;a<b;a++){d=c.css(this[a],"display");d!=="none"&&!c._data(this[a],"olddisplay")&&c._data(this[a],"olddisplay",d)}for(a=0;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,
toggle:function(a,b,d){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var f=e?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(Y("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){var f=c.speed(b,d,e);if(c.isEmptyObject(a))return this.each(f.complete);return this[f.queue===false?
"each":"queue"](function(){var g=c.extend({},f),j,o=this.nodeType===1,n=o&&c(this).is(":hidden"),l=this;for(j in a){var r=c.camelCase(j);if(j!==r){a[r]=a[j];delete a[j];j=r}if(a[j]==="hide"&&n||a[j]==="show"&&!n)return g.complete.call(this);if(o&&(j==="height"||j==="width")){g.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(c.css(this,"display")==="inline"&&c.css(this,"float")==="none")if(c.support.inlineBlockNeedsLayout)if(Ea(this.nodeName)==="inline")this.style.display=
"inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(c.isArray(a[j])){(g.specialEasing=g.specialEasing||{})[j]=a[j][1];a[j]=a[j][0]}}if(g.overflow!=null)this.style.overflow="hidden";g.curAnim=c.extend({},a);c.each(a,function(y,C){var B=new c.fx(l,g,y);if(Tb.test(C))B[C==="toggle"?n?"show":"hide":C](a);else{var H=Ub.exec(C),K=B.cur();if(H){C=parseFloat(H[2]);var L=H[3]||(c.cssNumber[y]?"":"px");if(L!=="px"){c.style(l,y,(C||1)+L);K=(C||1)/B.cur()*
K;c.style(l,y,K+L)}if(H[1])C=(H[1]==="-="?-1:1)*C+K;B.custom(K,C,L)}else B.custom(K,C,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:Y("show",1),slideUp:Y("hide",1),slideToggle:Y("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b,
d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a*
Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=c.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,d){function e(j){return f.step(j)}
var f=this,g=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||(c.cssNumber[this.prop]?"":"px");this.now=this.start;this.pos=this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!ja)ja=setInterval(g.tick,g.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);
this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,g=this.options;c.each(["","X","Y"],function(o,n){f.style["overflow"+n]=g.overflow[o]})}this.options.hide&&c(this.elem).hide();
if(this.options.hide||this.options.show)for(var j in this.options.curAnim)c.style(this.elem,j,this.options.orig[j]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,
{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},interval:13,stop:function(){clearInterval(ja);ja=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,
function(b){return a===b.elem}).length};var Vb=/^t(?:able|d|h)$/i,Wa=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in v.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(j){c.offset.setOffset(this,a,j)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,g=f.documentElement;if(!d||!c.contains(g,b))return d?{top:d.top,left:d.left}:{top:0,left:0};b=f.body;f=oa(f);
return{top:d.top+(f.pageYOffset||c.support.boxModel&&g.scrollTop||b.scrollTop)-(g.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||c.support.boxModel&&g.scrollLeft||b.scrollLeft)-(g.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d,e=b.offsetParent,f=b,g=b.ownerDocument,j=g.documentElement,o=g.body;d=
(g=g.defaultView)?g.getComputedStyle(b,null):b.currentStyle;for(var n=b.offsetTop,l=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==j;){if(c.offset.supportsFixedPosition&&d.position==="fixed")break;d=g?g.getComputedStyle(b,null):b.currentStyle;n-=b.scrollTop;l-=b.scrollLeft;if(b===e){n+=b.offsetTop;l+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&Vb.test(b.nodeName))){n+=parseFloat(d.borderTopWidth)||0;l+=parseFloat(d.borderLeftWidth)||0}f=e;e=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&
d.overflow!=="visible"){n+=parseFloat(d.borderTopWidth)||0;l+=parseFloat(d.borderLeftWidth)||0}d=d}if(d.position==="relative"||d.position==="static"){n+=o.offsetTop;l+=o.offsetLeft}if(c.offset.supportsFixedPosition&&d.position==="fixed"){n+=Math.max(j.scrollTop,o.scrollTop);l+=Math.max(j.scrollLeft,o.scrollLeft)}return{top:n,left:l}};c.offset={initialize:function(){var a=v.body,b=v.createElement("div"),d,e,f,g=parseFloat(c.css(a,"marginTop"))||0;c.extend(b.style,{position:"absolute",top:0,left:0,
margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<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>";a.insertBefore(b,a.firstChild);d=b.firstChild;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==
5;this.doesAddBorderForTableAndCells=f.offsetTop===5;e.style.position="fixed";e.style.top="20px";this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15;e.style.position=e.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==g;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=
parseFloat(c.css(a,"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),g=f.offset(),j=c.css(a,"top"),o=c.css(a,"left"),n=e==="absolute"&&c.inArray("auto",[j,o])>-1;e={};var l={};if(n)l=f.position();j=n?l.top:parseInt(j,10)||0;o=n?l.left:parseInt(o,10)||0;if(c.isFunction(b))b=b.call(a,d,g);if(b.top!=null)e.top=b.top-g.top+j;if(b.left!=null)e.left=b.left-g.left+o;"using"in
b?b.using.call(a,e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Wa.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||
v.body;a&&!Wa.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],g;if(!f)return null;if(e!==z)return this.each(function(){if(g=oa(this))g.scrollTo(!a?e:c(g).scrollLeft(),a?e:c(g).scrollTop());else this[d]=e});else return(g=oa(f))?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:f[d]}});c.each(["Height","Width"],
function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(j){var o=c(this);o[d](e.call(this,j,o[d]()))});if(c.isWindow(f)){var g=f.document.documentElement["client"+b];return f.document.compatMode==="CSS1Compat"&&g||f.document.body["client"+
b]||g}else if(f.nodeType===9)return Math.max(f.documentElement["client"+b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]);else if(e===z){f=c.css(f,d);g=parseFloat(f);return c.isNaN(g)?f:g}else return this.css(d,typeof e==="string"?e:e+"px")}});I.jQuery=I.$=c})(window);
/**
 *  SWFObject v2.2 <http://code.google.com/p/swfobject/> 
 *  is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
 *
 *  This source has been modified to meet iWin validation and minification standards.
 *
 *  Last JSLint: 6/1/2010 - down from several hundred to 3 'suggestion' errors in basic mode. 
 */
/*jslint white: true, browser: true, devel: true, eqeqeq: true */
var swfobject = function () {
    var D = "undefined",
    r = "object",
    S = "Shockwave Flash",
    W = "ShockwaveFlash.ShockwaveFlash",
    q = "application/x-shockwave-flash",
    R = "SWFObjectExprInst",
    x = "onreadystatechange",
    O = window,
    j = document,
    t = navigator,
    T = false,
    U = [h],
    o = [],
    N = [],
    I = [],
    l,
    Q,
    E,
    B,
    J = false,
    a = false,
    n,
    G,
    m = true,
    M = function () {
        var aa = typeof j.getElementById !== D && typeof j.getElementsByTagName !== D && typeof j.createElement !== D,
        ah = t.userAgent.toLowerCase(),
        Y = t.platform.toLowerCase(),
        ae = Y ? /win/.test(Y) : /win/.test(ah),
        ac = Y ? /mac/.test(Y) : /mac/.test(ah),
        af = /webkit/.test(ah) ? parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false,
        X = !+"\v1",
        ag = [0, 0, 0],
        ab = null;
        if (typeof t.plugins !== D && typeof t.plugins[S] === r) {
            ab = t.plugins[S].description;
            if (ab && !(typeof t.mimeTypes !== D && t.mimeTypes[q] && !t.mimeTypes[q].enabledPlugin)) {
                T = true;
                X = false;
                ab = ab.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
                ag[0] = parseInt(ab.replace(/^(.*)\..*$/, "$1"), 10);
                ag[1] = parseInt(ab.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
                ag[2] = /[a-zA-Z]/.test(ab) ? parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
            }
        } else {
            if (typeof O.ActiveXObject !== D) {
                try {
                    var ad = new ActiveXObject(W);
                    if (ad) {
                        ab = ad.GetVariable("$version");
                        if (ab) {
                            X = true;
                            ab = ab.split(" ")[1].split(",");
                            ag = [parseInt(ab[0], 10), parseInt(ab[1], 10), parseInt(ab[2], 10)];
                        }
                    }
                } catch (Z) {}
            }
        }
        return {
            w3: aa,
            pv: ag,
            wk: af,
            ie: X,
            win: ae,
            mac: ac
        };
    }(),
    k = function () {
        if (!M.w3) {
            return;
        }
        if ((typeof j.readyState !== D && j.readyState === "complete") || (typeof j.readyState === D && (j.getElementsByTagName("body")[0] || j.body))) {
            f();
        }
        if (!J) {
            if (typeof j.addEventListener !== D) {
                j.addEventListener("DOMContentLoaded", f, false);
            }
            if (M.ie && M.win) {
                j.attachEvent(x, function () {
                    if (j.readyState === "complete") {
                        j.detachEvent(x, arguments.callee);
                        f();
                    }
                });
                if (O === top) {
                    (function () {
                        if (J) {
                            return;
                        }
                        try {
                            j.documentElement.doScroll("left");
                        } catch (X) {
                            setTimeout(arguments.callee, 0);
                            return;
                        }
                        f();
                    })();
                }
            }
            if (M.wk) {
                (function () {
                    if (J) {
                        return;
                    }
                    if (!/loaded|complete/.test(j.readyState)) {
                        setTimeout(arguments.callee, 0);
                        return;
                    }
                    f();
                })();
            }
            s(f);
        }
    }();
    function f() {
        if (J) {
            return;
        }
        try {
            var Z = j.getElementsByTagName("body")[0].appendChild(C("span"));
            Z.parentNode.removeChild(Z);
        } catch (aa) {
            return;
        }
        J = true;
        var X = U.length;
        for (var Y = 0; Y < X; Y++) {
            U[Y]();
        }
    }
    function K(X) {
        if (J) {
            X();
        } else {
            U[U.length] = X;
        }
    }
    function s(Y) {
        if (typeof O.addEventListener !== D) {
            O.addEventListener("load", Y, false);
        } else {
            if (typeof j.addEventListener !== D) {
                j.addEventListener("load", Y, false);
            } else {
                if (typeof O.attachEvent !== D) {
                    i(O, "onload", Y);
                } else {
                    if (typeof O.onload === "function") {
                        var X = O.onload;
                        O.onload = function () {
                            X();
                            Y();
                        };
                    } else {
                        O.onload = Y;
                    }
                }
            }
        }
    }
    function h() {
        if (T) {
            V();
        } else {
            H();
        }
    }
    function V() {
        var X = j.getElementsByTagName("body")[0];
        var aa = C(r);
        aa.setAttribute("type", q);
        var Z = X.appendChild(aa);
        if (Z) {
            var Y = 0;
            (function () {
                if (typeof Z.GetVariable !== D) {
                    var ab = Z.GetVariable("$version");
                    if (ab) {
                        ab = ab.split(" ")[1].split(",");
                        M.pv = [parseInt(ab[0], 10), parseInt(ab[1], 10), parseInt(ab[2], 10)];
                    }
                } else {
                    if (Y < 10) {
                        Y++;
                        setTimeout(arguments.callee, 10);
                        return;
                    }
                }
                X.removeChild(aa);
                Z = null;
                H();
            })();
        } else {
            H();
        }
    }
    function H() {
        var ag = o.length;
        if (ag > 0) {
            for (var af = 0; af < ag; af++) {
                var Y = o[af].id;
                var ab = o[af].callbackFn;
                var aa = {
                    success: false,
                    id: Y
                };
                if (M.pv[0] > 0) {
                    var ae = c(Y);
                    if (ae) {
                        if (F(o[af].swfVersion) && !(M.wk && M.wk < 312)) {
                            w(Y, true);
                            if (ab) {
                                aa.success = true;
                                aa.ref = z(Y);
                                ab(aa);
                            }
                        } else {
                            if (o[af].expressInstall && A()) {
                                var ai = {};
                                ai.data = o[af].expressInstall;
                                ai.width = ae.getAttribute("width") || "0";
                                ai.height = ae.getAttribute("height") || "0";
                                if (ae.getAttribute("class")) {
                                    ai.styleclass = ae.getAttribute("class");
                                }
                                if (ae.getAttribute("align")) {
                                    ai.align = ae.getAttribute("align");
                                }
                                var ah = {};
                                var X = ae.getElementsByTagName("param");
                                var ac = X.length;
                                for (var ad = 0; ad < ac; ad++) {
                                    if (X[ad].getAttribute("name").toLowerCase() !== "movie") {
                                        ah[X[ad].getAttribute("name")] = X[ad].getAttribute("value");
                                    }
                                }
                                P(ai, ah, Y, ab);
                            } else {
                                p(ae);
                                if (ab) {
                                    ab(aa);
                                }
                            }
                        }
                    }
                } else {
                    w(Y, true);
                    if (ab) {
                        var Z = z(Y);
                        if (Z && typeof Z.SetVariable !== D) {
                            aa.success = true;
                            aa.ref = Z;
                        }
                        ab(aa);
                    }
                }
            }
        }
    }
    function z(aa) {
        var X = null;
        var Y = c(aa);
        if (Y && Y.nodeName === "OBJECT") {
            if (typeof Y.SetVariable !== D) {
                X = Y;
            } else {
                var Z = Y.getElementsByTagName(r)[0];
                if (Z) {
                    X = Z;
                }
            }
        }
        return X;
    }
    function A() {
        return ! a && F("6.0.65") && (M.win || M.mac) && !(M.wk && M.wk < 312);
    }
    function P(aa, ab, X, Z) {
        a = true;
        E = Z || null;
        B = {
            success: false,
            id: X
        };
        var ae = c(X);
        if (ae) {
            if (ae.nodeName === "OBJECT") {
                l = g(ae);
                Q = null;
            } else {
                l = ae;
                Q = X;
            }
            aa.id = R;
            if (typeof aa.width === D || (!/%$/.test(aa.width) && parseInt(aa.width, 10) < 310)) {
                aa.width = "310";
            }
            if (typeof aa.height === D || (!/%$/.test(aa.height) && parseInt(aa.height, 10) < 137)) {
                aa.height = "137";
            }
            j.title = j.title.slice(0, 47) + " - Flash Player Installation";
            var ad = M.ie && M.win ? "ActiveX": "PlugIn",
            ac = "MMredirectURL=" + O.location.toString().replace(/&/g, "%26") + "&MMplayerType=" + ad + "&MMdoctitle=" + j.title;
            if (typeof ab.flashvars !== D) {
                ab.flashvars += "&" + ac;
            } else {
                ab.flashvars = ac;
            }
            if (M.ie && M.win && ae.readyState !== 4) {
                var Y = C("div");
                X += "SWFObjectNew";
                Y.setAttribute("id", X);
                ae.parentNode.insertBefore(Y, ae);
                ae.style.display = "none";
                (function () {
                    if (ae.readyState === 4) {
                        ae.parentNode.removeChild(ae);
                    } else {
                        setTimeout(arguments.callee, 10);
                    }
                })();
            }
            u(aa, ab, X);
        }
    }
    function p(Y) {
        if (M.ie && M.win && Y.readyState !== 4) {
            var X = C("div");
            Y.parentNode.insertBefore(X, Y);
            X.parentNode.replaceChild(g(Y), X);
            Y.style.display = "none";
            (function () {
                if (Y.readyState === 4) {
                    Y.parentNode.removeChild(Y);
                } else {
                    setTimeout(arguments.callee, 10);
                }
            })();
        } else {
            Y.parentNode.replaceChild(g(Y), Y);
        }
    }
    function g(ab) {
        var aa = C("div");
        if (M.win && M.ie) {
            aa.innerHTML = ab.innerHTML;
        } else {
            var Y = ab.getElementsByTagName(r)[0];
            if (Y) {
                var ad = Y.childNodes;
                if (ad) {
                    var X = ad.length;
                    for (var Z = 0; Z < X; Z++) {
                        if (! (ad[Z].nodeType === 1 && ad[Z].nodeName === "PARAM") && !(ad[Z].nodeType === 8)) {
                            aa.appendChild(ad[Z].cloneNode(true));
                        }
                    }
                }
            }
        }
        return aa;
    }
    function u(ai, ag, Y) {
        var X,
        aa = c(Y);
        if (M.wk && M.wk < 312) {
            return X;
        }
        if (aa) {
            if (typeof ai.id === D) {
                ai.id = Y;
            }
            if (M.ie && M.win) {
                var ah = "";
                for (var ae in ai) {
                    if (ai[ae] !== Object.prototype[ae]) {
                        if (ae.toLowerCase() === "data") {
                            ag.movie = ai[ae];
                        } else {
                            if (ae.toLowerCase() === "styleclass") {
                                ah += ' class="' + ai[ae] + '"';
                            } else {
                                if (ae.toLowerCase() !== "classid") {
                                    ah += " " + ae + '="' + ai[ae] + '"';
                                }
                            }
                        }
                    }
                }
                var af = "";
                for (var ad in ag) {
                    if (ag[ad] !== Object.prototype[ad]) {
                        af += '<param name="' + ad + '" value="' + ag[ad] + '" />';
                    }
                }
                aa.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + ah + ">" + af + "</object>";
                N[N.length] = ai.id;
                X = c(ai.id);
            } else {
                var Z = C(r);
                Z.setAttribute("type", q);
                for (var ac in ai) {
                    if (ai[ac] !== Object.prototype[ac]) {
                        if (ac.toLowerCase() === "styleclass") {
                            Z.setAttribute("class", ai[ac]);
                        } else {
                            if (ac.toLowerCase() !== "classid") {
                                Z.setAttribute(ac, ai[ac]);
                            }
                        }
                    }
                }
                for (var ab in ag) {
                    if (ag[ab] !== Object.prototype[ab] && ab.toLowerCase() !== "movie") {
                        e(Z, ab, ag[ab]);
                    }
                }
                aa.parentNode.replaceChild(Z, aa);
                X = Z;
            }
        }
        return X;
    }
    function e(Z, X, Y) {
        var aa = C("param");
        aa.setAttribute("name", X);
        aa.setAttribute("value", Y);
        Z.appendChild(aa);
    }
    function y(Y) {
        var X = c(Y);
        if (X && X.nodeName === "OBJECT") {
            if (M.ie && M.win) {
                X.style.display = "none";
                (function () {
                    if (X.readyState === 4) {
                        b(Y);
                    } else {
                        setTimeout(arguments.callee, 10);
                    }
                })();
            } else {
                X.parentNode.removeChild(X);
            }
        }
    }
    function b(Z) {
        var Y = c(Z);
        if (Y) {
            for (var X in Y) {
                if (typeof Y[X] === "function") {
                    Y[X] = null;
                }
            }
            Y.parentNode.removeChild(Y);
        }
    }
    function c(Z) {
        var X = null;
        try {
            X = j.getElementById(Z);
        } catch (Y) {}
        return X;
    }
    function C(X) {
        return j.createElement(X);
    }
    function i(Z, X, Y) {
        Z.attachEvent(X, Y);
        I[I.length] = [Z, X, Y];
    }
    function F(Z) {
        var Y = M.pv,
        X = Z.split(".");
        X[0] = parseInt(X[0], 10);
        X[1] = parseInt(X[1], 10) || 0;
        X[2] = parseInt(X[2], 10) || 0;
        return (Y[0] > X[0] || (Y[0] === X[0] && Y[1] > X[1]) || (Y[0] === X[0] && Y[1] === X[1] && Y[2] >= X[2])) ? true : false;
    }
    function v(ac, Y, ad, ab) {
        if (M.ie && M.mac) {
            return;
        }
        var aa = j.getElementsByTagName("head")[0];
        if (!aa) {
            return;
        }
        var X = (ad && typeof ad === "string") ? ad : "screen";
        if (ab) {
            n = null;
            G = null;
        }
        if (!n || G !== X) {
            var Z = C("style");
            Z.setAttribute("type", "text/css");
            Z.setAttribute("media", X);
            n = aa.appendChild(Z);
            if (M.ie && M.win && typeof j.styleSheets !== D && j.styleSheets.length > 0) {
                n = j.styleSheets[j.styleSheets.length - 1];
            }
            G = X;
        }
        if (M.ie && M.win) {
            if (n && typeof n.addRule === r) {
                n.addRule(ac, Y);
            }
        } else {
            if (ac && Y && n && n.appendChild && j && j.createTextNode && typeof j.createTextNode !== D) {
                n.appendChild(j.createTextNode(ac + " {" + Y + "}"));
            }
        }
    }
    function w(Z, X) {
        if (!m) {
            return;
        }
        var Y = X ? "visible" : "hidden";
        if (J && c(Z)) {
            c(Z).style.visibility = Y;
        } else {
            v("#" + Z, "visibility:" + Y);
        }
    }
    function L(Y) {
        var Z = /[\\\"<>\.;]/;
        var X = Z.exec(Y) !== null;
        return X && typeof encodeURIComponent !== D ? encodeURIComponent(Y) : Y;
    }
    var d = function () {
        if (M.ie && M.win) {
            window.attachEvent("onunload", function () {
                var ac = I.length;
                for (var ab = 0; ab < ac; ab++) {
                    I[ab][0].detachEvent(I[ab][1], I[ab][2]);
                }
                var Z = N.length;
                for (var aa = 0; aa < Z; aa++) {
                    y(N[aa]);
                }
                for (var Y in M) {
                    if (M.hasOwnProperty(Y)) {
                        M[Y] = null;
                    }
                }
                M = null;
                for (var X in swfobject) {
                    if (swfobject.hasOwnProperty(X)) {
                        swfobject[X] = null;
                    }
                }
                swfobject = null;
            });
        }
    }();
    return {
        registerObject: function (ab, X, aa, Z) {
            if (M.w3 && ab && X) {
                var Y = {};
                Y.id = ab;
                Y.swfVersion = X;
                Y.expressInstall = aa;
                Y.callbackFn = Z;
                o[o.length] = Y;
                w(ab, false);
            } else {
                if (Z) {
                    Z({
                        success: false,
                        id: ab
                    });
                }
            }
        },
        getObjectById: function (X) {
            if (M.w3) {
                return z(X);
            }
        },
        embedSWF: function (ab, ah, ae, ag, Y, aa, Z, ad, af, ac) {
            var X = {
                success: false,
                id: ah
            };
            if (M.w3 && !(M.wk && M.wk < 312) && ab && ah && ae && ag && Y) {
                w(ah, false);
                K(function () {
                    ae += "";
                    ag += "";
                    var aj = {};
                    if (af && typeof af === r) {
                        for (var al in af) {
                            if (af.hasOwnProperty(al)) {
                                aj[al] = af[al];
                            }
                        }
                    }
                    aj.data = ab;
                    aj.width = ae;
                    aj.height = ag;
                    var am = {};
                    if (ad && typeof ad === r) {
                        for (var ak in ad) {
                            if (ad.hasOwnProperty(ak)) {
                                am[ak] = ad[ak];
                            }
                        }
                    }
                    if (Z && typeof Z === r) {
                        for (var ai in Z) {
                            if (typeof am.flashvars !== D) {
                                am.flashvars += "&" + ai + "=" + Z[ai];
                            } else {
                                am.flashvars = ai + "=" + Z[ai];
                            }
                        }
                    }
                    if (F(Y)) {
                        var an = u(aj, am, ah);
                        if (aj.id === ah) {
                            w(ah, true);
                        }
                        X.success = true;
                        X.ref = an;
                    } else {
                        if (aa && A()) {
                            aj.data = aa;
                            P(aj, am, ah, ac);
                            return;
                        } else {
                            w(ah, true);
                        }
                    }
                    if (ac) {
                        ac(X);
                    }
                });
            } else {
                if (ac) {
                    ac(X);
                }
            }
        },
        switchOffAutoHideShow: function () {
            m = false;
        },
        ua: M,
        getFlashPlayerVersion: function () {
            return {
                major: M.pv[0],
                minor: M.pv[1],
                release: M.pv[2]
            };
        },
        hasFlashPlayerVersion: F,
        createSWF: function (Z, Y, X) {
            if (M.w3) {
                return u(Z, Y, X);
            } else {
                return undefined;
            }
        },
        showExpressInstall: function (Z, aa, X, Y) {
            if (M.w3 && A()) {
                P(Z, aa, X, Y);
            }
        },
        removeSWF: function (X) {
            if (M.w3) {
                y(X);
            }
        },
        createCSS: function (aa, Z, Y, X) {
            if (M.w3) {
                v(aa, Z, Y, X);
            }
        },
        addDomLoadEvent: K,
        addLoadEvent: s,
        getQueryParamValue: function (aa) {
            var Z = j.location.search || j.location.hash;
            if (Z) {
                if (/\?/.test(Z)) {
                    Z = Z.split("?")[1];
                }
                if (aa === null) {
                    return L(Z);
                }
                var Y = Z.split("&");
                for (var X = 0; X < Y.length; X++) {
                    if (Y[X].substring(0, Y[X].indexOf("=")) === aa) {
                        return L(Y[X].substring((Y[X].indexOf("=") + 1)));
                    }
                }
            }
            return "";
        },
        expressInstallCallback: function () {
            if (a) {
                var X = c(R);
                if (X && l) {
                    X.parentNode.replaceChild(l, X);
                    if (Q) {
                        w(Q, true);
                        if (M.ie && M.win) {
                            l.style.display = "block";
                        }
                    }
                    if (E) {
                        E(B);
                    }
                }
                a = false;
            }
        }
    };
}();(function(){var a,d,f={init:function(){this.browser=this.searchString(this.dataBrowser)||"undefined";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"undefined";this.OS=this.searchString(this.dataOS)||"undefined"},searchString:function(b){for(a=0;a<b.length;a=a+=1){var c,e;c=b[a].string;e=b[a].prop;this.versionSearchString=b[a].versionSearch||b[a].identity;if(c)if(b[a].subString.indexOf("||")!==-1){e=b[a].subString.split("||");for(d=0;d<e.length;d=d+=
1)if(c.indexOf(e[d])!==-1)return b[a].identity}else{if(c.indexOf(b[a].subString)!==-1)return b[a].identity}else if(e)return b[a].identity}},searchVersion:function(b){var c=b.indexOf(this.versionSearchString);if(c!==-1)return parseFloat(b.substring(c+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",
identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,
subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.userAgent,subString:"Win95",identity:"Win95"},{string:navigator.userAgent,subString:"Win98",identity:"Win98"},{string:navigator.userAgent,subString:"Windows NT 4.0||WinNT4.0",identity:"WinNT"},{string:navigator.userAgent,subString:"Windows NT 5.0||WinNT5.0",identity:"Win2000"},{string:navigator.userAgent,subString:"Windows NT 5.1||WinNT5.1",
identity:"WinXP"},{string:navigator.userAgent,subString:"Windows NT 5.2||WinNT5.2",identity:"Win2003"},{string:navigator.userAgent,subString:"Win9x 4.90",identity:"WinME"},{string:navigator.userAgent,subString:"Windows NT 6.0||WinNT6.0",identity:"WinVista"},{string:navigator.userAgent,subString:"Windows NT 7.0||Windows NT 6.1||WinNT6.1",identity:"Win7"},{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"OSX"},{string:navigator.userAgent,
subString:"iPhone||iPod||iPad",identity:"iOS"},{string:navigator.userAgent,subString:"Kindle",identity:"Kindle"},{string:navigator.userAgent,subString:"Android",identity:"Android"},{string:navigator.userAgent,subString:"BlackBerry",identity:"BlackBerry"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};f.init();window.$.client={os:f.OS,browser:f.browser,browserVersion:f.version}})();
var $J=jQuery.noConflict();(function(c){var e;c.fn.outerHTML=function(){var b=this[0],a;return!b?null:typeof(a=b.outerHTML)==="string"?a:(e=e||c("<div/>")).html(this.eq(0).clone()).html()}})(jQuery);
(function(){jQuery.fn.pngFix=function(c){c=jQuery.extend({transparentImg:"/images/misc/transparent.gif"},c);if("ActiveXObject"in window&&!("XMLHttpRequest"in window)){var e,b,a,f,i,n,j,o,p;jQuery(this).each(function(){e=jQuery(this).get(0).tagName.toLowerCase();switch(e){case "img":b=jQuery(this);a={};a.src=b.attr("src");if(a.src.indexOf(".png")!==-1){b.attr("width",b.width());b.attr("height",b.height());a.width=b.width();a.height=b.height();a.id=b.attr("id")||"";a.klass=b.attr("class")||"";a.title=
b.attr("title")||"";a.alt=b.attr("alt")||"";a.align=b.attr("align")||"";a.cursor=b.parent().attr("href")?"hand":"";a.cssText=this.style.cssText;if(this.style.border)a.inlineLayout+="border:"+this.style.border+";";if(this.style.padding)a.inlineLayout+="padding:"+this.style.padding+";";if(this.style.margin)a.inlineLayout+="margin:"+this.style.margin+";";a.css={cssText:a.cssText,position:"relative",display:"inline-block",background:"transparent","float":a.align,cursor:a.cursor,width:a.width+"px",height:a.height+
"px",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+a.src+"', sizingMethod='scale')"};f=$J(document.createElement("span"));f.attr("id",a.id);f.attr("class",a.klass);f.attr("title",a.title);f.attr("alt",a.alt);f.css(a.css);if(a.inlineLayout!==""){i=$J(document.createElement("span"));i.css({cssText:a.inlineLayout,position:"relative",display:"inline-block",cursor:a.cursor,width:a.width+"px",height:a.height+"px"});f=i.append(f)}b.hide();b.after(f);b.attr("id","")}break;case "input":n=
jQuery(this);j={};j.src=n.attr("src");if(j.src.indexOf(".png")!==-1){n.css({filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+j.src+"', sizingMethod='scale')"});n.attr("src",c.transparentImg)}break;default:o=jQuery(this);p={};p.bgImage=o.css("background-image");if(p.bgImage.indexOf(".png")!==-1){p.src=p.bgImage.split('url("')[1].split('")')[0];o.css({"background-image":"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+p.src+"', sizingMethod='scale')"})}}})}else return jQuery}})(jQuery);
(function(){function c(){var b="";for(var a in this)if(typeof this[a]!="function")b+=a+'="'+this[a]+'" ';return b}function e(){var b="";for(var a in this)if(typeof this[a]!="function")b+=a+"="+encodeURIComponent(this[a])+"&";return b.replace(/&$/,"")}jQuery.fn.flash=function(b,a,f,i){var n=f||jQuery.fn.flash.replace;a=jQuery.fn.flash.copy(jQuery.fn.flash.pluginOptions,a);if(!jQuery.fn.flash.hasFlash(a.version))if(a.expressInstall&&jQuery.fn.flash.hasFlash(6,0,65))var j={flashvars:{MMredirectURL:location,
MMplayerType:"PlugIn",MMdoctitle:jQuery("title").text()}};else if(a.update)n=i||jQuery.fn.flash.update;else return this;b=jQuery.fn.flash.copy(jQuery.fn.flash.htmlOptions,j,b);return this.each(function(){n.call(this,jQuery.fn.flash.copy(b))})};jQuery.fn.flash.copy=function(){for(var b={},a={},f=0;f<arguments.length;f++){var i=arguments[f];if(i!=undefined){jQuery.extend(b,i);i.flashvars!=undefined&&jQuery.extend(a,i.flashvars)}}b.flashvars=a;return b};jQuery.fn.flash.hasFlash=function(b,a,f){if(/hasFlash\=true/.test(location))return true;
if(/hasFlash\=false/.test(location))return false;var i=jQuery.fn.flash.hasFlash.playerVersion().match(/\d+/g);b=String([b,a,f]).match(/\d+/g)||String(jQuery.fn.flash.pluginOptions.version).match(/\d+/g);for(a=0;a<3;a++){i[a]=parseInt(i[a]||0);b[a]=parseInt(b[a]||0);if(i[a]<b[a])return false;if(i[a]>b[a])return true}return true};jQuery.fn.flash.hasFlash.playerVersion=function(){try{try{var b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");try{b.AllowScriptAccess="always"}catch(a){return"6,0,0"}}catch(f){}return(new ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version").replace(/\D+/g,
",").match(/^,?(.+),?$/)[1]}catch(i){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(n){}}return"0,0,0"};jQuery.fn.flash.htmlOptions={height:240,flashvars:{},pluginspage:"http://www.adobe.com/go/getflashplayer",src:"#",type:"application/x-shockwave-flash",width:320};jQuery.fn.flash.pluginOptions={expressInstall:false,update:true,
version:"6.0.65"};jQuery.fn.flash.replace=function(b){this.innerHTML='<div class="alt">'+this.innerHTML+"</div>";jQuery(this).addClass("flash-replaced").prepend(jQuery.fn.flash.transform(b))};jQuery.fn.flash.update=function(){var b=String(location).split("?");b.splice(1,0,"?hasFlash=true&");b=b.join("");b='<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="'+b+'">Click here.</a></p>';this.innerHTML=
'<span class="alt">'+this.innerHTML+"</span>";jQuery(this).addClass("flash-update").prepend(b)};jQuery.fn.flash.transform=function(b){b.toString=c;if(b.flashvars)b.flashvars.toString=e;return"<embed "+String(b)+"/>"};window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})})();
(function(){jQuery.fn.center=function(c){var e={},b=false,a;a=jQuery(window);if(c&&typeof c.height==="number"&&typeof c.width==="number"&&typeof c.top==="number"&&typeof c.left==="number"){e.height=c.height;e.width=c.width;e.left=c.left;e.top=c.top}else{if(!c||c===window){c=window;b=true}c=$J(c);e.height=c.height();e.width=c.width();if(!b){e.top=c.position().top;e.left=c.position().left}}this.css("position","absolute");if(b){this.css("top",(e.height-this.innerHeight())/2+a.scrollTop()+"px");this.css("left",
(e.width-this.innerWidth())/2+a.scrollLeft()+"px")}else{this.css("top",e.top+(e.height-this.innerHeight())/2+a.scrollTop()+"px");this.css("left",e.left+(e.width-this.innerWidth())/2+a.scrollLeft()+"px")}return this}})(jQuery);(function(c){jQuery.fn.hideObj=function(){return c(this).addClass("hideObj").hide()}})(jQuery);(function(c){jQuery.fn.showObj=function(){return c(this).removeClass("hideObj").show()}})(jQuery);
(function(c){if(!e)var e={};(function(){function b(d){return d<10?"0"+d:d}function a(d){n.lastIndex=0;return n.test(d)?'"'+d.replace(n,function(h){var k=p[h];return typeof k==="string"?k:"\\u"+("0000"+h.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+d+'"'}function f(d,h){var k,m,r=j,l,g=h[d];if(g&&typeof g==="object"&&typeof g.toJSON==="function")g=g.toJSON(d);if(typeof s==="function")g=s.call(h,d,g);switch(typeof g){case "string":return a(g);case "number":return isFinite(g)?String(g):"null";case "boolean":case "null":return String(g);
case "object":if(!g)return"null";j+=o;l=[];if(Object.prototype.toString.apply(g)==="[object Array]"){m=g.length;for(d=0;d<m;d+=1)l[d]=f(d,g)||"null";h=l.length===0?"[]":j?"[\n"+j+l.join(",\n"+j)+"\n"+r+"]":"["+l.join(",")+"]";j=r;return h}if(s&&typeof s==="object"){m=s.length;for(d=0;d<m;d+=1){k=s[d];if(typeof k==="string")if(h=f(k,g))l.push(a(k)+(j?": ":":")+h)}}else for(k in g)if(Object.hasOwnProperty.call(g,k))if(h=f(k,g))l.push(a(k)+(j?": ":":")+h);h=l.length===0?"{}":j?"{\n"+j+l.join(",\n"+j)+
"\n"+r+"}":"{"+l.join(",")+"}";j=r;return h}}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"Z"};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var i=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
n=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,j,o,p={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},s;if(typeof e.stringify!=="function")e.stringify=function(d,h,k){var m;o=j="";if(typeof k==="number")for(m=0;m<k;m+=1)o+=" ";else if(typeof k==="string")o=k;if((s=h)&&typeof h!=="function"&&(typeof h!=="object"||typeof h.length!=="number"))throw new Error("JSON.stringify");return f("",
{"":d})};if(typeof e.parse!=="function")e.parse=function(d,h){function k(m,r){var l,g,q=m[r];if(q&&typeof q==="object")for(l in q)if(Object.hasOwnProperty.call(q,l)){g=k(q,l);if(g!==undefined)q[l]=g;else delete q[l]}return h.call(m,r,q)}i.lastIndex=0;if(i.test(d))d=d.replace(i,function(m){return"\\u"+("0000"+m.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(d.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){d=eval("("+d+")");return typeof h==="function"?k({"":d},""):d}throw new SyntaxError("JSON.parse");}})();c.toJSON=function(b,a){if(typeof a=="undefined")a=null;return e.parse(b,a)};c.jSONToString=function(b,a,f){if(typeof a=="undefined")a=null;if(typeof f=="undefined")f=null;return e.stringify(b,a,f)}})(jQuery);
var Prototype={Version:"1.6.1_rc3",Browser:function(){var a=navigator.userAgent,b=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!b,Opera:b,WebKit:a.indexOf("AppleWebKit/")>-1,Gecko:a.indexOf("Gecko")>-1&&a.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(a)}}(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:function(){var a=window.Element||window.HTMLElement;return!!(a&&a.prototype)}(),
SpecificElementExtensions:function(){if(typeof window.HTMLDivElement!=="undefined")return true;var a=document.createElement("div"),b=document.createElement("form"),c=false;if(a.__proto__&&a.__proto__!==b.__proto__)c=true;return c}()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari)Prototype.BrowserFeatures.SpecificElementExtensions=false;
var Abstract={},Try={these:function(){for(var a,b=0,c=arguments.length;b<c;b++){var d=arguments[b];try{a=d();break}catch(e){}}return a}},Class=function(){function a(){}function b(){function d(){this.initialize.apply(this,arguments)}var e=null,f=$A(arguments);if(Object.isFunction(f[0]))e=f.shift();Object.extend(d,Class.Methods);d.superclass=e;d.subclasses=[];if(e){a.prototype=e.prototype;d.prototype=new a;e.subclasses.push(d)}for(e=0;e<f.length;e++)d.addMethods(f[e]);if(!d.prototype.initialize)d.prototype.initialize=
Prototype.emptyFunction;return d.prototype.constructor=d}function c(d){var e=this.superclass&&this.superclass.prototype,f=Object.keys(d);if(!Object.keys({toString:true}).length){d.toString!=Object.prototype.toString&&f.push("toString");d.valueOf!=Object.prototype.valueOf&&f.push("valueOf")}for(var h=0,j=f.length;h<j;h++){var n=f[h],s=d[n];if(e&&Object.isFunction(s)&&s.argumentNames().first()=="$super"){var w=s;s=function(t){return function(){return e[t].apply(this,arguments)}}(n).wrap(w);s.valueOf=
w.valueOf.bind(w);s.toString=w.toString.bind(w)}this.prototype[n]=s}return this}return{create:b,Methods:{addMethods:c}}}();
(function(){function a(k){return Object.prototype.toString.call(k).match(/^\[object\s(.*)\]$/)[1]}function b(k,p){for(var C in p)k[C]=p[C];return k}function c(k){try{if(H(k))return"undefined";if(k===null)return"null";return k.inspect?k.inspect():String(k)}catch(p){if(p instanceof RangeError)return"...";throw p;}}function d(k){switch(typeof k){case "undefined":case "function":case "unknown":return;case "boolean":return k.toString()}if(k===null)return"null";if(k.toJSON)return k.toJSON();if(!s(k)){var p=
[];for(var C in k){var E=d(k[C]);H(E)||p.push(C.toJSON()+": "+E)}return"{"+p.join(", ")+"}"}}function e(k){return $H(k).toQueryString()}function f(k){return k&&k.toHTML?k.toHTML():String.interpret(k)}function h(k){var p=[];for(var C in k)p.push(C);return p}function j(k){var p=[];for(var C in k)p.push(k[C]);return p}function n(k){return b({},k)}function s(k){return!!(k&&k.nodeType==1)}function w(k){return a(k)==="Array"}function t(k){return k instanceof Hash}function y(k){return typeof k==="function"}
function D(k){return a(k)==="String"}function v(k){return a(k)==="Number"}function H(k){return typeof k==="undefined"}b(Object,{extend:b,inspect:c,toJSON:d,toQueryString:e,toHTML:f,keys:h,values:j,clone:n,isElement:s,isArray:w,isHash:t,isFunction:y,isString:D,isNumber:v,isUndefined:H})})();
Object.extend(Function.prototype,function(){function a(t,y){for(var D=t.length,v=y.length;v--;)t[D+v]=y[v];return t}function b(t,y){t=w.call(t,0);return a(t,y)}function c(){var t=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g,"").replace(/\s+/g,"").split(",");return t.length==1&&!t[0]?[]:t}function d(t){if(arguments.length<2&&Object.isUndefined(arguments[0]))return this;var y=this,D=w.call(arguments,1);return function(){var v=b(D,arguments);
return y.apply(t,v)}}function e(t){var y=this,D=w.call(arguments,1);return function(v){v=a([v||window.event],D);return y.apply(t,v)}}function f(){if(!arguments.length)return this;var t=this,y=w.call(arguments,0);return function(){var D=b(y,arguments);return t.apply(this,D)}}function h(t){var y=this,D=w.call(arguments,1);t*=1E3;return window.setTimeout(function(){return y.apply(y,D)},t)}function j(){return this.delay.apply(this,a([0.01],arguments))}function n(t){var y=this;return function(){var D=
a([y.bind(this)],arguments);return t.apply(this,D)}}function s(){if(this._methodized)return this._methodized;var t=this;return this._methodized=function(){var y=a([this],arguments);return t.apply(null,y)}}var w=Array.prototype.slice;return{argumentNames:c,bind:d,bindAsEventListener:e,curry:f,delay:h,defer:j,wrap:n,methodize:s}}());
Date.prototype.toJSON=function(){return'"'+this.getUTCFullYear()+"-"+(this.getUTCMonth()+1).toPaddedString(2)+"-"+this.getUTCDate().toPaddedString(2)+"T"+this.getUTCHours().toPaddedString(2)+":"+this.getUTCMinutes().toPaddedString(2)+":"+this.getUTCSeconds().toPaddedString(2)+'Z"'};RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(a){return String(a).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};
var PeriodicalExecuter=Class.create({initialize:function(a,b){this.callback=a;this.frequency=b;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1E3)},execute:function(){this.callback(this)},stop:function(){if(this.timer){clearInterval(this.timer);this.timer=null}},onTimerEvent:function(){if(!this.currentlyExecuting)try{this.currentlyExecuting=true;this.execute()}catch(a){}finally{this.currentlyExecuting=
false}}});Object.extend(String,{interpret:function(a){return a==null?"":String(a)},specialChar:{"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r","\\":"\\\\"}});
Object.extend(String.prototype,function(){function a(o){if(Object.isFunction(o))return o;var u=new Template(o);return function(z){return u.evaluate(z)}}function b(o,u){var z="",A=this,I;u=a(u);if(Object.isString(o))o=RegExp.escape(o);if(!(o.length||o.source)){u=u("");return u+A.split("").join(u)+u}for(;A.length>0;)if(I=A.match(o)){z+=A.slice(0,I.index);z+=String.interpret(u(I));A=A.slice(I.index+I[0].length)}else{z+=A;A=""}return z}function c(o,u,z){u=a(u);z=Object.isUndefined(z)?1:z;return this.gsub(o,
function(A){if(--z<0)return A[0];return u(A)})}function d(o,u){this.gsub(o,u);return String(this)}function e(o,u){o=o||30;u=Object.isUndefined(u)?"...":u;return this.length>o?this.slice(0,o-u.length)+u:String(this)}function f(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}function h(){return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi,"")}function j(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")}function n(){var o=new RegExp(Prototype.ScriptFragment,"img"),
u=new RegExp(Prototype.ScriptFragment,"im");return(this.match(o)||[]).map(function(z){return(z.match(u)||["",""])[1]})}function s(){return this.extractScripts().map(function(o){return eval(o)})}function w(){w.text.data=this;return w.div.innerHTML}function t(){var o=document.createElement("div");o.innerHTML=this.stripTags();return o.childNodes[0]?o.childNodes.length>1?$A(o.childNodes).inject("",function(u,z){return u+z.nodeValue}):o.childNodes[0].nodeValue:""}function y(o){var u=this.strip().match(/([^?#]*)(#.*)?$/);
if(!u)return{};return u[1].split(o||"&").inject({},function(z,A){if((A=A.split("="))[0]){var I=decodeURIComponent(A.shift());A=A.length>1?A.join("="):A[0];if(A!=undefined)A=decodeURIComponent(A);if(I in z){Object.isArray(z[I])||(z[I]=[z[I]]);z[I].push(A)}else z[I]=A}return z})}function D(){return this.split("")}function v(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)}function H(o){return o<1?"":(new Array(o+1)).join(this)}function k(){var o=this.split("-"),
u=o.length;if(u==1)return o[0];for(var z=this.charAt(0)=="-"?o[0].charAt(0).toUpperCase()+o[0].substring(1):o[0],A=1;A<u;A++)z+=o[A].charAt(0).toUpperCase()+o[A].substring(1);return z}function p(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()}function C(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()}function E(){return this.gsub(/_/,"-")}function x(o){var u=this.gsub(/[\x00-\x1f\\]/,function(z){var A=
String.specialChar[z[0]];return A?A:"\\u00"+z[0].charCodeAt().toPaddedString(2,16)});if(o)return'"'+u.replace(/"/g,'\\"')+'"';return"'"+u.replace(/'/g,"\\'")+"'"}function q(){return this.inspect(true)}function m(o){return this.sub(o||Prototype.JSONFilter,"#{1}")}function g(){var o=this;if(o.blank())return false;o=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/.test(o)}function i(o){var u=this.unfilterJSON();try{if(!o||u.isJSON())return eval("("+u+
")")}catch(z){}throw new SyntaxError("Badly formed JSON string: "+this.inspect());}function l(o){return this.indexOf(o)>-1}function r(o){return this.indexOf(o)===0}function B(o){var u=this.length-o.length;return u>=0&&this.lastIndexOf(o)===u}function F(){return this==""}function G(){return/^\s*$/.test(this)}function J(o,u){return(new Template(this,u)).evaluate(o)}return{gsub:b,sub:c,scan:d,truncate:e,strip:String.prototype.trim?String.prototype.trim:f,stripTags:h,stripScripts:j,extractScripts:n,evalScripts:s,
escapeHTML:w,unescapeHTML:t,toQueryParams:y,parseQuery:y,toArray:D,succ:v,times:H,camelize:k,capitalize:p,underscore:C,dasherize:E,inspect:x,toJSON:q,unfilterJSON:m,isJSON:g,evalJSON:i,include:l,startsWith:r,endsWith:B,empty:F,blank:G,interpolate:J}}());Object.extend(String.prototype.escapeHTML,{div:document.createElement("div"),text:document.createTextNode("")});String.prototype.escapeHTML.div.appendChild(String.prototype.escapeHTML.text);
if("<\n>".escapeHTML()!=="&lt;\n&gt;")String.prototype.escapeHTML=function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};if("&lt;\n&gt;".unescapeHTML()!=="<\n>")String.prototype.unescapeHTML=function(){return this.stripTags().replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")};
var Template=Class.create({initialize:function(a,b){this.template=a.toString();this.pattern=b||Template.Pattern},evaluate:function(a){if(a&&Object.isFunction(a.toTemplateReplacements))a=a.toTemplateReplacements();return this.template.gsub(this.pattern,function(b){if(a==null)return b[1]+"";var c=b[1]||"";if(c=="\\")return b[2];var d=a,e=b[3],f=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;b=f.exec(e);if(b==null)return c;for(;b!=null;){var h=b[1].startsWith("[")?b[2].gsub("\\\\]","]"):b[1];d=d[h];if(null==
d||""==b[3])break;e=e.substring("["==b[3]?b[1].length:b[0].length);b=f.exec(e)}return c+String.interpret(d)})}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;
var $break={},Enumerable=function(){function a(m,g){var i=0;try{this._each(function(r){m.call(g,r,i++)})}catch(l){if(l!=$break)throw l;}return this}function b(m,g,i){var l=-m,r=[],B=this.toArray();if(m<1)return B;for(;(l+=m)<B.length;)r.push(B.slice(l,l+m));return r.collect(g,i)}function c(m,g){m=m||Prototype.K;var i=true;this.each(function(l,r){i=i&&!!m.call(g,l,r);if(!i)throw $break;});return i}function d(m,g){m=m||Prototype.K;var i=false;this.each(function(l,r){if(i=!!m.call(g,l,r))throw $break;
});return i}function e(m,g){m=m||Prototype.K;var i=[];this.each(function(l,r){i.push(m.call(g,l,r))});return i}function f(m,g){var i;this.each(function(l,r){if(m.call(g,l,r)){i=l;throw $break;}});return i}function h(m,g){var i=[];this.each(function(l,r){m.call(g,l,r)&&i.push(l)});return i}function j(m,g,i){g=g||Prototype.K;var l=[];if(Object.isString(m))m=new RegExp(RegExp.escape(m));this.each(function(r,B){m.match(r)&&l.push(g.call(i,r,B))});return l}function n(m){if(Object.isFunction(this.indexOf))if(this.indexOf(m)!=
-1)return true;var g=false;this.each(function(i){if(i==m){g=true;throw $break;}});return g}function s(m,g){g=Object.isUndefined(g)?null:g;return this.eachSlice(m,function(i){for(;i.length<m;)i.push(g);return i})}function w(m,g,i){this.each(function(l,r){m=g.call(i,m,l,r)});return m}function t(m){var g=$A(arguments).slice(1);return this.map(function(i){return i[m].apply(i,g)})}function y(m,g){m=m||Prototype.K;var i;this.each(function(l,r){l=m.call(g,l,r);if(i==null||l>=i)i=l});return i}function D(m,
g){m=m||Prototype.K;var i;this.each(function(l,r){l=m.call(g,l,r);if(i==null||l<i)i=l});return i}function v(m,g){m=m||Prototype.K;var i=[],l=[];this.each(function(r,B){(m.call(g,r,B)?i:l).push(r)});return[i,l]}function H(m){var g=[];this.each(function(i){g.push(i[m])});return g}function k(m,g){var i=[];this.each(function(l,r){m.call(g,l,r)||i.push(l)});return i}function p(m,g){return this.map(function(i,l){return{value:i,criteria:m.call(g,i,l)}}).sort(function(i,l){i=i.criteria;l=l.criteria;return i<
l?-1:i>l?1:0}).pluck("value")}function C(){return this.map()}function E(){var m=Prototype.K,g=$A(arguments);if(Object.isFunction(g.last()))m=g.pop();var i=[this].concat(g).map($A);return this.map(function(l,r){return m(i.pluck(r))})}function x(){return this.toArray().length}function q(){return"#<Enumerable:"+this.toArray().inspect()+">"}return{each:a,eachSlice:b,all:c,every:c,any:d,some:d,collect:e,map:e,detect:f,findAll:h,select:h,filter:h,grep:j,include:n,member:n,inGroupsOf:s,inject:w,invoke:t,
max:y,min:D,partition:v,pluck:H,reject:k,sortBy:p,toArray:C,entries:C,zip:E,size:x,inspect:q,find:f}}();function $A(a){if(!a)return[];if("toArray"in Object(a))return a.toArray();for(var b=a.length||0,c=new Array(b);b--;)c[b]=a[b];return c}function $w(a){if(!Object.isString(a))return[];return(a=a.strip())?a.split(/\s+/):[]}Array.from=$A;
(function(){function a(x){for(var q=0,m=this.length;q<m;q++)x(this[q])}function b(){this.length=0;return this}function c(){return this[0]}function d(){return this[this.length-1]}function e(){return this.select(function(x){return x!=null})}function f(){return this.inject([],function(x,q){if(Object.isArray(q))return x.concat(q.flatten());x.push(q);return x})}function h(){var x=C.call(arguments,0);return this.select(function(q){return!x.include(q)})}function j(x){return(x!==false?this:this.toArray())._reverse()}
function n(x){return this.inject([],function(q,m,g){if(0==g||(x?q.last()!=m:!q.include(m)))q.push(m);return q})}function s(x){return this.uniq().findAll(function(q){return x.detect(function(m){return q===m})})}function w(){return C.call(this,0)}function t(){return this.length}function y(){return"["+this.map(Object.inspect).join(", ")+"]"}function D(){var x=[];this.each(function(q){q=Object.toJSON(q);Object.isUndefined(q)||x.push(q)});return"["+x.join(", ")+"]"}function v(x,q){q||(q=0);var m=this.length;
if(q<0)q=m+q;for(;q<m;q++)if(this[q]===x)return q;return-1}function H(x,q){q=isNaN(q)?this.length:(q<0?this.length+q:q)+1;x=this.slice(0,q).reverse().indexOf(x);return x<0?x:q-x-1}function k(){for(var x=C.call(this,0),q,m=0,g=arguments.length;m<g;m++){q=arguments[m];if(Object.isArray(q)&&!("callee"in q))for(var i=0,l=q.length;i<l;i++)x.push(q[i]);else x.push(q)}return x}var p=Array.prototype,C=p.slice,E=p.forEach;E||(E=a);Object.extend(p,Enumerable);if(!p._reverse)p._reverse=p.reverse;Object.extend(p,
{_each:E,clear:b,first:c,last:d,compact:e,flatten:f,without:h,reverse:j,uniq:n,intersect:s,clone:w,toArray:w,size:t,inspect:y,toJSON:D});if(function(){return[].concat(arguments)[0][0]!==1}(1,2))p.concat=k;if(!p.indexOf)p.indexOf=v;if(!p.lastIndexOf)p.lastIndexOf=H})();function $H(a){return new Hash(a)}
var Hash=Class.create(Enumerable,function(){function a(k){this._object=Object.isHash(k)?k.toObject():Object.clone(k)}function b(k){for(var p in this._object){var C=this._object[p],E=[p,C];E.key=p;E.value=C;k(E)}}function c(k,p){return this._object[k]=p}function d(k){if(this._object[k]!==Object.prototype[k])return this._object[k]}function e(k){var p=this._object[k];delete this._object[k];return p}function f(){return Object.clone(this._object)}function h(){return this.pluck("key")}function j(){return this.pluck("value")}
function n(k){var p=this.detect(function(C){return C.value===k});return p&&p.key}function s(k){return this.clone().update(k)}function w(k){return(new Hash(k)).inject(this,function(p,C){p.set(C.key,C.value);return p})}function t(k,p){if(Object.isUndefined(p))return k;return k+"="+encodeURIComponent(String.interpret(p))}function y(){return this.inject([],function(k,p){var C=encodeURIComponent(p.key);if((p=p.value)&&typeof p=="object"){if(Object.isArray(p))return k.concat(p.map(t.curry(C)))}else k.push(t(C,
p));return k}).join("&")}function D(){return"#<Hash:{"+this.map(function(k){return k.map(Object.inspect).join(": ")}).join(", ")+"}>"}function v(){return Object.toJSON(this.toObject())}function H(){return new Hash(this)}return{initialize:a,_each:b,set:c,get:d,unset:e,toObject:f,toTemplateReplacements:f,keys:h,values:j,index:n,merge:s,update:w,toQueryString:y,inspect:D,toJSON:v,clone:H}}());Hash.from=$H;
Object.extend(Number.prototype,function(){function a(){return this.toPaddedString(2,16)}function b(){return this+1}function c(s,w){$R(0,this,true).each(s,w);return this}function d(s,w){w=this.toString(w||10);return"0".times(s-w.length)+w}function e(){return isFinite(this)?this.toString():"null"}function f(){return Math.abs(this)}function h(){return Math.round(this)}function j(){return Math.ceil(this)}function n(){return Math.floor(this)}return{toColorPart:a,succ:b,times:c,toPaddedString:d,toJSON:e,
abs:f,round:h,ceil:j,floor:n}}());function $R(a,b,c){return new ObjectRange(a,b,c)}
var ObjectRange=Class.create(Enumerable,function(){function a(d,e,f){this.start=d;this.end=e;this.exclusive=f}function b(d){for(var e=this.start;this.include(e);){d(e);e=e.succ()}}function c(d){if(d<this.start)return false;if(this.exclusive)return d<this.end;return d<=this.end}return{initialize:a,_each:b,include:c}}()),Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||
false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(a){this.responders._each(a)},register:function(a){this.include(a)||this.responders.push(a)},unregister:function(a){this.responders=this.responders.without(a)},dispatch:function(a,b,c,d){this.each(function(e){if(Object.isFunction(e[a]))try{e[a].apply(e,[b,c,d])}catch(f){}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});
Ajax.Base=Class.create({initialize:function(a){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:"",evalJSON:true,evalJS:true};Object.extend(this.options,a||{});this.options.method=this.options.method.toLowerCase();if(Object.isString(this.options.parameters))this.options.parameters=this.options.parameters.toQueryParams();else if(Object.isHash(this.options.parameters))this.options.parameters=this.options.parameters.toObject()}});
Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,b,c){$super(c);this.transport=Ajax.getTransport();this.request(b)},request:function(a){this.url=a;this.method=this.options.method;a=Object.clone(this.options.parameters);if(!["get","post"].include(this.method)){a._method=this.method;this.method="post"}this.parameters=a;if(a=Object.toQueryString(a))if(this.method=="get")this.url+=(this.url.include("?")?"&":"?")+a;else if(/Konqueror|Safari|KHTML/.test(navigator.userAgent))a+=
"&_=";try{var b=new Ajax.Response(this);this.options.onCreate&&this.options.onCreate(b);Ajax.Responders.dispatch("onCreate",this,b);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);this.options.asynchronous&&this.respondToReadyState.bind(this).defer(1);this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=="post"?this.options.postBody||a:null;this.transport.send(this.body);!this.options.asynchronous&&this.transport.overrideMimeType&&
this.onStateChange()}catch(c){this.transport&&this.transport.status&&this.transport.status!=1223&&this.dispatchException(c)}},onStateChange:function(){var a=this.transport.readyState;a>1&&!(a==4&&this._complete)&&this.respondToReadyState(this.transport.readyState)},setRequestHeaders:function(){var a={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){a["Content-type"]=this.options.contentType+
(this.options.encoding?"; charset="+this.options.encoding:"");if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005)a.Connection="close"}if(typeof this.options.requestHeaders=="object"){var b=this.options.requestHeaders;if(Object.isFunction(b.push))for(var c=0,d=b.length;c<d;c+=2)a[b[c]]=b[c+1];else $H(b).each(function(f){a[f.key]=f.value})}for(var e in a)this.transport.setRequestHeader(e,a[e])},success:function(){var a=this.getStatus();return!a||a>=200&&
a<300},getStatus:function(){try{return this.transport.status==1223?204:this.transport.status||0}catch(a){return 0}},respondToReadyState:function(a){a=Ajax.Request.Events[a];var b=new Ajax.Response(this);if(a=="Complete"){try{this._complete=true;(this.options["on"+b.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(b,b.headerJSON)}catch(c){this.dispatchException(c)}var d=b.getHeader("Content-type");if(this.options.evalJS=="force"||this.options.evalJS&&this.isSameOrigin()&&
d&&d.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))this.evalResponse()}try{(this.options["on"+a]||Prototype.emptyFunction)(b,b.headerJSON);Ajax.Responders.dispatch("on"+a,this,b,b.headerJSON)}catch(e){this.dispatchException(e)}if(a=="Complete")this.transport.onreadystatechange=Prototype.emptyFunction},isSameOrigin:function(){var a=this.url.match(/^\s*https?:\/\/[^\/]*/);return!a||a[0]=="#{protocol}//#{domain}#{port}".interpolate({protocol:location.protocol,domain:document.domain,
port:location.port?":"+location.port:""})},getHeader:function(a){try{return this.transport.getResponseHeader(a)||null}catch(b){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(a){this.dispatchException(a)}},dispatchException:function(a){(this.options.onException||Prototype.emptyFunction)(this,a);Ajax.Responders.dispatch("onException",this,a)}});Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];
Ajax.Response=Class.create({initialize:function(a){this.request=a;a=this.transport=a.transport;var b=this.readyState=a.readyState;if(b>2&&!Prototype.Browser.IE||b==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(a.responseText);this.headerJSON=this._getHeaderJSON()}if(b==4){a=a.responseXML;this.responseXML=Object.isUndefined(a)?null:a;this.responseJSON=this._getResponseJSON()}},status:0,statusText:"",getStatus:Ajax.Request.prototype.getStatus,
getStatusText:function(){try{return this.transport.statusText||""}catch(a){return""}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders()}catch(a){return null}},getResponseHeader:function(a){return this.transport.getResponseHeader(a)},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders()},_getHeaderJSON:function(){var a=this.getHeader("X-JSON");if(!a)return null;a=decodeURIComponent(escape(a));try{return a.evalJSON(this.request.options.sanitizeJSON||
!this.request.isSameOrigin())}catch(b){this.request.dispatchException(b)}},_getResponseJSON:function(){var a=this.request.options;if(!a.evalJSON||a.evalJSON!="force"&&!(this.getHeader("Content-type")||"").include("application/json")||this.responseText.blank())return null;try{return this.responseText.evalJSON(a.sanitizeJSON||!this.request.isSameOrigin())}catch(b){this.request.dispatchException(b)}}});
Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,b,c,d){this.container={success:b.success||b,failure:b.failure||(b.success?null:b)};d=Object.clone(d);var e=d.onComplete;d.onComplete=function(f,h){this.updateContent(f.responseText);Object.isFunction(e)&&e(f,h)}.bind(this);$super(c,d)},updateContent:function(a){var b=this.container[this.success()?"success":"failure"],c=this.options;c.evalScripts||(a=a.stripScripts());if(b=$(b))if(c.insertion)if(Object.isString(c.insertion)){var d=
{};d[c.insertion]=a;b.insert(d)}else c.insertion(b,a);else b.update(a)}});
Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,b,c,d){$super(d);this.onComplete=this.options.onComplete;this.frequency=this.options.frequency||2;this.decay=this.options.decay||1;this.updater={};this.container=b;this.url=c;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},
updateComplete:function(a){if(this.options.decay){this.decay=a.responseText==this.lastText?this.decay*this.options.decay:1;this.lastText=a.responseText}this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});
function $(a){if(arguments.length>1){for(var b=0,c=[],d=arguments.length;b<d;b++)c.push($(arguments[b]));return c}if(Object.isString(a))a=document.getElementById(a);return Element.extend(a)}if(Prototype.BrowserFeatures.XPath)document._getElementsByXPath=function(a,b){var c=[];a=document.evaluate(a,$(b)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);b=0;for(var d=a.snapshotLength;b<d;b++)c.push(Element.extend(a.snapshotItem(b)));return c};if(!window.Node)var Node={};
Node.ELEMENT_NODE||Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12});
(function(a){var b=function(){var d=document.createElement("form"),e=document.createElement("input"),f=document.documentElement;e.setAttribute("name","test");d.appendChild(e);f.appendChild(d);e=d.elements?typeof d.elements.test=="undefined":null;f.removeChild(d);return e}(),c=a.Element;a.Element=function(d,e){e=e||{};d=d.toLowerCase();var f=Element.cache;if(b&&e.name){d="<"+d+' name="'+e.name+'">';delete e.name;return Element.writeAttribute(document.createElement(d),e)}f[d]||(f[d]=Element.extend(document.createElement(d)));
return Element.writeAttribute(f[d].cloneNode(false),e)};Object.extend(a.Element,c||{});if(c)a.Element.prototype=c.prototype})(this);Element.cache={};Element.idCounter=1;
Element.Methods={visible:function(a){return $(a).style.display!="none"},toggle:function(a){a=$(a);Element[Element.visible(a)?"hide":"show"](a);return a},hide:function(a){a=$(a);a.style.display="none";a.addClassName("hideObj");return a},show:function(a){a=$(a);a.style.display="";a.style.visibility="";a.removeClassName("hideObj");return a},remove:function(a){a=$(a);a.parentNode.removeChild(a);return a},update:function(){function a(e,f){e=$(e);if(f&&f.toElement)f=f.toElement();if(Object.isElement(f))return e.update().insert(f);
f=Object.toHTML(f);var h=e.tagName.toUpperCase();if(h==="SCRIPT"&&d){e.text=f;return e}if(b||c)if(h in Element._insertionTranslations.tags){for(;e.firstChild;)e.removeChild(e.firstChild);Element._getContentFromAnonymousElement(h,f.stripScripts()).each(function(j){e.appendChild(j)})}else e.innerHTML=f.stripScripts();else e.innerHTML=f.stripScripts();f.evalScripts.bind(f).defer();return e}var b=function(){var e=document.createElement("select"),f=true;e.innerHTML='<option value="test">test</option>';
if(e.options&&e.options[0])f=e.options[0].nodeName.toUpperCase()!=="OPTION";return f}(),c=function(){try{var e=document.createElement("table");if(e&&e.tBodies){e.innerHTML="<tbody><tr><td>test</td></tr></tbody>";return typeof e.tBodies[0]=="undefined"}}catch(f){return true}}(),d=function(){var e=document.createElement("script"),f=false;try{e.appendChild(document.createTextNode(""));f=!e.firstChild||e.firstChild&&e.firstChild.nodeType!==3}catch(h){f=true}return f}();return a}(),replace:function(a,
b){a=$(a);if(b&&b.toElement)b=b.toElement();else if(!Object.isElement(b)){b=Object.toHTML(b);var c=a.ownerDocument.createRange();c.selectNode(a);b.evalScripts.bind(b).defer();b=c.createContextualFragment(b.stripScripts())}a.parentNode.replaceChild(b,a);return a},insert:function(a,b){a=$(a);if(Object.isString(b)||Object.isNumber(b)||Object.isElement(b)||b&&(b.toElement||b.toHTML))b={bottom:b};var c,d,e;for(var f in b){c=b[f];f=f.toLowerCase();d=Element._insertionTranslations[f];if(c&&c.toElement)c=
c.toElement();if(Object.isElement(c))d(a,c);else{c=Object.toHTML(c);e=(f=="before"||f=="after"?a.parentNode:a).tagName.toUpperCase();e=Element._getContentFromAnonymousElement(e,c.stripScripts());if(f=="top"||f=="after")e.reverse();e.each(d.curry(a));c.evalScripts.bind(c).defer()}}return a},wrap:function(a,b,c){a=$(a);if(Object.isElement(b))$(b).writeAttribute(c||{});else b=Object.isString(b)?new Element(b,c):new Element("div",b);a.parentNode&&a.parentNode.replaceChild(b,a);b.appendChild(a);return b},
inspect:function(a){a=$(a);var b="<"+a.tagName.toLowerCase();$H({id:"id",className:"class"}).each(function(c){var d=c.first();c=c.last();if(d=(a[d]||"").toString())b+=" "+c+"="+d.inspect(true)});return b+">"},recursivelyCollect:function(a,b){a=$(a);for(var c=[];a=a[b];)a.nodeType==1&&c.push(Element.extend(a));return c},ancestors:function(a){return Element.recursivelyCollect(a,"parentNode")},descendants:function(a){return Element.select(a,"*")},firstDescendant:function(a){for(a=$(a).firstChild;a&&
a.nodeType!=1;)a=a.nextSibling;return $(a)},immediateDescendants:function(a){if(!(a=$(a).firstChild))return[];for(;a&&a.nodeType!=1;)a=a.nextSibling;if(a)return[a].concat($(a).nextSiblings());return[]},previousSiblings:function(a){return Element.recursivelyCollect(a,"previousSibling")},nextSiblings:function(a){return Element.recursivelyCollect(a,"nextSibling")},siblings:function(a){a=$(a);return Element.previousSiblings(a).reverse().concat(Element.nextSiblings(a))},match:function(a,b){if(Object.isString(b))b=
new Selector(b);return b.match($(a))},up:function(a,b,c){a=$(a);if(arguments.length==1)return $(a.parentNode);var d=Element.ancestors(a);return Object.isNumber(b)?d[b]:Selector.findElement(d,b,c)},down:function(a,b,c){a=$(a);if(arguments.length==1)return Element.firstDescendant(a);return Object.isNumber(b)?Element.descendants(a)[b]:Element.select(a,b)[c||0]},previous:function(a,b,c){a=$(a);if(arguments.length==1)return $(Selector.handlers.previousElementSibling(a));var d=Element.previousSiblings(a);
return Object.isNumber(b)?d[b]:Selector.findElement(d,b,c)},next:function(a,b,c){a=$(a);if(arguments.length==1)return $(Selector.handlers.nextElementSibling(a));var d=Element.nextSiblings(a);return Object.isNumber(b)?d[b]:Selector.findElement(d,b,c)},select:function(a){var b=Array.prototype.slice.call(arguments,1);return Selector.findChildElements(a,b)},adjacent:function(a){var b=Array.prototype.slice.call(arguments,1);return Selector.findChildElements(a.parentNode,b).without(a)},identify:function(a){a=
$(a);var b=Element.readAttribute(a,"id");if(b)return b;do b="anonymous_element_"+Element.idCounter++;while($(b));Element.writeAttribute(a,"id",b);return b},readAttribute:function(){var a=function(){var b=document.createElement("iframe"),c=false;b.setAttribute("src","javascript:false;");document.documentElement.appendChild(b);try{b.getAttribute("type",2)}catch(d){c=true}document.documentElement.removeChild(b);return c}();return function(b,c){b=$(b);if(a&&c==="type"&&b.tagName.toUpperCase()=="IFRAME")return b.getAttribute("type");
if(Prototype.Browser.IE){var d=Element._attributeTranslations.read;if(d.values[c])return d.values[c](b,c);if(d.names[c])c=d.names[c];if(c.include(":"))return!b.attributes||!b.attributes[c]?null:b.attributes[c].value}return b.getAttribute(c)}}(),writeAttribute:function(a,b,c){a=$(a);var d={},e=Element._attributeTranslations.write;if(typeof b=="object")d=b;else d[b]=Object.isUndefined(c)?true:c;for(var f in d){b=e.names[f]||f;c=d[f];if(e.values[f])b=e.values[f](a,c);if(c===false||c===null)a.removeAttribute(b);
else c===true?a.setAttribute(b,b):a.setAttribute(b,c)}return a},getHeight:function(a){return Element.getDimensions(a).height},getWidth:function(a){return Element.getDimensions(a).width},classNames:function(a){return new Element.ClassNames(a)},hasClassName:function(a,b){if(a=$(a)){a=a.className;return a.length>0&&(a==b||(new RegExp("(^|\\s)"+b+"(\\s|$)")).test(a))}},addClassName:function(a,b){if(a=$(a)){Element.hasClassName(a,b)||(a.className+=(a.className?" ":"")+b);return a}},removeClassName:function(a,
b){if(a=$(a)){a.className=a.className.replace(new RegExp("(^|\\s+)"+b+"(\\s+|$)")," ").strip();return a}},toggleClassName:function(a,b){if(a=$(a))return Element[Element.hasClassName(a,b)?"removeClassName":"addClassName"](a,b)},cleanWhitespace:function(a){a=$(a);for(var b=a.firstChild;b;){var c=b.nextSibling;b.nodeType==3&&!/\S/.test(b.nodeValue)&&a.removeChild(b);b=c}return a},empty:function(a){return $(a).innerHTML.blank()},descendantOf:function(a,b){a=$(a);b=$(b);if(a.compareDocumentPosition)return(a.compareDocumentPosition(b)&
8)===8;if(b.contains)return b.contains(a)&&b!==a;for(;a=a.parentNode;)if(a==b)return true;return false},scrollTo:function(a){a=$(a);var b=Element.cumulativeOffset(a);window.scrollTo(b[0],b[1]);return a},getStyle:function(a,b){a=$(a);b=b=="float"?"cssFloat":b.camelize();var c=a.style[b];if(!c||c=="auto")c=(a=document.defaultView.getComputedStyle(a,null))?a[b]:null;if(b=="opacity")return c?parseFloat(c):1;return c=="auto"?null:c},getOpacity:function(a){return $(a).getStyle("opacity")},setStyle:function(a,
b){a=$(a);var c=a.style;if(Object.isString(b)){a.style.cssText+=";"+b;return b.include("opacity")?a.setOpacity(b.match(/opacity:\s*(\d?\.?\d*)/)[1]):a}for(var d in b)if(d=="opacity")a.setOpacity(b[d]);else c[d=="float"||d=="cssFloat"?Object.isUndefined(c.styleFloat)?"cssFloat":"styleFloat":d]=b[d];return a},setOpacity:function(a,b){a=$(a);a.style.opacity=b==1||b===""?"":b<1.0E-5?0:b;return a},getDimensions:function(a){a=$(a);var b=Element.getStyle(a,"display");if(b!="none"&&b!=null)return{width:a.offsetWidth,
height:a.offsetHeight};b=a.style;var c=b.visibility,d=b.position,e=b.display;b.visibility="hidden";if(d!="fixed")b.position="absolute";b.display="block";var f=a.clientWidth;a=a.clientHeight;b.display=e;b.position=d;b.visibility=c;return{width:f,height:a}},makePositioned:function(a){a=$(a);var b=Element.getStyle(a,"position");if(b=="static"||!b){a._madePositioned=true;a.style.position="relative";if(Prototype.Browser.Opera){a.style.top=0;a.style.left=0}}return a},undoPositioned:function(a){a=$(a);if(a._madePositioned){a._madePositioned=
undefined;a.style.position=a.style.top=a.style.left=a.style.bottom=a.style.right=""}return a},makeClipping:function(a){a=$(a);if(a._overflow)return a;a._overflow=Element.getStyle(a,"overflow")||"auto";if(a._overflow!=="hidden")a.style.overflow="hidden";return a},undoClipping:function(a){a=$(a);if(!a._overflow)return a;a.style.overflow=a._overflow=="auto"?"":a._overflow;a._overflow=null;return a},cumulativeOffset:function(a){var b=0,c=0;do{b+=a.offsetTop||0;c+=a.offsetLeft||0;a=a.offsetParent}while(a);
return Element._returnOffset(c,b)},positionedOffset:function(a){var b=0,c=0;do{b+=a.offsetTop||0;c+=a.offsetLeft||0;if(a=a.offsetParent){if(a.tagName.toUpperCase()=="BODY")break;if(Element.getStyle(a,"position")!=="static")break}}while(a);return Element._returnOffset(c,b)},absolutize:function(a){a=$(a);if(Element.getStyle(a,"position")=="absolute")return a;var b=Element.positionedOffset(a),c=b[1];b=b[0];var d=a.clientWidth,e=a.clientHeight;a._originalLeft=b-parseFloat(a.style.left||0);a._originalTop=
c-parseFloat(a.style.top||0);a._originalWidth=a.style.width;a._originalHeight=a.style.height;a.style.position="absolute";a.style.top=c+"px";a.style.left=b+"px";a.style.width=d+"px";a.style.height=e+"px";return a},relativize:function(a){a=$(a);if(Element.getStyle(a,"position")=="relative")return a;a.style.position="relative";var b=parseFloat(a.style.top||0)-(a._originalTop||0),c=parseFloat(a.style.left||0)-(a._originalLeft||0);a.style.top=b+"px";a.style.left=c+"px";a.style.height=a._originalHeight;
a.style.width=a._originalWidth;return a},cumulativeScrollOffset:function(a){var b=0,c=0;do{b+=a.scrollTop||0;c+=a.scrollLeft||0;a=a.parentNode}while(a);return Element._returnOffset(c,b)},getOffsetParent:function(a){if(a.offsetParent)return $(a.offsetParent);if(a==document.body)return $(a);for(;(a=a.parentNode)&&a!=document.body;)if(Element.getStyle(a,"position")!="static")return $(a);return $(document.body)},viewportOffset:function(a){var b=0,c=0,d=a;do{b+=d.offsetTop||0;c+=d.offsetLeft||0;if(d.offsetParent==
document.body&&Element.getStyle(d,"position")=="absolute")break}while(d=d.offsetParent);d=a;do if(!Prototype.Browser.Opera||d.tagName&&d.tagName.toUpperCase()=="BODY"){b-=d.scrollTop||0;c-=d.scrollLeft||0}while(d=d.parentNode);return Element._returnOffset(c,b)},clonePosition:function(a,b,c){c=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},c||{});b=$(b);var d=Element.viewportOffset(b);a=$(a);var e=[0,0],f=null;if(Element.getStyle(a,"position")=="absolute"){f=
Element.getOffsetParent(a);e=Element.viewportOffset(f)}if(f==document.body){e[0]-=document.body.offsetLeft;e[1]-=document.body.offsetTop}if(c.setLeft)a.style.left=d[0]-e[0]+c.offsetLeft+"px";if(c.setTop)a.style.top=d[1]-e[1]+c.offsetTop+"px";if(c.setWidth)a.style.width=b.offsetWidth+"px";if(c.setHeight)a.style.height=b.offsetHeight+"px";return a}};Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});
Element._attributeTranslations={write:{names:{className:"class",htmlFor:"for"},values:{}}};
if(Prototype.Browser.Opera){Element.Methods.getStyle=Element.Methods.getStyle.wrap(function(a,b,c){switch(c){case "left":case "top":case "right":case "bottom":if(a(b,"position")==="static")return null;case "height":case "width":if(!Element.visible(b))return null;var d=parseInt(a(b,c),10);if(d!==b["offset"+c.capitalize()])return d+"px";return(c==="height"?["border-top-width","padding-top","padding-bottom","border-bottom-width"]:["border-left-width","padding-left","padding-right","border-right-width"]).inject(d,
function(e,f){f=a(b,f);return f===null?e:e-parseInt(f,10)})+"px";default:return a(b,c)}});Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(a,b,c){if(c==="title")return b.title;return a(b,c)})}else if(Prototype.Browser.IE){Element.Methods.getOffsetParent=Element.Methods.getOffsetParent.wrap(function(a,b){b=$(b);var c=b.getStyle("position");if(c!=="static")return a(b);b.setStyle({position:"relative"});a=a(b);b.setStyle({position:c});return a});$w("positionedOffset viewportOffset").each(function(a){Element.Methods[a]=
Element.Methods[a].wrap(function(b,c){c=$(c);var d=c.getStyle("position");if(d!=="static")return b(c);var e=c.getOffsetParent();e&&e.getStyle("position")==="fixed"&&e.setStyle({zoom:1});c.setStyle({position:"relative"});b=b(c);c.setStyle({position:d});return b})});Element.Methods.cumulativeOffset=Element.Methods.cumulativeOffset.wrap(function(a,b){return a(b)});Element.Methods.getStyle=function(a,b){a=$(a);b=b=="float"||b=="cssFloat"?"styleFloat":b.camelize();var c=a.style[b];if(!c&&a.currentStyle)c=
a.currentStyle[b];if(b=="opacity"){if(c=(a.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/))if(c[1])return parseFloat(c[1])/100;return 1}if(c=="auto"){if((b=="width"||b=="height")&&a.getStyle("display")!="none")return a["offset"+b.capitalize()]+"px";return null}return c};Element.Methods.setOpacity=function(a,b){function c(f){return f.replace(/alpha\([^\)]*\)/gi,"")}a=$(a);var d=a.currentStyle;if(d&&!d.hasLayout||!d&&a.style.zoom=="normal")a.style.zoom=1;d=a.getStyle("filter");var e=a.style;
if(b==1||b===""){(d=c(d))?(e.filter=d):e.removeAttribute("filter");return a}else if(b<1.0E-5)b=0;e.filter=c(d)+"alpha(opacity="+b*100+")";return a};Element._attributeTranslations=function(){var a="className",b="for",c=document.createElement("div");c.setAttribute(a,"x");if(c.className!=="x"){c.setAttribute("class","x");if(c.className==="x")a="class"}c=null;c=document.createElement("label");c.setAttribute(b,"x");if(c.htmlFor!=="x"){c.setAttribute("htmlFor","x");if(c.htmlFor==="x")b="htmlFor"}c=null;
return{read:{names:{"class":a,className:a,"for":b,htmlFor:b},values:{_getAttr:function(d,e){return d.getAttribute(e,2)},_getAttrNode:function(d,e){return(d=d.getAttributeNode(e))?d.value:""},_getEv:function(){var d=document.createElement("div");d.onclick=Prototype.emptyFunction;d=d.getAttribute("onclick");var e;if(String(d).indexOf("{")>-1)e=function(f,h){h=f.getAttribute(h);if(!h)return null;h=h.toString();h=h.split("{")[1];h=h.split("}")[0];return h.strip()};else if(d==="")e=function(f,h){h=f.getAttribute(h);
if(!h)return null;return h.strip()};d=null;return e}(),_flag:function(d,e){return $(d).hasAttribute(e)?e:null},style:function(d){return d.style.cssText.toLowerCase()},title:function(d){return d.title}}}}}();Element._attributeTranslations.write={names:Object.extend({cellpadding:"cellPadding",cellspacing:"cellSpacing"},Element._attributeTranslations.read.names),values:{checked:function(a,b){a.checked=!!b},style:function(a,b){a.style.cssText=b?b:""}}};Element._attributeTranslations.has={};$w("colSpan rowSpan vAlign dateTime accessKey tabIndex encType maxLength readOnly longDesc frameBorder").each(function(a){Element._attributeTranslations.write.names[a.toLowerCase()]=
a;Element._attributeTranslations.has[a.toLowerCase()]=a});(function(a){Object.extend(a,{href:a._getAttr,src:a._getAttr,type:a._getAttr,action:a._getAttrNode,disabled:a._flag,checked:a._flag,readonly:a._flag,multiple:a._flag,onload:a._getEv,onunload:a._getEv,onclick:a._getEv,ondblclick:a._getEv,onmousedown:a._getEv,onmouseup:a._getEv,onmouseover:a._getEv,onmousemove:a._getEv,onmouseout:a._getEv,onfocus:a._getEv,onblur:a._getEv,onkeypress:a._getEv,onkeydown:a._getEv,onkeyup:a._getEv,onsubmit:a._getEv,
onreset:a._getEv,onselect:a._getEv,onchange:a._getEv})})(Element._attributeTranslations.read.values);Prototype.BrowserFeatures.ElementExtensions&&function(){function a(b){b=b.getElementsByTagName("*");for(var c=[],d=0,e;e=b[d];d++)e.tagName!=="!"&&c.push(e);return c}Element.Methods.down=function(b,c,d){b=$(b);if(arguments.length==1)return b.firstDescendant();return Object.isNumber(c)?a(b)[c]:Element.select(b,c)[d||0]}}()}else if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent))Element.Methods.setOpacity=
function(a,b){a=$(a);a.style.opacity=b==1?0.999999:b===""?"":b<1.0E-5?0:b;return a};else if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(a,b){a=$(a);a.style.opacity=b==1||b===""?"":b<1.0E-5?0:b;if(b==1)if(a.tagName.toUpperCase()=="IMG"&&a.width){a.width++;a.width--}else try{var c=document.createTextNode(" ");a.appendChild(c);a.removeChild(c)}catch(d){}return a};Element.Methods.cumulativeOffset=function(a){var b=0,c=0;do{b+=a.offsetTop||0;c+=a.offsetLeft||0;if(a.offsetParent==document.body)if(Element.getStyle(a,
"position")=="absolute")break;a=a.offsetParent}while(a);return Element._returnOffset(c,b)}}
if("outerHTML"in document.documentElement)Element.Methods.replace=function(a,b){a=$(a);if(b&&b.toElement)b=b.toElement();if(Object.isElement(b)){a.parentNode.replaceChild(b,a);return a}b=Object.toHTML(b);var c=a.parentNode,d=c.tagName.toUpperCase();if(Element._insertionTranslations.tags[d]){var e=a.next();d=Element._getContentFromAnonymousElement(d,b.stripScripts());c.removeChild(a);e?d.each(function(f){c.insertBefore(f,e)}):d.each(function(f){c.appendChild(f)})}else a.outerHTML=b.stripScripts();
b.evalScripts.bind(b).defer();return a};Element._returnOffset=function(a,b){var c=[a,b];c.left=a;c.top=b;return c};Element._getContentFromAnonymousElement=function(a,b){var c=new Element("div");if(a=Element._insertionTranslations.tags[a]){c.innerHTML=a[0]+b+a[1];a[2].times(function(){c=c.firstChild})}else c.innerHTML=b;return $A(c.childNodes)};
Element._insertionTranslations={before:function(a,b){a.parentNode.insertBefore(b,a)},top:function(a,b){a.insertBefore(b,a.firstChild)},bottom:function(a,b){a.appendChild(b)},after:function(a,b){a.parentNode.insertBefore(b,a.nextSibling)},tags:{TABLE:["<table>","</table>",1],TBODY:["<table><tbody>","</tbody></table>",2],TR:["<table><tbody><tr>","</tr></tbody></table>",3],TD:["<table><tbody><tr><td>","</td></tr></tbody></table>",4],SELECT:["<select>","</select>",1]}};
(function(){var a=Element._insertionTranslations.tags;Object.extend(a,{THEAD:a.TBODY,TFOOT:a.TBODY,TH:a.TD})})();Element.Methods.Simulated={hasAttribute:function(a,b){b=Element._attributeTranslations.has[b]||b;a=$(a).getAttributeNode(b);return!!(a&&a.specified)}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);
(function(a){if(!Prototype.BrowserFeatures.ElementExtensions&&a.__proto__){window.HTMLElement={};window.HTMLElement.prototype=a.__proto__;Prototype.BrowserFeatures.ElementExtensions=true}})(document.createElement("div"));
Element.extend=function(){function a(h){if(typeof window.Element!="undefined"){var j=window.Element.prototype;if(j){var n="_"+(Math.random()+"").slice(2);h=document.createElement(h);j[n]="x";h=h[n]!=="x";delete j[n];return h}}return false}function b(h,j){for(var n in j){var s=j[n];if(Object.isFunction(s)&&!(n in h))h[n]=s.methodize()}}var c=a("object"),d=a("applet");if(Prototype.BrowserFeatures.SpecificElementExtensions){if(c&&d)return function(h){if(h&&typeof h._extendedByPrototype=="undefined"){var j=
h.tagName;if(j&&/^(?:object|applet|embed)$/i.test(j)){b(h,Element.Methods);b(h,Element.Methods.Simulated);b(h,Element.Methods.ByTag[j.toUpperCase()])}}return h};return Prototype.K}var e={},f=Element.Methods.ByTag;c=Object.extend(function(h){if(!h||typeof h._extendedByPrototype!="undefined"||h.nodeType!=1||h==window)return h;var j=Object.clone(e),n=h.tagName.toUpperCase();f[n]&&Object.extend(j,f[n]);b(h,j);h._extendedByPrototype=Prototype.emptyFunction;return h},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(e,
Element.Methods);Object.extend(e,Element.Methods.Simulated)}}});c.refresh();return c}();Element.hasAttribute=function(a,b){if(a.hasAttribute)return a.hasAttribute(b);return Element.Methods.Simulated.hasAttribute(a,b)};
Element.addMethods=function(a){function b(n){n=n.toUpperCase();Element.Methods.ByTag[n]||(Element.Methods.ByTag[n]={});Object.extend(Element.Methods.ByTag[n],a)}function c(n,s,w){w=w||false;for(var t in n){var y=n[t];if(Object.isFunction(y))if(!w||!(t in s))s[t]=y.methodize()}}function d(n){var s,w={OPTGROUP:"OptGroup",TEXTAREA:"TextArea",P:"Paragraph",FIELDSET:"FieldSet",UL:"UList",OL:"OList",DL:"DList",DIR:"Directory",H1:"Heading",H2:"Heading",H3:"Heading",H4:"Heading",H5:"Heading",H6:"Heading",
Q:"Quote",INS:"Mod",DEL:"Mod",A:"Anchor",IMG:"Image",CAPTION:"TableCaption",COL:"TableCol",COLGROUP:"TableCol",THEAD:"TableSection",TFOOT:"TableSection",TBODY:"TableSection",TR:"TableRow",TH:"TableCell",TD:"TableCell",FRAMESET:"FrameSet",IFRAME:"IFrame"};if(w[n])s="HTML"+w[n]+"Element";if(window[s])return window[s];s="HTML"+n+"Element";if(window[s])return window[s];s="HTML"+n.capitalize()+"Element";if(window[s])return window[s];n=document.createElement(n);return n.__proto__||n.constructor.prototype}
var e=Prototype.BrowserFeatures,f=Element.Methods.ByTag;if(!a){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{FORM:Object.clone(Form.Methods),INPUT:Object.clone(Form.Element.Methods),SELECT:Object.clone(Form.Element.Methods),TEXTAREA:Object.clone(Form.Element.Methods)})}if(arguments.length==2){var h=a;a=arguments[1]}if(h)Object.isArray(h)?h.each(b):b(h);else Object.extend(Element.Methods,a||{});h=window.HTMLElement?HTMLElement.prototype:
Element.prototype;if(e.ElementExtensions){c(Element.Methods,h);c(Element.Methods.Simulated,h,true)}if(e.SpecificElementExtensions)for(var j in Element.Methods.ByTag){e=d(j);Object.isUndefined(e)||c(f[j],e.prototype)}Object.extend(Element,Element.Methods);delete Element.ByTag;Element.extend.refresh&&Element.extend.refresh();Element.cache={}};
document.viewport={getDimensions:function(){return{width:this.getWidth(),height:this.getHeight()}},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)}};
(function(a){function b(){if(d.WebKit&&!e.evaluate)return document;if(d.Opera&&window.parseFloat(window.opera.version())<9.5)return document.body;return document.documentElement}function c(j){f||(f=b());h[j]="client"+j;a["get"+j]=function(){return f[h[j]]};return a["get"+j]()}var d=Prototype.Browser,e=document,f,h={};a.getWidth=c.curry("Width");a.getHeight=c.curry("Height")})(document.viewport);Element.Storage={UID:1};
Element.addMethods({getStorage:function(a){if(a=$(a)){if(a===window)a=0;else{if(typeof a._prototypeUID==="undefined")a._prototypeUID=[Element.Storage.UID++];a=a._prototypeUID[0]}Element.Storage[a]||(Element.Storage[a]=$H());return Element.Storage[a]}},store:function(a,b,c){if(a=$(a)){arguments.length===2?Element.getStorage(a).update(b):Element.getStorage(a).set(b,c);return a}},retrieve:function(a,b,c){if(a=$(a)){a=Element.getStorage(a);var d=a.get(b);if(Object.isUndefined(d)){a.set(b,c);d=c}return d}},
clone:function(a,b){if(a=$(a)){a=a.cloneNode(b);a._prototypeUID=void 0;if(b){b=Element.select(a,"*");for(var c=b.length;c--;)b[c]._prototypeUID=void 0}return Element.extend(a)}}});
var Selector=Class.create({initialize:function(a){this.expression=a.strip();if(this.shouldUseSelectorsAPI())this.mode="selectorsAPI";else if(this.shouldUseXPath()){this.mode="xpath";this.compileXPathMatcher()}else{this.mode="normal";this.compileMatcher()}},shouldUseXPath:function(){var a=function(){var b=false;if(document.evaluate&&window.XPathResult){b=document.createElement("div");b.innerHTML="<ul><li></li></ul><div><ul><li></li></ul></div>";b=document.evaluate(".//*[local-name()='ul' or local-name()='UL']//*[local-name()='li' or local-name()='LI']",
b,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null).snapshotLength!==2}return b}();return function(){if(!Prototype.BrowserFeatures.XPath)return false;var b=this.expression;if(Prototype.Browser.WebKit&&(b.include("-of-type")||b.include(":empty")))return false;if(/(\[[\w-]*?:|:checked)/.test(b))return false;if(a)return false;return true}}(),shouldUseSelectorsAPI:function(){if(!Prototype.BrowserFeatures.SelectorsAPI)return false;if(Selector.CASE_INSENSITIVE_CLASS_NAMES)return false;if(!Selector._div)Selector._div=
new Element("div");try{Selector._div.querySelector(this.expression)}catch(a){return false}return true},compileMatcher:function(){var a=this.expression,b=Selector.patterns,c=Selector.criteria,d,e,f=b.length,h;if(Selector._cache[a])this.matcher=Selector._cache[a];else{for(this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];a&&d!=a&&/\S/.test(a);){d=a;for(var j=0;j<f;j++){e=b[j].re;h=b[j].name;if(e=a.match(e)){this.matcher.push(Object.isFunction(c[h])?
c[h](e):(new Template(c[h])).evaluate(e));a=a.replace(e[0],"");break}}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join("\n"));Selector._cache[this.expression]=this.matcher}},compileXPathMatcher:function(){var a=this.expression,b=Selector.patterns,c=Selector.xpath,d,e,f=b.length,h;if(Selector._cache[a])this.xpath=Selector._cache[a];else{for(this.matcher=[".//*"];a&&d!=a&&/\S/.test(a);){d=a;for(var j=0;j<f;j++){h=b[j].name;if(e=a.match(b[j].re)){this.matcher.push(Object.isFunction(c[h])?
c[h](e):(new Template(c[h])).evaluate(e));a=a.replace(e[0],"");break}}}this.xpath=this.matcher.join("");Selector._cache[this.expression]=this.xpath}},findElements:function(a){a=a||document;var b=this.expression;switch(this.mode){case "selectorsAPI":if(a!==document){var c=a.id,d=$(a).identify();d=d.replace(/[\.:]/g,"\\$0");b="#"+d+" "+b}b=$A(a.querySelectorAll(b)).map(Element.extend);a.id=c;return b;case "xpath":return document._getElementsByXPath(this.xpath,a);default:return this.matcher(a)}},match:function(a){this.tokens=
[];for(var b=this.expression,c=Selector.patterns,d=Selector.assertions,e,f,h=c.length,j;b&&e!==b&&/\S/.test(b);){e=b;for(var n=0;n<h;n++){f=c[n].re;j=c[n].name;if(f=b.match(f))if(d[j]){this.tokens.push([j,Object.clone(f)]);b=b.replace(f[0],"")}else return this.findElements(document).include(a)}}b=true;for(n=0;c=this.tokens[n];n++){j=c[0];c=c[1];if(!Selector.assertions[j](a,c)){b=false;break}}return b},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+
">"}});if(Prototype.BrowserFeatures.SelectorsAPI&&document.compatMode==="BackCompat")Selector.CASE_INSENSITIVE_CLASS_NAMES=function(){var a=document.createElement("div"),b=document.createElement("span");a.id="prototype_test_id";b.className="Test";a.appendChild(b);return a.querySelector("#prototype_test_id .test")!==null}();
Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(a){if(a[1]=="*")return"";return"[local-name()='"+a[1].toLowerCase()+"' or local-name()='"+a[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:function(a){a[1]=a[1].toLowerCase();return(new Template("[@#{1}]")).evaluate(a)},attr:function(a){a[1]=a[1].toLowerCase();a[3]=a[5]||a[6];
return(new Template(Selector.xpath.operators[a[2]])).evaluate(a)},pseudo:function(a){var b=Selector.xpath.pseudos[a[1]];if(!b)return"";if(Object.isFunction(b))return b(a);return(new Template(Selector.xpath.pseudos[a[1]])).evaluate(a)},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},
pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","only-child":"[not(preceding-sibling::* or following-sibling::*)]",empty:"[count(*) = 0 and (count(text()) = 0)]",checked:"[@checked]",disabled:"[(@disabled) and (@type!='hidden')]",enabled:"[not(@disabled) and (@type!='hidden')]",not:function(a){for(var b=a[6],c=Selector.patterns,d=Selector.xpath,e,f,h=c.length,j=[];b&&e!=b&&/\S/.test(b);){e=b;for(var n=0;n<h;n++){f=c[n].name;if(a=b.match(c[n].re)){f=
Object.isFunction(d[f])?d[f](a):(new Template(d[f])).evaluate(a);j.push("("+f.substring(1,f.length-1)+")");b=b.replace(a[0],"");break}}}return"[not("+j.join(" and ")+")]"},"nth-child":function(a){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",a)},"nth-last-child":function(a){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",a)},"nth-of-type":function(a){return Selector.xpath.pseudos.nth("position() ",a)},"nth-last-of-type":function(a){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",
a)},"first-of-type":function(a){a[6]="1";return Selector.xpath.pseudos["nth-of-type"](a)},"last-of-type":function(a){a[6]="1";return Selector.xpath.pseudos["nth-last-of-type"](a)},"only-of-type":function(a){var b=Selector.xpath.pseudos;return b["first-of-type"](a)+b["last-of-type"](a)},nth:function(a,b){var c=b[6];if(c=="even")c="2n+0";if(c=="odd")c="2n+1";if(b=c.match(/^(\d+)$/))return"["+a+"= "+b[1]+"]";if(b=c.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(b[1]=="-")b[1]=-1;c=b[1]?Number(b[1]):1;b=b[2]?
Number(b[2]):0;return(new Template("[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]")).evaluate({fragment:a,a:c,b:b})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);      c = false;',className:'n = h.className(n, r, "#{1}", c);    c = false;',id:'n = h.id(n, r, "#{1}", c);           c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}", c); c = false;',attr:function(a){a[3]=a[5]||a[6];return(new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;')).evaluate(a)},
pseudo:function(a){if(a[6])a[6]=a[6].replace(/"/g,'\\"');return(new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;')).evaluate(a)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:[{name:"laterSibling",re:/^\s*~\s*/},{name:"child",re:/^\s*>\s*/},{name:"adjacent",re:/^\s*\+\s*/},{name:"descendant",re:/^\s/},{name:"tagName",re:/^\s*(\*|[\w\-]+)(\b|$)?/},{name:"id",re:/^#([\w\-\*]+)(\b|$)/},{name:"className",re:/^\.([\w\-\*]+)(\b|$)/},
{name:"pseudo",re:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/},{name:"attrPresence",re:/^\[((?:[\w-]+:)?[\w-]+)\]/},{name:"attr",re:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/}],assertions:{tagName:function(a,b){return b[1].toUpperCase()==a.tagName.toUpperCase()},className:function(a,b){return Element.hasClassName(a,b[1])},id:function(a,b){return a.id===b[1]},attrPresence:function(a,b){return Element.hasAttribute(a,
b[1])},attr:function(a,b){return(a=Element.readAttribute(a,b[1]))&&Selector.operators[b[2]](a,b[5]||b[6])}},handlers:{concat:function(a,b){for(var c=0,d;d=b[c];c++)a.push(d);return a},mark:function(a){for(var b=Prototype.emptyFunction,c=0,d;d=a[c];c++)d._countedByPrototype=b;return a},unmark:function(){return function(){var a=document.createElement("div"),b=false;a._countedByPrototype="x";return b=a.getAttribute("_countedByPrototype")==="x"}()?function(a){for(var b=0,c;c=a[b];b++)c.removeAttribute("_countedByPrototype");
return a}:function(a){for(var b=0,c;c=a[b];b++)c._countedByPrototype=void 0;return a}}(),index:function(a,b,c){a._countedByPrototype=Prototype.emptyFunction;if(b){a=a.childNodes;b=a.length-1;for(var d=1;b>=0;b--){var e=a[b];if(e.nodeType==1&&(!c||e._countedByPrototype))e.nodeIndex=d++}}else{b=0;d=1;for(a=a.childNodes;e=a[b];b++)if(e.nodeType==1&&(!c||e._countedByPrototype))e.nodeIndex=d++}},unique:function(a){if(a.length==0)return a;for(var b=[],c,d=0,e=a.length;d<e;d++)if(typeof(c=a[d])._countedByPrototype==
"undefined"){c._countedByPrototype=Prototype.emptyFunction;b.push(Element.extend(c))}return Selector.handlers.unmark(b)},descendant:function(a){for(var b=Selector.handlers,c=0,d=[],e;e=a[c];c++)b.concat(d,e.getElementsByTagName("*"));return d},child:function(a){for(var b=0,c=[],d;d=a[b];b++)for(var e=0,f;f=d.childNodes[e];e++)f.nodeType==1&&f.tagName!="!"&&c.push(f);return c},adjacent:function(a){for(var b=0,c=[],d;d=a[b];b++)(d=this.nextElementSibling(d))&&c.push(d);return c},laterSibling:function(a){for(var b=
Selector.handlers,c=0,d=[],e;e=a[c];c++)b.concat(d,Element.nextSiblings(e));return d},nextElementSibling:function(a){for(;a=a.nextSibling;)if(a.nodeType==1)return a;return null},previousElementSibling:function(a){for(;a=a.previousSibling;)if(a.nodeType==1)return a;return null},tagName:function(a,b,c,d){var e=c.toUpperCase(),f=[],h=Selector.handlers;if(a){if(d){if(d=="descendant"){for(b=0;d=a[b];b++)h.concat(f,d.getElementsByTagName(c));return f}else a=this[d](a);if(c=="*")return a}for(b=0;d=a[b];b++)d.tagName.toUpperCase()===
e&&f.push(d);return f}else return b.getElementsByTagName(c)},id:function(a,b,c,d){var e=$(c),f=Selector.handlers;if(b==document){if(!e)return[];if(!a)return[e]}else if(!b.sourceIndex||b.sourceIndex<1){a=b.getElementsByTagName("*");for(var h=0,j;j=a[h];h++)if(j.id===c)return[j]}if(a){if(d)if(d=="child")for(b=0;j=a[b];b++){if(e.parentNode==j)return[e]}else if(d=="descendant")for(b=0;j=a[b];b++){if(Element.descendantOf(e,j))return[e]}else if(d=="adjacent")for(b=0;j=a[b];b++){if(Selector.handlers.previousElementSibling(e)==
j)return[e]}else a=f[d](a);for(b=0;j=a[b];b++)if(j==e)return[e];return[]}return e&&Element.descendantOf(e,b)?[e]:[]},className:function(a,b,c,d){if(a&&d)a=this[d](a);return Selector.handlers.byClassName(a,b,c)},byClassName:function(a,b,c){a||(a=Selector.handlers.descendant([b]));b=" "+c+" ";for(var d=0,e=[],f,h;f=a[d];d++){h=f.className;if(h.length!=0)if(h==c||(" "+h+" ").include(b))e.push(f)}return e},attrPresence:function(a,b,c,d){a||(a=b.getElementsByTagName("*"));if(a&&d)a=this[d](a);b=[];d=0;
for(var e;e=a[d];d++)Element.hasAttribute(e,c)&&b.push(e);return b},attr:function(a,b,c,d,e,f){a||(a=b.getElementsByTagName("*"));if(a&&f)a=this[f](a);b=Selector.operators[e];e=[];f=0;for(var h;h=a[f];f++){var j=Element.readAttribute(h,c);j!==null&&b(j,d)&&e.push(h)}return e},pseudo:function(a,b,c,d,e){if(a&&e)a=this[e](a);a||(a=d.getElementsByTagName("*"));return Selector.pseudos[b](a,c,d)}},pseudos:{"first-child":function(a){for(var b=0,c=[],d;d=a[b];b++)Selector.handlers.previousElementSibling(d)||
c.push(d);return c},"last-child":function(a){for(var b=0,c=[],d;d=a[b];b++)Selector.handlers.nextElementSibling(d)||c.push(d);return c},"only-child":function(a){for(var b=Selector.handlers,c=0,d=[],e;e=a[c];c++)!b.previousElementSibling(e)&&!b.nextElementSibling(e)&&d.push(e);return d},"nth-child":function(a,b,c){return Selector.pseudos.nth(a,b,c)},"nth-last-child":function(a,b,c){return Selector.pseudos.nth(a,b,c,true)},"nth-of-type":function(a,b,c){return Selector.pseudos.nth(a,b,c,false,true)},
"nth-last-of-type":function(a,b,c){return Selector.pseudos.nth(a,b,c,true,true)},"first-of-type":function(a,b,c){return Selector.pseudos.nth(a,"1",c,false,true)},"last-of-type":function(a,b,c){return Selector.pseudos.nth(a,"1",c,true,true)},"only-of-type":function(a,b,c){var d=Selector.pseudos;return d["last-of-type"](d["first-of-type"](a,b,c),b,c)},getIndices:function(a,b,c){if(a==0)return b>0?[b]:[];return $R(1,c).inject([],function(d,e){0==(e-b)%a&&(e-b)/a>=0&&d.push(e);return d})},nth:function(a,
b,c,d,e){if(a.length==0)return[];if(b=="even")b="2n+0";if(b=="odd")b="2n+1";c=Selector.handlers;var f=[],h=[],j;c.mark(a);for(var n=0;j=a[n];n++)if(!j.parentNode._countedByPrototype){c.index(j.parentNode,d,e);h.push(j.parentNode)}if(b.match(/^\d+$/)){b=Number(b);for(n=0;j=a[n];n++)j.nodeIndex==b&&f.push(j)}else if(j=b.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(j[1]=="-")j[1]=-1;n=j[1]?Number(j[1]):1;j=j[2]?Number(j[2]):0;b=Selector.pseudos.getIndices(n,j,a.length);n=0;for(d=b.length;j=a[n];n++)for(e=0;e<
d;e++)j.nodeIndex==b[e]&&f.push(j)}c.unmark(a);c.unmark(h);return f},empty:function(a){for(var b=0,c=[],d;d=a[b];b++)d.tagName=="!"||d.firstChild||c.push(d);return c},not:function(a,b,c){var d=Selector.handlers;b=(new Selector(b)).findElements(c);d.mark(b);c=0;for(var e=[],f;f=a[c];c++)f._countedByPrototype||e.push(f);d.unmark(b);return e},enabled:function(a){for(var b=0,c=[],d;d=a[b];b++)if(!d.disabled&&(!d.type||d.type!=="hidden"))c.push(d);return c},disabled:function(a){for(var b=0,c=[],d;d=a[b];b++)d.disabled&&
c.push(d);return c},checked:function(a){for(var b=0,c=[],d;d=a[b];b++)d.checked&&c.push(d);return c}},operators:{"=":function(a,b){return a==b},"!=":function(a,b){return a!=b},"^=":function(a,b){return a==b||a&&a.startsWith(b)},"$=":function(a,b){return a==b||a&&a.endsWith(b)},"*=":function(a,b){return a==b||a&&a.include(b)},"~=":function(a,b){return(" "+a+" ").include(" "+b+" ")},"|=":function(a,b){return("-"+(a||"").toUpperCase()+"-").include("-"+(b||"").toUpperCase()+"-")}},split:function(a){var b=
[];a.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(c){b.push(c[1].strip())});return b},matchElements:function(a,b){b=$$(b);var c=Selector.handlers;c.mark(b);for(var d=0,e=[],f;f=a[d];d++)f._countedByPrototype&&e.push(f);c.unmark(b);return e},findElement:function(a,b,c){if(Object.isNumber(b)){c=b;b=false}return Selector.matchElements(a,b||"*")[c||0]},findChildElements:function(a,b){b=Selector.split(b.join(","));for(var c=[],d=Selector.handlers,e=0,f=b.length,h;e<f;e++){h=new Selector(b[e].strip());
d.concat(c,h.findElements(a))}return f>1?d.unique(c):c}});Prototype.Browser.IE&&Object.extend(Selector.handlers,{concat:function(a,b){for(var c=0,d;d=b[c];c++)d.tagName!=="!"&&a.push(d);return a}});function $$(){return Selector.findChildElements(document,$A(arguments))}
var Form={reset:function(a){a=$(a);a.reset();return a},serializeElements:function(a,b){if(typeof b!="object")b={hash:!!b};else if(Object.isUndefined(b.hash))b.hash=true;var c,d,e=false,f=b.submit;a=a.inject({},function(h,j){if(!j.disabled&&j.name){c=j.name;d=$(j).getValue();if(d!=null&&j.type!="file"&&(j.type!="submit"||!e&&f!==false&&(!f||c==f)&&(e=true)))if(c in h){Object.isArray(h[c])||(h[c]=[h[c]]);h[c].push(d)}else h[c]=d}return h});return b.hash?a:Object.toQueryString(a)}};
Form.Methods={serialize:function(a,b){return Form.serializeElements(Form.getElements(a),b)},getElements:function(a){a=$(a).getElementsByTagName("*");for(var b,c=[],d=Form.Element.Serializers,e=0;b=a[e];e++)c.push(b);return c.inject([],function(f,h){d[h.tagName.toLowerCase()]&&f.push(Element.extend(h));return f})},getInputs:function(a,b,c){a=$(a);a=a.getElementsByTagName("input");if(!b&&!c)return $A(a).map(Element.extend);for(var d=0,e=[],f=a.length;d<f;d++){var h=a[d];b&&h.type!=b||c&&h.name!=c||
e.push(Element.extend(h))}return e},disable:function(a){a=$(a);Form.getElements(a).invoke("disable");return a},enable:function(a){a=$(a);Form.getElements(a).invoke("enable");return a},findFirstElement:function(a){a=$(a).getElements().findAll(function(c){return"hidden"!=c.type&&!c.disabled});var b=a.findAll(function(c){return c.hasAttribute("tabIndex")&&c.tabIndex>=0}).sortBy(function(c){return c.tabIndex}).first();return b?b:a.find(function(c){return/^(?:input|select|textarea)$/i.test(c.tagName)})},
focusFirstElement:function(a){a=$(a);a.findFirstElement().activate();return a},request:function(a,b){a=$(a);b=Object.clone(b||{});var c=b.parameters,d=a.readAttribute("action")||"";if(d.blank())d=window.location.href;b.parameters=a.serialize(true);if(c){if(Object.isString(c))c=c.toQueryParams();Object.extend(b.parameters,c)}if(a.hasAttribute("method")&&!b.method)b.method=a.method;return new Ajax.Request(d,b)}};
Form.Element={focus:function(a){$(a).focus();return a},select:function(a){$(a).select();return a}};
Form.Element.Methods={serialize:function(a){a=$(a);if(!a.disabled&&a.name){var b=a.getValue();if(b!=undefined){var c={};c[a.name]=b;return Object.toQueryString(c)}}return""},getValue:function(a){a=$(a);var b=a.tagName.toLowerCase();return Form.Element.Serializers[b](a)},setValue:function(a,b){a=$(a);var c=a.tagName.toLowerCase();Form.Element.Serializers[c](a,b);return a},clear:function(a){$(a).value="";return a},present:function(a){return $(a).value!=""},activate:function(a){a=$(a);try{a.focus();
if(a.select&&(a.tagName.toLowerCase()!="input"||!/^(?:button|reset|submit)$/i.test(a.type)))a.select()}catch(b){}return a},disable:function(a){a=$(a);a.disabled=true;return a},enable:function(a){a=$(a);a.disabled=false;return a}};var Field=Form.Element,$F=Form.Element.Methods.getValue;
Form.Element.Serializers={input:function(a,b){switch(a.type.toLowerCase()){case "checkbox":case "radio":return Form.Element.Serializers.inputSelector(a,b);default:return Form.Element.Serializers.textarea(a,b)}},inputSelector:function(a,b){if(Object.isUndefined(b))return a.checked?a.value:null;else a.checked=!!b},textarea:function(a,b){if(Object.isUndefined(b))return a.value;else a.value=b},select:function(a,b){if(Object.isUndefined(b))return this[a.type=="select-one"?"selectOne":"selectMany"](a);
else for(var c,d,e=!Object.isArray(b),f=0,h=a.length;f<h;f++){c=a.options[f];d=this.optionValue(c);if(e){if(d==b){c.selected=true;return}}else c.selected=b.include(d)}},selectOne:function(a){var b=a.selectedIndex;return b>=0?this.optionValue(a.options[b]):null},selectMany:function(a){var b,c=a.length;if(!c)return null;var d=0;for(b=[];d<c;d++){var e=a.options[d];e.selected&&b.push(this.optionValue(e))}return b},optionValue:function(a){return Element.extend(a).hasAttribute("value")?a.value:a.text}};
Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,b,c,d){$super(d,c);this.element=$(b);this.lastValue=this.getValue()},execute:function(){var a=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(a)?this.lastValue!=a:String(this.lastValue)!=String(a)){this.callback(this.element,a);this.lastValue=a}}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element)}});
Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element)}});
Abstract.EventObserver=Class.create({initialize:function(a,b){this.element=$(a);this.callback=b;this.lastValue=this.getValue();this.element.tagName.toLowerCase()=="form"?this.registerFormCallbacks():this.registerCallback(this.element)},onElementEvent:function(){var a=this.getValue();if(this.lastValue!=a){this.callback(this.element,a);this.lastValue=a}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this)},registerCallback:function(a){if(a.type)switch(a.type.toLowerCase()){case "checkbox":case "radio":Event.observe(a,
"click",this.onElementEvent.bind(this));break;default:Event.observe(a,"change",this.onElementEvent.bind(this));break}}});Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element)}});
(function(){function a(g){return p(g,0)}function b(g){return p(g,1)}function c(g){return p(g,2)}function d(g){g=v.extend(g);var i=g.target,l=g.type;if((g=g.currentTarget)&&g.tagName)if(l==="load"||l==="error"||l==="click"&&g.tagName.toLowerCase()==="input"&&g.type==="radio")i=g;if(i.nodeType==Node.TEXT_NODE)i=i.parentNode;return Element.extend(i)}function e(g,i){g=v.element(g);if(!i)return g;g=[g].concat(g.ancestors());return Selector.findElement(g,i,0)}function f(g){return{x:h(g),y:j(g)}}function h(g){var i=
document.documentElement,l=document.body||{scrollLeft:0};try{return g.pageX||g.clientX+(i.scrollLeft||l.scrollLeft)-(i.clientLeft||0)}catch(r){return 0}}function j(g){var i=document.documentElement,l=document.body||{scrollTop:0};try{return g.pageY||g.clientY+(i.scrollTop||l.scrollTop)-(i.clientTop||0)}catch(r){return 0}}function n(g){v.extend(g);g.preventDefault();g.stopPropagation();g.stopped=true}function s(g,i,l){var r=Element.retrieve(g,"prototype_event_registry");if(Object.isUndefined(r)){q.push(g);
r=Element.retrieve(g,"prototype_event_registry",$H())}var B=r.get(i);if(Object.isUndefined(B)){B=[];r.set(i,B)}if(B.pluck("handler").include(l))return false;var F;if(i.include(":"))F=function(G){if(Object.isUndefined(G.eventName))return false;if(G.eventName!==i)return false;v.extend(G,g);l.call(g,G)};else if(!k&&(i==="mouseenter"||i==="mouseleave")){if(i==="mouseenter"||i==="mouseleave")F=function(G){v.extend(G,g);for(var J=G.relatedTarget;J&&J!==g;)try{J=J.parentNode}catch(o){J=g}J!==g&&l.call(g,
G)}}else F=function(G){v.extend(G,g);l.call(g,G)};F.handler=l;B.push(F);return F}function w(){for(var g=0,i=q.length;g<i;g++){v.stopObserving(q[g]);q[g]=null}}function t(g,i,l){g=$(g);l=s(g,i,l);if(!l)return g;if(i.include(":"))if(g.addEventListener)g.addEventListener("dataavailable",l,false);else{g.attachEvent("ondataavailable",l);g.attachEvent("onfilterchange",l)}else{i=m(i);if(g.addEventListener)g.addEventListener(i,l,false);else try{g.attachEvent("on"+i,l)}catch(r){}}return g}function y(g,i,l){g=
$(g);var r=Element.retrieve(g,"prototype_event_registry");if(Object.isUndefined(r))return g;if(i&&!l){var B=r.get(i);if(Object.isUndefined(B))return g;B.each(function(o){Element.stopObserving(g,i,o.handler)});return g}else if(!i){r.each(function(o){var u=o.key;o.value.each(function(z){Element.stopObserving(g,u,z.handler)})});return g}if(B=r.get(i)){var F=B.find(function(o){return o.handler===l});if(!F)return g;var G=m(i);if(i.include(":"))if(g.removeEventListener)g.removeEventListener("dataavailable",
F,false);else{g.detachEvent("ondataavailable",F);g.detachEvent("onfilterchange",F)}else if(g.removeEventListener)g.removeEventListener(G,F,false);else try{g.detachEvent("on"+G,F)}catch(J){}r.set(i,B.without(F));return g}}function D(g,i,l,r){g=$(g);if(Object.isUndefined(r))r=true;if(g==document&&document.createEvent&&!g.dispatchEvent)g=document.documentElement;var B;if(document.createEvent){B=document.createEvent("HTMLEvents");B.initEvent("dataavailable",true,true)}else{B=document.createEventObject();
B.eventType=r?"ondataavailable":"onfilterchange"}B.eventName=i;B.memo=l||{};document.createEvent?g.dispatchEvent(B):g.fireEvent(B.eventType,B);return v.extend(B)}var v={KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{}},H=document.documentElement,k="onmouseenter"in H&&"onmouseleave"in H,p;if(Prototype.Browser.IE){var C={0:1,1:4,2:2};p=function(g,i){return g.button===
C[i]}}else p=Prototype.Browser.WebKit?function(g,i){switch(i){case 0:return g.which==1&&!g.metaKey;case 1:return g.which==1&&g.metaKey;default:return false}}:function(g,i){return g.which?g.which===i+1:g.button===i};v.Methods={isLeftClick:a,isMiddleClick:b,isRightClick:c,element:d,findElement:e,pointer:f,pointerX:h,pointerY:j,stop:n};var E=Object.keys(v.Methods).inject({},function(g,i){g[i]=v.Methods[i].methodize();return g});if(Prototype.Browser.IE){var x=function(g){switch(g.type){case "mouseover":g=
g.fromElement;break;case "mouseout":g=g.toElement;break;default:return null}return Element.extend(g)};Object.extend(E,{stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return"[object Event]"}});v.extend=function(g,i){if(!g)return false;if(g._extendedByPrototype)return g;g._extendedByPrototype=Prototype.emptyFunction;var l=v.pointer(g);Object.extend(g,{target:g.srcElement||i,relatedTarget:x(g),pageX:l.x,pageY:l.y});return Object.extend(g,
E)}}else{v.prototype=window.Event.prototype||document.createEvent("HTMLEvents").__proto__;Object.extend(v.prototype,E);v.extend=Prototype.K}var q=[];Prototype.Browser.IE&&window.attachEvent("onunload",w);Prototype.Browser.WebKit&&window.addEventListener("unload",Prototype.emptyFunction,false);var m=Prototype.K;k||(m=function(g){var i={mouseenter:"mouseover",mouseleave:"mouseout"};return g in i?i[g]:g});Object.extend(v,v.Methods);Object.extend(v,{fire:D,observe:t,stopObserving:y});Element.addMethods({fire:D,
observe:t,stopObserving:y});Object.extend(document,{fire:D.methodize(),observe:t.methodize(),stopObserving:y.methodize(),loaded:false});if(window.Event)Object.extend(window.Event,v);else window.Event=v})();
(function(){function a(){if(!document.loaded){d&&window.clearTimeout(d);document.loaded=true;document.fire("dom:loaded")}}function b(){if(document.readyState==="complete"){document.stopObserving("readystatechange",b);a()}}function c(){try{document.documentElement.doScroll("left")}catch(e){d=c.defer();return}a()}var d;if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,false);else{document.observe("readystatechange",b);if(window==top)d=c.defer()}Event.observe(window,"load",
a)})();Element.addMethods();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;
var Insertion={Before:function(a,b){return Element.insert(a,{before:b})},Top:function(a,b){return Element.insert(a,{top:b})},Bottom:function(a,b){return Element.insert(a,{bottom:b})},After:function(a,b){return Element.insert(a,{after:b})}},$continue=new Error('"throw $continue" is deprecated, use "return" instead'),Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||
document.documentElement.scrollTop||document.body.scrollTop||0},within:function(a,b,c){if(this.includeScrollOffsets)return this.withinIncludingScrolloffsets(a,b,c);this.xcomp=b;this.ycomp=c;this.offset=Element.cumulativeOffset(a);return c>=this.offset[1]&&c<this.offset[1]+a.offsetHeight&&b>=this.offset[0]&&b<this.offset[0]+a.offsetWidth},withinIncludingScrolloffsets:function(a,b,c){var d=Element.cumulativeScrollOffset(a);this.xcomp=b+d[0]-this.deltaX;this.ycomp=c+d[1]-this.deltaY;this.offset=Element.cumulativeOffset(a);
return this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+a.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+a.offsetWidth},overlap:function(a,b){if(!a)return 0;if(a=="vertical")return(this.offset[1]+b.offsetHeight-this.ycomp)/b.offsetHeight;if(a=="horizontal")return(this.offset[0]+b.offsetWidth-this.xcomp)/b.offsetWidth},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(a){Position.prepare();return Element.absolutize(a)},
relativize:function(a){Position.prepare();return Element.relativize(a)},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(a,b,c){c=c||{};return Element.clonePosition(b,a,c)}};
if(!document.getElementsByClassName)document.getElementsByClassName=function(a){function b(c){return c.blank()?null:"[contains(concat(' ', @class, ' '), ' "+c+" ')]"}a.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(c,d){d=d.toString().strip();return(d=/\s/.test(d)?$w(d).map(b).join(""):b(d))?document._getElementsByXPath(".//*"+d,c):[]}:function(c,d){d=d.toString().strip();var e=[],f=/\s/.test(d)?$w(d):null;if(!f&&!d)return e;c=$(c).getElementsByTagName("*");d=" "+d+" ";for(var h=
0,j,n;j=c[h];h++)if(j.className&&(n=" "+j.className+" ")&&(n.include(d)||f&&f.all(function(s){return!s.toString().blank()&&n.include(" "+s+" ")})))e.push(Element.extend(j));return e};return function(c,d){return $(d||document.body).getElementsByClassName(c)}}(Element.Methods);Element.ClassNames=Class.create();
Element.ClassNames.prototype={initialize:function(a){this.element=$(a)},_each:function(a){this.element.className.split(/\s+/).select(function(b){return b.length>0})._each(a)},set:function(a){this.element.className=a},add:function(a){this.include(a)||this.set($A(this).concat(a).join(" "))},remove:function(a){this.include(a)&&this.set($A(this).without(a).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);
function SHA256(o){function d(b,c){var e=(b&65535)+(c&65535);return(b>>16)+(c>>16)+(e>>16)<<16|e&65535}function g(b,c){return b>>>c|b<<32-c}function t(b,c){return b>>>c}function v(b,c,e){return b&c^~b&e}function w(b,c,e){return b&c^b&e^c&e}function x(b){return g(b,2)^g(b,13)^g(b,22)}function y(b){return g(b,6)^g(b,11)^g(b,25)}function z(b){return g(b,7)^g(b,18)^t(b,3)}function A(b){return g(b,17)^g(b,19)^t(b,10)}function B(b,c){var e=new Array(1116352408,1899447441,3049323471,3921009573,961987163,
1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,
958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),a=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),h=new Array(64),j,k,p,i,l,m,q,r,f,s,u;b[c>>5]|=128<<24-c%32;b[(c+64>>9<<4)+15]=c;for(r=0;r<b.length;r+=16){c=a[0];j=a[1];k=a[2];p=a[3];i=a[4];l=a[5];m=a[6];q=a[7];for(f=0;f<64;f++){h[f]=f<16?b[f+r]:d(d(d(A(h[f-2]),h[f-7]),z(h[f-15])),h[f-16]);s=d(d(d(d(q,y(i)),v(i,l,m)),
e[f]),h[f]);u=d(x(c),w(c,j,k));q=m;m=l;l=i;i=d(p,s);p=k;k=j;j=c;c=d(s,u)}a[0]=d(c,a[0]);a[1]=d(j,a[1]);a[2]=d(k,a[2]);a[3]=d(p,a[3]);a[4]=d(i,a[4]);a[5]=d(l,a[5]);a[6]=d(m,a[6]);a[7]=d(q,a[7])}return a}function C(b){for(var c=Array(),e=(1<<n)-1,a=0;a<b.length*n;a+=n)c[a>>5]|=(b.charCodeAt(a/n)&e)<<24-a%32;return c}function D(b){b=b.replace(/\r\n/g,"\n");for(var c="",e=0;e<b.length;e++){var a=b.charCodeAt(e);if(a<128)c+=String.fromCharCode(a);else{if(a>127&&a<2048)c+=String.fromCharCode(a>>6|192);
else{c+=String.fromCharCode(a>>12|224);c+=String.fromCharCode(a>>6&63|128)}c+=String.fromCharCode(a&63|128)}}return c}function E(b){for(var c=F?"0123456789ABCDEF":"0123456789abcdef",e="",a=0;a<b.length*4;a++)e+=c.charAt(b[a>>2]>>(3-a%4)*8+4&15)+c.charAt(b[a>>2]>>(3-a%4)*8&15);return e}var n=8,F=0;o=D(o);return E(B(C(o),o.length*n))};
var a;Date.parseFunctions={count:0};Date.parseRegexes=[];Date.formatFunctions={count:0};Date.prototype.dateFormat=function(b){Date.formatFunctions[b]==null&&Date.createNewFormat(b);return this[Date.formatFunctions[b]]()};
Date.createNewFormat=function(b){var c="format"+Date.formatFunctions.count++;Date.formatFunctions[b]=c;c="Date.prototype."+c+" = function(){return ";for(var d=false,e="",f=0;f<b.length;++f){e=b.charAt(f);if(!d&&e=="\\")d=true;else if(d){d=false;c+="'"+String.escape(e)+"' + "}else c+=Date.getFormatCode(e)}eval(c.substring(0,c.length-3)+";}")};
Date.getFormatCode=function(b){switch(b){case "d":return"String.leftPad(this.getDate(), 2, '0') + ";case "D":return"Date.dayNames[this.getDay()].substring(0, 3) + ";case "j":return"this.getDate() + ";case "l":return"Date.dayNames[this.getDay()] + ";case "S":return"this.getSuffix() + ";case "w":return"this.getDay() + ";case "z":return"this.getDayOfYear() + ";case "W":return"this.getWeekOfYear() + ";case "F":return"Date.monthNames[this.getMonth()] + ";case "m":return"String.leftPad(this.getMonth() + 1, 2, '0') + ";
case "M":return"Date.monthNames[this.getMonth()].substring(0, 3) + ";case "n":return"(this.getMonth() + 1) + ";case "t":return"this.getDaysInMonth() + ";case "L":return"(this.isLeapYear() ? 1 : 0) + ";case "Y":return"this.getFullYear() + ";case "y":return"('' + this.getFullYear()).substring(2, 4) + ";case "a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";case "A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";case "g":return"((this.getHours() %12) ? this.getHours() % 12 : 12) + ";case "G":return"this.getHours() + ";
case "h":return"String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";case "H":return"String.leftPad(this.getHours(), 2, '0') + ";case "i":return"String.leftPad(this.getMinutes(), 2, '0') + ";case "s":return"String.leftPad(this.getSeconds(), 2, '0') + ";case "O":return"this.getGMTOffset() + ";case "T":return"this.getTimezone() + ";case "Z":return"(this.getTimezoneOffset() * -60) + ";default:return"'"+String.escape(b)+"' + "}};
Date.parseDateFormat=function(b,c){Date.parseFunctions[c]==null&&Date.createParser(c);return Date[Date.parseFunctions[c]](b)};
Date.createParser=function(b){var c="parse"+Date.parseFunctions.count++,d=Date.parseRegexes.length,e=1;Date.parseFunctions[b]=c;c="Date."+c+" = function(input){\nvar y = -1, m = -1, d = -1, h = -1, i = -1, s = -1;\nvar d = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes["+d+"]);\nif (results && results.length > 0) {";for(var f="",g=false,h="",i=0;i<b.length;++i){h=b.charAt(i);if(!g&&h=="\\")g=true;else if(g){g=false;f+=String.escape(h)}else{obj=
Date.formatCodeToRegex(h,e);e+=obj.g;f+=obj.s;if(obj.g&&obj.c)c+=obj.c}}c+="if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}";
Date.parseRegexes[d]=new RegExp("^"+f+"$");eval(c)};
Date.formatCodeToRegex=function(b,c){switch(b){case "D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case "j":case "d":return{g:1,c:"d = parseInt(results["+c+"], 10);\n",s:"(\\d{1,2})"};case "l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case "S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case "w":return{g:0,c:null,s:"\\d"};case "z":return{g:0,c:null,s:"(?:\\d{1,3})"};case "W":return{g:0,c:null,s:"(?:\\d{2})"};case "F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+c+"].substring(0, 3)], 10);\n",
s:"("+Date.monthNames.join("|")+")"};case "M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+c+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case "n":case "m":return{g:1,c:"m = parseInt(results["+c+"], 10) - 1;\n",s:"(\\d{1,2})"};case "t":return{g:0,c:null,s:"\\d{1,2}"};case "L":return{g:0,c:null,s:"(?:1|0)"};case "Y":return{g:1,c:"y = parseInt(results["+c+"], 10);\n",s:"(\\d{4})"};case "y":return{g:1,c:"var ty = parseInt(results["+c+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",
s:"(\\d{1,2})"};case "a":return{g:1,c:"if (results["+c+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case "A":return{g:1,c:"if (results["+c+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case "g":case "G":case "h":case "H":return{g:1,c:"h = parseInt(results["+c+"], 10);\n",s:"(\\d{1,2})"};case "i":return{g:1,c:"i = parseInt(results["+c+"], 10);\n",s:"(\\d{2})"};case "s":return{g:1,c:"s = parseInt(results["+c+"], 10);\n",
s:"(\\d{2})"};case "O":return{g:0,c:null,s:"[+-]\\d{4}"};case "T":return{g:0,c:null,s:"[A-Z]{3}"};case "Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};default:return{g:0,c:null,s:String.escape(b)}}};a=Date.prototype;a.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3")};
a.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(this.getTimezoneOffset()/60),2,"0")+String.leftPad(this.getTimezoneOffset()%60,2,"0")};a.getDayOfYear=function(){var b=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var c=0;c<this.getMonth();++c)b+=Date.daysInMonth[c];return b+this.getDate()-1};
a.getWeekOfYear=function(){var b=this.getDayOfYear()+(4-this.getDay()),c=7-(new Date(this.getFullYear(),0,1)).getDay()+4;document.write(c);return String.leftPad((b-c)/7+1,2,"0")};a.isLeapYear=function(){var b=this.getFullYear();return(b&3)==0&&(b%100||b%400==0&&b)};a.getFirstDayOfMonth=function(){var b=(this.getDay()-(this.getDate()-1))%7;return b<0?b+7:b};a.getLastDayOfMonth=function(){var b=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return b<0?b+7:b};
a.getDaysInMonth=function(){Date.daysInMonth[1]=this.isLeapYear()?29:28;return Date.daysInMonth[this.getMonth()]};a.getSuffix=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};String.escape=function(b){return b.replace(/('|\\)/g,"\\$1")};String.leftPad=function(b,c,d){b=new String(b);if(d==null)d=" ";for(;b.length<c;)b=d+b;return b};Date.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31];
Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Date.y2kYear=50;Date.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11};
Date.patterns={ISO8601LongPattern:"Y-m-d H:i:s",ISO8601ShortPattern:"Y-m-d",ShortDatePattern:"n/j/Y",LongDatePattern:"l, F d, Y",FullDateTimePattern:"l, F d, Y g:i:s A",MonthDayPattern:"F d",ShortTimePattern:"g:i A",LongTimePattern:"g:i:s A",SortableDateTimePattern:"Y-m-d\\TH:i:s",UniversalSortableDateTimePattern:"Y-m-d H:i:sO",YearMonthPattern:"F, Y"};
if((!(typeof window.console==="object"&&window.console!==null)||!(typeof console==="object"&&console!==null&&typeof console.firebug==="string"))&&typeof window.console==="undefined"){var names=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];window.console={};for(var i=0;i<names.length;i+=1)window.console[names[i]]=function(){return function(){}}()}else if(window.location.href.indexOf("iwin.com")>-1&&typeof window.console===
"object"&&typeof window.console.debug!=="string")window.console.debug=function(){};
function i$(a){if($(a))return $(a);console.debug("There is no such element with id = '%s'",a);return{style:{},src:{},href:{},absolutize:function(){},addClassName:function(){},addMethods:function(){},adjacent:function(){},ancestors:function(){},childElements:function(){},classNames:function(){},cleanWhitespace:function(){},clonePosition:function(){},cumulativeOffset:function(){},cumulativeScrollOffset:function(){},descendantOf:function(){},descendants:function(){},down:function(){},empty:function(){},
extend:function(){},fire:function(){},firstDescendant:function(){},getDimensions:function(){},getElementsByClassName:function(){},getElementsBySelector:function(){},getHeight:function(){},getOffsetParent:function(){},getStyle:function(){},getWidth:function(){},hasClassName:function(){},hide:function(){},identify:function(){},immediateDescendants:function(){},insert:function(){},inspect:function(){},makeClipping:function(){},makePositioned:function(){},match:function(){},next:function(){},nextSiblings:function(){},
observe:function(){},positionedOffset:function(){},previous:function(){},previousSiblings:function(){},readAttribute:function(){},recursivelyCollect:function(){},relativize:function(){},remove:function(){},removeClassName:function(){},replace:function(){},scrollTo:function(){},select:function(){},setOpacity:function(){},setStyle:function(){},show:function(){},siblings:function(){},stopObserving:function(){},toggle:function(){},toggleClassName:function(){},undoClipping:function(){},undoPositioned:function(){},
up:function(){},update:function(){},viewportOffset:function(){},visible:function(){},wrap:function(){},writeAttribute:function(){}}}if(window.iwin)console.debug("iwin object already exists.");else var iwin={};if(iwin.Util)console.debug("iwin Util already exists.");else iwin.Util={};
iwin.Util.OS={name:window.navigator.platform,isWin:window.navigator.platform.indexOf("Win")!==-1,isMac:window.navigator.platform.indexOf("Mac")!==-1,isLinux:window.navigator.platform.indexOf("Linux")!==-1,isiPhone:window.navigator.platform.indexOf("iPhone")!==-1,isOther:false};iwin.Util.OS.isOther=!(iwin.Util.OS.isWin||iwin.Util.OS.isMac||iwin.Util.OS.isLinux||iwin.Util.OS.isiPhone);iwin.Util.Event={};
iwin.Util.Event.observeOnce=function(a,b,c,d){var e,f=function(){Event.stopObserving(a,b,c);Event.stopObserving(a,b,f);if(d)for(e=0;e<d.length;e+=1)Event.stopObserving(a,d[e],f)};Event.observe(a,b,c);Event.observe(a,b,f);if(d)for(e=0;e<d.length;e+=1)Event.observe(a,d[e],f)};iwin.Util.isInArcade=function(){try{return window.external.IsInArcade()}catch(a){return false}};iwin.Util.isSoundEnabled=function(){return iwin.Util.isInArcade()?window.external.IsSoundEnabled():true};
iwin.Util.isInGameLauncher=function(){try{return window.external.IsInGameLauncher()}catch(a){return false}};iwin.Util.isInEUS=function(){try{return window.external.IsInEUS()}catch(a){return false}};iwin.Util.isGameRegistered=function(){try{return window.external.IsGameRegistered()}catch(a){return false}};iwin.Util.getSession=function(){var a=iwin.Util.readCookie("JSESSIONID");if(a===null)(a=iwin.jsid||null)&&iwin.Util.createCookie("JSESSIONID",a,1);return a};
iwin.Util.hasSession=function(){return iwin.Util.getSession()===null?false:true};iwin.Util.hasFBSession=function(){if(iwin.facebook.sdk.appId)return iwin.Util.readCookie("fbsr_"+iwin.facebook.sdk.appId);else console.error("Facebook appId not initialized")};iwin.Util.isReturningVisitor=function(){var a,b;a=new Date;if((b=iwin.Util.readCookie("returningVisitor"))&&a.getTime()-parseFloat(b)<864E5)return false;else if(!b){iwin.Util.createCookie("returningVisitor",a.getTime(),365);return false}return true};
iwin.Util.createCookie=function(a,b,c,d){var e="";if(c){e=new Date;e.setTime(e.getTime()+c*24*60*60*1E3);e="; expires="+e.toGMTString()}else e="";d=d?"; domain="+d:"";document.cookie=a+"="+b+e+"; path=/"+d};iwin.Util.readCookie=function(a){a=a+"=";for(var b=document.cookie.split(";"),c=0;c<b.length;c++){for(var d=b[c];d.charAt(0)===" ";)d=d.substring(1,d.length);if(d.indexOf(a)===0)return d.substring(a.length,d.length)}return null};iwin.Util.destroyCookie=function(a){iwin.Util.createCookie(a,"",-1)};
iwin.Util.addCommas=function(a){a+="";a=a.replace(/,/g,"");var b=a.split(".");a=b[0];b=b.length>1?"."+b[1]:"";for(var c=/(\d+)(\d{3})/;c.test(a);)a=a.replace(c,"$1,$2");return a+b};
iwin.Util.gbrowser=function(){if(Prototype.Browser.Opera){if(/(\d+\.\d+) /.test(navigator.appVersion))return{name:"Opera",version:new Number(RegExp.$1)};return{name:"Opera",version:"undefined"}}if(Prototype.Browser.Gecko)return{name:"FF",version:RegExp.$1};if(Prototype.Browser.IE){if(/MSIE (\d+\.\d+);/.test(navigator.userAgent))return{name:"IE",version:new Number(RegExp.$1)};return{name:"IE",version:"undefined"}}return{name:"undefined",version:"undefined"}};
iwin.Util.getUrlVars=function(a){var b,c,d;b=[];a=a||window.location.href;c=a.slice(a.indexOf("?")+1).split("&");for(d=0;d<c.length;d+=1){a=c[d].split("=");b.push(a[0]);b[a[0]]=a[1]}return b};iwin.Util.cacheWrap=function(a,b){function c(f,g){var h=(new Date).getTime();if(f||h-e>b){d=f&&typeof g!=="undefined"?g:a();e=h}return d}var d=null,e=0;if(!a||!b)throw"Both implementation function and max age are required parameters";return c};
iwin.Util.windowOpen=function(a,b,c,d){c+=32;d+=96;if(iwin.Util.isInGameLauncher())a=iwin.Util.addSessionToUrl(a);a=window.open(a,b,"width="+c+", height="+d+", location=no, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes");try{a.resizeTo(c,d);a.focus()}catch(e){console.debug("resizing error: %s",e)}};iwin.Util.windowClose=function(){window.close()};
iwin.Util.addSessionToUrl=function(a){if(a.indexOf(";jsessionid")>=0){console.debug("Util.addSessionToUrl - URL already contains jsessionid: %s",a);return a}var b=readCookie("JSESSIONID");if(!b)return a;b=";jsessionid="+b;var c=a.indexOf("?");if(c===-1)c=a.indexOf("#");return c===-1?a+b:a.substring(0,c)+b+a.substring(c)};
iwin.Util.getUrlParameter=function(a,b){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");a=(new RegExp("[\\?&]"+a+"=([^&#]*)")).exec(b?b:window.location.href);return a===null?null:a[1]};iwin.Util.arcadeCheckFF=function(){try{if(GetArcadeExtensionVersion()!=="")return true}catch(a){}return false};iwin.Util.arcadeCheckIE=function(){try{if(typeof new ActiveXObject("iWinInformer.iWinInformer")==="object")return true}catch(a){}return false};
iwin.Util.arcadeDownload=function(a){if(iwin.Util.isInArcade()||iwin.Util.arcadeCheckFF()||iwin.Util.arcadeCheckIE()){a=a.href.split("ACDCMD=");window.location.href="iwin://ACDCMD="+a[1]}else window.location.href=a.href;return false};iwin.Util.problemHandler=function(a,b){b?console.error("Exception[%s]:  %s ",this,b):console.error("Failure[%s]:  %s ",this,a.status)};iwin.Util.showObj=function(a){i$(a).removeClassName("hideObj")};iwin.Util.hideObj=function(a){i$(a).addClassName("hideObj")};
iwin.Util.togglePopup=function(a){$(a).hasClassName("hideObj")?iwin.Util.showObj(a):iwin.Util.hideObj(a)};iwin.Util.isEmailValid=function(a){a=a.toLowerCase();if(a.search(/^[A-Za-z0-9]+[_A-Za-z0-9+-]*(\.[_A-Za-z0-9+-]+)*@[A-Za-z0-9][A-Za-z0-9-]*(\.[A-Za-z0-9-]+)*(\.[A-Za-z0-9-]{2,})+$/)===-1)return false;return true};iwin.Util.initStaticPages=function(){if(iwin.Util.isInArcade()){$("header_frame").setStyle({display:"none"});$("footer_frame").setStyle({display:"none"})}};
iwin.Util.isOverElement=function(a,b,c){var d=c.cumulativeOffset(),e=c.getDimensions();c=d.left;var f=c+e.width;d=d.top;e=d+e.height;return!(a<c||a>f||b<d||b>e)};if(iwin.Util.String)console.debug("iwin String already exists.");else iwin.Util.String={};iwin.Util.String.decode=function(a){if(typeof a==="string")return unescape(a.replace(/\+/g," "));else{console.debug("iwin.Util.String.decode without valid str input: %s",a);return""}};
iwin.Util.String.encode=function(a){if(typeof a==="string")return escape(a.replace(/\s/g,"+"));else{console.debug("iwin.Util.String.encode without valid str input: %s",a);return""}};iwin.Util.evalJSON=function(a){try{return typeof JSON!=="undefined"?JSON.parse(a):eval("("+a+")")}catch(b){console.error(b);return{}}};iwin.Util.arcade={};
iwin.Util.arcade.getActiveXInstance=iwin.Util.cacheWrap(function(){var a;try{a=new ActiveXObject("iWinSupport.iWinSupport");a.UpdateGamesList()}catch(b){a=null;console.debug(b)}return a},1E4);iwin.Util.arcade.getGameListByActiveX=function(){var a,b,c,d;c={};try{if(b=iwin.Util.arcade.getActiveXInstance()){a=iwin.Util.evalJSON(b.GamesListJSON);for(d=0;d<a.length;d+=1)c[a[d].gameId]=a[d]}else console.error("[iwin.Util.arcade.getGameListByActiveX] Unable to retrieve Arcade ActiveX Object")}catch(e){console.error(e)}return c};
iwin.Util.arcade.getGameListByEvent=function(){var a,b,c,d,e;d={};try{if(a=document.getElementById("extensionDataElement"))a.setAttribute("gamelist","");else{a=document.createElement("MyExtensionDataElement");a.id="extensionDataElement";document.documentElement.appendChild(a)}b=document.createEvent("Events");b.initEvent("iWinGameListEvent",true,false);a.dispatchEvent(b);c=iwin.Util.evalJSON(a.getAttribute("gamelist"));for(e=0;e<c.length;e+=1)d[c[e].gameId]=c[e]}catch(f){console.error(f)}return d};
iwin.Util.arcade.getGameList=iwin.Util.cacheWrap(function(){var a;if(iwin.Util.arcadeCheckFF())a=iwin.Util.arcade.getGameListByEvent();else if(iwin.Util.arcade.getActiveXInstance())a=iwin.Util.arcade.getGameListByActiveX();else{console.debug("[iwin.Util.arcade.getGameList] Your current browser does not support retrieving game lists.");a={}}return a},1E4);
iwin.Util.arcade.isGameInstalled=function(a){var b;if(iwin.Util.arcadeCheckFF()){if((b=iwin.Util.arcade.getGameList())&&b[a])return true}else if(iwin.Util.isInArcade())return window.external.IsGameInstalled(a);else if(iwin.Util.arcade.getActiveXInstance())try{if((b=iwin.Util.arcade.getActiveXInstance())&&b.IsGameInstalled(a))return true}catch(c){console.error(c)}return false};
iwin.Util.resolvePath=function(a,b,c){var d,e,f;c=c||"/";a=a.split(c);b=b.split(c).reverse();d=[];e=[];if(b[0].indexOf(".")!==-1)b=b.slice(1);for(f=0;f<b.length;f+=1){if(a[f])a[f]=a[f].replace(/\.{3,}/,"..");if(a[f]&&a[f]!==".."||!a[f]){a[f]&&a[f]!=="."&&d.push(a[f]);e.push(b[f])}}e.reverse();a=e.concat(d);return a=a.join(c)};iwin.Util.userSubscription=null;
iwin.Util.getUserSubscription=function(a,b){if(!this.queue)this.queue=[];if(this.inProgress)this.queue.push(a);else if(this.username=iwin.Auth.getCurrentUsername())if(!iwin.Util.userSubscription||b){if(this.guidConversionToken){window.clearTimeout(this.guidConversionToken);this.guidConversionToken=null}this.inProgress=true;$J.ajax({type:"GET",url:"/subscriptions/features/club/current.json",dataType:"json",success:function(c){var d;iwin.Util.userSubscription=c;if(typeof a==="function")for(a(c);this.queue.length;){d=
this.queue.pop();typeof d==="function"&&d(c)}this.inProgress=false},error:function(c){iwin.Util.userSubscription=null;if(c.status===503){c=c.getResponseHeader("Retry-After");if(isNaN(c))c=5;else if(c<=0)c=1;this.guidConversionToken=window.setTimeout(function(){iwin.Util.getUserSubscription(a,b)},1E3*c)}else if(typeof a==="function"){for(a(iwin.Util.userSubscription);this.queue.length;){c=this.queue.pop();typeof c==="function"&&c(iwin.Util.userSubscription)}this.inProgress=false}},context:this})}else{if(typeof a===
"function")a(iwin.Util.userSubscription||null)}else{iwin.Util.userSubscription=null;a(iwin.Util.userSubscription)}};if(window.Util)console.error("Util object already exists.");else var Util={};Util.windowOpen=iwin.Util.windowOpen;Util.cacheWrap=iwin.Util.cacheWrap;Util.isInArcade=iwin.Util.isInArcade;Util.isSoundEnabled=iwin.Util.isSoundEnabled;Util.isInGameLauncher=iwin.Util.isInGameLauncher;Util.isInEUS=iwin.Util.isInEUS;Util.addCommas=iwin.Util.addCommas;Util.windowClose=iwin.Util.windowClose;
Util.addSessionToUrl=iwin.Util.addSessionToUrl;Util.getUrlParameter=iwin.Util.getUrlParameter;Util.arcadeCheckFF=iwin.Util.arcadeCheckFF;Util.arcadeCheckIE=iwin.Util.arcadeCheckIE;Util.isEmailValid=iwin.Util.isEmailValid;Util.OS=iwin.Util.OS;Util.isOverElement=iwin.Util.isOverElement;is_valid_email=iwin.Util.isEmailValid;showObj=iwin.Util.showObj;hideObj=iwin.Util.hideObj;togglePopup=iwin.Util.togglePopup;problemHandler=iwin.Util.problemHandler;arcadeDownload=iwin.Util.arcadeDownload;addCommas=iwin.Util.addCommas;
createCookie=iwin.Util.createCookie;readCookie=iwin.Util.readCookie;destroyCookie=iwin.Util.destroyCookie;gbrowser=iwin.Util.gbrowser;init_static_pages=iwin.Util.initStaticPages;var browser=gbrowser();
var iwin=window.iwin||{};
iwin.tracking={domain:iwin.Util.isInArcade()||iwin.Util.isInEUS()?"IWGM":"www",init:function(a,b){this.name=b||"Unknown";this.implementation=a||{};this.implementation.init&&typeof this.implementation.init==="function"&&this.implementation.init()},trackPageview:function(){try{this.implementation.trackPageview.apply(this,arguments)}catch(a){console.error(this.name+" implementation: "+a)}},trackEvent:function(){try{this.implementation.trackEvent.apply(this,arguments)}catch(a){console.error(this.name+" implementation: "+
a)}},trackPageEvent:function(){try{this.implementation.trackPageEvent.apply(this,arguments)}catch(a){console.error(this.name+" implementation: "+a)}},addTrans:function(){try{this.implementation.addTrans.apply(this,arguments)}catch(a){console.error(this.name+" implementation: "+a)}},addItem:function(){try{this.implementation.addItem.apply(this,arguments)}catch(a){console.error(this.name+" implementation: "+a)}},trackTrans:function(){try{this.implementation.trackTrans.apply(this,arguments)}catch(a){console.error(this.name+
" implementation: "+a)}}};iwin.tracking.google={};iwin.tracking.google.init=function(){};iwin.tracking.google.trackPageview=function(){var a,b;try{a=arguments;b=["_trackPageview"];if(a.length>1){console.debug("Usage: trackPageview([opt_pageURL]) ["+Array.prototype.slice.call(arguments).toString()+"]");return false}a.length===1&&b.push(a[0]);_gaq.push(b);iwin.tracking.iwin.garc.track(b)}catch(c){console.error("Problem with google analytics[trackPageview]: "+c)}};
iwin.tracking.google.trackEvent=function(){var a,b,c;try{a=arguments;b=["_trackEvent"];if(a.length<2||a.length>4){console.debug("Usage: trackEvent(category, action, [opt_label, [opt_value]]) ["+Array.prototype.slice.call(arguments).toString()+"]");return false}for(c=0;c<a.length;c+=1)b.push(a[c]);_gaq.push(b);iwin.tracking.iwin.garc.track(b)}catch(e){console.error("Problem with google analytics[trackEvent]: "+e)}};
iwin.tracking.google.trackPageEvent=function(){var a,b,c,e;a=arguments;b=a[0];c=a[1];if(a.length<4||a.length>6||!(b&&c)||b&&typeof b.length==="number"&&b.length===0){console.debug("Usage: trackPageEvent(pageElement, eventType, category, action, [opt_label, [opt_value]]) ["+Array.prototype.slice.call(arguments).toString()+"]");return false}e=a[3].replace(/ /g,"").toLowerCase();c=c+"."+e;if(a.length===5)$J(b).unbind(c).bind(c,function(){iwin.tracking.google.trackEvent(a[2],a[3],a[4])});else a.length===
6&&$J(b).unbind(c).bind(c,function(){iwin.tracking.google.trackEvent(a[2],a[3],a[4],a[5])})};
iwin.tracking.google.addTrans=function(){var a,b,c;try{a=arguments;b=["_addTrans"];if(a.length!==8){console.debug("Usage: addTrans(orderId, affiliation, total, tax, shipping, city, state, country) ["+Array.prototype.slice.call(arguments).toString()+"]");return false}for(c=0;c<a.length;c+=1)b.push(a[c]);_gaq.push(b);iwin.tracking.iwin.garc.track(b)}catch(e){console.error("Problem with google analytics[addTrans]: "+e)}};
iwin.tracking.google.addItem=function(){var a,b,c;try{a=arguments;b=["_addItem"];if(a.length!==6){console.debug("Usage: addItem(orderId, sku, name, category, price, quantity) ["+Array.prototype.slice.call(arguments).toString()+"]");return false}for(c=0;c<a.length;c+=1)b.push(a[c]);_gaq.push(b);iwin.tracking.iwin.garc.track(b)}catch(e){console.error("Problem with google analytics[addItem]: "+e)}};
iwin.tracking.google.trackTrans=function(){var a;try{a=["_trackTrans"];_gaq.push(a);iwin.tracking.iwin.garc.track(a)}catch(b){console.error("Problem with google analytics[trackTrans]: "+b)}};iwin.tracking.iwin={};iwin.tracking.iwin.init=function(){iwin.tracking.iwin.trackSource()};
iwin.tracking.iwin.trackSource=function(a){var b,c,e,d,f;f=(new Date).getTime();e=iwin.Util.readCookie("iWinCSC");iwin.Util.readCookie("iWinTSC");d={};b=document.referrer;c=true;a=iwin.Util.getUrlVars(a);if(typeof a.iwinsrc==="string"&&a.iwinsrc!==""){d.name="iwinsrc";d.value=a.iwinsrc;c=false}else if(typeof a.utm_campaign==="string"&&a.utm_campaign!==""&&(unescape(a.utm_campaign)==="Transactional+Upsell"||a.utm_campaign==="Transactional+Upsell")){d.name="iwinsrc";d.value="transaction_email";c=false}else if(b!==
""&&!b.match(/^(http|https):\/\/([\w\-]+)\.iwin\.com/)){if((b=b.match(/https{0,1}:\/\/([^\/]*)\/*.*/i))&&b[1]){b=b[1];c=false;d.name="referrer";d.value=b}}else{d.name="iwinsrc";d.value="direct"}d.compoundValue=d.name+"="+d.value+"|ts="+f;if(e===null){console.log("iWinCSC : %s : %d",d.compoundValue,90);iwin.Util.createCookie("iWinCSC",d.compoundValue,90)}else{console.log("iWinCSC (update expiry date) : %s : %d",e,90);iwin.Util.createCookie("iWinCSC",e,90)}if(!c){console.log("iWinTSC : %s : %d",d.compoundValue,
90);iwin.Util.createCookie("iWinTSC",d.compoundValue,90)}};iwin.tracking.iwin.garc={};iwin.tracking.iwin.garc.init=function(){if(window._garc&&location.pathname.indexOf("garc")===-1)if(iwin.Util.readCookie("iWinGARC")){var a=$J.toJSON($J.toJSON(iwin.Util.readCookie("iWinGARC")));a.push({path:_garc[1],tracks:[],defaultTrack:_garc[0]});iwin.Util.createCookie("iWinGARC",$J.jSONToString(a),365,".iwin.com")}};
iwin.tracking.iwin.garc.track=function(a){var b=iwin.Util.readCookie("iWinGARC");if(b){b=$J.toJSON($J.toJSON(b));b[b.length-1].tracks.push({name:a.shift(),value:a});iwin.Util.createCookie("iWinGARC",$J.jSONToString(b),365,".iwin.com")}};iwin.tracking.init(iwin.tracking.google,"Google Analytics");iwin.tracking.iwin.init();iwin.tracking.iwin.garc.init();
var Popup_Data_Cache={},Popup_Data_Status={},_hasICoins=false;Event.observe(document,"dom:loaded",function(){var a=$$(".poppable");a.length>0&&a.each(function(d){make_poppable(d,750)})});function initializeGamePopup(){Event.observe(document,"click",popup_click_close);Event.observe(document,"iwin:auth:login:success",updatePopupForIcoins);Event.observe(document,"iwin:auth:logout:success",function(){updatePopupDisplayForIcoins(false)});iwin.Auth.getCurrentUsername()&&updatePopupForIcoins()}
function updatePopupForIcoins(){iwin.Util.getUserSubscription(function(a){a&&(a.name==="Club iWin Membership"||a.name==="All Access"&&a.iCoinsBalance>0)?updatePopupDisplayForIcoins(true):updatePopupDisplayForIcoins(false)})}
function updatePopupDisplayForIcoins(a){console.debug("updatePopupDisplayForIcoins with hasIcoins: %s",a);_hasICoins=a;bottomOptsObj=$("popup_bottom_opts");bottomIcoinsObj=$("popup_bottom_icoins");if(Object.isElement(bottomOptsObj)&&Object.isElement(bottomIcoinsObj))if(a){bottomOptsObj.hide();bottomIcoinsObj.show()}else{bottomOptsObj.show();bottomIcoinsObj.hide()}else console.debug("updatePopupDisplayForIcoins with invalid dom objs")}
function cache_dom_data(a){if(!(a==null||Popup_Data_Status[a])){Popup_Data_Status[a]="loading";new Ajax.Request(a+".xml",{method:"get",requestHeaders:{Accept:"application/xml"},onSuccess:function(d){var b=d.responseXML;setTimeout(function(){try{var c=b.getElementsByTagName("game")[0].getAttribute("id"),f=b.getElementsByTagName("title")[0].firstChild.data,g=b.getElementsByTagName("short-description")[0].firstChild.data,e=b.getElementsByTagName("long-description")[0].firstChild.data,h=b.getElementsByTagName("images-url")[0].firstChild.data,
i=b.getElementsByTagName("release-date")[0].firstChild.data,j=b.getElementsByTagName("reviews-url")[0].firstChild.data,t=b.getElementsByTagName("game")[0].getAttribute("self"),m=null;if(b.getElementsByTagName("download-url")[0])m=b.getElementsByTagName("download-url")[0].firstChild.data;var n=null;if(b.getElementsByTagName("download-cmd")[0])n=b.getElementsByTagName("download-cmd")[0].firstChild.data;var o=null;if(b.getElementsByTagName("cash-purchase-url")[0])o=b.getElementsByTagName("cash-purchase-url")[0].firstChild.data;
var p=null;if(b.getElementsByTagName("icoins-purchase-url")[0])p=b.getElementsByTagName("icoins-purchase-url")[0].firstChild.data;var q=null;if(b.getElementsByTagName("icoins-learnhow-url")[0])q=b.getElementsByTagName("icoins-learnhow-url")[0].firstChild.data;var u=b.getElementsByTagName("trial-duration")[0].firstChild.data,v=b.getElementsByTagName("money-price")[0].firstChild.data,w=b.getElementsByTagName("icoins-price")[0].firstChild.data,x=b.getElementsByTagName("icoins-best-dollar-value")[0].firstChild.data,
y=b.getElementsByTagName("access-price")[0].firstChild.data,r=null;if(b.getElementsByTagName("rating")[0])r=b.getElementsByTagName("rating")[0].firstChild.data;for(var l=b.getElementsByTagName("category"),s={},k=0;k<l.length;k++){var z=l[k].firstChild.data.escapeHTML();l[k].getAttribute("cname");var A=l[k].getAttribute("xlink:href");s[z]=A}Popup_Data_Cache[a]={canonicalName:c,title:f,sdesc:g,ldesc:e,img_path:h,release_date:i,reviews_url:j,self_url:t,download_url:m,download_cmd:n,cash_purchase_url:o,
icoins_purchase_url:p,icoins_learnhow_url:q,trial_duration:u,icoins_cash_price:x,rating:r,cash_price:v,icoins_price:w,access_price:y,categories:s};Popup_Data_Status[a]="success"}catch(B){Popup_Data_Status[a]="failure";console.error(B);console.error(b)}},0)},onFailure:function(d){Popup_Data_Status[a]="failure";console.error(d.status)}})}}
function determine_direction(a){var d=document.viewport.getDimensions(),b=a.getDimensions();a=a.viewportOffset();var c=d.width/2;try{if(window.external.IsInArcade())c+=90}catch(f){}var g=b.width/2+a.left;return b.height/2+a.top>d.height/2?g>c?"se":"sw":g>c?"ne":"nw"}function get_game_url(a){for(var d=0;a.tagName!="a"&&a.tagName!="A"&&d<5;){a=a.parentNode;d++}if(d==5){console.error("could not locate game url within 5 ancestor nodes");return null}else return a.href}
var pop_timer=null,delay_timer=null,game_popup_initialized=false;
function make_poppable(a,d){a=$(a);var b=$("popup");if(b){if(!game_popup_initialized){game_popup_initialized=true;initializeGamePopup()}Event.stopObserving(a,"mouseover");Event.stopObserving(a,"mouseout");Event.observe(a,"mouseover",function(){setTimeout(function(){cache_dom_data(get_game_url(a))},100);pop_timer=setTimeout(function(){show_popup(a)},d);delay_timer&&clearTimeout(delay_timer)});Event.observe(a,"mouseout",function(){pop_timer&&clearTimeout(pop_timer);delay_timer=setTimeout(function(){b.hide()},
2E3)})}}function init_game_popup(){var a=$("popup");if(a){Event.observe(a,"mouseover",function(){delay_timer&&clearTimeout(delay_timer)});Event.observe(a,"mouseout",function(){delay_timer=setTimeout(function(){a.hide()},2E3)})}}Event.observe(document,"dom:loaded",init_game_popup);
function populate_popup_data(a){a=Popup_Data_Cache[a];var d;d=iwin.Util.userSubscription?iwin.Util.userSubscription.name==="All Access"&&iwin.Util.userSubscription.iCoinsBalance===0?"access":iwin.Util.userSubscription.name==="Club iWin Membership"||iwin.Util.userSubscription.name==="All Access"&&iwin.Util.userSubscription.iCoinsBalance>0?"icoins":"unsub":"unsub";$("popup_game_title").update(a.title);try{$("popup_game_desc").update(a.sdesc)}catch(b){$("popup_game_desc").update("Could not render short description due to invalid XHTML")}iwin.tracking.trackPageEvent($J("#popup_ddp_link"),
"click",iwin.tracking.domain+"/gamepopup","clicked to game ddp",a.canonicalName);iwin.tracking.trackPageEvent($J("#popup_dl_button_a"),"click",iwin.tracking.domain+"/gamepopup","started download",a.canonicalName);$("popup_game_img").src=a.img_path+"/fea_3.jpg";$("popup_ddp_link").href=a.self_url;var c=a.trial_duration;if(c==0)$("popup_game_play").innerHTML="Free Play";else $("popup_game_play").innerHTML=c+" min. trial";var f=a.rating,g=$("popup_star_rating");if(a.rating==null){g.removeClassName("rated");
g.innerHTML="Not Rated";g.style.width="65px"}else{g.innerHTML="";g.addClassName("rated");g.style.width=parseInt(90*Math.round(f/10)/10,10)+"px"}f=[];for(var e in a.categories)f.push('<a href="'+a.categories[e]+'">'+e+"</a>");f.length>1?$("popup_category_label").update("Categories: "):$("popup_category_label").update("Category: ");$("popup_game_categories").innerHTML=f.join(", ");e=a.release_date;e=e.substring(5,7)+"/"+e.substring(8,10)+"/"+e.substring(0,4);$("popup_release_date").update(e);$("popup_dl_button_a").href=
a.download_url;e=false;try{e=window.external.IsGameInstalled(a.download_cmd.split("/")[2])}catch(h){e=false}$("popup_dl_button_a").removeClassName("download").removeClassName("play-free").removeClassName("play-now");if(e)$("popup_dl_button_a").addClassName("play-now");else c==0?$("popup_dl_button_a").addClassName("play-free"):$("popup_dl_button_a").addClassName("download");console.debug("built bottom contents");$("popup_icn_price").innerHTML=Util.addCommas(a.icoins_price)+" iCoins";if(a.icoins_purchase_url!=
null)$("popup_icn_link").href=a.icoins_purchase_url;else $("popup_icn_link").href="/";c=a.icoins_cash_price;if(c>=1)$("popup_icn_value").innerHTML="&#36;"+c;else $("popup_icn_value").innerHTML=c+"&#162;";if(a.icoins_learnhow_url!=null)$("popup_icn_learnhow_link").href=a.icoins_learnhow_url;else $("popup_icn_learnhow_link").href="/";c=a.access_price;if(c>=1)$("popup_access_price").innerHTML="&#36;"+c;else $("popup_access_price").innerHTML=c*100+"&#162;";c=a.cash_price;if(c>=1)$("popup_usd_price").innerHTML=
"&#36;"+c;else $("popup_usd_price").innerHTML=c*100+"&#162;";if(a.cash_purchase_url!=null){$("popup_usd_link").href=a.cash_purchase_url;$("popup_access_link").href=a.cash_purchase_url}else{$("popup_usd_link").href="/";$("popup_access_link").href="/"}if(a.cash_price*100<=0){$("popup_bottom_opts").hide();$("popup_bottom_icoins").hide();$("popup_bottom_access").hide()}else{console.log(d);if(d==="icoins"){$("popup_bottom_opts").hide();$("popup_bottom_access").hide();$("popup_bottom_icoins").show()}else if(d===
"access"){$("popup_bottom_access").show();$("popup_bottom_opts").hide();$("popup_bottom_icoins").hide()}else{$("popup_bottom_opts").show();$("popup_bottom_icoins").hide();$("popup_bottom_access").hide()}}}var popup_arrow_width=40;
function popup_click_close(a){var d=$("popup");if(d&&d.visible()){var b=d.cumulativeOffset(),c=d.getDimensions(),f=b.left,g=f+c.width;b=b.top;c=b+c.height;var e=a.pointerX();a=a.pointerY();if(d.hasClassName("popup_nw")||d.hasClassName("popup_sw"))f+=popup_arrow_width;else g-=popup_arrow_width;if(e<f||e>g||a<b||a>c)d.hide()}}function show_popup(a){console.debug("show_popup()");try_show_popup(a,5,get_game_url(a))}
function try_show_popup(a,d,b){console.debug("try_show_popup(%s, %s)",d,b);if(b!=null){var c=Popup_Data_Status[b];if(c==null)console.error("No popup data found for %s",b);else if(c=="failure")console.error("No popup data could be obtained for %s",b);else if(c=="loading")if(d>0){setTimeout(function(){try_show_popup(a,d-1,b)},100);console.debug("not ready")}else console.error("Popup data could be obtained in time for %s",b);else{populate_popup_data(b);c=determine_direction(a);var f=a.cumulativeOffset(),
g=a.getDimensions(),e=$("popup");e.className="";e.addClassName("popup_"+c);var h=e.getDimensions();e=h.width;h=h.height;var i,j;switch(c){case "ne":i=f.left-e;j=f.top+g.height/2-83;break;case "nw":i=f.left+g.width-40;j=f.top+g.height/2-83;break;case "se":i=f.left-e;j=f.top+g.height/2-h+83;break;case "sw":i=f.left+g.width-40;j=f.top+g.height/2-h+83;break}$("popup").style.left=i+"px";$("popup").style.top=j+"px";$("popup").style.display="block"}}};
if(!window.iwin)var iwin={};if(!iwin.Util)iwin.Util={};
iwin.Util.showPopup=function(a,b,c,d){var e;if(a=$(a)){a.removeClassName("hideObj");if(b){e=iwin.Util.getPageSize();a.setStyle({height:e[1]+"px",opacity:0.8});c?a.setStyle({opacity:0}):a.setStyle({opacity:0.8})}if(!b&&c){b=c.cumulativeOffset();a.down(".arrow").remove();if(d==="down"){a.down(0).hasClassName("arrow")||a.down(0).insert({before:'<span class="arrow top">&nbsp;</span>'});a.setStyle({marginTop:c.getHeight()+5+"px",left:b[0]-70+c.getWidth()-8+"px",top:b[1]+10+"px"})}else{a.down(0).next()||
a.down(0).insert({after:'<span class="arrow">&nbsp;</span>'});a.setStyle({marginTop:"-"+(a.getHeight()+10)+"px",left:b[0]-70+c.getWidth()-8+"px",top:b[1]+5+"px"})}}}};iwin.Util.hidePopups=function(){var a;(a=$$(".popup"))&&a.each(function(b){b.addClassName("hideObj")});(a=$("overlay"))&&a.addClassName("hideObj")};
iwin.Util.initPopups=function(){var a;(a=$$(".cancel"))&&a.each(function(b){b.observe("click",function(c){iwin.Util.hidePopups();Event.stop(c)})});(a=$$(".close"))&&a.each(function(b){b.observe("click",function(c){iwin.Util.hidePopups();Event.stop(c)})});(a=$("overlay"))&&a.observe("click",function(b){iwin.Util.hidePopups();Event.stop(b)})};
iwin.Util.getPageSize=function(){var a,b,c,d;if(window.innerHeight&&window.scrollMaxY){a=document.body.scrollWidth;b=window.innerHeight+window.scrollMaxY}else if(document.body.scrollHeight>document.body.offsetHeight){a=document.body.scrollWidth;b=document.body.scrollHeight}else{a=document.body.offsetWidth;b=document.body.offsetHeight}if(self.innerHeight){c=self.innerWidth;d=self.innerHeight}else if(document.documentElement&&document.documentElement.clientHeight){c=document.documentElement.clientWidth;
d=document.documentElement.clientHeight}else if(document.body){c=document.body.clientWidth;d=document.body.clientHeight}return[a<c?c:a,b<d?d:b,c,d]};
iwin.Util.PopupRounded=function(a){this.content=a.content;this.title=a.title||"";this.id=a.id||"";this.klass=this.title?a.klass||"":"noTitle "+a.klass||"noTitle";this.useOverlay=a.useOverlay||a.isModal;this.isModal=a.isModal;this.closeAnywhere=a.closeAnywhere;this.openElement=a.openElement;this.cloneContent=a.cloneContent||false;this.centerOn=a.centerOn||null;this.container=this.closeButton=null;this.overlayInDOM=this.isOpen=this.inDOM=false;this.hideOthers=true;this.overlay=$J("#popupOverlay");this.data=
{};this.autoRedraw=typeof a.autoRedraw==="undefined"?true:a.autoRedraw;this.html='<div id="'+this.id+'" class="popupRounded '+this.klass+'">';this.html+='    <div id="'+this.id+'Outline" class="curvyRedraw popupOutline">&nbsp;</div>';this.html+='    <div id="'+this.id+'Content" class="curvyRedraw popupContent">';this.html+='        <a title="Close" href="#close" class="close">&nbsp;</a>';if(this.title)this.html+='        <div class="title">'+this.title+"</div>";this.html+='        <div class="content curvyRedraw">&#160;</div>';
this.html+="    </div>";this.html+="</div>";this.init=function(){if(this.content){this.createHTML();this.initEvents()}};this.setData=function(b){if(b)this.data=b};this.getData=function(){return this.data};this.initEvents=function(){var b=this;this.openElement&&this.openElement.bind("click",function(){b.open();return false});this.closeButton.bind("click",function(){b.close();return false});this.submitButton.bind("click",function(){b.submitForm.submit();return false});$J(document).keypress(function(c){c.keyCode===
27&&b.isOpen&&b.close()});this.isModal||this.overlay.bind("click",function(){b.close();return false});this.closeAnywhere&&this.container.bind("click",function(){b.close();return false})};this.createHTML=function(){this.content=this.cloneContent?$J(this.content).clone():$J(this.content).detach();this.container=$J(this.html);this.closeButton=this.container.find(".close");this.submitButton=this.content.find(".submit");this.submitForm=this.content.find("form");this.container.find(".content").html(this.content.showObj());
if(this.overlay.length)this.overlayInDOM=true;else this.overlay=$J(document.createElement("div")).attr("id","popupOverlay").hide()};this.open=function(){var b,c,d;this.hideOthers&&$J("div.popupRounded").each(function(e,f){$J(f).hideObj()});if(!this.inDOM){this.id&&$J("#"+this.id).remove();$J("body").append(this.container);this.inDOM=true;this.container.data("instance",this);this.onCreate()}this.container.children(".popupOutline").css("opacity",0.5);if(!this.overlayInDOM){$J("body").append(this.overlay);
this.overlayInDOM=true}this.useOverlay?this.overlay.stop().fadeTo(500,0.8):this.overlay.fadeOut(500);this.container.showObj();this.content.showObj();this.position();this.isOpen=true;if(iwin.AuthUI){iwin.AuthUI.Login.hide();iwin.AuthUI.Register.hide();iwin.AuthUI.Forgot.hide()}b={tl:{radius:4},tr:{radius:4},bl:{radius:4},br:{radius:4},antiAlias:true};c={tl:{radius:4},tr:{radius:4},bl:{radius:0},br:{radius:0},antiAlias:true};d={tl:{radius:0},tr:{radius:0},bl:{radius:4},br:{radius:4},antiAlias:true};
if(this.title){curvyCorners(c,this.container.children(".popupContent").get(0));curvyCorners(d,this.container.find(".content").get(0))}else curvyCorners(b,this.container.find(".content").get(0));curvyCorners(b,this.container.children(".popupOutline").get(0));this.onOpen();this.autoRedraw&&this.redraw()};this.onOpen=function(){};this.onCreate=function(){};this.onClose=function(){};this.close=function(){this.overlay.queue("fx");this.container.fadeOut(500);this.overlay.fadeOut(500);this.cloneContent&&
this.container.remove();this.isOpen=false;this.onClose()};this.position=function(){this.container.center(this.centerOn);if(jQuery.browser.msie&&parseInt(jQuery.browser.version,10)<7){this.container.children(".popupOutline").css({height:this.container.height()+"px"});this.overlay.css({height:jQuery(document).height()+"px"})}};this.redraw=function(){var b,c,d;if(!this.id||this.id&&this.id==="")console.error("[iwin.Util.PopupRounded#redraw] Cannot redraw popup, popup has no ID to reference, please assign an ID. Popup title: %s, Popup class: %s",
this.title,this.klass);else{d=$J("#"+this.id);curvyCorners.redraw();if($J.browser.msie&&parseInt($J.browser.version,10)<7){c=d.find(".content");b=d.find(".popupOutline");d=c.height();c=c.width();b=curvyCorners.adjust(b.get(0));b.style.height=d+35+"px";b.style.width=c+"px"}curvyCorners.redraw()}};this.init();return this};iwin.Util.PopupRounded.hideAll=function(){$J(".popupRounded").each(function(){$J(this).fadeOut(500)});$J("#popupOverlay").fadeOut(500)};
iwin.Util.PopupVideo=function(a,b){var c=this;this.inherits=iwin.Util.PopupRounded;this.playerId=b.playerId;this.videoUrl=b.videoUrl;this.height=b.height;this.width=b.width;this.playerElement=b.playerElement;this.playerControlHeight=24;this.player=this.popup=null;this.init=function(){if(!a.content)a.content=this.createDefaultContent();if(!this.playerElement)this.playerElement=$J(".videoPlayer",a.content).get(0);if(typeof a.autoRedraw==="undefined")a.autoRedraw=false;this.popup=this.inherits(a);this.initVideo()};
this.initVideo=function(){this.popup.onOpen=function(){var d="";if(!c.player){d=(d=c.videoUrl)&&d.indexOf("//")===0?window.location.protocol+d:d;c.player=flowplayer(c.playerElement,{src:"/flash/flowplayer-3.1.5.swf",cachebusting:iwin.Util.gbrowser().name==="IE"},{clip:d})}c.player.load()};this.popup.onClose=function(){c.player.unload()}};this.createDefaultContent=function(){var d,e;d=$J(document.createElement("div"));e=$J(document.createElement("div")).addClass("videoPlayer");this.playerId&&e.attr("id",
this.playerId);this.height&&this.width&&e.css({height:this.height+this.playerControlHeight+"px",width:this.width+"px"});d.append(e);return d};this.init();return this};Event.observe(document,"dom:loaded",iwin.Util.initPopups);
var iwin=window.iwin||{};iwin.advertise=iwin.advertise||{};iwin.advertise.doubleClick={};iwin.advertise.neoEdge={};iwin.advertise.metaCafe={};iwin.advertise.init=function(){$J(".ad_banner").each(function(b,a){b=iwin.advertise.getParams(a.innerHTML);if(b.adType==="NeoEdge")iwin.advertise.neoEdge.processAd(a,b.adId);else b.adType==="MetaCafe"?iwin.advertise.metaCafe.processAd(a,b.adId):iwin.advertise.doubleClick.processAd(a,b)})};
iwin.advertise.getParams=function(b){var a;a=b.split("-");return{adId:b,location:a[0],width:a[1],height:a[2],position:a[3],zone1:a[4],zone2:a[5],adType:a[6]}};iwin.advertise.neoEdge.processAd=function(b,a){var c;a=$J('div[id$="'+a+'"]');b=$J(b);if(a.length>0){a=a.children(":not(script)");c=document.createElement("div");c=$J(c).append(a);b.empty();b.append(c);b.show()}};
iwin.advertise.metaCafe.processAd=function(b,a){var c;a=$J('div[id$="'+a+'"]');b=$J(b);if(a.length>0){a=a.children(":not(script)");c=document.createElement("div");c=$J(c).append(a);b.empty();b.append(c);b.show()}};
iwin.advertise.doubleClick.processAd=function(b,a){var c;c=(new Date).getTime();(c=a&&a.zone2?'<iframe src="http://ad.doubleclick.net/adi/iwin.'+a.location+"/"+a.zone1+"/"+a.zone2+";s1="+a.zone1+";s2="+a.zone2+";type=is;pos="+a.position+";iwin=ad;tile=1;dcopt=ist;sz="+a.width+"x"+a.height+";ord="+c+'" width="'+a.width+'" height="'+a.height+'" marginwidth="0"marginheight="0" frameborder="0" scrolling="no"><script language="JavaScript" src="http://ad.doubleclick.net/adj/iwin.'+a.location+"/"+a.zone1+
"/"+a.zone2+";s1="+a.zone1+";s2="+a.zone2+";type=is;pos="+a.position+";iwin=ad;tile=1;dcopt=ist;sz="+a.width+"x"+a.height+";ord="+c+'" type="text/javascript"><\/script></iframe>':a&&a.zone1?'<iframe src="http://ad.doubleclick.net/adi/iwin.'+a.location+"/"+a.zone1+";s1="+a.zone1+";type=is;pos="+a.position+";iwin=ad;tile=1;dcopt=ist;sz="+a.width+"x"+a.height+";ord="+c+'" width="'+a.width+'" height="'+a.height+'" marginwidth="0"marginheight="0" frameborder="0" scrolling="no"><script language="JavaScript" src="http://ad.doubleclick.net/adj/iwin.'+
a.location+"/"+a.zone1+";s1="+a.zone1+";type=is;pos="+a.position+";iwin=ad;tile=1;dcopt=ist;sz="+a.width+"x"+a.height+";ord="+c+'" type="text/javascript"><\/script></iframe>':null)?$J(b).html(c).show():console.debug("[iwin.advertise.doubleClick.processAd] failed with %o",a)};$J(document).ready(iwin.advertise.init);
var a,curvyCornersVerbose=false;
function browserdetect(){var b=navigator.userAgent.toLowerCase();if(this.isIE=b.indexOf("msie")>-1){this.ieVer=/msie\s(\d\.\d)/.exec(b)[1];this.quirksMode=!document.compatMode||document.compatMode.indexOf("BackCompat")>-1;this.get_style=function(c,d){if(!(d in c.currentStyle))return"";var f=/^([\d.]+)(\w*)/.exec(c.currentStyle[d]);if(!f)return c.currentStyle[d];if(f[1]==0)return"0";if(f[2]&&f[2]!=="px"){d=c.style.left;var g=c.runtimeStyle.left;c.runtimeStyle.left=c.currentStyle.left;c.style.left=
f[1]+f[2];f[0]=c.style.pixelLeft;c.style.left=d;c.runtimeStyle.left=g}return f[0]};this.supportsCorners=false}else{this.ieVer=this.quirksMode=0;this.get_style=function(c,d){d=d.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return document.defaultView.getComputedStyle(c,"").getPropertyValue(d)};this.isSafari=b.indexOf("safari")!=-1;this.isWebKit=b.indexOf("webkit")!=-1;if(this.isOp="opera"in window)this.supportsCorners=(this.isOp=window.opera.version())>=10.5;else{if(!this.isWebkit)if(!(this.isMoz=
b.indexOf("firefox")!==-1))for(b=document.childNodes.length;--b>=0;)if("style"in document.childNodes[b]){this.isMoz="MozBorderRadius"in document.childNodes[b];break}this.supportsCorners=this.isWebKit||this.isMoz}}}var curvyBrowser=new browserdetect;if(curvyBrowser.isIE)try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}function curvyCnrSpec(b){this.selectorText=b;this.tlR=this.trR=this.blR=this.brR=0;this.tlu=this.tru=this.blu=this.bru="";this.antiAlias=true}a=curvyCnrSpec.prototype;
a.setcorner=function(b,c,d,f){if(b){propname=b.charAt(0)+c.charAt(0);this[propname+"R"]=parseInt(d);this[propname+"u"]=f}else{this.tlR=this.trR=this.blR=this.brR=parseInt(d);this.tlu=this.tru=this.blu=this.bru=f}};
a.get=function(b){if(/^(t|b)(l|r)(R|u)$/.test(b))return this[b];if(/^(t|b)(l|r)Ru$/.test(b)){b=b.charAt(0)+b.charAt(1);return this[b+"R"]+this[b+"u"]}if(/^(t|b)Ru?$/.test(b)){var c=b.charAt(0);c+=this[c+"lR"]>this[c+"rR"]?"l":"r";c=this[c+"R"];if(b.length===3&&b.charAt(2)==="u")c+=this.u;return c}throw new Error("Don't recognize property "+b);};a.radiusdiff=function(b){if(b!=="t"&&b!=="b")throw new Error("Param must be 't' or 'b'");return Math.abs(this[b+"lR"]-this[b+"rR"])};
a.setfrom=function(b){this.tlu=this.tru=this.blu=this.bru="px";if("tl"in b)this.tlR=b.tl.radius;if("tr"in b)this.trR=b.tr.radius;if("bl"in b)this.blR=b.bl.radius;if("br"in b)this.brR=b.br.radius;if("antiAlias"in b)this.antiAlias=b.antiAlias};
a.cloneOn=function(b){var c=["tl","tr","bl","br"],d=0,f,g;for(f in c)if(!isNaN(f)){g=this[c[f]+"u"];if(g!==""&&g!=="px"){d=new curvyCnrSpec;break}}if(d){var h,l,i=curvyBrowser.get_style(b,"left");for(f in c)if(!isNaN(f)){h=c[f];g=this[h+"u"];l=this[h+"R"];if(g!=="px"){i=b.style.left;b.style.left=l+g;l=b.style.pixelLeft;b.style.left=i}d[h+"R"]=l;d[h+"u"]="px"}b.style.left=i}else d=this;return d};
a.radiusSum=function(b){if(b!=="t"&&b!=="b")throw new Error("Param must be 't' or 'b'");return this[b+"lR"]+this[b+"rR"]};a.radiusCount=function(b){var c=0;this[b+"lR"]&&++c;this[b+"rR"]&&++c;return c};a.cornerNames=function(){var b=[];this.tlR&&b.push("tl");this.trR&&b.push("tr");this.blR&&b.push("bl");this.brR&&b.push("br");return b};
function operasheet(b){b=document.styleSheets.item(b).ownerNode.text;b=b.replace(/\/\*(\n|\r|.)*?\*\//g,"");var c=new RegExp("^\\s*([\\w.#][-\\w.#, ]+)[\\n\\s]*\\{([^}]+border-((top|bottom)-(left|right)-)?radius[^}]*)\\}","mg"),d;for(this.rules=[];(d=c.exec(b))!==null;){for(var f=new RegExp("(..)border-((top|bottom)-(left|right)-)?radius:\\s*([\\d.]+)(in|em|px|ex|pt)","g"),g,h=new curvyCnrSpec(d[1]);(g=f.exec(d[2]))!==null;)g[1]!=="z-"&&h.setcorner(g[3],g[4],g[5],g[6]);this.rules.push(h)}}
operasheet.contains_border_radius=function(b){return/border-((top|bottom)-(left|right)-)?radius/.test(document.styleSheets.item(b).ownerNode.text)};
function curvyCorners(){var b,c,d,f,g;if(typeof arguments[0]!=="object")throw curvyCorners.newError("First parameter of curvyCorners() must be an object.");if(arguments[0]instanceof curvyCnrSpec){f=arguments[0];if(!f.selectorText&&typeof arguments[1]==="string")f.selectorText=arguments[1]}else{if(typeof arguments[1]!=="object"&&typeof arguments[1]!=="string")throw curvyCorners.newError("Second parameter of curvyCorners() must be an object or a class name.");c=arguments[1];if(typeof c!=="string")c=
"";if(c!==""&&c.charAt(0)!=="."&&"autoPad"in arguments[0])c="."+c;f=new curvyCnrSpec(c);f.setfrom(arguments[0])}if(f.selectorText){g=0;var h=f.selectorText.replace(/\s+$/,"").split(/,\s*/);d=[];for(b=0;b<h.length;++b){if((c=h[b].lastIndexOf("#"))!==-1)h[b]=h[b].substr(c);d=d.concat(curvyCorners.getElementsBySelector(h[b].split(/\s+/)))}}else{g=1;d=arguments}b=g;for(c=d.length;b<c;++b){g=d[b];h=false;if(g.className)(h=g.className.indexOf("curvyIgnore")!==-1)||(g.className+=" curvyIgnore");else g.className=
"curvyIgnore";if(!h){if(g.className.indexOf("curvyRedraw")!==-1){if(typeof curvyCorners.redrawList==="undefined")curvyCorners.redrawList=[];curvyCorners.redrawList.push({node:g,spec:f,copy:g.cloneNode(false)})}(new curvyObject(f,g)).applyCorners()}}}curvyCorners.prototype.applyCornersToAll=function(){throw curvyCorners.newError("This function is now redundant. Just call curvyCorners(). See documentation.");};
curvyCorners.redraw=function(){if(!curvyCorners.redrawList)throw curvyCorners.newError("curvyCorners.redraw() has nothing to redraw.");var b=curvyCorners.block_redraw;curvyCorners.block_redraw=true;for(var c in curvyCorners.redrawList)if(!isNaN(c)){var d=curvyCorners.redrawList[c];if(d.node.clientWidth){for(var f=d.copy.cloneNode(false),g=d.node.firstChild;g!=null;g=g.nextSibling)if(g.className==="autoPadDiv")break;if(!g){curvyCorners.alert("Couldn't find autoPad DIV");break}d.node.parentNode.replaceChild(f,
d.node);for(var h=g.getElementsByTagName("script"),l=h.length-1;l>=0;--l)h[l].parentNode.removeChild(h[l]);for(;g.firstChild;)f.appendChild(g.removeChild(g.firstChild));d=new curvyObject(d.spec,d.node=f);d.applyCorners()}}curvyCorners.block_redraw=b};curvyCorners.adjust=function(b){if(!curvyBrowser.supportsCorners){if(!curvyCorners.redrawList)throw curvyCorners.newError("curvyCorners.adjust() has nothing to adjust.");var c,d=curvyCorners.redrawList.length;for(c=0;c<d;++c)b=curvyCorners.redrawList[c].copy}return b};
curvyCorners.handleWinResize=function(){curvyCorners.block_redraw||curvyCorners.redraw()};curvyCorners.setWinResize=function(b){curvyCorners.block_redraw=!b};curvyCorners.newError=function(b){return new Error("curvyCorners Error:\n"+b)};curvyCorners.alert=function(b){if(typeof curvyCornersVerbose==="undefined"||curvyCornersVerbose)console.info(b)};
function curvyObject(b,c){var d;this.box=c;this.settings=b;this.topContainer=this.bottomContainer=this.shell=d=null;c=this.box.clientWidth;if("canHaveChildren"in this.box&&!this.box.canHaveChildren||this.box.tagName==="TABLE")throw new Error(this.errmsg("You cannot apply corners to "+this.box.tagName+" elements.","Error"));if(!c&&curvyBrowser.isIE){this.box.style.zoom=1;c=this.box.clientWidth}if(!c&&curvyBrowser.get_style(this.box,"display")==="inline"){this.box.style.display="inline-block";curvyCorners.alert(this.errmsg("Converting inline element to inline-block",
"warning"));c=this.box.clientWidth}if(!c){if(!this.box.parentNode)throw this.newError("box has no parent!");for(d=this.box;;d=d.parentNode){if(!d||d.tagName==="BODY"){this.applyCorners=function(){};curvyCorners.alert(this.errmsg("zero-width box with no accountable parent","warning"));return}if(curvyBrowser.get_style(d,"display")==="none")break}var f=d.style.display;d.style.display="block";if(d.className.indexOf("hideObj")!=-1){var g=true;d.className=d.className.replace("hideObj","")}c=this.box.clientWidth}if(c){if(b instanceof
curvyCnrSpec)this.spec=b.cloneOn(this.box);else{this.spec=new curvyCnrSpec("");this.spec.setfrom(this.settings)}var h=curvyBrowser.get_style(this.box,"borderTopWidth"),l=curvyBrowser.get_style(this.box,"borderBottomWidth"),i=curvyBrowser.get_style(this.box,"borderLeftWidth"),p=curvyBrowser.get_style(this.box,"borderRightWidth"),C=curvyBrowser.get_style(this.box,"borderTopColor"),D=curvyBrowser.get_style(this.box,"borderBottomColor"),E=curvyBrowser.get_style(this.box,"borderLeftColor"),s=curvyBrowser.get_style(this.box,
"borderRightColor"),S=curvyBrowser.get_style(this.box,"borderTopStyle"),T=curvyBrowser.get_style(this.box,"borderBottomStyle"),U=curvyBrowser.get_style(this.box,"borderLeftStyle"),V=curvyBrowser.get_style(this.box,"borderRightStyle");b=curvyBrowser.get_style(this.box,"backgroundColor");var R=curvyBrowser.get_style(this.box,"backgroundImage"),W=curvyBrowser.get_style(this.box,"backgroundRepeat"),r,v;if(this.box.currentStyle&&this.box.currentStyle.backgroundPositionX){r=curvyBrowser.get_style(this.box,
"backgroundPositionX");v=curvyBrowser.get_style(this.box,"backgroundPositionY")}else{r=curvyBrowser.get_style(this.box,"backgroundPosition");r=r.split(" ");v=r.length===2?r[1]:0;r=r[0]}var X=curvyBrowser.get_style(this.box,"position"),Y=curvyBrowser.get_style(this.box,"paddingTop"),Z=curvyBrowser.get_style(this.box,"paddingBottom"),$=curvyBrowser.get_style(this.box,"paddingLeft"),aa=curvyBrowser.get_style(this.box,"paddingRight");curvyBrowser.get_style(this.box,"border");var F=curvyBrowser.ieVer>
7?curvyBrowser.get_style(this.box,"filter"):null,G=this.spec.get("tR"),I=this.spec.get("bR"),w=function(j){if(typeof j==="number")return j;if(typeof j!=="string")throw new Error("unexpected styleToNPx type "+typeof j);var x=/^[-\d.]([a-z]+)$/.exec(j);if(x&&x[1]!="px")throw new Error("Unexpected unit "+x[1]);if(isNaN(j=parseInt(j)))j=0;return j};try{this.borderWidth=w(h);this.borderWidthB=w(l);this.borderWidthL=w(i);this.borderWidthR=w(p);this.boxColour=curvyObject.format_colour(b);this.topPadding=
w(Y);this.bottomPadding=w(Z);this.leftPadding=w($);this.rightPadding=w(aa);this.boxWidth=c;this.boxHeight=this.box.clientHeight;this.borderColour=curvyObject.format_colour(C);this.borderColourB=curvyObject.format_colour(D);this.borderColourL=curvyObject.format_colour(E);this.borderColourR=curvyObject.format_colour(s);this.borderString=this.borderWidth+"px "+S+" "+this.borderColour;this.borderStringB=this.borderWidthB+"px "+T+" "+this.borderColourB;this.borderStringL=this.borderWidthL+"px "+U+" "+
this.borderColourL;this.borderStringR=this.borderWidthR+"px "+V+" "+this.borderColourR;this.backgroundImage=R!="none"?R:"";this.backgroundRepeat=W}catch(ba){throw this.newError(ba.message);}var J=this.boxHeight,H=c;if(curvyBrowser.isOp){r=w(r);v=w(v);if(r){c=H+this.borderWidthL+this.borderWidthR;if(r>c)r=c;r=c/r*100+"%"}if(v){c=J+this.borderWidth+this.borderWidthB;if(v>c)v=c;v=c/v*100+"%"}}if(!curvyBrowser.quirksMode){this.boxWidth-=this.leftPadding+this.rightPadding;this.boxHeight-=this.topPadding+
this.bottomPadding}this.contentContainer=document.createElement("div");if(F)this.contentContainer.style.filter=F;for(;this.box.firstChild;)this.contentContainer.appendChild(this.box.removeChild(this.box.firstChild));if(X!="absolute")this.box.style.position="relative";this.box.style.padding="0";this.box.style.border=this.box.style.backgroundImage="none";this.box.style.backgroundColor="transparent";this.box.style.width=H+this.borderWidthL+this.borderWidthR+"px";this.box.style.height=J+this.borderWidth+
this.borderWidthB+"px";c=document.createElement("div");c.style.position="absolute";if(F)c.style.filter=F;c.style.width=curvyBrowser.quirksMode?H+this.borderWidthL+this.borderWidthR+"px":H+"px";c.style.height=function(j){return j<=0?"0":j+"px"}(J+this.borderWidth+this.borderWidthB-G-I);c.style.padding="0";c.style.top=G+"px";c.style.left="0";if(this.borderWidthL)c.style.borderLeft=this.borderStringL;if(this.borderWidth&&!G)c.style.borderTop=this.borderString;if(this.borderWidthR)c.style.borderRight=
this.borderStringR;if(this.borderWidthB&&!I)c.style.borderBottom=this.borderStringB;c.style.backgroundColor=b;c.style.backgroundImage=this.backgroundImage;c.style.backgroundRepeat=this.backgroundRepeat;c.style.direction="ltr";this.shell=this.box.appendChild(c);c=curvyBrowser.get_style(this.shell,"width");if(c===""||c==="auto"||c.indexOf("%")!==-1)throw this.newError("Shell width is "+c);this.boxWidth=c!=""&&c!="auto"&&c.indexOf("%")==-1?parseInt(c):this.shell.clientWidth;this.applyCorners=function(){this.backgroundPosX=
this.backgroundPosY=0;if(this.backgroundObject){var j=function(K,P,Q){if(K===0)return 0;if(K==="right"||K==="bottom")return Q-P;if(K==="center")return(Q-P)/2;if(K.indexOf("%")>0)return(Q-P)*100/parseInt(K);return w(K)};this.backgroundPosX=j(r,this.backgroundObject.width,H);this.backgroundPosY=j(v,this.backgroundObject.height,J)}else if(this.backgroundImage){this.backgroundPosX=w(r);this.backgroundPosY=w(v)}if(G){j=document.createElement("div");j.style.width=this.boxWidth+"px";j.style.fontSize="1px";
j.style.overflow="hidden";j.style.position="absolute";j.style.paddingLeft=this.borderWidth+"px";j.style.paddingRight=this.borderWidth+"px";j.style.height=G+"px";j.style.top=-G+"px";j.style.left=-this.borderWidthL+"px";this.topContainer=this.shell.appendChild(j)}if(I){j=document.createElement("div");j.style.width=this.boxWidth+"px";j.style.fontSize="1px";j.style.overflow="hidden";j.style.position="absolute";j.style.paddingLeft=this.borderWidthB+"px";j.style.paddingRight=this.borderWidthB+"px";j.style.height=
I+"px";j.style.bottom=-I+"px";j.style.left=-this.borderWidthL+"px";this.bottomContainer=this.shell.appendChild(j)}j=this.spec.cornerNames();for(var x in j)if(!isNaN(x)){var A=j[x],q=this.spec[A+"R"],n,y,B,t;if(A=="tr"||A=="tl"){n=this.borderWidth;y=this.borderColour;t=this.borderWidth}else{n=this.borderWidthB;y=this.borderColourB;t=this.borderWidthB}B=q-t;n=document.createElement("div");n.style.height=this.spec.get(A+"Ru");n.style.width=this.spec.get(A+"Ru");n.style.position="absolute";n.style.fontSize=
"1px";n.style.overflow="hidden";var o,m,L,u=F?parseInt(/alpha\(opacity.(\d+)\)/.exec(F)[1]):100;for(o=0;o<q;++o){var M=o+1>=B?-1:Math.floor(Math.sqrt(Math.pow(B,2)-Math.pow(o+1,2)))-1;if(B!=q)var k=o>=B?-1:Math.ceil(Math.sqrt(Math.pow(B,2)-Math.pow(o,2))),N=o+1>=q?-1:Math.floor(Math.sqrt(Math.pow(q,2)-Math.pow(o+1,2)))-1;var O=o>=q?-1:Math.ceil(Math.sqrt(Math.pow(q,2)-Math.pow(o,2)));M>-1&&this.drawPixel(o,0,this.boxColour,u,M+1,n,true,q);if(B!=q)if(this.spec.antiAlias){for(m=M+1;m<k;++m)if(this.backgroundImage!=
""){L=curvyObject.pixelFraction(o,m,B)*100;this.drawPixel(o,m,y,u,1,n,L>=30,q)}else if(this.boxColour!=="transparent"){L=curvyObject.BlendColour(this.boxColour,y,curvyObject.pixelFraction(o,m,B));this.drawPixel(o,m,L,u,1,n,false,q)}else this.drawPixel(o,m,y,u>>1,1,n,false,q);if(N>=k){if(k==-1)k=0;this.drawPixel(o,k,y,u,N-k+1,n,false,0)}L=y;m=N}else N>M&&this.drawPixel(o,M+1,y,u,N-M,n,false,0);else{L=this.boxColour;m=M}if(this.spec.antiAlias&&this.boxColour!=="transparent")for(;++m<O;)this.drawPixel(o,
m,L,curvyObject.pixelFraction(o,m,q)*u,1,n,t<=0,q)}y=0;for(B=n.childNodes.length;y<B;++y){t=n.childNodes[y];o=parseInt(t.style.top);u=parseInt(t.style.left);O=parseInt(t.style.height);if(A=="tl"||A=="bl")t.style.left=q-u-1+"px";if(A=="tr"||A=="tl")t.style.top=q-O-o+"px";t.style.backgroundRepeat=this.backgroundRepeat;if(this.backgroundImage)switch(A){case "tr":t.style.backgroundPosition=this.backgroundPosX-this.borderWidthL+q-H-u+"px "+(this.backgroundPosY+O+o+this.borderWidth-q)+"px";break;case "tl":t.style.backgroundPosition=
this.backgroundPosX-q+u+1+this.borderWidthL+"px "+(this.backgroundPosY-q+O+o+this.borderWidth)+"px";break;case "bl":t.style.backgroundPosition=this.backgroundPosX-q+u+1+this.borderWidthL+"px "+(this.backgroundPosY-J-this.borderWidth+(curvyBrowser.quirksMode?o:-o)+q)+"px";break;case "br":t.style.backgroundPosition=curvyBrowser.quirksMode?this.backgroundPosX-this.borderWidthL-H+q-u+"px "+(this.backgroundPosY-J-this.borderWidth+o+q)+"px":this.backgroundPosX-this.borderWidthL-H+q-u+"px "+(this.backgroundPosY-
J-this.borderWidth+q-o)+"px"}}switch(A){case "tl":n.style.top=n.style.left="0";this.topContainer.appendChild(n);break;case "tr":n.style.top=n.style.right="0";this.topContainer.appendChild(n);break;case "bl":n.style.bottom=n.style.left="0";this.bottomContainer.appendChild(n);break;case "br":n.style.bottom=n.style.right="0";this.bottomContainer.appendChild(n)}}x={t:this.spec.radiusdiff("t"),b:this.spec.radiusdiff("b")};for(z in x)if(typeof z!=="function")if(this.spec.get(z+"R")){if(x[z]){m=this.spec[z+
"lR"]<this.spec[z+"rR"]?z+"l":z+"r";k=document.createElement("div");k.style.height=x[z]+"px";k.style.width=this.spec.get(m+"Ru");k.style.position="absolute";k.style.fontSize="1px";k.style.overflow="hidden";k.style.backgroundColor=this.boxColour;if(F)k.style.filter=F;k.style.backgroundImage=this.backgroundImage;k.style.backgroundRepeat=this.backgroundRepeat;switch(m){case "tl":k.style.bottom=k.style.left="0";k.style.borderLeft=this.borderStringL;k.style.backgroundPosition=this.backgroundPosX+"px "+
(this.borderWidth+this.backgroundPosY-this.spec.tlR)+"px";this.topContainer.appendChild(k);break;case "tr":k.style.bottom=k.style.right="0";k.style.borderRight=this.borderStringR;k.style.backgroundPosition=this.backgroundPosX-this.boxWidth+this.spec.trR+"px "+(this.borderWidth+this.backgroundPosY-this.spec.trR)+"px";this.topContainer.appendChild(k);break;case "bl":k.style.top=k.style.left="0";k.style.borderLeft=this.borderStringL;k.style.backgroundPosition=this.backgroundPosX+"px "+(this.backgroundPosY-
this.borderWidth-this.boxHeight+x[z]+this.spec.blR)+"px";this.bottomContainer.appendChild(k);break;case "br":k.style.top=k.style.right="0";k.style.borderRight=this.borderStringR;k.style.backgroundPosition=this.borderWidthL+this.backgroundPosX-this.boxWidth+this.spec.brR+"px "+(this.backgroundPosY-this.borderWidth-this.boxHeight+x[z]+this.spec.brR)+"px";this.bottomContainer.appendChild(k)}}m=document.createElement("div");if(F)m.style.filter=F;m.style.position="relative";m.style.fontSize="1px";m.style.overflow=
"hidden";m.style.width=this.fillerWidth(z);m.style.backgroundColor=this.boxColour;m.style.backgroundImage=this.backgroundImage;m.style.backgroundRepeat=this.backgroundRepeat;switch(z){case "t":if(this.topContainer){m.style.height=curvyBrowser.quirksMode?100+G+"px":100+G-this.borderWidth+"px";m.style.marginLeft=this.spec.tlR?this.spec.tlR-this.borderWidthL+"px":"0";m.style.borderTop=this.borderString;if(this.backgroundImage){k=this.spec.tlR?this.borderWidthL+this.backgroundPosX-this.spec.tlR+"px ":
this.backgroundPosX+"px ";m.style.backgroundPosition=k+this.backgroundPosY+"px";this.shell.style.backgroundPosition=this.backgroundPosX+"px "+(this.backgroundPosY-G+this.borderWidthL)+"px"}this.topContainer.appendChild(m)}break;case "b":if(this.bottomContainer){m.style.height=curvyBrowser.quirksMode?I+"px":I-this.borderWidthB+"px";m.style.marginLeft=this.spec.blR?this.spec.blR-this.borderWidthL+"px":"0";m.style.borderBottom=this.borderStringB;if(this.backgroundImage){k=this.spec.blR?this.backgroundPosX+
this.borderWidthL-this.spec.blR+"px ":this.backgroundPosX+"px ";m.style.backgroundPosition=k+(this.backgroundPosY-J-this.borderWidth+I)+"px"}this.bottomContainer.appendChild(m)}}}this.contentContainer.style.position="absolute";this.contentContainer.className="autoPadDiv";this.contentContainer.style.left=this.borderWidthL+"px";this.contentContainer.style.paddingTop=this.topPadding+"px";this.contentContainer.style.top=this.borderWidth+"px";this.contentContainer.style.paddingLeft=this.leftPadding+"px";
this.contentContainer.style.paddingRight=this.rightPadding+"px";z=H;curvyBrowser.quirksMode||(z-=this.leftPadding+this.rightPadding);this.contentContainer.style.width=z+"px";this.contentContainer.style.textAlign=curvyBrowser.get_style(this.box,"textAlign");this.box.style.textAlign="left";this.box.appendChild(this.contentContainer);if(d)d.style.display=f;if(g)d.className+=" hideObj"};if(this.backgroundImage){r=this.backgroundCheck(r);v=this.backgroundCheck(v);if(this.backgroundObject){this.backgroundObject.holdingElement=
this;this.dispatch=this.applyCorners;this.applyCorners=function(){if(this.backgroundObject.complete)this.dispatch();else this.backgroundObject.onload=new Function("curvyObject.dispatch(this.holdingElement);")}}}}else{curvyCorners.alert(this.errmsg("zero-width box, cannot display","error"));this.applyCorners=function(){}}}
curvyObject.prototype.backgroundCheck=function(b){if(b==="top"||b==="left"||parseInt(b)===0)return 0;if(!/^[-\d.]+px$/.test(b)&&!this.backgroundObject){this.backgroundObject=new Image;this.backgroundObject.src=function(c){var d=/url\("?([^'"]+)"?\)/.exec(c);return d?d[1]:c}(this.backgroundImage)}return b};curvyObject.dispatch=function(b){if("dispatch"in b)b.dispatch();else throw b.newError("No dispatch function");};
curvyObject.prototype.drawPixel=function(b,c,d,f,g,h,l,i){var p=document.createElement("div");p.style.height=g+"px";p.style.width="1px";p.style.position="absolute";p.style.fontSize="1px";p.style.overflow="hidden";g=this.spec.get("tR");p.style.backgroundColor=d;if(l&&this.backgroundImage!=""){p.style.backgroundImage=this.backgroundImage;p.style.backgroundPosition="-"+(this.boxWidth-(i-b)+this.borderWidth)+"px -"+(this.boxHeight+g+c-this.borderWidth)+"px"}f!=100&&curvyObject.setOpacity(p,f);p.style.top=
c+"px";p.style.left=b+"px";h.appendChild(p)};curvyObject.prototype.fillerWidth=function(b){var c;c=curvyBrowser.quirksMode?0:this.spec.radiusCount(b)*this.borderWidthL;if((b=this.boxWidth-this.spec.radiusSum(b)+c)<0)throw this.newError("Radius exceeds box width");return b+"px"};
curvyObject.prototype.errmsg=function(b,c){var d="\ntag: "+this.box.tagName;if(this.box.id)d+="\nid: "+this.box.id;if(this.box.className)d+="\nclass: "+this.box.className;var f;if((f=this.box.parentNode)===null)d+="\n(box has no parent)";else{d+="\nParent tag: "+f.tagName;if(f.id)d+="\nParent ID: "+f.id;if(f.className)d+="\nParent class: "+f.className}if(c===undefined)c="warning";return"curvyObject "+c+":\n"+b+d};curvyObject.prototype.newError=function(b){return new Error(this.errmsg(b,"exception"))};
curvyObject.IntToHex=function(b){var c=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];return c[b>>>4]+""+c[b&15]};
curvyObject.BlendColour=function(b,c,d){if(b==="transparent"||c==="transparent")throw this.newError("Cannot blend with transparent");if(b.charAt(0)!=="#")b=curvyObject.format_colour(b);if(c.charAt(0)!=="#")c=curvyObject.format_colour(c);var f=parseInt(b.substr(1,2),16),g=parseInt(b.substr(3,2),16);b=parseInt(b.substr(5,2),16);var h=parseInt(c.substr(1,2),16),l=parseInt(c.substr(3,2),16);c=parseInt(c.substr(5,2),16);if(d>1||d<0)d=1;f=Math.round(f*d+h*(1-d));if(f>255)f=255;if(f<0)f=0;g=Math.round(g*
d+l*(1-d));if(g>255)g=255;if(g<0)g=0;d=Math.round(b*d+c*(1-d));if(d>255)d=255;if(d<0)d=0;return"#"+curvyObject.IntToHex(f)+curvyObject.IntToHex(g)+curvyObject.IntToHex(d)};
curvyObject.pixelFraction=function(b,c,d){d=d*d;var f=new Array(2),g=new Array(2),h=0,l="",i=Math.sqrt(d-Math.pow(b,2));if(i>=c&&i<c+1){l="Left";f[h]=0;g[h]=i-c;++h}i=Math.sqrt(d-Math.pow(c+1,2));if(i>=b&&i<b+1){l+="Top";f[h]=i-b;g[h]=1;++h}i=Math.sqrt(d-Math.pow(b+1,2));if(i>=c&&i<c+1){l+="Right";f[h]=1;g[h]=i-c;++h}i=Math.sqrt(d-Math.pow(c,2));if(i>=b&&i<b+1){l+="Bottom";f[h]=i-b;g[h]=0}switch(l){case "LeftRight":b=Math.min(g[0],g[1])+(Math.max(g[0],g[1])-Math.min(g[0],g[1]))/2;break;case "TopRight":b=
1-(1-f[0])*(1-g[1])/2;break;case "TopBottom":b=Math.min(f[0],f[1])+(Math.max(f[0],f[1])-Math.min(f[0],f[1]))/2;break;case "LeftBottom":b=g[0]*f[1]/2;break;default:b=1}return b};curvyObject.rgb2Array=function(b){return b.substring(4,b.indexOf(")")).split(", ")};
curvyObject.rgb2Hex=function(b){try{var c=curvyObject.rgb2Array(b),d=parseInt(c[0]),f=parseInt(c[1]),g=parseInt(c[2]),h="#"+curvyObject.IntToHex(d)+curvyObject.IntToHex(f)+curvyObject.IntToHex(g)}catch(l){b="getMessage"in l?l.getMessage():l.message;throw new Error("Error ("+b+") converting RGB value to Hex in rgb2Hex");}return h};
curvyObject.setOpacity=function(b,c){c=c==100?99.999:c;if(curvyBrowser.isSafari&&b.tagName!="IFRAME"){var d=curvyObject.rgb2Array(b.style.backgroundColor),f=parseInt(d[0]),g=parseInt(d[1]);d=parseInt(d[2]);b.style.backgroundColor="rgba("+f+", "+g+", "+d+", "+c/100+")"}else if(typeof b.style.opacity!=="undefined")b.style.opacity=c/100;else if(typeof b.style.MozOpacity!=="undefined")b.style.MozOpacity=c/100;else if(typeof b.style.filter!=="undefined")b.style.filter="alpha(opacity="+c+")";else if(typeof b.style.KHTMLOpacity!==
"undefined")b.style.KHTMLOpacity=c/100};curvyCorners.addEvent=function(b,c,d,f){if(b.addEventListener){b.addEventListener(c,d,f);return true}if(b.attachEvent)return b.attachEvent("on"+c,d);b["on"+c]=d;return false};if(typeof addEvent==="undefined")addEvent=curvyCorners.addEvent;
curvyObject.getComputedColour=function(b){var c=document.createElement("DIV");c.style.backgroundColor=b;document.body.appendChild(c);if(window.getComputedStyle){b=document.defaultView.getComputedStyle(c,null).getPropertyValue("background-color");c.parentNode.removeChild(c);if(b.substr(0,3)==="rgb")b=curvyObject.rgb2Hex(b);return b}else{var d=document.body.createTextRange();d.moveToElementText(c);d.execCommand("ForeColor",false,b);b=d.queryCommandValue("ForeColor");b="rgb("+(b&255)+", "+((b&65280)>>
8)+", "+((b&16711680)>>16)+")";c.parentNode.removeChild(c);return curvyObject.rgb2Hex(b)}};curvyObject.format_colour=function(b){if(b!=""&&b!="transparent")if(b.substr(0,3)==="rgb")b=curvyObject.rgb2Hex(b);else if(b.charAt(0)!=="#")b=curvyObject.getComputedColour(b);else if(b.length===4)b="#"+b.charAt(1)+b.charAt(1)+b.charAt(2)+b.charAt(2)+b.charAt(3)+b.charAt(3);return b};
curvyCorners.getElementsByClass=function(b,c){var d=[];if(c===undefined)c=document;b=b.split(".");var f="*";if(b.length===1){f=b[0];b=false}else{if(b[0])f=b[0];b=b[1]}if(f.charAt(0)==="#")(c=document.getElementById(f.substr(1)))&&d.push(c);else{c=c.getElementsByTagName(f);f=c.length;if(b){var g=new RegExp("(^|\\s)"+b+"(\\s|$)");for(b=0;b<f;++b)g.test(c[b].className)&&d.push(c[b])}else for(b=0;b<f;++b)d.push(c[b])}return d};
curvyCorners.getElementsBySelector=function(b,c){var d=b[0];if(c===undefined)c=document;if(d.indexOf("#")!==-1)c=(c=c.getElementById(d.substr(1)))?[c]:[];else c=curvyCorners.getElementsByClass(d,c);if(b.length>1){d=[];for(var f=c.length;--f>=0;)c=d=d.concat(curvyCorners.getElementsBySelector(b.slice(1),c[f]))}return c};
if(curvyBrowser.supportsCorners){var curvyCornersNoAutoScan=true;curvyCorners.init=function(){}}else{curvyCorners.scanStyles=function(){function b(l){if(!parseInt(l))return"px";return/^[\d.]+(\w+)$/.exec(l)[1]}var c,d,f;if(curvyBrowser.isIE){var g=function(l){var i=l.style;if(curvyBrowser.ieVer>6){var p=i["-moz-border-radius"]||0,C=i["-moz-border-radius-topright"]||0,D=i["-moz-border-radius-topleft"]||0,E=i["-moz-border-radius-bottomright"]||0;i=i["-moz-border-radius-bottomleft"]||0}else{p=i["moz-border-radius"]||
0;C=i["moz-border-radius-topright"]||0;D=i["moz-border-radius-topleft"]||0;E=i["moz-border-radius-bottomright"]||0;i=i["moz-border-radius-bottomleft"]||0}if(p){var s=p.split("/");s=s[0].split(/\s+/);s[s.length-1]===""&&s.pop();switch(s.length){case 3:D=s[0];C=i=s[1];E=s[2];p=false;break;case 2:D=E=s[0];C=i=s[1];p=false;case 1:break;case 4:D=s[0];C=s[1];E=s[2];i=s[3];p=false;break;default:curvyCorners.alert("Illegal corners specification: "+p)}}if(p||D||C||E||i){l=new curvyCnrSpec(l.selectorText);
if(p)l.setcorner(null,null,parseInt(p),b(p));else{C&&l.setcorner("t","r",parseInt(C),b(C));D&&l.setcorner("t","l",parseInt(D),b(D));i&&l.setcorner("b","l",parseInt(i),b(i));E&&l.setcorner("b","r",parseInt(E),b(E))}curvyCorners(l)}};for(c=0;c<document.styleSheets.length;++c)try{if(document.styleSheets[c].imports)for(d=0;d<document.styleSheets[c].imports.length;++d)for(f=0;f<document.styleSheets[c].imports[d].rules.length;++f)g(document.styleSheets[c].imports[d].rules[f]);for(d=0;d<document.styleSheets[c].rules.length;++d)g(document.styleSheets[c].rules[d])}catch(h){typeof curvyCornersVerbose!==
"undefined"&&curvyCornersVerbose&&console.info(h.message+" - ignored")}}else if(curvyBrowser.isOp)for(c=0;c<document.styleSheets.length;++c){if(operasheet.contains_border_radius(c)){f=new operasheet(c);for(d in f.rules)isNaN(d)||curvyCorners(f.rules[d])}}else curvyCorners.alert("Scanstyles does nothing in Webkit/Firefox/Opera")};curvyCorners.init=function(){if(!arguments.callee.done){arguments.callee.done=true;if(curvyBrowser.isWebKit&&curvyCorners.init.timer){clearInterval(curvyCorners.init.timer);
curvyCorners.init.timer=null}curvyCorners.scanStyles()}}}if(typeof curvyCornersNoAutoScan==="undefined"||curvyCornersNoAutoScan===false)curvyBrowser.isOp?document.addEventListener("DOMContentLoaded",curvyCorners.init,false):curvyCorners.addEvent(window,"load",curvyCorners.init,false);
(function(){function J(a){console.log("$f.fireEvent",[].slice.call(a))}function w(a){if(!a||typeof a!="object")return a;var d=new a.constructor;for(var c in a)if(a.hasOwnProperty(c))d[c]=w(a[c]);return d}function q(a,d){if(a){var c,m=0,f=a.length;if(f===undefined)for(c in a){if(d.call(a[c],c,a[c])===false)break}else for(c=a[0];m<f&&d.call(c,m,c)!==false;c=a[++m]);return a}}function G(a){return document.getElementById(a)}function v(a,d,c){if(typeof d!="object")return a;a&&d&&q(d,function(m,f){if(!c||
typeof f!="function")a[m]=f});return a}function B(a){var d=a.indexOf(".");if(d!=-1){var c=a.substring(0,d)||"*",m=a.substring(d+1,a.length),f=[];q(document.getElementsByTagName(c),function(){this.className&&this.className.indexOf(m)!=-1&&f.push(this)});return f}}function I(a){a=a||window.event;if(a.preventDefault){a.stopPropagation();a.preventDefault()}else{a.returnValue=false;a.cancelBubble=true}return false}function z(a,d,c){a[d]=a[d]||[];a[d].push(c)}function A(){return"_"+(""+Math.random()).substring(2,
10)}function t(a,d,c){function m(){function g(j){!f.isLoaded()&&f._fireEvent("onBeforeClick")!==false&&f.load();return I(j)}if($f(a)){$f(a).getParent().innerHTML="";C=$f(a).getIndex();r[C]=f}else{r.push(f);C=r.length-1}L=parseInt(a.style.height,10)||a.clientHeight;if(typeof d=="string")d={src:d};u=a.id||"fp"+A();D=d.id||u+"_api";d.id=D;c.playerId=u;if(typeof c=="string")c={clip:{url:c}};if(typeof c.clip=="string")c.clip={url:c.clip};c.clip=c.clip||{};if(a.getAttribute("href",2)&&!c.clip.url)c.clip.url=
a.getAttribute("href",2);h=new e(c.clip,-1,f);c.playlist=c.playlist||[c.clip];var n=0;q(c.playlist,function(){var j=this;if(typeof j=="object"&&j.length)j={url:""+j};q(c.clip,function(p,x){if(x!==undefined&&j[p]===undefined&&typeof x!="function")j[p]=x});c.playlist[n]=j;j=new e(j,n,f);i.push(j);n++});q(c,function(j,p){if(typeof p=="function"){h[j]?h[j](p):z(s,j,p);delete c[j]}});q(c.plugins,function(j,p){if(p)o[j]=new l(j,p,f)});if(!c.plugins||c.plugins.controls===undefined)o.controls=new l("controls",
null,f);o.canvas=new l("canvas",null,f);d.bgcolor=d.bgcolor||"#000000";d.version=d.version||[9,0];d.expressInstall="http://www.flowplayer.org/swf/expressinstall.swf";y=a.innerHTML;if(y.replace(/\s/g,"")!=="")if(a.addEventListener)a.addEventListener("click",g,false);else a.attachEvent&&a.attachEvent("onclick",g);else{a.addEventListener&&a.addEventListener("click",I,false);f.load()}}var f=this,k=null,y,h,i=[],o={},s={},u,D,C,H,M,L;v(f,{id:function(){return u},isLoaded:function(){return k!==null},getParent:function(){return a},
hide:function(g){if(g)a.style.height="0px";if(k)k.style.height="0px";return f},show:function(){a.style.height=L+"px";if(k)k.style.height=M+"px";return f},isHidden:function(){return k&&parseInt(k.style.height,10)===0},load:function(g){if(!k&&f._fireEvent("onBeforeLoad")!==false){q(r,function(){this.unload()});if((y=a.innerHTML)&&!flashembed.isSupported(d.version))a.innerHTML="";flashembed(a,d,{config:c});if(g){g.cached=true;z(s,"onLoad",g)}}return f},unload:function(){if(y.replace(/\s/g,"")!==""){if(f._fireEvent("onBeforeUnload")===
false)return f;try{if(k){k.fp_close();f._fireEvent("onUnload")}}catch(g){}k=null;a.innerHTML=y}return f},getClip:function(g){if(g===undefined)g=H;return i[g]},getCommonClip:function(){return h},getPlaylist:function(){return i},getPlugin:function(g){var n=o[g];if(!n&&f.isLoaded()){var j=f._api().fp_getPlugin(g);if(j){n=new l(g,j,f);o[g]=n}}return n},getScreen:function(){return f.getPlugin("screen")},getControls:function(){return f.getPlugin("controls")},getConfig:function(g){return g?w(c):c},getFlashParams:function(){return d},
loadPlugin:function(g,n,j,p){if(typeof j=="function"){p=j;j={}}var x=p?A():"_";f._api().fp_loadPlugin(g,n,j,x);n={};n[x]=p;p=new l(g,null,f,n);return o[g]=p},getState:function(){return k?k.fp_getState():-1},play:function(g,n){function j(){g!==undefined?f._api().fp_play(g,n):f._api().fp_play()}k?j():f.load(function(){j()});return f},getVersion:function(){if(k){var g=k.fp_getVersion();g.push("flowplayer.js 3.1.4");return g}return"flowplayer.js 3.1.4"},_api:function(){if(!k)throw"Flowplayer "+f.id()+
" not loaded when calling an API method";return k},setClip:function(g){f.setPlaylist([g]);return f},getIndex:function(){return C}});q("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut".split(","),function(){var g="on"+this;if(g.indexOf("*")!=-1){g=g.substring(0,g.length-1);var n="onBefore"+g.substring(2);f[n]=function(j){z(s,n,j);return f}}f[g]=function(j){z(s,g,j);return f}});q("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed".split(","),
function(){var g=this;f[g]=function(n,j){if(!k)return f;var p=null;p=n!==undefined&&j!==undefined?k["fp_"+g](n,j):n===undefined?k["fp_"+g]():k["fp_"+g](n);return p==="undefined"||p===undefined?f:p}});f._fireEvent=function(g){if(typeof g=="string")g=[g];var n=g[0],j=g[1],p=g[2],x=g[3],E=0;c.debug&&J(g);if(!k&&n=="onLoad"&&j=="player"){k=k||G(D);M=k.clientHeight;q(i,function(){this._fireEvent("onLoad")});q(o,function(N,K){K._fireEvent("onUpdate")});h._fireEvent("onLoad")}if(!(n=="onLoad"&&j!="player")){if(n==
"onError")if(typeof j=="string"||typeof j=="number"&&typeof p=="number"){j=p;p=x}if(n=="onContextMenu")q(c.contextMenu[j],function(N,K){K.call(f)});else if(n=="onPluginEvent"){if(x=o[j.name||j]){x._fireEvent("onUpdate",j);x._fireEvent(p,g.slice(3))}}else{if(n=="onPlaylistReplace"){i=[];var O=0;q(j,function(){i.push(new e(this,O++,f))})}if(n=="onClipAdd"){if(j.isInStream)return;j=new e(j,p,f);i.splice(p,0,j);for(E=p+1;E<i.length;E++)i[E].index++}var F=true;if(typeof j=="number"&&j<i.length){H=j;if(g=
i[j])F=g._fireEvent(n,p,x);if(!g||F!==false)F=h._fireEvent(n,p,x,g)}q(s[n],function(){F=this.call(f,j,p);this.cached&&s[n].splice(E,1);if(F===false)return false;E++});return F}}};typeof a=="string"?flashembed.domReady(function(){var g=G(a);if(g){a=g;m()}else throw"Flowplayer cannot access element: "+a;}):m()}function b(a){this.length=a.length;this.each=function(d){q(a,d)};this.size=function(){return a.length}}var e=function(a,d,c){var m=this,f={},k={};m.index=d;if(typeof a=="string")a={url:a};v(this,
a,true);q("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop".split(","),function(){var h="on"+this;if(h.indexOf("*")!=-1){h=h.substring(0,h.length-1);var i="onBefore"+h.substring(2);m[i]=function(o){z(k,i,o);return m}}m[h]=function(o){z(k,h,o);return m};if(d==-1){if(m[i])c[i]=m[i];if(m[h])c[h]=m[h]}});v(this,{onCuepoint:function(h,i){if(arguments.length==1){f.embedded=[null,h];return m}if(typeof h=="number")h=[h];var o=A();f[o]=[h,i];c.isLoaded()&&
c._api().fp_addCuepoints(h,d,o);return m},update:function(h){v(m,h);c.isLoaded()&&c._api().fp_updateClip(h,d);var i=c.getConfig();v(d==-1?i.clip:i.playlist[d],h,true)},_fireEvent:function(h,i,o,s){if(h=="onLoad"){q(f,function(C,H){H[0]&&c._api().fp_addCuepoints(H[0],d,C)});return false}s=s||m;if(h=="onCuepoint"){var u=f[i];if(u)return u[1].call(c,s,o)}if(i&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(h)!=-1){v(s,i);if(i.metaData)if(s.duration)s.fullDuration=i.metaData.duration;else s.duration=
i.metaData.duration}var D=true;q(k[h],function(){D=this.call(c,s,i,o)});return D}});if(a.onCuepoint){var y=a.onCuepoint;m.onCuepoint.apply(m,typeof y=="function"?[y]:y);delete a.onCuepoint}q(a,function(h,i){if(typeof i=="function"){z(k,h,i);delete a[h]}});if(d==-1)c.onCuepoint=this.onCuepoint},l=function(a,d,c,m){var f={},k=this,y=false;m&&v(f,m);q(d,function(h,i){if(typeof i=="function"){f[h]=i;delete d[h]}});v(this,{animate:function(h,i,o){if(!h)return k;if(typeof i=="function"){o=i;i=500}if(typeof h==
"string"){var s=h;h={};h[s]=i;i=500}if(o){var u=A();f[u]=o}if(i===undefined)i=500;d=c._api().fp_animate(a,h,i,u);return k},css:function(h,i){if(i!==undefined){var o={};o[h]=i;h=o}d=c._api().fp_css(a,h);v(k,d);return k},show:function(){this.display="block";c._api().fp_showPlugin(a);return k},hide:function(){this.display="none";c._api().fp_hidePlugin(a);return k},toggle:function(){this.display=c._api().fp_togglePlugin(a);return k},fadeTo:function(h,i,o){if(typeof i=="function"){o=i;i=500}if(o){var s=
A();f[s]=o}this.display=c._api().fp_fadeTo(a,h,i,s);this.opacity=h;return k},fadeIn:function(h,i){return k.fadeTo(1,h,i)},fadeOut:function(h,i){return k.fadeTo(0,h,i)},getName:function(){return a},getPlayer:function(){return c},_fireEvent:function(h,i){if(h=="onUpdate"){var o=c._api().fp_getPlugin(a);if(!o)return;v(k,o);delete k.methods;if(!y){q(o.methods,function(){var s=""+this;k[s]=function(){var u=[].slice.call(arguments);u=c._api().fp_invoke(a,s,u);return u==="undefined"||u===undefined?k:u}});
y=true}}if(o=f[h]){o.apply(k,i);h.substring(0,1)=="_"&&delete f[h]}}})},r=[];window.flowplayer=window.$f=function(){var a=null,d=arguments[0];if(!arguments.length){q(r,function(){if(this.isLoaded()){a=this;return false}});return a||r[0]}if(arguments.length==1)if(typeof d=="number")return r[d];else{if(d=="*")return new b(r);q(r,function(){if(this.id()==d.id||this.id()==d||this.getParent()==d){a=this;return false}});return a}if(arguments.length>1){var c=arguments[1],m=arguments.length==3?arguments[2]:
{};if(typeof d=="string")if(d.indexOf(".")!=-1){var f=[];q(B(d),function(){f.push(new t(this,w(c),w(m)))});return new b(f)}else{var k=G(d);return new t(k!==null?k:d,c,m)}else if(d)return new t(d,c,m)}return null};v(window.$f,{fireEvent:function(){var a=[].slice.call(arguments),d=$f(a[0]);return d?d._fireEvent(a.slice(1)):null},addPlugin:function(a,d){t.prototype[a]=d;return $f},each:q,extend:v});if(typeof jQuery=="function")jQuery.prototype.flowplayer=function(a,d){if(!arguments.length||typeof arguments[0]==
"number"){var c=[];this.each(function(){var m=$f(this);m&&c.push(m)});return arguments.length?c[arguments[0]]:new b(c)}return this.each(function(){$f(this,w(a),d?w(d):{})})}})();
(function(){function J(){if(t.done)return false;var b=document;if(b&&b.getElementsByTagName&&b.getElementById&&b.body){clearInterval(t.timer);t.timer=null;for(b=0;b<t.ready.length;b++)t.ready[b].call();t.ready=null;t.done=true}}function w(b,e){if(e)for(key in e)if(e.hasOwnProperty(key))b[key]=e[key];return b}function q(b){switch(G(b)){case "string":b=b.replace(new RegExp('(["\\\\])',"g"),"\\$1");b=b.replace(/^\s?(\d+)%/,"$1pct");return'"'+b+'"';case "array":return"["+v(b,function(r){return q(r)}).join(",")+
"]";case "function":return'"function()"';case "object":var e=[];for(var l in b)b.hasOwnProperty(l)&&e.push('"'+l+'":'+q(b[l]));return"{"+e.join(",")+"}"}return String(b).replace(/\s/g," ").replace(/\'/g,'"')}function G(b){if(b===null||b===undefined)return false;var e=typeof b;return e=="object"&&b.push?"array":e}function v(b,e){var l=[];for(var r in b)if(b.hasOwnProperty(r))l[r]=e(b[r]);return l}function B(b,e){var l=w({},b),r=document.all;b='<object width="'+l.width+'" height="'+l.height+'"';if(r&&
!l.id)l.id="_"+(""+Math.random()).substring(9);if(l.id)b+=' id="'+l.id+'"';if(l.cachebusting)l.src+=(l.src.indexOf("?")!=-1?"&":"?")+Math.random();b+=l.w3c||!r?' data="'+l.src+'" type="application/x-shockwave-flash"':' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';b+=">";if(l.w3c||r)b+='<param name="movie" value="'+l.src+'" />';l.width=l.height=l.id=l.w3c=l.src=null;for(var a in l)if(l[a]!==null)b+='<param name="'+a+'" value="'+l[a]+'" />';a="";if(e){for(var d in e)if(e[d]!==null)a+=d+"="+
(typeof e[d]=="object"?q(e[d]):e[d])+"&";a=a.substring(0,a.length-1);b+='<param name="flashvars" value=\''+a+"' />"}b+="</object>";return b}function I(b,e,l){var r=flashembed.getVersion();w(this,{getContainer:function(){return b},getConf:function(){return e},getVersion:function(){return r},getFlashvars:function(){return l},getApi:function(){return b.firstChild},getHTML:function(){return B(e,l)}});var a=e.version,d=e.expressInstall,c=!a||flashembed.isSupported(a);if(c){e.onFail=e.version=e.expressInstall=
null;b.innerHTML=B(e,l)}else if(a&&d&&flashembed.isSupported([6,65])){w(e,{src:d});l={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title};b.innerHTML=B(e,l)}else if(b.innerHTML.replace(/\s/g,"")===""){b.innerHTML="<h2>Flash version "+a+" or greater is required</h2><h3>"+(r[0]>0?"Your version is "+r:"You have no flash plugin installed")+"</h3>"+(b.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='http://www.adobe.com/go/getflashplayer'>here</a></p>");
if(b.tagName=="A")b.onclick=function(){location.href="http://www.adobe.com/go/getflashplayer"}}if(!c&&e.onFail){a=e.onFail.call(this);if(typeof a=="string")b.innerHTML=a}if(document.all)window[e.id]=document.getElementById(e.id)}var z=typeof jQuery=="function",A={width:"100%",height:"100%",allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:null,onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(z){jQuery.tools=jQuery.tools||{};jQuery.tools.flashembed={version:"1.0.4",
conf:A}}var t=z?jQuery:function(b){if(t.done)return b();if(t.timer)t.ready.push(b);else{t.ready=[b];t.timer=setInterval(J,13)}};window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}});window.flashembed=function(b,e,l){if(typeof b=="string"){var r=document.getElementById(b);if(r)b=r;else{t(function(){flashembed(b,e,l)});return}}if(b){if(typeof e=="string")e={src:e};r=w({},A);w(r,e);return new I(b,r,l)}};w(window.flashembed,
{getVersion:function(){var b=[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var e=navigator.plugins["Shockwave Flash"].description;if(typeof e!="undefined"){e=e.replace(/^.*\s+(\S+\s+\S+$)/,"$1");b=parseInt(e.replace(/^(.*)\..*$/,"$1"),10);e=/r/.test(e)?parseInt(e.replace(/^.*r(.*)$/,"$1"),10):0;b=[b,e]}}else if(window.ActiveXObject){try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(l){try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");b=
[6,0];e.AllowScriptAccess="always"}catch(r){if(b[0]==6)return b}try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(a){}}if(typeof e=="object"){e=e.GetVariable("$version");if(typeof e!="undefined"){e=e.replace(/^\S+\s+(.*)$/,"$1").split(",");b=[parseInt(e[0],10),parseInt(e[2],10)]}}}return b},isSupported:function(b){var e=flashembed.getVersion();return e[0]>b[0]||e[0]==b[0]&&e[1]>=b[1]},domReady:t,asString:q,getHTML:B});if(z)jQuery.fn.flashembed=function(b,e){var l=null;this.each(function(){l=
flashembed(this,b,e)});return b.api===false?this:l}})();
var iwin=window.iwin||{};iwin.facebook=iwin.facebook||{};iwin.facebook.sdk=iwin.facebook.sdk||{};iwin.facebook.sdk.xfbml={};iwin.facebook.sdk.plugin={};if(typeof iWinSiteFacebookAppId==="undefined")console.error("No facebook app id specified");else iwin.facebook.sdk.appId=iWinSiteFacebookAppId;iwin.facebook.sdk.initCalled=false;iwin.facebook.sdk.initialized=false;
iwin.facebook.sdk.init=function(){if(!iwin.facebook.sdk.initCalled){iwin.facebook.sdk.initCalled=true;if(window.FB){FB.init({appId:iwin.facebook.sdk.appId,status:true,cookie:true,xfbml:false});$J(document).trigger("iwin:facebook:sdk:ready");iwin.facebook.sdk.initialized=true}}};iwin.facebook.sdk.xfbml.parse=function(a){if(window.FB&&window.FB.XFBML&&window.FB.XFBML.parse){if(a&&a.data)a=a.data.element;if(typeof a==="string")a=document.getElementById(a);a?window.FB.XFBML.parse(a):window.FB.XFBML.parse()}};
iwin.facebook.sdk.plugin.likeButton=function(a,j){var h;if(!a)return false;a=$J(a);if(a.has("iframe").length)return false;h=$J(document.createElement("fb:like"));j&&h.attr(j);a.append(h);iwin.facebook.sdk.plugin.parse(a.get(0))};iwin.facebook.sdk.plugin.parse=function(a){if(iwin.facebook.sdk.initialized||window.FB)iwin.facebook.sdk.xfbml.parse(a);else{$J(document).bind("iwin:facebook:sdk:ready",{element:a},iwin.facebook.sdk.xfbml.parse);iwin.facebook.sdk.init()}};
iwin.facebook.sdk.plugin.mergeAccount=function(){!iwin.Util.readCookie("FBMergePopupClosed")&&window.FB&&FB.getLoginStatus(function(a){a.authResponse||$J.getJSON("/auth/fb-merge-popup",function(j){j&&j.enabled===true&&$J.getJSON("/auth/users/iw/"+iwin.Auth.getCurrentUsername(),function(h){if(!h.facebookId){h=new iwin.Util.PopupRounded({content:$J("#fbMergeAccountContent"),title:"Connect Your Account",id:"fbMergeAccountPopup",useOverlay:true,isModal:true,closeAnywhere:false});h.onClose=function(){iwin.Util.createCookie("FBMergePopupClosed",
true,4)};h.onOpen=function(){$J("#fbMergeUsername").text(iwin.Auth.getCurrentUsername());$J(".altClose").click($J.proxy(function(n){n.preventDefault();this.close()},this))};h.open()}})})})};
iwin.facebook.sdk.plugin.connect=function(a,j){var h,n,o,p;if(!window.FB){console.error("[iwin.facebook.sdk.plugin.connect] FB lib not loaded.");return false}h=function(f){FB.getLoginStatus(function(d){d.authResponse?f(d.authResponse.uid):FB.login(function(e){e.authResponse?f(e.authResponse.uid):console.log("cancelled")},{scope:j})})};p=function(f,d,e){var k,g;g=function(b,c){$J.ajax({url:"/auth/users",dataType:"json",contentType:"application/json",type:"POST",data:Object.toJSON({email:"iwinregval@iwin.com",
password:"notprovided",username:b,validateOnly:true}),success:function(){c(true)},error:function(){c()}})};k=function(b){if(d.first_name&&d.last_name){var c=d.first_name+"_"+d.last_name;c.length<200?g(c,function(i){i?b(c):b()}):b()}else b()};(function(b){FB.Data.query("select username from user where uid={0}",d.id).wait(function(c){c[0]&&c[0].username?g(c[0].username,function(i){i?b(c[0].username):b()}):b()})})(function(b){b?e(b):k(function(c){c?e(c):e(f.id)})})};n=function(){FB.api("/me",function(f){var d=
f.id,e=f.email,k=Object.toJSON({facebookId:d,email:e});$J.ajax({url:"/auth/users",dataType:"json",contentType:"application/json",type:"POST",data:k,complete:function(g){if(g.status===400&&g.responseText.indexOf("EMAIL_TAKEN")!==-1){console.log("errors with sign-up");g=$J(".authError,#crtacc_form .error-info");g.text(iwin.AuthUI.messages[iwin.Auth.errors.register.EMAIL_TAKEN]);g.showObj();iwin.AuthUI.redraw();FB.logout()}else $J.getJSON("/auth/users/fb/"+d,function(b,c,i){p(b,f,function(m){b.username=
m;if(!b.email)b.email=e;if(i.status===200)$J.ajax({url:"/auth/users/fb/"+d+"?_method=PUT",dataType:"json",contentType:"application/json",type:"POST",data:Object.toJSON(b),success:function(){console.log("should be logged in as "+m);iwin.Auth.autologin();iwin.Util.PopupRounded.hideAll()},error:function(l){if(l.status===400&&l.responseText.indexOf("EMAIL_TAKEN")!==-1){console.log("errors with identity update");l=$J(".authError,#crtacc_form .error-info");l.text(iwin.AuthUI.messages[iwin.Auth.errors.register.EMAIL_TAKEN]);
l.showObj();iwin.AuthUI.redraw();FB.logout()}}});else i.status===204&&console.log("204 response")})})}})})};o=function(f){f.preventDefault();iwin.Auth.isLoggedIn()?FB.getLoginStatus(function(d){if(d.authResponse)iwin.Auth.autologin(true);else{var e=iwin.Auth.getCurrentUsername();h(function(k){k&&e&&$J.getJSON("/auth/users/iw/"+e,function(g,b,c){console.log(g);console.log(c);if(c.status===200){g.facebookId=k;$J.ajax({url:"/auth/users/iw/"+e+"?_method=PUT",dataType:"json",contentType:"application/json",
type:"POST",data:Object.toJSON(g),success:function(){console.log("should be logged in 2");iwin.Auth.autologin();iwin.Util.PopupRounded.hideAll()},error:function(i){if(i.status===400&&i.responseText.indexOf("FB_ID_TAKEN")!==-1){var m,l=$J("#fbMergeAccountContent");$J.getJSON("/auth/users/fb/"+k,function(q){m=q.username?'<h3>Sign in failed.</h3><p>This Facebook account is already in use. Please sign in using your iWin.com account. If you believe this is an error please contact <a href="http://support.iwin.com/">customer support</a>.</p>':
"<h3>Sign in failed.</h3><p>We could not authenticate your Facebook account at this time. Please sign in using your iWin.com account. We apologize for any inconvenience.</p>";l.html(m);FB.logout()})}}})}else c.status===204&&console.log("204 response")})})}}):FB.login(function(d){if(d.authResponse){console.log("permissions granted");iwin.Auth.autologin(false,function(e){e||n()})}else console.log("permission denied")},{scope:j})};FB.getLoginStatus(function(f){if(f.authResponse){console.log(f);if(!iwin.Auth.isLoggedIn()){console.log("logged in with FB, not iWin");
iwin.Auth.autologin()}}else if(iwin.Auth.isLoggedIn()){console.log("logged in with iwin, not fb");iwin.facebook.sdk.plugin.mergeAccount()}a=$J(a);a.unbind("click").click(o)})};
var iwin=window.iwin||{};iwin.trialpay={};iwin.trialpay.init=function(){iwin.Auth.getCurrentUsername()&&iwin.Util.getUserSubscription(iwin.trialpay.success)};
iwin.trialpay.success=function(a){$J.getJSON("/trialpay/offer-popup",function(b){if(b&&b.enabled===true)if(a)iwin.trialpay.showDealspot(a);else{b="/auth/users/iw/"+iwin.Auth.getCurrentUsername();$J.ajax({type:"GET",url:b,dataType:"json",success:iwin.trialpay.showDealspot,error:function(c){if(c.status===500||c.status===503)try{var d=$J(c.responseXML).find("conversion-status");if(d&&d.attr("self"))window.location.href=d.attr("self");else console.error("Error: "+c.responseText)}catch(f){console.error("Error: "+
c.responseText)}console.error("Error: "+c.responseText)}})}})};
iwin.trialpay.showDealspot=function(a){var b,c,d,f,e=false;c=a.state;d=a.features;if(c==="ACTIVE")for(b in d)if(d[b].keyword==="iCoins")e=true;b="";if(a.userId)b=a.userId;else if(a.id)b=a.id;a='<div id="dealspotPopupCode" class="hideObj"><a href="#" class="link"><img src="/images/trialpay/mothers_day_2011_2.jpg" alt="Mother\'s Day - Buy flowers for Mother\'s Day and get Jewel Quest: Mysteries" width="526" height="271"/></a></div>';c=trialPayFreeGameOfferwallUrl.replace("%user_id%",b);if(e){a='<div id="dealspotPopupCode" class="hideObj"><a href="#" class="link"><img src="/images/trialpay/mothers_day_2011_1.jpg" alt="Mother\'s Day - Buy flowers for Mother\'s Day and earn 2000 iCoins" width="526" height="271"/></a></div>';
c=trialPayICoinsOfferwallUrl.replace("%user_id%",b)}f='<div id="trialPayPopupCode" class="hideObj"><iframe width="760" height="400" scrolling="auto" frameborder="0" style="border: 1px none white;" src="'+c+'"></iframe></div>';if(a&&f){$J("body").find("#dealspotPopupCode,#trialPayPopupCode").remove();$J("body").append(a);e=new iwin.Util.PopupRounded({content:$J("#dealspotPopupCode"),title:"Mothers Day Promotion",id:"dealspotPopup",useOverlay:true,isModal:false,closeAnywhere:false});e.open=function(){if(!this.inDOM){$J(this.id).remove();
$J(this.container).find(".popupContent").removeClass("curvyRedraw").siblings(".popupOutline").remove().end().find(".title").remove().end().find(".content").removeClass(".curvyRedraw").css("padding",0).css("background","none");$J("body").append(this.container);this.inDOM=true;this.onCreate()}this.container.children(".popupOutline").css("opacity",0.5);if(!this.overlayInDOM){$J("body").append(this.overlay);this.overlayInDOM=true}this.useOverlay?this.overlay.stop().fadeTo(500,0.8):this.overlay.fadeOut(500);
this.container.showObj();this.content.showObj();this.position();this.isOpen=true;this.container.find("#dealspotPopupCode a.link").click(function(){$J("body").append(f);(new iwin.Util.PopupRounded({content:$J("#trialPayPopupCode"),title:"Mother's Day promotion",id:"trialPayPopup",useOverlay:true,isModal:false,closeAnywhere:false})).open();return false})};e.open()}};
iwin.trialpay.showOfferwall=function(a){if(a)iwin.trialpay.displayOfferwall(a);else{a="/auth/users/iw/"+iwin.Auth.getCurrentUsername();$J.ajax({type:"GET",url:a,dataType:"json",success:iwin.trialpay.displayOfferwall,error:function(b){if(b.status===500||b.status===503)try{var c=$J(b.responseXML).find("conversion-status");if(c&&c.attr("self"))window.location.href=c.attr("self");else console.error("Error: "+b.responseText)}catch(d){console.error("Error: "+b.responseText)}console.error("Error: "+b.responseText)}})}};
iwin.trialpay.displayOfferwall=function(a){var b,c,d;c=a.state;d=a.features;if(c==="ACTIVE")for(b in d);b="";if(a.userId)b=a.userId;else if(a.id)b=a.id;if(a='<div id="trialPayPopupCode" class="hideObj"><iframe width="760" height="400" scrolling="auto" frameborder="0" style="border: 1px none white;" src="'+trialPayICoinsOfferwallUrl.replace("%user_id%",b)+'"></iframe></div>'){$J("body").find("#trialPayPopupCode").remove();$J("body").append(a);(new iwin.Util.PopupRounded({content:$J("#trialPayPopupCode"),
title:"New ways to get more iCoins",id:"trialPayPopup",useOverlay:true,isModal:false,closeAnywhere:false})).open()}};Event.observe(document,"iwin:auth:login:success",iwin.trialpay.init);
var iwin=window.iwin||{};iwin.clogs=iwin.clogs||{};iwin.clogs.event={};iwin.clogs.pageLoadTimeStamp=iwin.clogs.pageLoadTimeStamp||(new Date).getTime();
iwin.clogs.getUserIds=function(d){if(iwin.Auth&&iwin.Auth.isLoggedIn())$J.getJSON("/auth/users/iw/"+iwin.Auth.getCurrentUsername(),function(a,e,c){if(c.status===200){e="";e+=a.id?"/"+a.id:"/anonymous";e+=a.facebookId?"/"+a.facebookId:"/anonymous";d(e)}else d()});else if(window.FB){var g;FB.getLoginStatus(function(a){g=true;a.session?d("/anonymous/"+a.session.uid):d()});window.setTimeout(function(){g||d("/anonymous/no-response")},3E3)}else d()};
iwin.clogs.event=function(d){var g,a,e,c,h,b,f;g=$J.client.browser;a=$J.client.browserVersion;e=$J.client.os;c="undefined";if(window.swfobject){c=swfobject.getFlashPlayerVersion();c=c.major+"."+c.minor+"."+c.release}h="false";iwin.Util.createCookie("clogtest","true");if(iwin.Util.readCookie("clogtest")){h="true";iwin.Util.destroyCookie("clogtest")}b="";b+="/clogs/"+encodeURI(d);b+="/"+g+"-"+a;b+="/"+e;b+="/"+c;b+="/"+h;iwin.clogs.getUserIds(function(i){b+=i?i:"/anonymous/anonymous";b+="/"+((new Date).getTime()-
iwin.clogs.pageLoadTimeStamp);f=window.location.protocol+"//";f+=window.location.hostname;f+=window.location.pathname;window.console&&window.console.log&&console.log(f+b);f+=b;if(window.location.search)f+=window.location.search;$J.post(f)})};
if(meeboSwitch==="1"&&window.location.protocol==="http:"){window.Meebo||function(c){function p(){return["<",i,' onload="var d=',g,";d.getElementsByTagName('head')[0].",j,"(d.",h,"('script')).",k,"='//cim.meebo.com/cim?iv=",a.v,"&",q,"=",c[q],c[l]?"&"+l+"="+c[l]:"",c[e]?"&"+e+"="+c[e]:"","'\"></",i,">"].join("")}var f=window,a=f.Meebo=f.Meebo||function(){(a._=a._||[]).push(arguments)},d=document,i="body",m=d[i],r;if(!m){r=arguments.callee;return setTimeout(function(){r(c)},100)}a.$={0:+new Date};a.T=
function(u){a.$[u]=new Date-a.$[0]};a.v=5;var j="appendChild",h="createElement",k="src",l="lang",q="network",e="domain",n=d[h]("div"),v=n[j](d[h]("m")),b=d[h]("iframe"),g="document",o,s=function(){a.T("load");a("load")};f.addEventListener?f.addEventListener("load",s,false):f.attachEvent("onload",s);n.style.display="none";m.insertBefore(n,m.firstChild).id="meebo";b.frameBorder="0";b.name=b.id="meebo-iframe";b.allowTransparency="true";v[j](b);try{b.contentWindow[g].open()}catch(w){c[e]=d[e];o="javascript:var d="+
g+".open();d.domain='"+d.domain+"';";b[k]=o+"void(0);"}try{var t=b.contentWindow[g];t.write(p());t.close()}catch(x){b[k]=o+'d.write("'+p().replace(/"/g,'\\"')+'");d.close();'}a.T(1)}({network:"iwin"});Meebo.disableSharePageButton=true}$J(document).ready(function(){meeboSwitch==="1"&&window.location.protocol==="http:"&&Meebo("domReady")});
var Prototip={Version:"2.1.0.1"},Tips={options:{images:"/scripts/prototip-2.1.0.1/images/prototip/",zIndex:6E3}};Prototip.Styles={"default":{border:9,borderColor:"#0065c1",className:"iWin",closeButton:false,hideAfter:false,hideOn:"mouseleave",hook:false,images:"styles/iWin/",radius:6,showOn:"mousemove",width:"auto",offset:{x:0,y:14},stem:{position:"topLeft",height:12,width:15}},iWin:{className:"iWin",border:9,borderColor:"#0065c1",radius:6,stem:{height:12,width:15}}};
eval(function(e,f,a,d,c,g){c=function(b){return(b<f?"":c(parseInt(b/f)))+((b%=f)>35?String.fromCharCode(b+29):b.toString(36))};if(!"".replace(/^/,String)){for(;a--;)g[c(a)]=d[a]||c(a);d=[function(b){return g[b]}];c=function(){return"\\w+"};a=1}for(;a--;)if(d[a])e=e.replace(new RegExp("\\b"+c(a)+"\\b","g"),d[a]);return e}('N.Y(U,{4n:"1.6.0.3",2M:{26:!!10.4o("26").3r},3s:q(){9.3t("27");p(/^(4p?:\\/\\/|\\/)/.4q(s.o.V)){s.V=s.o.V}11{r a=/1G(?:-[\\w\\d.]+)?\\.4r(.*)/;s.V=(($$("4s[28]").3u(q(b){M b.28.29(a)})||{}).28||"").2N(a,"")+s.o.V}p(!9.2M.26){p(10.4t>=8&&!10.3v.2j){10.3v.2O("2j","4u:4v-4w-4x:4y","#2k#3w")}11{10.1c("3x:2P",q(){10.4z().4A("2j\\\\:*","4B: 2Q(#2k#3w);")})}}s.2l();I.1c(2R,"2S",9.2S)},3t:q(a){p((4C 2R[a]=="4D")||(9.2T(2R[a].4E)<9.2T(9["3y"+a]))){3z("U 4F "+a+" >= "+9["3y"+a]);}},2T:q(a){r b=a.2N(/3A.*|\\./g,"");b=4G(b+"0".4H(4-b.2U));M a.4I("3A")>-1?b-1:b},4J:$w("3B 4K"),1S:q(a){p(27.2V.3C){M a}a=a.2m(q(f,d){r b=N.2n(9)?9:9.C,c=d.4L;4M(c&&c!=b){4N{c=c.4O}4P(g){c=b}}p(c==b){M}f(d)});M a},2W:q(a){M(a>0)?(-1*a):(a).4Q()},2S:q(){s.3D()}});N.Y(s,{1A:[],13:[],2l:q(){9.2o=9.1o},1m:(q(a){M{1i:(a?"1T":"1i"),15:(a?"1H":"15"),1T:(a?"1T":"1i"),1H:(a?"1H":"15")}})(27.2V.3C),3E:{1i:"1i",15:"15",1T:"1i",1H:"15"},2a:{D:"2X",2X:"D",v:"1p",1p:"v",1U:"1U",1d:"1f",1f:"1d"},3F:{H:"1d",G:"1f"},2Y:q(a){M!!1V[1]?9.2a[a]:a},1j:(q(b){r a=J 4R("4S ([\\\\d.]+)").4T(b);M a?(3G(a[1])<7):X})(4U.4V),2Z:(27.2V.4W&&!10.4X),2O:q(a){9.1A.2p(a)},1B:q(a){r b=9.1A.3u(q(c){M c.C==$(a)});p(b){b.3H();p(b.17){b.F.1B();p(s.1j){b.1q.1B()}}9.1A=9.1A.3I(b)}a.1G=2b},3D:q(){9.1A.30(q(a){9.1B(a.C)}.1g(9))},2q:q(c){p(c==9.3J){M}p(9.13.2U===0){9.2o=9.o.1o;31(r b=0,a=9.1A.2U;b<a;b++){9.1A[b].F.u({1o:9.o.1o})}}c.F.u({1o:9.2o++});p(c.R){c.R.u({1o:9.2o})}9.3J=c},3K:q(a){9.32(a);9.13.2p(a)},32:q(a){9.13=9.13.3I(a)},3L:q(){s.13.1I("T")},W:q(b,f){b=$(b),f=$(f);r k=N.Y({1e:{x:0,y:0},O:X},1V[2]||{});r d=k.1u||f.2r();d.D+=k.1e.x;d.v+=k.1e.y;r c=k.1u?[0,0]:f.3M(),a=10.1C.2s(),g=k.1u?"1W":"18";d.D+=(-1*(c[0]-a[0]));d.v+=(-1*(c[1]-a[1]));p(k.1u){r e=[0,0];e.H=0;e.G=0}r i={C:b.1X()},j={C:N.2c(d)};i[g]=k.1u?e:f.1X();j[g]=N.2c(d);31(r h 3N j){3O(k[h]){S"4Y":S"4Z":j[h].D+=i[h].H;19;S"51":j[h].D+=(i[h].H/2);19;S"52":j[h].D+=i[h].H;j[h].v+=(i[h].G/2);19;S"53":S"54":j[h].v+=i[h].G;19;S"55":S"56":j[h].D+=i[h].H;j[h].v+=i[h].G;19;S"57":j[h].D+=(i[h].H/2);j[h].v+=i[h].G;19;S"58":j[h].v+=(i[h].G/2);19}}d.D+=-1*(j.C.D-j[g].D);d.v+=-1*(j.C.v-j[g].v);p(k.O){b.u({D:d.D+"B",v:d.v+"B"})}M d}});s.2l();r 59=5a.3P({2l:q(c,e){9.C=$(c);p(!9.C){3z("U: I 5b 5c, 5d 3P a 17.");M}s.1B(9.C);r a=(N.2t(e)||N.2n(e)),b=a?1V[2]||[]:e;9.1r=a?e:2b;p(b.1Y){b=N.Y(N.2c(U.33[b.1Y]),b)}9.o=N.Y(N.Y({1k:X,1h:0,34:"#5e",1n:0,K:s.o.K,1a:s.o.5f,1v:!(b.1b&&b.1b=="1Z")?0.14:X,1D:X,1w:"1H",3Q:X,W:b.W,1e:b.W?{x:0,y:0}:{x:16,y:16},1J:(b.W&&!b.W.1u)?1l:X,1b:"2u",E:X,1Y:"2k",18:9.C,12:X,1C:(b.W&&!b.W.1u)?X:1l,H:X},U.33["2k"]),b);9.18=$(9.o.18);9.1n=9.o.1n;9.1h=(9.1n>9.o.1h)?9.1n:9.o.1h;p(9.o.V){9.V=9.o.V.35("://")?9.o.V:s.V+9.o.V}11{9.V=s.V+"5g/"+(9.o.1Y||"")+"/"}p(!9.V.5h("/")){9.V+="/"}p(N.2t(9.o.E)){9.o.E={O:9.o.E}}p(9.o.E.O){9.o.E=N.Y(N.2c(U.33[9.o.1Y].E)||{},9.o.E);9.o.E.O=[9.o.E.O.29(/[a-z]+/)[0].2e(),9.o.E.O.29(/[A-Z][a-z]+/)[0].2e()];9.o.E.1E=["D","2X"].3R(9.o.E.O[0])?"1d":"1f";9.1s={1d:X,1f:X}}p(9.o.1k){9.o.1k.o=N.Y({36:27.5i},9.o.1k.o||{})}9.1m=$w("5j 3B").3R(9.C.5k.2e())?s.3E:s.1m;p(9.o.W.1u){r d=9.o.W.1t.29(/[a-z]+/)[0].2e();9.1W=s.2a[d]+s.2a[9.o.W.1t.29(/[A-Z][a-z]+/)[0].2e()].2v()}9.3S=(s.2Z&&9.1n);9.3T();s.2O(9);9.3U();U.Y(9)},3T:q(){9.F=J I("Q",{K:"1G"}).u({1o:s.o.1o});p(9.3S){9.F.T=q(){9.u("D:-3V;v:-3V;1K:2w;");M 9};9.F.P=q(){9.u("1K:13");M 9};9.F.13=q(){M(9.37("1K")=="13"&&3G(9.37("v").2N("B",""))>-5l)}}9.F.T();p(s.1j){9.1q=J I("5m",{K:"1q",28:"5n:X;",5o:0}).u({2x:"2f",1o:s.o.1o-1,5p:0})}p(9.o.1k){9.20=9.20.2m(9.38)}9.1t=J I("Q",{K:"1r"});9.12=J I("Q",{K:"12"}).T();p(9.o.1a||(9.o.1w.C&&9.o.1w.C=="1a")){9.1a=J I("Q",{K:"2g"}).21(9.V+"2g.2y")}},2z:q(){p(10.2P){9.39();9.3W=1l;M 1l}11{p(!9.3W){10.1c("3x:2P",9.39);M X}}},39:q(){$(10.3a).L(9.F);p(s.1j){$(10.3a).L(9.1q)}p(9.o.1k){$(10.3a).L(9.R=J I("Q",{K:"5q"}).21(9.V+"R.5r").T())}r g="F";p(9.o.E.O){9.E=J I("Q",{K:"5s"}).u({G:9.o.E[9.o.E.1E=="1f"?"G":"H"]+"B"});r b=9.o.E.1E=="1d";9[g].L(9.3b=J I("Q",{K:"5t 2A"}).L(9.3X=J I("Q",{K:"5u 2A"})));9.E.L(9.1L=J I("Q",{K:"5v"}).u({G:9.o.E[b?"H":"G"]+"B",H:9.o.E[b?"G":"H"]+"B"}));p(s.1j&&!9.o.E.O[1].3Y().35("5w")){9.1L.u({2x:"5x"})}g="3X"}p(9.1h){r d=9.1h,f;9[g].L(9.22=J I("5y",{K:"22"}).L(9.23=J I("3c",{K:"23 3d"}).u("G: "+d+"B").L(J I("Q",{K:"2B 5z"}).L(J I("Q",{K:"24"}))).L(f=J I("Q",{K:"5A"}).u({G:d+"B"}).L(J I("Q",{K:"3Z"}).u({1x:"0 "+d+"B",G:d+"B"}))).L(J I("Q",{K:"2B 5B"}).L(J I("Q",{K:"24"})))).L(9.3e=J I("3c",{K:"3e 3d"}).L(9.3f=J I("Q",{K:"3f"}).u("2C: 0 "+d+"B"))).L(9.40=J I("3c",{K:"40 3d"}).u("G: "+d+"B").L(J I("Q",{K:"2B 5C"}).L(J I("Q",{K:"24"}))).L(f.5D(1l)).L(J I("Q",{K:"2B 5E"}).L(J I("Q",{K:"24"})))));g="3f";r c=9.22.3g(".24");$w("5F 5G 5H 5I").30(q(j,h){p(9.1n>0){U.41(c[h],j,{1M:9.o.34,1h:d,1n:9.o.1n})}11{c[h].2D("42")}c[h].u({H:d+"B",G:d+"B"}).2D("24"+j.2v())}.1g(9));9.22.3g(".3Z",".3e",".42").1I("u",{1M:9.o.34})}9[g].L(9.17=J I("Q",{K:"17 "+9.o.K}).L(9.25=J I("Q",{K:"25"}).L(9.12)));p(9.o.H){r e=9.o.H;p(N.5J(e)){e+="B"}9.17.u("H:"+e)}p(9.E){r a={};a[9.o.E.1E=="1d"?"v":"1p"]=9.E;9.F.L(a);9.2h()}9.17.L(9.1t);p(!9.o.1k){9.3h({12:9.o.12,1r:9.1r})}},3h:q(e){r a=9.F.37("1K");9.F.u("G:1N;H:1N;1K:2w").P();p(9.1h){9.23.u("G:0");9.23.u("G:0")}p(e.12){9.12.P().43(e.12);9.25.P()}11{p(!9.1a){9.12.T();9.25.T()}}p(N.2n(e.1r)){e.1r.P()}p(N.2t(e.1r)||N.2n(e.1r)){9.1t.43(e.1r)}9.17.u({H:9.17.44()+"B"});9.F.u("1K:13").P();9.17.P();r c=9.17.1X(),b={H:c.H+"B"},d=[9.F];p(s.1j){d.2p(9.1q)}p(9.1a){9.12.P().L({v:9.1a});9.25.P()}p(e.12||9.1a){9.25.u("H: 3i%")}b.G=2b;9.F.u({1K:a});9.1t.2D("2A");p(e.12||9.1a){9.12.2D("2A")}p(9.1h){9.23.u("G:"+9.1h+"B");9.23.u("G:"+9.1h+"B");b="H: "+(c.H+2*9.1h)+"B";d.2p(9.22)}d.1I("u",b);p(9.E){9.2h();p(9.o.E.1E=="1d"){9.F.u({H:9.F.44()+9.o.E.G+"B"})}}9.F.T()},3U:q(){9.3j=9.20.1y(9);9.45=9.T.1y(9);p(9.o.1J&&9.o.1b=="2u"){9.o.1b="1i"}p(9.o.1b==9.o.1w){9.1O=9.46.1y(9);9.C.1c(9.o.1b,9.1O)}p(9.1a){9.1a.1c("1i",q(e){e.21(9.V+"5K.2y")}.1g(9,9.1a)).1c("15",q(e){e.21(9.V+"2g.2y")}.1g(9,9.1a))}r c={C:9.1O?[]:[9.C],18:9.1O?[]:[9.18],1t:9.1O?[]:[9.F],1a:[],2f:[]},a=9.o.1w.C;9.3k=a||(!9.o.1w?"2f":"C");9.1P=c[9.3k];p(!9.1P&&a&&N.2t(a)){9.1P=9.1t.3g(a)}r d={1T:"1i",1H:"15"};$w("P T").30(q(h){r g=h.2v(),f=(9.o[h+"47"].3l||9.o[h+"47"]);9[h+"48"]=f;p(["1T","1H","1i","15"].35(f)){9[h+"48"]=(9.1m[f]||f);9["3l"+g]=U.1S(9["3l"+g])}}.1g(9));p(!9.1O){9.C.1c(9.o.1b,9.3j)}p(9.1P){9.1P.1I("1c",9.5L,9.45)}p(!9.o.1J&&9.o.1b=="1Z"){9.2E=9.O.1y(9);9.C.1c("2u",9.2E)}9.49=9.T.2m(q(g,f){r e=f.5M(".2g");p(e){e.5N();f.5O();g(f)}}).1y(9);p(9.1a||(9.o.1w&&(9.o.1w.C==".2g"))){9.F.1c("1Z",9.49)}p(9.o.1b!="1Z"&&(9.3k!="C")){9.2F=U.1S(q(){9.1F("P")}).1y(9);9.C.1c(9.1m.15,9.2F)}r b=[9.C,9.F];9.3m=U.1S(q(){s.2q(9);9.2G()}).1y(9);9.3n=U.1S(9.1D).1y(9);b.1I("1c",9.1m.1i,9.3m).1I("1c",9.1m.15,9.3n);p(9.o.1k&&9.o.1b!="1Z"){9.2H=U.1S(9.4a).1y(9);9.C.1c(9.1m.15,9.2H)}},3H:q(){p(9.o.1b==9.o.1w){9.C.1z(9.o.1b,9.1O)}11{9.C.1z(9.o.1b,9.3j);p(9.1P){9.1P.1I("1z")}}p(9.2E){9.C.1z("2u",9.2E)}p(9.2F){9.C.1z("15",9.2F)}9.F.1z();9.C.1z(9.1m.1i,9.3m).1z(9.1m.15,9.3n);p(9.2H){9.C.1z(9.1m.15,9.2H)}},38:q(c,b){p(!9.17){p(!9.2z()){M}}9.O(b);p(9.2I){M}11{p(9.4b){c(b);M}}9.2I=1l;r e=b.5P(),d={2i:{1Q:e.x,1R:e.y}};r a=N.2c(9.o.1k.o);a.36=a.36.2m(q(g,f){9.3h({12:9.o.12,1r:f.5Q});9.O(d);(q(){g(f);r h=(9.R&&9.R.13());p(9.R){9.1F("R");9.R.1B();9.R=2b}p(h){9.P()}9.4b=1l;9.2I=2b}.1g(9)).1v(0.6)}.1g(9));9.5R=I.P.1v(9.o.1v,9.R);9.F.T();9.2I=1l;9.R.P();9.5S=(q(){J 5T.5U(9.o.1k.2Q,a)}.1g(9)).1v(9.o.1v);M X},4a:q(){9.1F("R")},20:q(a){p(!9.17){p(!9.2z()){M}}9.O(a);p(9.F.13()){M}9.1F("P");9.5V=9.P.1g(9).1v(9.o.1v)},1F:q(a){p(9[a+"4c"]){5W(9[a+"4c"])}},P:q(){p(9.F.13()){M}p(s.1j){9.1q.P()}p(9.o.3Q){s.3L()}s.3K(9);9.17.P();9.F.P();p(9.E){9.E.P()}9.C.4d("1G:5X")},1D:q(a){p(9.o.1k){p(9.R&&9.o.1b!="1Z"){9.R.T()}}p(!9.o.1D){M}9.2G();9.5Y=9.T.1g(9).1v(9.o.1D)},2G:q(){p(9.o.1D){9.1F("1D")}},T:q(){9.1F("P");9.1F("R");p(!9.F.13()){M}9.4e()},4e:q(){p(s.1j){9.1q.T()}p(9.R){9.R.T()}9.F.T();(9.22||9.17).P();s.32(9);9.C.4d("1G:2w")},46:q(a){p(9.F&&9.F.13()){9.T(a)}11{9.20(a)}},2h:q(){r c=9.o.E,b=1V[0]||9.1s,d=s.2Y(c.O[0],b[c.1E]),f=s.2Y(c.O[1],b[s.2a[c.1E]]),a=9.1n||0;9.1L.21(9.V+d+f+".2y");p(c.1E=="1d"){r e=(d=="D")?c.G:0;9.3b.u("D: "+e+"B;");9.1L.u({"2J":d});9.E.u({D:0,v:(f=="1p"?"3i%":f=="1U"?"50%":0),5Z:(f=="1p"?-1*c.H:f=="1U"?-0.5*c.H:0)+(f=="1p"?-1*a:f=="v"?a:0)+"B"})}11{9.3b.u(d=="v"?"1x: 0; 2C: "+c.G+"B 0 0 0;":"2C: 0; 1x: 0 0 "+c.G+"B 0;");9.E.u(d=="v"?"v: 0; 1p: 1N;":"v: 1N; 1p: 0;");9.1L.u({1x:0,"2J":f!="1U"?f:"2f"});p(f=="1U"){9.1L.u("1x: 0 1N;")}11{9.1L.u("1x-"+f+": "+a+"B;")}p(s.2Z){p(d=="1p"){9.E.u({O:"4f",60:"61",v:"1N",1p:"1N","2J":"D",H:"3i%",1x:(-1*c.G)+"B 0 0 0"});9.E.1Y.2x="4g"}11{9.E.u({O:"4h","2J":"2f",1x:0})}}}9.1s=b},O:q(b){p(!9.17){p(!9.2z()){M}}s.2q(9);p(s.1j){r a=9.F.1X();p(!9.2K||9.2K.G!=a.G||9.2K.H!=a.H){9.1q.u({H:a.H+"B",G:a.G+"B"})}9.2K=a}p(9.o.W){r j,h;p(9.1W){r k=10.1C.2s(),c=b.2i||{};r g,i=2;3O(9.1W.3Y()){S"62":S"63":g={x:0-i,y:0-i};19;S"64":g={x:0,y:0-i};19;S"65":S"66":g={x:i,y:0-i};19;S"67":g={x:i,y:0};19;S"68":S"69":g={x:i,y:i};19;S"6a":g={x:0,y:i};19;S"6b":S"6c":g={x:0-i,y:i};19;S"6d":g={x:0-i,y:0};19}g.x+=9.o.1e.x;g.y+=9.o.1e.y;j=N.Y({1e:g},{C:9.o.W.1t,1W:9.1W,1u:{v:c.1R||2L.1R(b)-k.v,D:c.1Q||2L.1Q(b)-k.D}});h=s.W(9.F,9.18,j);p(9.o.1C){r n=9.3o(h),m=n.1s;h=n.O;h.D+=m.1f?2*U.2W(g.x-9.o.1e.x):0;h.v+=m.1f?2*U.2W(g.y-9.o.1e.y):0;p(9.E&&(9.1s.1d!=m.1d||9.1s.1f!=m.1f)){9.2h(m)}}h={D:h.D+"B",v:h.v+"B"};9.F.u(h)}11{j=N.Y({1e:9.o.1e},{C:9.o.W.1t,18:9.o.W.18});h=s.W(9.F,9.18,N.Y({O:1l},j));h={D:h.D+"B",v:h.v+"B"}}p(9.R){r e=s.W(9.R,9.18,N.Y({O:1l},j))}p(s.1j){9.1q.u(h)}}11{r f=9.18.2r(),c=b.2i||{},h={D:((9.o.1J)?f[0]:c.1Q||2L.1Q(b))+9.o.1e.x,v:((9.o.1J)?f[1]:c.1R||2L.1R(b))+9.o.1e.y};p(!9.o.1J&&9.C!==9.18){r d=9.C.2r();h.D+=-1*(d[0]-f[0]);h.v+=-1*(d[1]-f[1])}p(!9.o.1J&&9.o.1C){r n=9.3o(h),m=n.1s;h=n.O;p(9.E&&(9.1s.1d!=m.1d||9.1s.1f!=m.1f)){9.2h(m)}}h={D:h.D+"B",v:h.v+"B"};9.F.u(h);p(9.R){9.R.u(h)}p(s.1j){9.1q.u(h)}}},3o:q(c){r e={1d:X,1f:X},d=9.F.1X(),b=10.1C.2s(),a=10.1C.1X(),g={D:"H",v:"G"};31(r f 3N g){p((c[f]+d[g[f]]-b[f])>a[g[f]]){c[f]=c[f]-(d[g[f]]+(2*9.o.1e[f=="D"?"x":"y"]));p(9.E){e[s.3F[g[f]]]=1l}}}M{O:c,1s:e}}});N.Y(U,{41:q(d,g){r j=1V[2]||9.o,f=j.1n,c=j.1h,e={v:(g.4i(0)=="t"),D:(g.4i(1)=="l")};p(9.2M.26){r b=J I("26",{K:"6e"+g.2v(),H:c+"B",G:c+"B"});d.L(b);r i=b.3r("2d");i.6f=j.1M;i.6g((e.D?f:c-f),(e.v?f:c-f),f,0,6h.6i*2,1l);i.6j();i.4j((e.D?f:0),0,c-f,c);i.4j(0,(e.v?f:0),c,c-f)}11{r h;d.L(h=J I("Q").u({H:c+"B",G:c+"B",1x:0,2C:0,2x:"4g",O:"4f",6k:"2w"}));r a=J I("2j:6l",{6m:j.1M,6n:"6o",6p:j.1M,6q:(f/c*0.5).6r(2)}).u({H:2*c-1+"B",G:2*c-1+"B",O:"4h",D:(e.D?0:(-1*c))+"B",v:(e.v?0:(-1*c))+"B"});h.L(a);a.4k=a.4k}}});I.6s({21:q(c,b){c=$(c);r a=N.Y({4l:"v D",3p:"6t-3p",3q:"6u",1M:""},1V[2]||{});c.u(s.1j?{6v:"6w:6x.6y.6z(28=\'"+b+"\'\', 3q=\'"+a.3q+"\')"}:{6A:a.1M+" 2Q("+b+") "+a.4l+" "+a.3p});M c}});U.4m={P:q(){s.2q(9);9.2G();r d={};p(9.o.W){d.2i={1Q:0,1R:0}}11{r a=9.18.2r(),c=9.18.3M(),b=10.1C.2s();a.D+=(-1*(c[0]-b[0]));a.v+=(-1*(c[1]-b[1]));d.2i={1Q:a.D,1R:a.v}}p(9.o.1k){9.38(d)}11{9.20(d)}9.1D()}};U.Y=q(a){a.C.1G={};N.Y(a.C.1G,{P:U.4m.P.1g(a),T:a.T.1g(a),1B:s.1B.1g(s,a.C)})};U.3s();',
62,409,"|||||||||this|||||||||||||||options|if|function|var|Tips||setStyle|top||||||px|element|left|stem|wrapper|height|width|Element|new|className|insert|return|Object|position|show|div|loader|case|hide|Prototip|images|hook|false|extend||document|else|title|visible||mouseout||tooltip|target|break|closeButton|showOn|observe|horizontal|offset|vertical|bind|border|mouseover|fixIE|ajax|true|useEvent|radius|zIndex|bottom|iframeShim|content|stemInverse|tip|mouse|delay|hideOn|margin|bindAsEventListener|stopObserving|tips|remove|viewport|hideAfter|orientation|clearTimer|prototip|mouseleave|invoke|fixed|visibility|stemImage|backgroundColor|auto|eventToggle|hideTargets|pointerX|pointerY|capture|mouseenter|middle|arguments|mouseHook|getDimensions|style|click|showDelayed|setPngBackground|borderFrame|borderTop|prototip_Corner|toolbar|canvas|Prototype|src|match|_inverse|null|clone||toLowerCase|none|close|positionStem|fakePointer|ns_vml|default|initialize|wrap|isElement|zIndexTop|push|raise|cumulativeOffset|getScrollOffsets|isString|mousemove|capitalize|hidden|display|png|build|clearfix|prototip_CornerWrapper|padding|addClassName|eventPosition|eventCheckDelay|cancelHideAfter|ajaxHideEvent|ajaxContentLoading|float|iframeShimDimensions|Event|support|replace|add|loaded|url|window|unload|convertVersionString|length|Browser|toggleInt|right|inverseStem|WebKit419|each|for|removeVisible|Styles|borderColor|include|onComplete|getStyle|ajaxShow|_build|body|stemWrapper|li|borderRow|borderMiddle|borderCenter|select|_update|100|eventShow|hideElement|event|activityEnter|activityLeave|getPositionWithinViewport|repeat|sizingMethod|getContext|start|require|find|namespaces|VML|dom|REQUIRED_|throw|_|input|IE|removeAll|specialEvent|_stemTranslation|parseFloat|deactivate|without|_highest|addVisibile|hideAll|cumulativeScrollOffset|in|switch|create|hideOthers|member|fixSafari2|setup|activate|9500px|_isBuilding|stemBox|toUpperCase|prototip_Between|borderBottom|createCorner|prototip_Fill|update|getWidth|eventHide|toggle|On|Action|buttonEvent|ajaxHide|ajaxContentLoaded|Timer|fire|afterHide|relative|block|absolute|charAt|fillRect|outerHTML|align|Methods|REQUIRED_Prototype|createElement|https|test|js|script|documentMode|urn|schemas|microsoft|com|vml|createStyleSheet|addRule|behavior|typeof|undefined|Version|requires|parseInt|times|indexOf|_captureTroubleElements|textarea|relatedTarget|while|try|parentNode|catch|abs|RegExp|MSIE|exec|navigator|userAgent|WebKit|evaluate|topRight|rightTop||topMiddle|rightMiddle|bottomLeft|leftBottom|bottomRight|rightBottom|bottomMiddle|leftMiddle|Tip|Class|not|available|cannot|000000|closeButtons|styles|endsWith|emptyFunction|area|tagName|9500|iframe|javascript|frameBorder|opacity|prototipLoader|gif|prototip_Stem|prototip_StemWrapper|prototip_StemBox|prototip_StemImage|MIDDLE|inline|ul|prototip_CornerWrapperTopLeft|prototip_BetweenCorners|prototip_CornerWrapperTopRight|prototip_CornerWrapperBottomLeft|cloneNode|prototip_CornerWrapperBottomRight|tl|tr|bl|br|isNumber|close_hover|hideAction|findElement|blur|stop|pointer|responseText|loaderTimer|ajaxTimer|Ajax|Request|showTimer|clearTimeout|shown|hideAfterTimer|marginTop|clear|both|LEFTTOP|TOPLEFT|TOPMIDDLE|TOPRIGHT|RIGHTTOP|RIGHTMIDDLE|RIGHTBOTTOM|BOTTOMRIGHT|BOTTOMMIDDLE|BOTTOMLEFT|LEFTBOTTOM|LEFTMIDDLE|cornerCanvas|fillStyle|arc|Math|PI|fill|overflow|roundrect|fillcolor|strokeWeight|1px|strokeColor|arcSize|toFixed|addMethods|no|scale|filter|progid|DXImageTransform|Microsoft|AlphaImageLoader|background".split("|"),
0,{}));
if(!window.iwin)var iwin={};iwin.Auth={};iwin.Auth.errors={};iwin.Auth.errors.login={BAD_AUTH:"login.BAD_AUTH",BANNED:"login.BANNED",USERNAME_MISSING:"login.USERNAME_MISSING",PASSWORD_MISSING:"login.PASSWORD_MISSING",MULTIPLE_ACCOUNTS:"login.MULTIPLE_ACCOUNTS",RESET_REQUIRED:"login.RESET_REQUIRED",HTTPS_REQUIRED:"login.HTTPS_REQUIRED"};
iwin.Auth.errors.register={USERNAME_TAKEN:"register.USERNAME_TAKEN",USERNAME_TOO_SHORT:"register.USERNAME_TOO_SHORT",USERNAME_TOO_LONG:"register.USERNAME_TOO_LONG",USERNAME_INVALID_CHARS:"register.USERNAME_INVALID_CHARS",USERNAME_PROFANITY:"register.USERNAME_PROFANITY",PASSWORD_MISMATCH:"register.PASSWORD_MISMATCH",PASSWORD_TOO_SHORT:"register.PASSWORD_TOO_SHORT",EMAIL_TAKEN:"register.EMAIL_TAKEN",EMAIL_INVALID:"register.EMAIL_INVALID"};
iwin.Auth.errors.reset={EMAIL_MISMATCH:"reset.EMAIL_MISMATCH",EMAIL_INVALID:"reset.EMAIL_INVALID",MULTIPLE_ACCOUNTS:"reset.MULTIPLE_ACCOUNTS",NO_ACCOUNT:"reset.NO_ACCOUNT"};iwin.Auth.errors.setpwd={PASSWORD_MISMATCH:"setpwd.PASSWORD_MISMATCH",PASSWORD_TOO_SHORT:"setpwd.PASSWORD_TOO_SHORT",NO_ACCOUNT:"setpwd.NO_ACCOUNT",HTTPS_REQUIRED:"setpwd.HTTPS_REQUIRED"};iwin.Auth.errors.resolve=function(a,b){var d=$A();b.each(function(g){g.startsWith(a)?d.push(g):d.push(a+g)});return d};
iwin.Auth.event={login:{start:function(){document.fire("iwin:auth:login:start")},success:function(a){document.fire("iwin:auth:login:success",{username:a})},problem:function(a){document.fire("iwin:auth:login:problem",iwin.Auth.errors.resolve("login.",a))},failure:function(){document.fire("iwin:auth:login:failure")}},logout:{start:function(){document.fire("iwin:auth:logout:start")},success:function(){document.fire("iwin:auth:logout:success")},failure:function(){document.fire("iwin:auth:logout:failure")}},
register:{start:function(){document.fire("iwin:auth:register:start")},success:function(){document.fire("iwin:auth:register:success")},problem:function(a){document.fire("iwin:auth:register:problem",iwin.Auth.errors.resolve("register.",a))},usernameSuggest:function(a){document.fire("iwin:auth:register:usernameSuggest",a)},failure:function(){document.fire("iwin:auth:register:failure")}},registerValidate:{start:function(){document.fire("iwin:auth:register-validate:start")},success:function(){document.fire("iwin:auth:register-validate:success")},
problem:function(a){document.fire("iwin:auth:register-validate:problem",iwin.Auth.errors.resolve("register.",a))},failure:function(){document.fire("iwin:auth:register-validate:failure")}},reset:{start:function(){document.fire("iwin:auth:reset:start")},success:function(){document.fire("iwin:auth:reset:success")},problem:function(a){document.fire("iwin:auth:reset:problem",iwin.Auth.errors.resolve("reset.",a))},failure:function(){document.fire("iwin:auth:reset:failure")}},suggest:{start:function(){document.fire("iwin:auth:suggest:start")},
success:function(a){document.fire("iwin:auth:suggest:success",a)},failure:function(){document.fire("iwin:auth:suggest:failure")}},setpwd:{start:function(){document.fire("iwin:auth:setpwd:start")},success:function(a){document.fire("iwin:auth:setpwd:success",a)},problem:function(a){document.fire("iwin:auth:setpwd:problem",iwin.Auth.errors.resolve("setpwd.",a))},failure:function(){document.fire("iwin:auth:setpwd:failure")}}};
iwin.Auth.login=function(a,b,d,g,k){function e(f,c){var i=null;new Ajax.Request("/auth/session/nonce",{asynchronous:false,method:"GET",requestHeaders:{Accept:"text/plain"},onException:function(q,r){console.error(r)},onFailure:function(q){console.error(q.status)},onSuccess:function(q){i=q.responseText}});var h=f.toLowerCase(),j=SHA256(c),l=SHA256(i+":"+h+":"+j),p={username:f,hash:l,autoLogin:d};console.debug("Creating login object: nonce=%s username=%s password=%s userLC=%s pass=%s hash=%s",i,f,c,
h,j,l);return p}function o(f,c){var i=window.external.GetSystemHID(),h=f.toLowerCase(),j=SHA256(c),l=SHA256(i+":"+h+":"+j),p={username:f,hardwareId:i,token:l,autoLogin:d};console.debug("Creating login object: hardwareId=%s username=%s password=%s userLC=%s pass=%s token=%s",i,f,c,h,j,l);return p}function n(f,c,i){return i&&i.length>0?{username:f,password:c,admin:true,adminActAs:i}:{username:f,password:c,admin:true}}(function(){iwin.Auth.event.login.start();if(arguments.length<3&&a&&a.length>2&&a.indexOf("/")>
0){var f=a.split("/",2);a=f[0];g=true;k=f[1]}if(g===true&&window.location.protocol!=="https:"&&window.location.hostname.indexOf("iwin.com")>-1&&window.location.hostname!=="cs-www.iwin.com"&&window.location.hostname.indexOf("int-iwin.com")<0)iwin.Auth.event.login.problem([iwin.Auth.errors.login.HTTPS_REQUIRED]);else try{f=[];if(!a||a.length==0)f.push(iwin.Auth.errors.login.USERNAME_MISSING);if(!b||b.length==0)f.push(iwin.Auth.errors.login.PASSWORD_MISSING);if(f.length>0)iwin.Auth.event.login.problem(f);
else{var c=g===true?n(a,b,k):iwin.Util.isInArcade()||iwin.Util.isInGameLauncher()||iwin.Util.isInEUS()?o(a,b):e(a,b),i=Object.toJSON(c);console.debug("PUT /auth/session/credentials: %s",i);new Ajax.Request("/auth/session/credentials?_method=PUT",{asynchronous:false,method:"post",contentType:"application/json",postBody:i,onException:function(j,l){console.error(l);iwin.Util.isInArcade()&&window.external.SetLoginFailed();iwin.Auth.event.login.failure()},onFailure:function(j){console.error(j.status);
iwin.Util.isInArcade()&&window.external.SetLoginFailed();iwin.Auth.event.login.failure()},onSuccess:function(j){j=j.responseJSON;var l=g===true&&j.adminActAs?j.adminActAs:j.username;if(iwin.Util.isInArcade()||iwin.Util.isInGameLauncher()||iwin.Util.isInEUS()){var p=c.username;try{window.external.SetDisplayName(l)}catch(q){p=l}g===true?window.external.SetLoginInfo(l,"dummy"):window.external.SetLoginInfo(p,c.token);window.external.UpdateOpalsInfo()}iwin.Auth.getCurrentCredentials(true,j);iwin.Auth.event.login.success(l)},
on401:function(){if(iwin.Util.isInArcade()||iwin.Util.isInGameLauncher()||iwin.Util.isInEUS())window.external.SetLoginFailed();iwin.Auth.event.login.problem([iwin.Auth.errors.login.BAD_AUTH])},on400:function(){if(iwin.Util.isInArcade()||iwin.Util.isInGameLauncher()||iwin.Util.isInEUS())window.external.SetLoginFailed();iwin.Auth.event.login.problem([iwin.Auth.errors.login.MULTIPLE_ACCOUNTS])},on409:function(){if(iwin.Util.isInArcade()||iwin.Util.isInGameLauncher()||iwin.Util.isInEUS())window.external.SetLoginFailed();
iwin.Auth.event.login.problem([iwin.Auth.errors.login.RESET_REQUIRED])},on403:function(){if(iwin.Util.isInArcade()||iwin.Util.isInGameLauncher()||iwin.Util.isInEUS())window.external.SetLoginFailed();iwin.Auth.event.login.problem([iwin.Auth.errors.login.BANNED])}})}}catch(h){console.error(h);if(iwin.Util.isInArcade()||iwin.Util.isInGameLauncher()||iwin.Util.isInEUS())window.external.SetLoginFailed();iwin.Auth.event.login.failure()}}).defer()};
iwin.Auth.autologin=function(a,b){function d(c){var i=window.external.GetSystemHID(),h=c.toLowerCase(),j=SHA256(i+":"+h);console.debug("Creating login object: hardwareId=%s username=%s userLC=%s token=%s",i,c,h,j);return j}try{if(!iwin.Auth.getCurrentUsername()||a==true){var g=false;if(iwin.Util.isInArcade()||iwin.Util.isInGameLauncher()||iwin.Util.isInEUS()){var k=window.external.GetOpalUserName(),e=window.external.GetOpalLoginToken(),o=window.external.GetSystemHID();if(k&&e&&o){var n=Object.toJSON({username:k,
hardwareId:o,token:e});new Ajax.Request("/auth/session/credentials?_method=PUT",{asynchronous:false,method:"post",contentType:"application/json",postBody:n,onException:function(){},onFailure:function(){},onSuccess:function(c){g=true;iwin.Auth.event.login.success(c.responseJSON.username);b&&b(c.responseJSON.username)}})}}if(!g)if(iwin.Util.readCookie("IWIN_AUTO")||iwin.Util.hasFBSession())new Ajax.Request("/auth/session/credentials",{asynchronous:false,method:"post",contentType:"application/json",
onException:function(){if(iwin.Util.isInArcade()||iwin.Util.isInGameLauncher()||iwin.Util.isInEUS())window.external.SetLoginFailed();b&&b()},onFailure:function(){if(iwin.Util.isInArcade()||iwin.Util.isInGameLauncher()||iwin.Util.isInEUS())window.external.SetLoginFailed();b&&b()},onSuccess:function(c){c=c.responseJSON;if(iwin.Util.isInArcade()||iwin.Util.isInGameLauncher()||iwin.Util.isInEUS()){try{window.external.SetDisplayName(c.username)}catch(i){}var h=d(c.username);window.external.SetLoginInfo(c.username,
h);window.external.UpdateOpalsInfo()}iwin.Auth.getCurrentCredentials(true,c);iwin.Auth.event.login.success(c.username);b&&b(c.username)},on204:function(){b&&b()}});else b&&b()}}catch(f){}};iwin.Auth.redirectOnLogout=function(a){Event.observe(document,"iwin:auth:logout:success",function(){window.location.href=a?a:"/"})};
iwin.Auth.logout=function(){iwinLogout=function(){console.debug("DELETE /auth/session/credentials");new Ajax.Request("/auth/session/credentials?_method=DELETE",{asynchronous:false,method:"post",contentType:"application/json",requestHeaders:{Accept:"application/json"},onException:function(a,b){console.error(b);iwin.Auth.event.logout.failure()},onFailure:function(a){console.error(a.status);iwin.Auth.event.logout.failure()},onSuccess:function(){if(iwin.Util.isInArcade()||iwin.Util.isInGameLauncher()||
iwin.Util.isInEUS()){try{window.external.DoLogout()}catch(a){}window.external.UpdateOpalsInfo()}iwin.Auth.getCurrentCredentials(true,null);iwin.Auth.event.logout.success()}})};(function(){iwin.Auth.event.logout.start();try{window.FB?FB.getLoginStatus(function(b){b.authResponse?FB.logout(function(){iwinLogout()}):iwinLogout()},true):iwinLogout()}catch(a){console.error(a);iwin.Auth.event.logout.failure()}}).defer()};iwin.Auth.validating=null;
iwin.Auth.register=function(a,b,d,g,k,e){var o=function(n){var f=new RSAKey;f.setPublic("C0A2394275F3F2D971104F61FB557724BDDDD2DF6BC713EBECA24F43BBA030255A8E312B57325C28FC0A7D1CC1D99F53B577318155E48C899EE31170CA92F197D1F288D911F85C1370C5A1DB9C2ABC8893ACB2A9726288967AF8EE373084BD2FFC447C2E772A31ED379C9243A3C998AF1E10C5BB0CA99ACE2295E28769D907D81017A8C9449592E58887B8B4B4224C9DC345D8D3270F2CBD30656E73035A9DB678916F5AF6AC77E4D6A7D04A4840F408E76B3FF59DA9A15A5866E063F9D60C0168B5CD57370566A8C3E669129C9E0BB34CFE1E0EB0214831312B48B5F40DFBA3EA93BC1DFD3C9B60665CAE503A5A767C68F145876B96E1F02758B0669B50CFDD",
"10001");return f.encrypt(n)};(function(){var n=false;if(!e&&d!==b){console.debug("passwords do not match, converting to validation.");n=e=true}e?iwin.Auth.event.registerValidate.start():iwin.Auth.event.register.start();try{if(e){if(!(a||b||d||g)){console.debug("nothing to validate yet, skipping validation");return}a||(a="iwinregval");g||(g="iwinregval@iwin.com");b||(b="iwinregval");if(d){if(d!==b)n=true}else d="iwinregval";if(iwin.Auth.validating&&iwin.Auth.validating.username==a&&iwin.Auth.validating.password==
b&&iwin.Auth.validating.confirmPassword==d&&iwin.Auth.validating.email==g){console.debug("no change, skipping validation");return}else iwin.Auth.validating={username:a,password:b,confirmPassword:d,email:g}}else if(d!==b){var f=[];f.push(iwin.Auth.errors.register.PASSWORD_MISMATCH);iwin.Auth.event.register.problem(f);return}var c=o(b);c={username:a,password:c,passwordEncrypted:true,email:g,emailOptIn:k};if(e)c.validateOnly=true;f=Object.toJSON(c);console.debug("POST /auth/users: %s",f);new Ajax.Request("/auth/users",
{asynchronous:e,method:"post",contentType:"application/json",postBody:f,onException:function(h,j){console.error(j);e?iwin.Auth.event.registerValidate.failure():iwin.Auth.event.register.failure()},onFailure:function(h){console.error(h.status);e?iwin.Auth.event.registerValidate.failure():iwin.Auth.event.register.failure()},on400:function(h){h=$A(h.responseJSON.problems);console.debug("on400:: validateOnly: %s, passwordMismatch: %s",e,n);if(e){n&&h.push(iwin.Auth.errors.register.PASSWORD_MISMATCH);iwin.Auth.event.registerValidate.problem(h)}else iwin.Auth.event.register.problem(h)},
onSuccess:function(){console.debug("onSuccess:: validateOnly: %s, passwordMismatch: %s",e,n);if(e)if(n){var h=[];h.push(iwin.Auth.errors.register.PASSWORD_MISMATCH);iwin.Auth.event.registerValidate.problem(h)}else iwin.Auth.event.registerValidate.success();else{k&&iwin.tracking.trackEvent(iwin.tracking.domain+"/header","signed up for email","marketing");iwin.Auth.event.register.success();iwin.Auth.login(a,b)}}})}catch(i){console.error(i);e?iwin.Auth.event.registerValidate.failure():iwin.Auth.event.register.failure()}}).defer()};
iwin.Auth.suggestUsernames=function(a,b){(function(){iwin.Auth.event.suggest.start();try{var d="/auth/alt-usernames?u="+a;if(b)d+="&m="+m;console.debug("GET "+d);new Ajax.Request(d,{asynchronous:true,method:"GET",requestHeaders:{Accept:"application/json"},onException:function(k,e){console.error(e);iwin.Auth.event.suggest.failure()},onFailure:function(k){console.error(k.status);iwin.Auth.event.suggest.failure()},onSuccess:function(k){iwin.Auth.event.suggest.success(k.responseJSON)}})}catch(g){console.error(g);
iwin.Auth.event.suggest.failure()}}).defer()};
iwin.Auth.resetCredentials=function(a,b){(function(){iwin.Auth.event.reset.start();try{var d=[];if(!a||!iwin.Util.isEmailValid(a))d.push(iwin.Auth.errors.reset.EMAIL_INVALID);b!=a&&d.push(iwin.Auth.errors.reset.EMAIL_MISMATCH);if(d.length>0)iwin.Auth.event.reset.problem(d);else{var g=Object.toJSON({email:a});console.debug("POST /auth/reset-tokens: %s",g);new Ajax.Request("/auth/reset-tokens",{asynchronous:false,method:"post",contentType:"application/json",postBody:g,onException:function(e,o){console.error(o);
iwin.Auth.event.reset.failure()},onFailure:function(e){console.error(e.status);iwin.Auth.event.reset.failure()},on400:function(e){iwin.Auth.event.reset.problem($A(e.responseJSON.problems))},onSuccess:function(){iwin.Auth.event.reset.success()}})}}catch(k){console.error(k);iwin.Auth.event.reset.failure()}}).defer()};
iwin.Auth.setpwd=function(a,b,d){(function(){iwin.Auth.event.setpwd.start();if(window.location.href.indexOf("iwin.com")>-1&&window.location.href.indexOf("https://")==-1)iwin.Auth.event.setpwd.problem([iwin.Auth.errors.setpwd.HTTPS_REQUIRED]);else try{if(b!==a)iwin.Auth.event.setpwd.problem([iwin.Auth.errors.setpwd.PASSWORD_MISMATCH]);else if(a==="")iwin.Auth.event.setpwd.problem([iwin.Auth.errors.setpwd.PASSWORD_TOO_SHORT]);else{var g=Object.toJSON({newPassword:a});console.debug("POST "+d+": %s",
g);new Ajax.Request(d,{asynchronous:false,method:"post",contentType:"application/json",postBody:g,onException:function(e,o){console.error(o);iwin.Auth.event.setpwd.failure()},onFailure:function(e){console.error(e.status);iwin.Auth.event.setpwd.failure()},on400:function(e){iwin.Auth.event.setpwd.problem($A(e.responseJSON.problems))},onSuccess:function(){iwin.Auth.event.setpwd.success()}})}}catch(k){console.error(k);iwin.Auth.event.setpwd.failure()}}).defer()};
iwin.Auth.isLoggedIn=function(){if(iwin.Auth.getCurrentUsername())return true;return false};iwin.Auth.getCurrentUsername=function(){var a=iwin.Auth.getCurrentCredentials();return a&&a.username?a.username:null};
iwin.Auth.getCurrentCredentials=iwin.Util.cacheWrap(function(){var a=null;if(iwin.Util.hasSession()||iwin.Util.hasFBSession())new Ajax.Request("/auth/session/credentials",{asynchronous:false,method:"GET",requestHeaders:{Accept:"application/json",Authorization:"iWinS "+iwin.Util.getSession()},onException:function(b,d){console.error(d)},onFailure:function(b){console.error(b.status)},onSuccess:function(b){a=b.responseJSON}});return a},1E4);Event.observe(document,"dom:loaded",iwin.Auth.autologin);
function Auth_logout(){iwin.Auth.logout()};
if(!window.iwin)var iwin={};iwin.AuthUI={};iwin.AuthUI.event={};iwin.AuthUI.event.fire=function(c,a){(a&&a.fire?a:document).fire(c)};iwin.AuthUI.event.login={show:iwin.AuthUI.event.fire.curry("iwin:auth-ui:login:show"),hide:iwin.AuthUI.event.fire.curry("iwin:auth-ui:login:hide")};iwin.AuthUI.event.register={show:iwin.AuthUI.event.fire.curry("iwin:auth-ui:register:show"),hide:iwin.AuthUI.event.fire.curry("iwin:auth-ui:register:hide")};
iwin.AuthUI.event.forgot={show:iwin.AuthUI.event.fire.curry("iwin:auth-ui:forgot:show"),hide:iwin.AuthUI.event.fire.curry("iwin:auth-ui:forgot:hide")};iwin.AuthUI.event.setpwd={show:iwin.AuthUI.event.fire.curry("iwin:auth-ui:setpwd:show"),hide:iwin.AuthUI.event.fire.curry("iwin:auth-ui:setpwd:hide")};iwin.AuthUI.event.close=iwin.AuthUI.event.fire.curry("iwin:auth-ui:close");iwin.AuthUI.messages=[];iwin.AuthUI.messages[iwin.Auth.errors.login.BAD_AUTH]="The username or password was incorrect. Please try again.";
iwin.AuthUI.messages[iwin.Auth.errors.login.BANNED]='Your account is deactivated, please contact <a href="http://support.iwin.com/">Customer Support</a>.';iwin.AuthUI.messages[iwin.Auth.errors.login.USERNAME_MISSING]="Username is required.";iwin.AuthUI.messages[iwin.Auth.errors.login.PASSWORD_MISSING]="Password is required.";iwin.AuthUI.messages[iwin.Auth.errors.login.MULTIPLE_ACCOUNTS]='Multiple users were found with this email address.  Please try again with your username, or contact <a href="/support">Customer Service</a> for assistance.';
iwin.AuthUI.messages[iwin.Auth.errors.login.RESET_REQUIRED]='Due to security upgrades your password needs to be reset.  Please click the "Forgot your password" link below to reset your password.';iwin.AuthUI.messages[iwin.Auth.errors.login.HTTPS_REQUIRED]="Administrative logins require an HTTPS page.";iwin.AuthUI.messages[iwin.Auth.errors.register.USERNAME_TAKEN]="That username is already in use.";iwin.AuthUI.messages[iwin.Auth.errors.register.USERNAME_TOO_SHORT]="The username must be at least 3 characters long.";
iwin.AuthUI.messages[iwin.Auth.errors.register.USERNAME_TOO_LONG]="The username must be no more than 20 characters long.";iwin.AuthUI.messages[iwin.Auth.errors.register.USERNAME_INVALID_CHARS]="The username may only contain letters, numbers, dashes, and underscores.";iwin.AuthUI.messages[iwin.Auth.errors.register.USERNAME_PROFANITY]="That username is already in use. Please try another.";iwin.AuthUI.messages[iwin.Auth.errors.register.PASSWORD_MISMATCH]="Passwords do not match.";
iwin.AuthUI.messages[iwin.Auth.errors.register.PASSWORD_TOO_SHORT]="The password must be at least 4 characters long.";iwin.AuthUI.messages[iwin.Auth.errors.register.EMAIL_TAKEN]="The email address is already in use.";iwin.AuthUI.messages[iwin.Auth.errors.register.EMAIL_INVALID]="The email address doesn't appear valid.";iwin.AuthUI.messages[iwin.Auth.errors.reset.EMAIL_INVALID]="The email address doesn't appear valid.";iwin.AuthUI.messages[iwin.Auth.errors.reset.EMAIL_MISMATCH]="Email addresses do not match.";
iwin.AuthUI.messages[iwin.Auth.errors.reset.MULTIPLE_ACCOUNTS]='Multiple users were found with this email address.  Please contact <a href="/support">Customer Service</a> for assistance.';iwin.AuthUI.messages[iwin.Auth.errors.reset.NO_ACCOUNT]="No account found with that email address.";iwin.AuthUI.messages[iwin.Auth.errors.setpwd.PASSWORD_MISMATCH]="Passwords do not match.";iwin.AuthUI.messages[iwin.Auth.errors.setpwd.PASSWORD_TOO_SHORT]="The password must be at least 4 characters long.";
iwin.AuthUI.messages[iwin.Auth.errors.setpwd.NO_ACCOUNT]="The link you used is no longer valid.";iwin.AuthUI.messages[iwin.Auth.errors.setpwd.HTTPS_REQUIRED]='This page is insecure. Please use <a href="'+window.location.href.replace(/http:/,"https:")+'">the secure version</a>.';iwin.AuthUI.messages.toDisplay=function(c){c=c.uniq();var a="";c.each(function(b){if(iwin.AuthUI.messages[b])a+="<li/>"+iwin.AuthUI.messages[b]+"</li>";else console.error("Could not find message for error code %s",b)});return a};
iwin.AuthUI.detachedMode=false;iwin.AuthUI.forceDetachedMode=function(){iwin.AuthUI.detachedMode=true};iwin.AuthUI.isModal=false;
iwin.AuthUI.CommonUI=function(c){this.name=c;this.initialized=false;this.spacing=2;this.xShift=10;this.target=null;this.elements={overlay:null,root:null,container:null,msg:null,err:null,top:{arrow:null,flat:null},close:{arrow:null,flat:null},bottom:{arrow:null,flat:null},form:null,submitButton:null,submittingImage:null,suggestedUsernames:null};this.defaultMsg=null;this.reposition=function(){this.initialized&&this.elements.root.visible()&&this.positionCenter()};this.positionCenter=function(){console.debug(this.name+
" - positionCenter");var a=document.viewport.getDimensions(),b=this.elements.container.getDimensions(),d=a.height/2-b.height/2;if(d>200)d=200;else if(d<5)d=5;this.elements.root.style.top=d+"px";a=a.width/2-b.width/2;if(a<5)a=5;this.elements.root.style.left=a+"px"};this.positionOn=function(){console.debug(this.name+" - positionOn");var a=document.viewport.getDimensions(),b=this.elements.root.getDimensions(),d=this.target.getDimensions(),e=this.target.cumulativeOffset(),f=e.left+d.width/2,g=e.top+d.height,
h=e.top>b.height;this.elements.root.style.top=e.top+d.height/2<=a.height/2||!h?g+this.spacing+"px":e.top-(b.height+this.spacing)+"px";d=f+this.xShift-b.width/2;if(d+b.width>a.width)d=a.width-b.width;else if(d<0)d=0;this.elements.root.style.left=d+"px";console.debug(this.name+" - positioning ui to %i, %i",this.elements.root.style.left,this.elements.root.style.top)};this.doShow=function(){console.debug(this.name+" - doShow");try{if(this.initialized){this.target=null;if(this.defaultMsg===null)this.defaultMsg=
this.elements.msg.innerHTML;this.reset();var a=$A(arguments),b=a.shift();if(Object.isElement(b)){this.target=b;b=a.shift()}if(Object.isString(b)&&b.length>0){this.elements.msg.update(b);this.elements.msg.show();b=a.shift()}if(b===true||iwin.AuthUI.isModal){iwin.AuthUI.isModal=true;this.elements.close.hide()}this.elements.container.show();this.elements.root.show();this.elements.form&&this.elements.form.visible()&&this.elements.form.focusFirstElement();this.positionCenter();$J.browser.msie&&parseInt($J.browser.version,
10)<7&&this.elements.overlay.setStyle({height:$J(document).height()+"px"});this.elements.overlay.visible()||$J(this.elements.overlay).fadeTo(500,0.8);this.redraw();return true}return false}catch(d){console.error(d);return false}};this.doHide=function(){var a=true;console.debug(this.name+" - doHide");if(this.initialized&&this.elements.root.visible()){this.elements.container.siblings().each(function(b){if(b.hasClassName("authSection")&&b.visible())a=false});if(a){this.elements.root.hide();$J(this.elements.overlay).fadeOut(500)}else this.redraw();
this.elements.container.hide();iwin.AuthUI.isModal=false;return true}return false};this.reset=function(){iwin.Auth.validating=null;this.elements.root.hide();this.elements.container.hide();this.elements.close.show();typeof this.defaultMsg==="string"&&this.defaultMsg!==""?this.elements.msg.update(this.defaultMsg):this.elements.msg.hide();this.elements.err.update();this.elements.err.hide();this.elements.form.reset();this.elements.submittingImage.hide();this.elements.submitButton.show();this.redraw()};
this.resetForError=function(a){this.elements.submittingImage.hide();this.elements.submitButton.show();this.elements.err.update(a);this.elements.err.show();this.redraw()};this.clearErrors=function(){this.elements.err.hide();this.elements.err.update();this.redraw()};this.submitting=function(){this.elements.submittingImage.show()};this.redraw=function(){var a=this.elements.container.getDimensions();if(a.height&&a.height+6!==$J("#authOutline div").height()||a.width&&a.width+6!==$J("#authOutline div").width())curvyCorners.redraw()}};
iwin.AuthUI.redraw=function(){i$("authOutline");var c=$J(".authSection:visible");c={height:c.height(),width:c.width()};if(c.height&&c.height+6!==$J("#authOutline div").height()||c.width&&c.width+6!==$J("#authOutline div").width())curvyCorners.redraw()};
iwin.AuthUI.LoginUI=function(){this.init=function(){console.debug(this.name+" initializing...");this.pfLink=null;this.elements.overlay=$("authOverlay");this.elements.root=$("auth");this.elements.container=$("authSignIn");this.elements.outline=$("authOutline");this.elements.msg=$("signInInfo");this.elements.err=$("signInError");this.elements.close=$("authClose");this.elements.form=$("signInForm");this.elements.submitButton=$("signInButton");this.elements.submittingImage=$("signInLoading");this.elements.close.observe("click",
iwin.AuthUI.event.close);iwin.facebook.sdk.init();window.FB&&iwin.facebook.sdk.plugin.connect(".facebookConnect","publish_stream,email");var c=this.hide.bindAsEventListener(this);Event.observe(document,"iwin:auth-ui:close",c);Event.observe(document,"iwin:auth-ui:close",function(){this.pfLink=null}.bindAsEventListener(this));var a=function(b){console.debug("clicking forgot link");iwin.AuthUI.Forgot.show(this.target);Event.stop(b)}.bindAsEventListener(this);$$("#signInForgot a").each(function(b){console.debug("adding handler to forgot link");
b.observe("click",a)});c=function(b){console.debug("clicking signup link");iwin.AuthUI.Register.show(this.target);Event.stop(b)}.bindAsEventListener(this);console.debug("adding handler to register link");i$("authSignUpLink").observe("click",c);c=function(b){console.debug("clicking sign in link");iwin.AuthUI.Login.show(this.target);Event.stop(b)}.bindAsEventListener(this);console.debug("adding handler to sign in link");i$("authSignInLink").observe("click",c);this.elements.submitButton.observe("click",
function(b){this.submit();Event.stop(b)}.bindAsEventListener(this));Event.observe(document,"iwin:auth:login:success",function(){if((iwin.Util.isInArcade()||iwin.Util.isInGameLauncher())&&this.pfLink&&this.pfLink.match(/^link\:\/\/PF\/[0-9]+\/[0-9]+\/[0-9]+\/0$/)){var b=this.pfLink;this.hide();window.location.href=b}this.hide()}.bindAsEventListener(this));$(this.elements.form).select("input[type=text]","input[type=password]").each(function(b){$(b).observe("keypress",function(d){if(d.keyCode==Event.KEY_RETURN){this.submit();
Event.stop(d)}}.bindAsEventListener(this))}.bind(this));Event.observe(document,"iwin:auth-ui:register:show",this.hide.bindAsEventListener(this));Event.observe(document,"iwin:auth-ui:forgot:show",this.hide.bindAsEventListener(this));Event.observe(document,"iwin:auth:login:start",this.submitting.bindAsEventListener(this));Event.observe(document,"iwin:auth:login:problem",function(b){this.resetForError(iwin.AuthUI.messages.toDisplay(b.memo))}.bindAsEventListener(this));Event.observe(document,"iwin:auth:login:failure",
function(){this.resetForError("<li>Sign In service temporarily unavailable.</li>")}.bindAsEventListener(this));Event.observe(window,"resize",this.reposition.bind(this));this.initialized=true;console.debug(this.name+" initialization complete.")};this.show=function(c,a,b){if(this.doShow(c,a,b)){$J(this.elements.root).removeClass().addClass("signIn");iwin.AuthUI.event.login.show(this.target);this.redraw()}};this.hide=function(c){this.doHide()&&iwin.AuthUI.event.login.hide(this.target);c&&Event.stop(c)};
this.submit=function(){try{var c=this.elements.form.username,a=this.elements.form.password,b=this.elements.form.autoLogin;c.value=$F(c).strip();a.value=$F(a).strip();iwin.Auth.login($F(c),$F(a),b.checked)}catch(d){console.error(d)}}};iwin.AuthUI.LoginUI.prototype=new iwin.AuthUI.CommonUI("login-ui");iwin.AuthUI.Login=new iwin.AuthUI.LoginUI;function pfAuthLogin(c,a,b){if(iwin.AuthUI.Login){iwin.AuthUI.Login.pfLink="link://PF/"+c+"/"+a+"/"+b+"/0";iwin.AuthUI.Login.show()}}
iwin.AuthUI.RegisterUI=function(){this.init=function(){console.debug(this.name+" initializing...");this.elements.overlay=$("authOverlay");this.elements.root=$("auth");this.elements.container=$("authSignUp");this.elements.outline=$("authOutline");this.elements.msg=$("signUpInfo");this.elements.err=$("signUpError");this.elements.close=$("authClose");this.elements.form=$("signUpForm");this.elements.submitButton=$("createAccountButton");this.elements.submittingImage=$("signUpLoading");this.elements.suggestedUsernames=
$("suggestedUsernames");Event.observe(this.elements.form.username,"blur",function(){this.validate()}.bindAsEventListener(this));this.elements.close.observe("click",iwin.AuthUI.event.close);var c=this.hide.bindAsEventListener(this);Event.observe(document,"iwin:auth-ui:close",c);this.elements.submitButton.observe("click",function(a){this.submit();Event.stop(a)}.bindAsEventListener(this));Event.observe(document,"iwin:auth:login:success",function(){if((iwin.Util.isInArcade()||iwin.Util.isInGameLauncher())&&
this.pfLink&&this.pfLink.match(/^link\:\/\/PF\/[0-9]+\/[0-9]+\/[0-9]+\/0$/)){var a=this.pfLink;this.hide();window.location.href=a}this.hide()}.bindAsEventListener(this));$(this.elements.form).select("input[type=text]","input[type=password]").each(function(a){$(a).observe("keypress",function(b){if(b.keyCode==Event.KEY_RETURN){this.submit();Event.stop(b)}}.bindAsEventListener(this))}.bind(this));Event.observe(document,"iwin:auth-ui:login:show",this.hide.bindAsEventListener(this));Event.observe(document,
"iwin:auth-ui:forgot:show",this.hide.bindAsEventListener(this));Event.observe(document,"iwin:auth:suggest:success",function(a){this.suggestUsernameReset();this.suggestUsernameShow(a.memo)}.bindAsEventListener(this));Event.observe(document,"iwin:auth:register-validate:problem",function(a){if(a.memo.indexOf("register.USERNAME_TAKEN")!=-1&&this.elements.form.username.value){iwin.AuthUI.messages[iwin.Auth.errors.register.USERNAME_TAKEN]='"'+this.elements.form.username.value+'" is already in use.';iwin.Auth.suggestUsernames(this.elements.form.username.value)}else this.suggestUsernameReset();
this.resetForError(iwin.AuthUI.messages.toDisplay(a.memo))}.bindAsEventListener(this));Event.observe(document,"iwin:auth:register-validate:success",function(){this.clearErrors();this.suggestUsernameReset()}.bindAsEventListener(this));Event.observe(document,"iwin:auth:register:start",this.submitting.bindAsEventListener(this));Event.observe(document,"iwin:auth:register:success",this.hide.bindAsEventListener(this));Event.observe(document,"iwin:auth:register:problem",function(a){if(a.memo.indexOf("register.USERNAME_TAKEN")!=
-1&&this.elements.form.username.value){iwin.AuthUI.messages[iwin.Auth.errors.register.USERNAME_TAKEN]='"'+this.elements.form.username.value+'" is already in use.';iwin.Auth.suggestUsernames(this.elements.form.username.value)}else this.suggestUsernameReset();this.resetForError(iwin.AuthUI.messages.toDisplay(a.memo))}.bindAsEventListener(this));Event.observe(document,"iwin:auth:register:failure",function(){this.resetForError("<li>Registration service temporarily unavailable.</li>")}.bindAsEventListener(this));
Event.observe(window,"resize",this.reposition.bind(this));this.initialized=true;console.debug(this.name+" initialization complete.")};this.suggestUsernameReset=function(){if(this.elements.suggestedUsernames){this.elements.suggestedUsernames.update();this.elements.suggestedUsernames.hide()}this.elements.form.username.previous().setStyle({color:"#000",fontWeight:"bold"});this.redraw()};this.suggestUsernameShow=function(c){var a,b="<span>Here are some suggestions:</span><ul>";a=this;c.each(function(d){b+=
'<li><a href="#">'+d+"</a></li>"});b+="</ul>";this.elements.form.username.previous().setStyle({color:"#FF0000",fontWeight:"bold"});if(this.elements.suggestedUsernames!==null){this.elements.suggestedUsernames.update(b);this.elements.suggestedUsernames.show()}else{this.elements.suggestedUsernames=new Element("div",{id:"suggestedUsernames"});this.elements.suggestedUsernames.insert({top:b});this.elements.form.username.insert({after:this.elements.suggestedUsernames})}$$("#suggestedUsernames a").each(function(d){d.observe("click",
function(e){a.elements.form.username.value=e.target.innerHTML;a.elements.form.password.focus();a.validate()})});this.redraw()};this.show=function(c,a,b){if(this.doShow(c,a,b)){$J(this.elements.root).removeClass().addClass("register");iwin.AuthUI.event.register.show(this.target);this.redraw()}};this.hide=function(c){if(this.doHide()){iwin.AuthUI.event.register.hide(this.target);this.suggestUsernameReset()}c&&Event.stop(c)};this.submit=function(){try{var c=this.elements.form.username,a=this.elements.form.password,
b=this.elements.form.confirmPassword,d=this.elements.form.email,e=this.elements.form.emailOptIn;c.value=$F(c).strip();a.value=$F(a).strip();b.value=$F(b).strip();d.value=$F(d).strip();iwin.Auth.register($F(c),$F(a),$F(b),$F(d),e.checked)}catch(f){console.error(f)}};this.validate=function(){try{var c=this.elements.form.username,a=this.elements.form.password,b=this.elements.form.confirmPassword,d=this.elements.form.email,e=this.elements.form.emailOptIn;c.value=$F(c).strip();a.value=$F(a).strip();b.value=
$F(b).strip();d.value=$F(d).strip();iwin.Auth.register($F(c),$F(a),$F(b),$F(d),e.checked,true)}catch(f){console.error(f)}}};iwin.AuthUI.RegisterUI.prototype=new iwin.AuthUI.CommonUI("register-ui");iwin.AuthUI.Register=new iwin.AuthUI.RegisterUI;
iwin.AuthUI.ForgotUI=function(){this.init=function(){console.debug(this.name+" initializing...");this.elements.overlay=$("authOverlay");this.elements.root=$("auth");this.elements.container=$("authReset");this.elements.outline=$("authOutline");this.elements.msg=$("resetInfo");this.elements.err=$("resetError");this.elements.close=$("authClose");this.elements.form=$("resetForm");this.elements.submitButton=$("resetButton");this.elements.submittingImage=$("resetLoading");this.elements.close.observe("click",
iwin.AuthUI.event.close);var c=this.hide.bindAsEventListener(this);Event.observe(document,"iwin:auth-ui:close",c);this.elements.submitButton.observe("click",function(a){this.submit();Event.stop(a)}.bindAsEventListener(this));$(this.elements.form).select("input[type=text]","input[type=password]").each(function(a){$(a).observe("keypress",function(b){if(b.keyCode==Event.KEY_RETURN){this.submit();Event.stop(b)}}.bindAsEventListener(this))}.bind(this));Event.observe(document,"iwin:auth-ui:login:show",
this.hide.bindAsEventListener(this));Event.observe(document,"iwin:auth-ui:register:show",this.hide.bindAsEventListener(this));Event.observe(document,"iwin:auth:reset:start",this.submitting.bindAsEventListener(this));Event.observe(document,"iwin:auth:reset:success",this.success.bindAsEventListener(this));Event.observe(document,"iwin:auth:reset:problem",function(a){this.resetForError(iwin.AuthUI.messages.toDisplay(a.memo))}.bindAsEventListener(this));Event.observe(document,"iwin:auth:reset:failure",
function(){this.resetForError("<li>Credentials service temporarily unavailable.</li>")}.bindAsEventListener(this));Event.observe(window,"resize",this.reposition.bind(this));this.initialized=true;console.debug(this.name+" initialization complete.")};this.show=function(c,a,b){console.debug(this.name+" - show");this.elements.form&&this.elements.form.show();if(this.doShow(c,a,b)){$J(this.elements.root).removeClass().addClass("forgotPassword");iwin.AuthUI.event.forgot.show();this.redraw()}};this.hide=
function(c){console.debug(this.name+" - hide");this.doHide()&&iwin.AuthUI.event.forgot.hide(this.target);c&&Event.stop(c)};this.success=function(){this.elements.err.hide();this.elements.form.hide();this.elements.msg.show();this.elements.msg.update("An email has been sent containing your username and a link to set a new password.");this.redraw()};this.submit=function(){try{var c=this.elements.form.email,a=this.elements.form.confirmEmail;c.value=$F(c).strip();a.value=$F(a).strip();iwin.Auth.resetCredentials($F(c),
$F(a))}catch(b){console.error(b)}}};iwin.AuthUI.ForgotUI.prototype=new iwin.AuthUI.CommonUI("forgot-ui");iwin.AuthUI.Forgot=new iwin.AuthUI.ForgotUI;
iwin.AuthUI.SetPwdUI=function(){this.init=function(){console.debug(this.name+" initializing...");this.elements.overlay=$("authOverlay");this.elements.root=$("auth");this.elements.container=$("authSetpwd");this.elements.outline=$("authOutline");this.elements.msg=$("setpwdInfo");this.elements.err=$("setpwdError");this.elements.close=$("authClose");this.elements.form=$("setpwdForm");this.elements.submitButton=$("setpwdButton");this.elements.submittingImage=$("setpwdLoading");this.elements.close.observe("click",
iwin.AuthUI.event.close);var c=this.hide.bindAsEventListener(this);Event.observe(document,"iwin:auth-ui:close",c);this.elements.submitButton.observe("click",function(a){this.submit();Event.stop(a)}.bindAsEventListener(this));$(this.elements.form).select("input[type=text]","input[type=password]").each(function(a){$(a).observe("keypress",function(b){if(b.keyCode==Event.KEY_RETURN){this.submit();Event.stop(b)}}.bindAsEventListener(this))}.bind(this));Event.observe(document,"iwin:auth-ui:login:show",
this.hide.bindAsEventListener(this));Event.observe(document,"iwin:auth-ui:register:show",this.hide.bindAsEventListener(this));Event.observe(document,"iwin:auth:setpwd:start",this.submitting.bindAsEventListener(this));Event.observe(document,"iwin:auth:setpwd:success",this.success.bindAsEventListener(this));Event.observe(document,"iwin:auth:setpwd:problem",function(a){this.resetForError(iwin.AuthUI.messages.toDisplay(a.memo))}.bindAsEventListener(this));Event.observe(document,"iwin:auth:setpwd:failure",
function(){this.resetForError("<li>Credentials service temporarily unavailable.</li>")}.bindAsEventListener(this));Event.observe(window,"resize",this.reposition.bind(this));this.initialized=true;console.debug(this.name+" initialization complete.")};this.show=function(c,a,b){console.debug(this.name+" - show");this.elements.form&&this.elements.form.show();if(this.doShow(c,a,b)){$J(this.elements.root).removeClass().addClass("setPassword");iwin.AuthUI.event.setpwd.show();this.redraw()}};this.hide=function(c){console.debug(this.name+
" - hide");this.doHide()&&iwin.AuthUI.event.setpwd.hide(this.target);c&&Event.stop(c)};this.success=function(){this.elements.err.hide();this.elements.form.hide();this.elements.msg.show();this.elements.msg.update("Your password has been updated.");this.redraw()};this.submit=function(){try{var c=this.elements.form.newPassword,a=this.elements.form.newPasswordConfirm;c.value=$F(c).strip();a.value=$F(a).strip();iwin.Auth.setpwd($F(c),$F(a),window.location.href)}catch(b){console.error(b)}}};
iwin.AuthUI.SetPwdUI.prototype=new iwin.AuthUI.CommonUI("setpwd-ui");iwin.AuthUI.SetPwd=new iwin.AuthUI.SetPwdUI;
iwin.AuthUI.init=function(){$J("#authOverlay").hide().removeClass("hideObj");i$("authOutline").setStyle({opacity:0.5});allRounded={tl:{radius:4},tr:{radius:4},bl:{radius:4},br:{radius:4},antiAlias:true};topRounded={tl:{radius:4},tr:{radius:4},bl:{radius:0},br:{radius:0},antiAlias:true};bottomRounded={tl:{radius:0},tr:{radius:0},bl:{radius:4},br:{radius:4},antiAlias:true};curvyCorners(allRounded,"#authOutline")};function AuthUI_Login_show(c,a){iwin.AuthUI.Login.show(c,a)}
function AuthUI_Login_hide(){iwin.AuthUI.Login.hide()}function AuthUI_Register_show(c,a){iwin.AuthUI.Register.show(c,a)}function AuthUI_Register_hide(){iwin.AuthUI.Register.hide()}Event.observe(document,"dom:loaded",function(){if($("authOutline")){console.debug("Initializing Auth UI");iwin.AuthUI.init();iwin.AuthUI.Login.init();iwin.AuthUI.Register.init();iwin.AuthUI.Forgot.init();iwin.AuthUI.SetPwd.init();document.fire("iwin:auth-ui:ready")}});

