(function(){var W=this,AB,F=W.jQuery,S=W.$,T=W.jQuery=W.$=function(B,A){return new T.fn.init(B,A)},M=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,AC=/^.[^:#\[\.,]*$/;T.fn=T.prototype={init:function(a,B){a=a||document;if(a.nodeType){this[0]=a;this.length=1;this.context=a;return this}if(typeof a==="string"){var C=M.exec(a);if(C&&(C[1]||!B)){if(C[1]){a=T.clean([C[1]],B)}else{var A=document.getElementById(C[3]);if(A&&A.id!=C[3]){return T().find(a)}var D=T(A||[]);D.context=document;D.selector=a;return D}}else{return T(B).find(a)}}else{if(T.isFunction(a)){return T(document).ready(a)}}if(a.selector&&a.context){this.selector=a.selector;this.context=a.context}return this.setArray(T.isArray(a)?a:T.makeArray(a))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(A){return A===AB?Array.prototype.slice.call(this):this[A]},pushStack:function(C,A,D){var B=T(C);B.prevObject=this;B.context=this.context;if(A==="find"){B.selector=this.selector+(this.selector?" ":"")+D}else{if(A){B.selector=this.selector+"."+A+"("+D+")"}}return B},setArray:function(A){this.length=0;Array.prototype.push.apply(this,A);return this},each:function(A,B){return T.each(this,A,B)},index:function(A){return T.inArray(A&&A.jquery?A[0]:A,this)},attr:function(C,A,B){var D=C;if(typeof C==="string"){if(A===AB){return this[0]&&T[B||"attr"](this[0],C)}else{D={};D[C]=A}}return this.each(function(a){for(C in D){T.attr(B?this.style:this,C,T.prop(this,D[C],B,a,C))}})},css:function(B,A){if((B=="width"||B=="height")&&parseFloat(A)<0){A=AB}return this.attr(B,A,"curCSS")},text:function(A){if(typeof A!=="object"&&A!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(A))}var B="";T.each(A||this,function(){T.each(this.childNodes,function(){if(this.nodeType!=8){B+=this.nodeType!=1?this.nodeValue:T.fn.text([this])}})});return B},wrapAll:function(B){if(this[0]){var A=T(B,this[0].ownerDocument).clone();if(this[0].parentNode){A.insertBefore(this[0])}A.map(function(){var C=this;while(C.firstChild){C=C.firstChild}return C}).append(this)}return this},wrapInner:function(A){return this.each(function(){T(this).contents().wrapAll(A)})},wrap:function(A){return this.each(function(){T(this).wrapAll(A)})},append:function(){return this.domManip(arguments,true,function(A){if(this.nodeType==1){this.appendChild(A)}})},prepend:function(){return this.domManip(arguments,true,function(A){if(this.nodeType==1){this.insertBefore(A,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(A){this.parentNode.insertBefore(A,this)})},after:function(){return this.domManip(arguments,false,function(A){this.parentNode.insertBefore(A,this.nextSibling)})},end:function(){return this.prevObject||T([])},push:[].push,sort:[].sort,splice:[].splice,find:function(B){if(this.length===1){var A=this.pushStack([],"find",B);A.length=0;T.find(B,this[0],A);return A}else{return this.pushStack(T.unique(T.map(this,function(C){return T.find(B,C)})),"find",B)}},clone:function(B){var D=this.map(function(){if(!T.support.noCloneEvent&&!T.isXMLDoc(this)){var b=this.outerHTML;if(!b){var a=this.ownerDocument.createElement("div");a.appendChild(this.cloneNode(true));b=a.innerHTML}return T.clean([b.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(B===true){var A=this.find("*").andSelf(),C=0;D.find("*").andSelf().each(function(){if(this.nodeName!==A[C].nodeName){return }var c=T.data(A[C],"events");for(var a in c){for(var b in c[a]){T.event.add(this,a,c[a][b],c[a][b].data)}}C++})}return D},filter:function(A){return this.pushStack(T.isFunction(A)&&T.grep(this,function(B,C){return A.call(B,C)})||T.multiFilter(A,T.grep(this,function(B){return B.nodeType===1})),"filter",A)},closest:function(C){var A=T.expr.match.POS.test(C)?T(C):null,B=0;return this.map(function(){var D=this;while(D&&D.ownerDocument){if(A?A.index(D)>-1:T(D).is(C)){T.data(D,"closest",B);return D}D=D.parentNode;B++}})},not:function(B){if(typeof B==="string"){if(AC.test(B)){return this.pushStack(T.multiFilter(B,this,true),"not",B)}else{B=T.multiFilter(B,this)}}var A=B.length&&B[B.length-1]!==AB&&!B.nodeType;return this.filter(function(){return A?T.inArray(this,B)<0:this!=B})},add:function(A){return this.pushStack(T.unique(T.merge(this.get(),typeof A==="string"?T(A):T.makeArray(A))))},is:function(A){return !!A&&T.multiFilter(A,this).length>0},hasClass:function(A){return !!A&&this.is("."+A)},val:function(C){if(C===AB){var e=this[0];if(e){if(T.nodeName(e,"option")){return(e.attributes.value||{}).specified?e.value:e.text}if(T.nodeName(e,"select")){var a=e.selectedIndex,B=[],A=e.options,b=e.type=="select-one";if(a<0){return null}for(var d=b?a:0,D=b?a+1:A.length;d<D;d++){var c=A[d];if(c.selected){C=T(c).val();if(b){return C}B.push(C)}}return B}return(e.value||"").replace(/\r/g,"")}return AB}if(typeof C==="number"){C+=""}return this.each(function(){if(this.nodeType!=1){return }if(T.isArray(C)&&/radio|checkbox/.test(this.type)){this.checked=(T.inArray(this.value,C)>=0||T.inArray(this.name,C)>=0)}else{if(T.nodeName(this,"select")){var f=T.makeArray(C);T("option",this).each(function(){this.selected=(T.inArray(this.value,f)>=0||T.inArray(this.text,f)>=0)});if(!f.length){this.selectedIndex=-1}}else{this.value=C}}})},html:function(A){return A===AB?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(A)},replaceWith:function(A){return this.after(A).remove()},eq:function(A){return this.slice(A,+A+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(A){return this.pushStack(T.map(this,function(B,C){return A.call(B,C,B)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(D,A,B){if(this[0]){var a=(this[0].ownerDocument||this[0]).createDocumentFragment(),d=T.clean(D,(this[0].ownerDocument||this[0]),a),b=a.firstChild;if(b){for(var c=0,e=this.length;c<e;c++){B.call(C(this[c],b),this.length>1||c>0?a.cloneNode(true):a)}}if(d){T.each(d,E)}}return this;function C(g,f){return A&&T.nodeName(g,"table")&&T.nodeName(f,"tr")?(g.getElementsByTagName("tbody")[0]||g.appendChild(g.ownerDocument.createElement("tbody"))):g}}};T.fn.init.prototype=T.fn;function E(B,A){if(A.src){T.ajax({url:A.src,async:false,dataType:"script"})}else{T.globalEval(A.text||A.textContent||A.innerHTML||"")}if(A.parentNode){A.parentNode.removeChild(A)}}function AD(){return +new Date}T.extend=T.fn.extend=function(){var C=arguments[0]||{},a=1,D=arguments.length,d=false,b;if(typeof C==="boolean"){d=C;C=arguments[1]||{};a=2}if(typeof C!=="object"&&!T.isFunction(C)){C={}}if(D==a){C=this;--a}for(;a<D;a++){if((b=arguments[a])!=null){for(var c in b){var B=C[c],A=b[c];if(C===A){continue}if(d&&A&&typeof A==="object"&&!A.nodeType){C[c]=T.extend(d,B||(A.length!=null?[]:{}),A)}else{if(A!==AB){C[c]=A}}}}}return C};var AG=/z-?index|font-?weight|opacity|zoom|line-?height/i,Q=document.defaultView||{},L=Object.prototype.toString;T.extend({noConflict:function(A){W.$=S;if(A){W.jQuery=F}return T},isFunction:function(A){return L.call(A)==="[object Function]"},isArray:function(A){return L.call(A)==="[object Array]"},isXMLDoc:function(A){return A.nodeType===9&&A.documentElement.nodeName!=="HTML"||!!A.ownerDocument&&T.isXMLDoc(A.ownerDocument)},globalEval:function(A){if(A&&/\S/.test(A)){var B=document.getElementsByTagName("head")[0]||document.documentElement,C=document.createElement("script");C.type="text/javascript";if(T.support.scriptEval){C.appendChild(document.createTextNode(A))}else{C.text=A}B.insertBefore(C,B.firstChild);B.removeChild(C)}},nodeName:function(A,B){return A.nodeName&&A.nodeName.toUpperCase()==B.toUpperCase()},each:function(a,A,b){var c,D=0,C=a.length;if(b){if(C===AB){for(c in a){if(A.apply(a[c],b)===false){break}}}else{for(;D<C;){if(A.apply(a[D++],b)===false){break}}}}else{if(C===AB){for(c in a){if(A.call(a[c],c,a[c])===false){break}}}else{for(var B=a[0];D<C&&A.call(B,D,B)!==false;B=a[++D]){}}}return a},prop:function(B,A,C,D,a){if(T.isFunction(A)){A=A.call(B,D)}return typeof A==="number"&&C=="curCSS"&&!AG.test(a)?A+"px":A},className:{add:function(B,A){T.each((A||"").split(/\s+/),function(D,C){if(B.nodeType==1&&!T.className.has(B.className,C)){B.className+=(B.className?" ":"")+C}})},remove:function(B,A){if(B.nodeType==1){B.className=A!==AB?T.grep(B.className.split(/\s+/),function(C){return !T.className.has(A,C)}).join(" "):""}},has:function(A,B){return A&&T.inArray(B,(A.className||A).toString().split(/\s+/))>-1}},swap:function(B,C,A){var a={};for(var D in C){a[D]=B.style[D];B.style[D]=C[D]}A.call(B);for(var D in C){B.style[D]=a[D]}},css:function(a,c,C,d){if(c=="width"||c=="height"){var A,b={position:"absolute",visibility:"hidden",display:"block"},B=c=="width"?["Left","Right"]:["Top","Bottom"];function D(){A=c=="width"?a.offsetWidth:a.offsetHeight;if(d==="border"){return }T.each(B,function(){if(!d){A-=parseFloat(T.curCSS(a,"padding"+this,true))||0}if(d==="margin"){A+=parseFloat(T.curCSS(a,"margin"+this,true))||0}else{A-=parseFloat(T.curCSS(a,"border"+this+"Width",true))||0}})}if(a.offsetWidth!==0){D()}else{T.swap(a,b,D)}return Math.max(0,Math.round(A))}return T.curCSS(a,c,C)},curCSS:function(a,d,c){var B,e=a.style;if(d=="opacity"&&!T.support.opacity){B=T.attr(e,"opacity");return B==""?"1":B}if(d.match(/float/i)){d=H}if(!c&&e&&e[d]){B=e[d]}else{if(Q.getComputedStyle){if(d.match(/float/i)){d="float"}d=d.replace(/([A-Z])/g,"-$1").toLowerCase();var A=Q.getComputedStyle(a,null);if(A){B=A.getPropertyValue(d)}if(d=="opacity"&&B==""){B="1"}}else{if(a.currentStyle){var D=d.replace(/\-(\w)/g,function(g,f){return f.toUpperCase()});B=a.currentStyle[d]||a.currentStyle[D];if(!/^\d+(px)?$/i.test(B)&&/^\d/.test(B)){var b=e.left,C=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=B||0;B=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=C}}}}return B},clean:function(c,B,D){B=B||document;if(typeof B.createElement==="undefined"){B=B.ownerDocument||B[0]&&B[0].ownerDocument||document}if(!D&&c.length===1&&typeof c[0]==="string"){var a=/^<(\w+)\s*\/?>$/.exec(c[0]);if(a){return[B.createElement(a[1])]}}var b=[],d=[],A=B.createElement("div");T.each(c,function(h,e){if(typeof e==="number"){e+=""}if(!e){return }if(typeof e==="string"){e=e.replace(/(<(\w+)[^>]*?)\/>/g,function(n,m,o){return o.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?n:m+"></"+o+">"});var j=e.replace(/^\s+/,"").substring(0,10).toLowerCase();var g=!j.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!j.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||j.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!j.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!j.indexOf("<td")||!j.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!j.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!T.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];A.innerHTML=g[1]+e+g[2];while(g[0]--){A=A.lastChild}if(!T.support.tbody){var f=/<tbody/i.test(e),k=!j.indexOf("<table")&&!f?A.firstChild&&A.firstChild.childNodes:g[1]=="<table>"&&!f?A.childNodes:[];for(var l=k.length-1;l>=0;--l){if(T.nodeName(k[l],"tbody")&&!k[l].childNodes.length){k[l].parentNode.removeChild(k[l])}}}if(!T.support.leadingWhitespace&&/^\s/.test(e)){A.insertBefore(B.createTextNode(e.match(/^\s*/)[0]),A.firstChild)}e=T.makeArray(A.childNodes)}if(e.nodeType){b.push(e)}else{b=T.merge(b,e)}});if(D){for(var C=0;b[C];C++){if(T.nodeName(b[C],"script")&&(!b[C].type||b[C].type.toLowerCase()==="text/javascript")){d.push(b[C].parentNode?b[C].parentNode.removeChild(b[C]):b[C])}else{if(b[C].nodeType===1){b.splice.apply(b,[C+1,0].concat(T.makeArray(b[C].getElementsByTagName("script"))))}D.appendChild(b[C])}}return d}return b},attr:function(C,b,B){if(!C||C.nodeType==3||C.nodeType==8){return AB}var a=!T.isXMLDoc(C),A=B!==AB;b=a&&T.props[b]||b;if(C.tagName){var c=/href|src|style/.test(b);if(b=="selected"&&C.parentNode){C.parentNode.selectedIndex}if(b in C&&a&&!c){if(A){if(b=="type"&&T.nodeName(C,"input")&&C.parentNode){throw"type property can't be changed"}C[b]=B}if(T.nodeName(C,"form")&&C.getAttributeNode(b)){return C.getAttributeNode(b).nodeValue}if(b=="tabIndex"){var D=C.getAttributeNode("tabIndex");return D&&D.specified?D.value:C.nodeName.match(/(button|input|object|select|textarea)/i)?0:C.nodeName.match(/^(a|area)$/i)&&C.href?0:AB}return C[b]}if(!T.support.style&&a&&b=="style"){return T.attr(C.style,"cssText",B)}if(A){C.setAttribute(b,""+B)}var d=!T.support.hrefNormalized&&a&&c?C.getAttribute(b,2):C.getAttribute(b);return d===null?AB:d}if(!T.support.opacity&&b=="opacity"){if(A){C.zoom=1;C.filter=(C.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(B)+""=="NaN"?"":"alpha(opacity="+B*100+")")}return C.filter&&C.filter.indexOf("opacity=")>=0?(parseFloat(C.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}b=b.replace(/-([a-z])/ig,function(f,e){return e.toUpperCase()});if(A){C[b]=B}return C[b]},trim:function(A){return(A||"").replace(/^\s+|\s+$/g,"")},makeArray:function(A){var C=[];if(A!=null){var B=A.length;if(B==null||typeof A==="string"||T.isFunction(A)||A.setInterval){C[0]=A}else{while(B){C[--B]=A[B]}}}return C},inArray:function(B,A){for(var D=0,C=A.length;D<C;D++){if(A[D]===B){return D}}return -1},merge:function(B,a){var D=0,C,A=B.length;if(!T.support.getAll){while((C=a[D++])!=null){if(C.nodeType!=8){B[A++]=C}}}else{while((C=a[D++])!=null){B[A++]=C}}return B},unique:function(A){var b=[],c={};try{for(var a=0,D=A.length;a<D;a++){var B=T.data(A[a]);if(!c[B]){c[B]=true;b.push(A[a])}}}catch(C){b=A}return b},grep:function(a,A,b){var D=[];for(var C=0,B=a.length;C<B;C++){if(!b!=!A(a[C],C)){D.push(a[C])}}return D},map:function(b,A){var a=[];for(var D=0,C=b.length;D<C;D++){var B=A(b[D],D);if(B!=null){a[a.length]=B}}return a.concat.apply([],a)}});var O=navigator.userAgent.toLowerCase();T.browser={version:(O.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(O),opera:/opera/.test(O),msie:/msie/.test(O)&&!/opera/.test(O),mozilla:/mozilla/.test(O)&&!/(compatible|webkit)/.test(O)};T.each({parent:function(A){return A.parentNode},parents:function(A){return T.dir(A,"parentNode")},next:function(A){return T.nth(A,2,"nextSibling")},prev:function(A){return T.nth(A,2,"previousSibling")},nextAll:function(A){return T.dir(A,"nextSibling")},prevAll:function(A){return T.dir(A,"previousSibling")},siblings:function(A){return T.sibling(A.parentNode.firstChild,A)},children:function(A){return T.sibling(A.firstChild)},contents:function(A){return T.nodeName(A,"iframe")?A.contentDocument||A.contentWindow.document:T.makeArray(A.childNodes)}},function(B,A){T.fn[B]=function(D){var C=T.map(this,A);if(D&&typeof D=="string"){C=T.multiFilter(D,C)}return this.pushStack(T.unique(C),B,D)}});T.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(B,A){T.fn[B]=function(d){var a=[],C=T(d);for(var D=0,c=C.length;D<c;D++){var b=(D>0?this.clone(true):this).get();T.fn[A].apply(T(C[D]),b);a=a.concat(b)}return this.pushStack(a,B,d)}});T.each({removeAttr:function(A){T.attr(this,A,"");if(this.nodeType==1){this.removeAttribute(A)}},addClass:function(A){T.className.add(this,A)},removeClass:function(A){T.className.remove(this,A)},toggleClass:function(A,B){if(typeof B!=="boolean"){B=!T.className.has(this,A)}T.className[B?"add":"remove"](this,A)},remove:function(A){if(!A||T.filter(A,[this]).length){T("*",this).add([this]).each(function(){T.event.remove(this);T.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){T(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(B,A){T.fn[B]=function(){return this.each(A,arguments)}});function Y(B,A){return B[0]&&parseInt(T.curCSS(B[0],A,true),10)||0}var AA="jQuery"+AD(),I=0,R={};T.extend({cache:{},data:function(C,D,B){C=C==W?R:C;var A=C[AA];if(!A){A=C[AA]=++I}if(D&&!T.cache[A]){T.cache[A]={}}if(B!==AB){T.cache[A][D]=B}return D?T.cache[A][D]:A},removeData:function(C,D){C=C==W?R:C;var A=C[AA];if(D){if(T.cache[A]){delete T.cache[A][D];D="";for(D in T.cache[A]){break}if(!D){T.removeData(C)}}}else{try{delete C[AA]}catch(B){if(C.removeAttribute){C.removeAttribute(AA)}}delete T.cache[A]}},queue:function(C,D,A){if(C){D=(D||"fx")+"queue";var B=T.data(C,D);if(!B||T.isArray(A)){B=T.data(C,D,T.makeArray(A))}else{if(A){B.push(A)}}}return B},dequeue:function(A,B){var D=T.queue(A,B),C=D.shift();if(!B||B==="fx"){C=D[0]}if(C!==AB){C.call(A)}}});T.fn.extend({data:function(D,B){var A=D.split(".");A[1]=A[1]?"."+A[1]:"";if(B===AB){var C=this.triggerHandler("getData"+A[1]+"!",[A[0]]);if(C===AB&&this.length){C=T.data(this[0],D)}return C===AB&&A[1]?this.data(A[0]):C}else{return this.trigger("setData"+A[1]+"!",[A[0],B]).each(function(){T.data(this,D,B)})}},removeData:function(A){return this.each(function(){T.removeData(this,A)})},queue:function(B,A){if(typeof B!=="string"){A=B;B="fx"}if(A===AB){return T.queue(this[0],B)}return this.each(function(){var C=T.queue(this,B,A);if(B=="fx"&&C.length==1){C[0].call(this)}})},dequeue:function(A){return this.each(function(){T.dequeue(this,A)})}});(function(){var B=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,d=0,h=Object.prototype.toString;var k=function(o,s,AJ,AI){AJ=AJ||[];s=s||document;if(s.nodeType!==1&&s.nodeType!==9){return[]}if(!o||typeof o!=="string"){return AJ}var n=[],q,x,u,t,z,r,p=true;B.lastIndex=0;while((q=B.exec(o))!==null){n.push(q[1]);if(q[2]){r=RegExp.rightContext;break}}if(n.length>1&&c.exec(o)){if(n.length===2&&g.relative[n[0]]){x=f(n[0]+n[1],s)}else{x=g.relative[n[0]]?[s]:k(n.shift(),s);while(n.length){o=n.shift();if(g.relative[o]){o+=n.shift()}x=f(o,x)}}}else{var y=AI?{expr:n.pop(),set:l(AI)}:k.find(n.pop(),n.length===1&&s.parentNode?s.parentNode:s,C(s));x=k.filter(y.expr,y.set);if(n.length>0){u=l(x)}else{p=false}while(n.length){var v=n.pop(),w=v;if(!g.relative[v]){v=""}else{w=n.pop()}if(w==null){w=s}g.relative[v](u,w,C(s))}}if(!u){u=x}if(!u){throw"Syntax error, unrecognized expression: "+(v||o)}if(h.call(u)==="[object Array]"){if(!p){AJ.push.apply(AJ,u)}else{if(s.nodeType===1){for(var m=0;u[m]!=null;m++){if(u[m]&&(u[m]===true||u[m].nodeType===1&&e(s,u[m]))){AJ.push(x[m])}}}else{for(var m=0;u[m]!=null;m++){if(u[m]&&u[m].nodeType===1){AJ.push(x[m])}}}}}else{l(u,AJ)}if(r){k(r,s,AJ,AI);if(j){hasDuplicate=false;AJ.sort(j);if(hasDuplicate){for(var m=1;m<AJ.length;m++){if(AJ[m]===AJ[m-1]){AJ.splice(m--,1)}}}}}return AJ};k.matches=function(n,m){return k(n,null,null,m)};k.find=function(m,t,u){var n,p;if(!m){return[]}for(var q=0,r=g.order.length;q<r;q++){var o=g.order[q],p;if((p=g.match[o].exec(m))){var s=RegExp.leftContext;if(s.substr(s.length-1)!=="\\"){p[1]=(p[1]||"").replace(/\\/g,"");n=g.find[o](p,t,u);if(n!=null){m=m.replace(g.match[o],"");break}}}}if(!n){n=t.getElementsByTagName("*")}return{set:n,expr:m}};k.filter=function(z,AI,w,q){var r=z,u=[],m=AI,o,t,n=AI&&AI[0]&&C(AI[0]);while(z&&AI.length){for(var AJ in g.filter){if((o=g.match[AJ].exec(z))!=null){var s=g.filter[AJ],v,x;t=false;if(m==u){u=[]}if(g.preFilter[AJ]){o=g.preFilter[AJ](o,m,w,u,q,n);if(!o){t=v=true}else{if(o===true){continue}}}if(o){for(var p=0;(x=m[p])!=null;p++){if(x){v=s(x,o,p,m);var y=q^!!v;if(w&&v!=null){if(y){t=true}else{m[p]=false}}else{if(y){u.push(x);t=true}}}}}if(v!==AB){if(!w){m=u}z=z.replace(g.match[AJ],"");if(!t){return[]}break}}}if(z==r){if(t==null){throw"Syntax error, unrecognized expression: "+z}else{break}}r=z}return m};var g=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(m){return m.getAttribute("href")}},relative:{"+":function(m,t,n){var p=typeof t==="string",u=p&&!/\W/.test(t),o=p&&!u;if(u&&!n){t=t.toUpperCase()}for(var q=0,r=m.length,s;q<r;q++){if((s=m[q])){while((s=s.previousSibling)&&s.nodeType!==1){}m[q]=o||s&&s.nodeName===t?s||false:s===t}}if(o){k.filter(t,m,true)}},">":function(r,o,q){var t=typeof o==="string";if(t&&!/\W/.test(o)){o=q?o:o.toUpperCase();for(var n=0,p=r.length;n<p;n++){var s=r[n];if(s){var m=s.parentNode;r[n]=m.nodeName===o?m:false}}}else{for(var n=0,p=r.length;n<p;n++){var s=r[n];if(s){r[n]=t?s.parentNode:s.parentNode===o}}if(t){k.filter(o,r,true)}}},"":function(m,o,q){var n=d++,p=A;if(!o.match(/\W/)){var r=o=q?o:o.toUpperCase();p=D}p("parentNode",o,n,m,r,q)},"~":function(m,o,q){var n=d++,p=A;if(typeof o==="string"&&!o.match(/\W/)){var r=o=q?o:o.toUpperCase();p=D}p("previousSibling",o,n,m,r,q)}},find:{ID:function(o,n,m){if(typeof n.getElementById!=="undefined"&&!m){var p=n.getElementById(o[1]);return p?[p]:[]}},NAME:function(n,r,q){if(typeof r.getElementsByName!=="undefined"){var o=[],s=r.getElementsByName(n[1]);for(var m=0,p=s.length;m<p;m++){if(s[m].getAttribute("name")===n[1]){o.push(s[m])}}return o.length===0?null:o}},TAG:function(n,m){return m.getElementsByTagName(n[1])}},preFilter:{CLASS:function(m,o,n,p,r,q){m=" "+m[1].replace(/\\/g,"")+" ";if(q){return m}for(var t=0,s;(s=o[t])!=null;t++){if(s){if(r^(s.className&&(" "+s.className+" ").indexOf(m)>=0)){if(!n){p.push(s)}}else{if(n){o[t]=false}}}}return false},ID:function(m){return m[1].replace(/\\/g,"")},TAG:function(n,o){for(var m=0;o[m]===false;m++){}return o[m]&&C(o[m])?n[1]:n[1].toUpperCase()},CHILD:function(n){if(n[1]=="nth"){var m=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(n[2]=="even"&&"2n"||n[2]=="odd"&&"2n+1"||!/\D/.test(n[2])&&"0n+"+n[2]||n[2]);n[2]=(m[1]+(m[2]||1))-0;n[3]=m[3]-0}n[0]=d++;return n},ATTR:function(s,o,n,p,r,q){var m=s[1].replace(/\\/g,"");if(!q&&g.attrMap[m]){s[1]=g.attrMap[m]}if(s[2]==="~="){s[4]=" "+s[4]+" "}return s},PSEUDO:function(r,o,n,p,q){if(r[1]==="not"){if(r[3].match(B).length>1||/^\w/.test(r[3])){r[3]=k(r[3],null,null,o)}else{var m=k.filter(r[3],o,n,true^q);if(!n){p.push.apply(p,m)}return false}}else{if(g.match.POS.test(r[0])||g.match.CHILD.test(r[0])){return true}}return r},POS:function(m){m.unshift(true);return m}},filters:{enabled:function(m){return m.disabled===false&&m.type!=="hidden"},disabled:function(m){return m.disabled===true},checked:function(m){return m.checked===true},selected:function(m){m.parentNode.selectedIndex;return m.selected===true},parent:function(m){return !!m.firstChild},empty:function(m){return !m.firstChild},has:function(m,n,o){return !!k(o[3],m).length},header:function(m){return/h\d/i.test(m.nodeName)},text:function(m){return"text"===m.type},radio:function(m){return"radio"===m.type},checkbox:function(m){return"checkbox"===m.type},file:function(m){return"file"===m.type},password:function(m){return"password"===m.type},submit:function(m){return"submit"===m.type},image:function(m){return"image"===m.type},reset:function(m){return"reset"===m.type},button:function(m){return"button"===m.type||m.nodeName.toUpperCase()==="BUTTON"},input:function(m){return/input|select|textarea|button/i.test(m.nodeName)}},setFilters:{first:function(m,n){return n===0},last:function(n,o,p,m){return o===m.length-1},even:function(m,n){return n%2===0},odd:function(m,n){return n%2===1},lt:function(m,n,o){return n<o[3]-0},gt:function(m,n,o){return n>o[3]-0},nth:function(m,n,o){return o[3]-0==n},eq:function(m,n,o){return o[3]-0==n}},filter:{PSEUDO:function(r,n,m,q){var o=n[1],t=g.filters[o];if(t){return t(r,m,n,q)}else{if(o==="contains"){return(r.textContent||r.innerText||"").indexOf(n[3])>=0}else{if(o==="not"){var s=n[3];for(var m=0,p=s.length;m<p;m++){if(s[m]===r){return false}}return true}}}},CHILD:function(t,q){var n=q[1],s=t;switch(n){case"only":case"first":while(s=s.previousSibling){if(s.nodeType===1){return false}}if(n=="first"){return true}s=t;case"last":while(s=s.nextSibling){if(s.nodeType===1){return false}}return true;case"nth":var r=q[2],u=q[3];if(r==1&&u==0){return true}var o=q[0],v=t.parentNode;if(v&&(v.sizcache!==o||!t.nodeIndex)){var p=0;for(s=v.firstChild;s;s=s.nextSibling){if(s.nodeType===1){s.nodeIndex=++p}}v.sizcache=o}var m=t.nodeIndex-u;if(r==0){return m==0}else{return(m%r==0&&m/r>=0)}}},ID:function(m,n){return m.nodeType===1&&m.getAttribute("id")===n},TAG:function(m,n){return(n==="*"&&m.nodeType===1)||m.nodeName===n},CLASS:function(m,n){return(" "+(m.className||m.getAttribute("class"))+" ").indexOf(n)>-1},ATTR:function(r,m){var n=m[1],p=g.attrHandle[n]?g.attrHandle[n](r):r[n]!=null?r[n]:r.getAttribute(n),q=p+"",s=m[2],o=m[4];return p==null?s==="!=":s==="="?q===o:s==="*="?q.indexOf(o)>=0:s==="~="?(" "+q+" ").indexOf(o)>=0:!o?q&&p!==false:s==="!="?q!=o:s==="^="?q.indexOf(o)===0:s==="$="?q.substr(q.length-o.length)===o:s==="|="?q===o||q.substr(0,o.length+1)===o+"-":false},POS:function(r,o,n,q){var p=o[2],m=g.setFilters[p];if(m){return m(r,n,o,q)}}}};var c=g.match.POS;for(var a in g.match){g.match[a]=RegExp(g.match[a].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var l=function(m,n){m=Array.prototype.slice.call(m);if(n){n.push.apply(n,m);return n}return m};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(b){l=function(q,m){var o=m||[];if(h.call(q)==="[object Array]"){Array.prototype.push.apply(o,q)}else{if(typeof q.length==="number"){for(var n=0,p=q.length;n<p;n++){o.push(q[n])}}else{for(var n=0;q[n];n++){o.push(q[n])}}}return o}}var j;if(document.documentElement.compareDocumentPosition){j=function(n,o){var m=n.compareDocumentPosition(o)&4?-1:n===o?0:1;if(m===0){hasDuplicate=true}return m}}else{if("sourceIndex" in document.documentElement){j=function(n,o){var m=n.sourceIndex-o.sourceIndex;if(m===0){hasDuplicate=true}return m}}else{if(document.createRange){j=function(m,o){var n=m.ownerDocument.createRange(),p=o.ownerDocument.createRange();n.selectNode(m);n.collapse(true);p.selectNode(o);p.collapse(true);var q=n.compareBoundaryPoints(Range.START_TO_END,p);if(q===0){hasDuplicate=true}return q}}}}(function(){var n=document.createElement("form"),m="script"+(new Date).getTime();n.innerHTML="<input name='"+m+"'/>";var o=document.documentElement;o.insertBefore(n,o.firstChild);if(!!document.getElementById(m)){g.find.ID=function(s,r,q){if(typeof r.getElementById!=="undefined"&&!q){var p=r.getElementById(s[1]);return p?p.id===s[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===s[1]?[p]:AB:[]}};g.filter.ID=function(q,p){var r=typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id");return q.nodeType===1&&r&&r.nodeValue===p}}o.removeChild(n)})();(function(){var m=document.createElement("div");m.appendChild(document.createComment(""));if(m.getElementsByTagName("*").length>0){g.find.TAG=function(p,q){var r=q.getElementsByTagName(p[1]);if(p[1]==="*"){var n=[];for(var o=0;r[o];o++){if(r[o].nodeType===1){n.push(r[o])}}r=n}return r}}m.innerHTML="<a href='#'></a>";if(m.firstChild&&typeof m.firstChild.getAttribute!=="undefined"&&m.firstChild.getAttribute("href")!=="#"){g.attrHandle.href=function(n){return n.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var n=k,m=document.createElement("div");m.innerHTML="<p class='TEST'></p>";if(m.querySelectorAll&&m.querySelectorAll(".TEST").length===0){return }k=function(r,s,p,o){s=s||document;if(!o&&s.nodeType===9&&!C(s)){try{return l(s.querySelectorAll(r),p)}catch(q){}}return n(r,s,p,o)};k.find=n.find;k.filter=n.filter;k.selectors=n.selectors;k.matches=n.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var m=document.createElement("div");m.innerHTML="<div class='test e'></div><div class='test'></div>";if(m.getElementsByClassName("e").length===0){return }m.lastChild.className="e";if(m.getElementsByClassName("e").length===1){return }g.order.splice(1,0,"CLASS");g.find.CLASS=function(p,o,n){if(typeof o.getElementsByClassName!=="undefined"&&!n){return o.getElementsByClassName(p[1])}}})()}function D(s,n,o,u,m,v){var w=s=="previousSibling"&&!v;for(var q=0,r=u.length;q<r;q++){var t=u[q];if(t){if(w&&t.nodeType===1){t.sizcache=o;t.sizset=q}t=t[s];var p=false;while(t){if(t.sizcache===o){p=u[t.sizset];break}if(t.nodeType===1&&!v){t.sizcache=o;t.sizset=q}if(t.nodeName===n){p=t;break}t=t[s]}u[q]=p}}}function A(s,n,o,u,m,v){var w=s=="previousSibling"&&!v;for(var q=0,r=u.length;q<r;q++){var t=u[q];if(t){if(w&&t.nodeType===1){t.sizcache=o;t.sizset=q}t=t[s];var p=false;while(t){if(t.sizcache===o){p=u[t.sizset];break}if(t.nodeType===1){if(!v){t.sizcache=o;t.sizset=q}if(typeof n!=="string"){if(t===n){p=true;break}}else{if(k.filter(n,[t]).length>0){p=t;break}}}t=t[s]}u[q]=p}}}var e=document.compareDocumentPosition?function(m,n){return m.compareDocumentPosition(n)&16}:function(m,n){return m!==n&&(m.contains?m.contains(n):true)};var C=function(m){return m.nodeType===9&&m.documentElement.nodeName!=="HTML"||!!m.ownerDocument&&C(m.ownerDocument)};var f=function(p,r){var m=[],t="",s,n=r.nodeType?[r]:r;while((s=g.match.PSEUDO.exec(p))){t+=s[0];p=p.replace(g.match.PSEUDO,"")}p=g.relative[p]?p+"*":p;for(var q=0,o=n.length;q<o;q++){k(p,n[q],m)}return k.filter(t,m)};T.find=k;T.filter=k.filter;T.expr=k.selectors;T.expr[":"]=T.expr.filters;k.selectors.filters.hidden=function(m){return m.offsetWidth===0||m.offsetHeight===0};k.selectors.filters.visible=function(m){return m.offsetWidth>0||m.offsetHeight>0};k.selectors.filters.animated=function(m){return T.grep(T.timers,function(n){return m===n.elem}).length};T.multiFilter=function(m,o,n){if(n){m=":not("+m+")"}return k.matches(m,o)};T.dir=function(n,o){var p=[],m=n[o];while(m&&m!=document){if(m.nodeType==1){p.push(m)}m=m[o]}return p};T.nth=function(q,p,n,m){p=p||1;var o=0;for(;q;q=q[n]){if(q.nodeType==1&&++o==p){break}}return q};T.sibling=function(m,n){var o=[];for(;m;m=m.nextSibling){if(m.nodeType==1&&m!=n){o.push(m)}}return o};return ;W.Sizzle=k})();T.event={add:function(C,b,D,A){if(C.nodeType==3||C.nodeType==8){return }if(C.setInterval&&C!=W){C=W}if(!D.guid){D.guid=this.guid++}if(A!==AB){var a=D;D=this.proxy(a);D.data=A}var c=T.data(C,"events")||T.data(C,"events",{}),B=T.data(C,"handle")||T.data(C,"handle",function(){return typeof T!=="undefined"&&!T.event.triggered?T.event.handle.apply(arguments.callee.elem,arguments):AB});B.elem=C;T.each(b.split(/\s+/),function(g,f){var e=f.split(".");f=e.shift();D.type=e.slice().sort().join(".");var d=c[f];if(T.event.specialAll[f]){T.event.specialAll[f].setup.call(C,A,e)}if(!d){d=c[f]={};if(!T.event.special[f]||T.event.special[f].setup.call(C,A,e)===false){if(C.addEventListener){C.addEventListener(f,B,false)}else{if(C.attachEvent){C.attachEvent("on"+f,B)}}}}d[D.guid]=D;T.event.global[f]=true});C=null},guid:1,global:{},remove:function(B,a,C){if(B.nodeType==3||B.nodeType==8){return }var b=T.data(B,"events"),c,d;if(b){if(a===AB||(typeof a==="string"&&a.charAt(0)==".")){for(var D in b){this.remove(B,D+(a||""))}}else{if(a.type){C=a.handler;a=a.type}T.each(a.split(/\s+/),function(j,g){var e=g.split(".");g=e.shift();var h=RegExp("(^|\\.)"+e.slice().sort().join(".*\\.")+"(\\.|$)");if(b[g]){if(C){delete b[g][C.guid]}else{for(var f in b[g]){if(h.test(b[g][f].type)){delete b[g][f]}}}if(T.event.specialAll[g]){T.event.specialAll[g].teardown.call(B,e)}for(c in b[g]){break}if(!c){if(!T.event.special[g]||T.event.special[g].teardown.call(B,e)===false){if(B.removeEventListener){B.removeEventListener(g,T.data(B,"handle"),false)}else{if(B.detachEvent){B.detachEvent("on"+g,T.data(B,"handle"))}}}c=null;delete b[g]}}})}for(c in b){break}if(!c){var A=T.data(B,"handle");if(A){A.elem=null}T.removeData(B,"events");T.removeData(B,"handle")}}},trigger:function(D,B,a,d){var b=D.type||D;if(!d){D=typeof D==="object"?D[AA]?D:T.extend(T.Event(b),D):T.Event(b);if(b.indexOf("!")>=0){D.type=b=b.slice(0,-1);D.exclusive=true}if(!a){D.stopPropagation();if(this.global[b]){T.each(T.cache,function(){if(this.events&&this.events[b]){T.event.trigger(D,B,this.handle.elem)}})}}if(!a||a.nodeType==3||a.nodeType==8){return AB}D.result=AB;D.target=a;B=T.makeArray(B);B.unshift(D)}D.currentTarget=a;var C=T.data(a,"handle");if(C){C.apply(a,B)}if((!a[b]||(T.nodeName(a,"a")&&b=="click"))&&a["on"+b]&&a["on"+b].apply(a,B)===false){D.result=false}if(!d&&a[b]&&!D.isDefaultPrevented()&&!(T.nodeName(a,"a")&&b=="click")){this.triggered=true;try{a[b]()}catch(A){}}this.triggered=false;if(!D.isPropagationStopped()){var c=a.parentNode||a.ownerDocument;if(c){T.event.trigger(D,B,c,true)}}},handle:function(B){var C,d;B=arguments[0]=T.event.fix(B||W.event);B.currentTarget=this;var A=B.type.split(".");B.type=A.shift();C=!A.length&&!B.exclusive;var D=RegExp("(^|\\.)"+A.slice().sort().join(".*\\.")+"(\\.|$)");d=(T.data(this,"events")||{})[B.type];for(var b in d){var a=d[b];if(C||D.test(a.type)){B.handler=a;B.data=a.data;var c=a.apply(this,arguments);if(c!==AB){B.result=c;if(c===false){B.preventDefault();B.stopPropagation()}}if(B.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(C){if(C[AA]){return C}var a=C;C=T.Event(a);for(var D=this.props.length,A;D;){A=this.props[--D];C[A]=a[A]}if(!C.target){C.target=C.srcElement||document}if(C.target.nodeType==3){C.target=C.target.parentNode}if(!C.relatedTarget&&C.fromElement){C.relatedTarget=C.fromElement==C.target?C.toElement:C.fromElement}if(C.pageX==null&&C.clientX!=null){var B=document.documentElement,b=document.body;C.pageX=C.clientX+(B&&B.scrollLeft||b&&b.scrollLeft||0)-(B.clientLeft||0);C.pageY=C.clientY+(B&&B.scrollTop||b&&b.scrollTop||0)-(B.clientTop||0)}if(!C.which&&((C.charCode||C.charCode===0)?C.charCode:C.keyCode)){C.which=C.charCode||C.keyCode}if(!C.metaKey&&C.ctrlKey){C.metaKey=C.ctrlKey}if(!C.which&&C.button){C.which=(C.button&1?1:(C.button&2?3:(C.button&4?2:0)))}return C},proxy:function(A,B){B=B||function(){return A.apply(this,arguments)};B.guid=A.guid=A.guid||B.guid||this.guid++;return B},special:{ready:{setup:P,teardown:function(){}}},specialAll:{live:{setup:function(B,A){T.event.add(this,A[0],AF)},teardown:function(A){if(A.length){var C=0,B=RegExp("(^|\\.)"+A[0]+"(\\.|$)");T.each((T.data(this,"events").live||{}),function(){if(B.test(this.type)){C++}});if(C<1){T.event.remove(this,A[0],AF)}}}}}};T.Event=function(A){if(!this.preventDefault){return new T.Event(A)}if(A&&A.type){this.originalEvent=A;this.type=A.type}else{this.type=A}this.timeStamp=AD();this[AA]=true};function X(){return false}function J(){return true}T.Event.prototype={preventDefault:function(){this.isDefaultPrevented=J;var A=this.originalEvent;if(!A){return }if(A.preventDefault){A.preventDefault()}A.returnValue=false},stopPropagation:function(){this.isPropagationStopped=J;var A=this.originalEvent;if(!A){return }if(A.stopPropagation){A.stopPropagation()}A.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=J;this.stopPropagation()},isDefaultPrevented:X,isPropagationStopped:X,isImmediatePropagationStopped:X};var AH=function(B){var C=B.relatedTarget;while(C&&C!=this){try{C=C.parentNode}catch(A){C=this}}if(C!=this){B.type=B.data;T.event.handle.apply(this,arguments)}};T.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(A,B){T.event.special[B]={setup:function(){T.event.add(this,A,AH,B)},teardown:function(){T.event.remove(this,A,AH)}}});T.fn.extend({bind:function(B,A,C){return B=="unload"?this.one(B,A,C):this.each(function(){T.event.add(this,B,C||A,C&&A)})},one:function(B,A,C){var D=T.event.proxy(C||A,function(a){T(this).unbind(a,D);return(C||A).apply(this,arguments)});return this.each(function(){T.event.add(this,B,D,C&&A)})},unbind:function(A,B){return this.each(function(){T.event.remove(this,A,B)})},trigger:function(B,A){return this.each(function(){T.event.trigger(B,A,this)})},triggerHandler:function(C,A){if(this[0]){var B=T.Event(C);B.preventDefault();B.stopPropagation();T.event.trigger(B,A,this[0]);return B.result}},toggle:function(A){var C=arguments,B=1;while(B<C.length){T.event.proxy(A,C[B++])}return this.click(T.event.proxy(A,function(D){this.lastToggle=(this.lastToggle||0)%B;D.preventDefault();return C[this.lastToggle++].apply(this,arguments)||false}))},hover:function(B,A){return this.mouseenter(B).mouseleave(A)},ready:function(A){P();if(T.isReady){A.call(document,T)}else{T.readyList.push(A)}return this},live:function(A,B){var C=T.event.proxy(B);C.guid+=this.selector+A;T(document).bind(Z(A,this.selector),this.selector,C);return this},die:function(A,B){T(document).unbind(Z(A,this.selector),B?{guid:B.guid+this.selector+A}:null);return this}});function AF(A){var D=RegExp("(^|\\.)"+A.type+"(\\.|$)"),B=true,C=[];T.each(T.data(this,"events").live||[],function(c,b){if(D.test(b.type)){var a=T(A.target).closest(b.data)[0];if(a){C.push({elem:a,fn:b})}}});C.sort(function(a,b){return T.data(a.elem,"closest")-T.data(b.elem,"closest")});T.each(C,function(){if(this.fn.call(this.elem,A,this.fn.data)===false){return(B=false)}});return B}function Z(A,B){return["live",A,B.replace(/\./g,"`").replace(/ /g,"|")].join(".")}T.extend({isReady:false,readyList:[],ready:function(){if(!T.isReady){T.isReady=true;if(T.readyList){T.each(T.readyList,function(){this.call(document,T)});T.readyList=null}T(document).triggerHandler("ready")}}});var G=false;function P(){if(G){return }G=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);T.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);T.ready()}});if(document.documentElement.doScroll&&W==W.top){(function(){if(T.isReady){return }try{document.documentElement.doScroll("left")}catch(A){setTimeout(arguments.callee,0);return }T.ready()})()}}}T.event.add(W,"load",T.ready)}T.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(A,B){T.fn[B]=function(C){return C?this.bind(B,C):this.trigger(B)}});T(W).bind("unload",function(){for(var A in T.cache){if(A!=1&&T.cache[A].handle){T.event.remove(T.cache[A].handle.elem)}}});(function(){T.support={};var b=document.documentElement,a=document.createElement("script"),A=document.createElement("div"),B="script"+(new Date).getTime();A.style.display="none";A.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var D=A.getElementsByTagName("*"),c=A.getElementsByTagName("a")[0];if(!D||!D.length||!c){return }T.support={leadingWhitespace:A.firstChild.nodeType==3,tbody:!A.getElementsByTagName("tbody").length,objectAll:!!A.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!A.getElementsByTagName("link").length,style:/red/.test(c.getAttribute("style")),hrefNormalized:c.getAttribute("href")==="/a",opacity:c.style.opacity==="0.5",cssFloat:!!c.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};a.type="text/javascript";try{a.appendChild(document.createTextNode("window."+B+"=1;"))}catch(C){}b.insertBefore(a,b.firstChild);if(W[B]){T.support.scriptEval=true;delete W[B]}b.removeChild(a);if(A.attachEvent&&A.fireEvent){A.attachEvent("onclick",function(){T.support.noCloneEvent=false;A.detachEvent("onclick",arguments.callee)});A.cloneNode(true).fireEvent("onclick")}T(function(){var d=document.createElement("div");d.style.width=d.style.paddingLeft="1px";document.body.appendChild(d);T.boxModel=T.support.boxModel=d.offsetWidth===2;document.body.removeChild(d).style.display="none"})})();var H=T.support.cssFloat?"cssFloat":"styleFloat";T.props={"for":"htmlFor","class":"className","float":H,cssFloat:H,styleFloat:H,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};T.fn.extend({_load:T.fn.load,load:function(a,B,A){if(typeof a!=="string"){return this._load(a)}var C=a.indexOf(" ");if(C>=0){var c=a.slice(C,a.length);a=a.slice(0,C)}var D="GET";if(B){if(T.isFunction(B)){A=B;B=null}else{if(typeof B==="object"){B=T.param(B);D="POST"}}}var b=this;T.ajax({url:a,type:D,dataType:"html",data:B,complete:function(e,d){if(d=="success"||d=="notmodified"){b.html(c?T("<div/>").append(e.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(c):e.responseText)}if(A){b.each(A,[e.responseText,d,e])}}});return this},serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?T.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(C,B){var A=T(this).val();return A==null?null:T.isArray(A)?T.map(A,function(D,a){return{name:B.name,value:D}}):{name:B.name,value:A}}).get()}});T.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(B,A){T.fn[A]=function(C){return this.bind(A,C)}});var N=AD();T.extend({get:function(D,B,A,C){if(T.isFunction(B)){A=B;B=null}return T.ajax({type:"GET",url:D,data:B,success:A,dataType:C})},getScript:function(B,A){return T.get(B,null,A,"script")},getJSON:function(C,B,A){return T.get(C,B,A,"json")},post:function(D,B,A,C){if(T.isFunction(B)){A=B;B={}}return T.ajax({type:"POST",url:D,data:B,success:A,dataType:C})},ajaxSetup:function(A){T.extend(T.ajaxSettings,A)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return W.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(g){g=T.extend(true,g,T.extend(true,{},T.ajaxSettings,g));var A,o=/=\?(&|$)/g,b,B,n=g.type.toUpperCase();if(g.data&&g.processData&&typeof g.data!=="string"){g.data=T.param(g.data)}if(g.dataType=="jsonp"){if(n=="GET"){if(!g.url.match(o)){g.url+=(g.url.match(/\?/)?"&":"?")+(g.jsonp||"callback")+"=?"}}else{if(!g.data||!g.data.match(o)){g.data=(g.data?g.data+"&":"")+(g.jsonp||"callback")+"=?"}}g.dataType="json"}if(g.dataType=="json"&&(g.data&&g.data.match(o)||g.url.match(o))){A="jsonp"+N++;if(g.data){g.data=(g.data+"").replace(o,"="+A+"$1")}g.url=g.url.replace(o,"="+A+"$1");g.dataType="script";W[A]=function(r){B=r;l();h();W[A]=AB;try{delete W[A]}catch(q){}if(m){m.removeChild(D)}}}if(g.dataType=="script"&&g.cache==null){g.cache=false}if(g.cache===false&&n=="GET"){var p=AD();var C=g.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+p+"$2");g.url=C+((C==g.url)?(g.url.match(/\?/)?"&":"?")+"_="+p:"")}if(g.data&&n=="GET"){g.url+=(g.url.match(/\?/)?"&":"?")+g.data;g.data=null}if(g.global&&!T.active++){T.event.trigger("ajaxStart")}var c=/^(\w+:)?\/\/([^\/?#]+)/.exec(g.url);if(g.dataType=="script"&&n=="GET"&&c&&(c[1]&&c[1]!=location.protocol||c[2]!=location.host)){var m=document.getElementsByTagName("head")[0];var D=document.createElement("script");D.src=g.url;if(g.scriptCharset){D.charset=g.scriptCharset}if(!A){var e=false;D.onload=D.onreadystatechange=function(){if(!e&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){e=true;l();h();D.onload=D.onreadystatechange=null;m.removeChild(D)}}}m.appendChild(D);return AB}var j=false;var k=g.xhr();if(g.username){k.open(n,g.url,g.async,g.username,g.password)}else{k.open(n,g.url,g.async)}try{if(g.data){k.setRequestHeader("Content-Type",g.contentType)}if(g.ifModified){k.setRequestHeader("If-Modified-Since",T.lastModified[g.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}k.setRequestHeader("X-Requested-With","XMLHttpRequest");k.setRequestHeader("Accept",g.dataType&&g.accepts[g.dataType]?g.accepts[g.dataType]+", */*":g.accepts._default)}catch(a){}if(g.beforeSend&&g.beforeSend(k,g)===false){if(g.global&&!--T.active){T.event.trigger("ajaxStop")}k.abort();return false}if(g.global){T.event.trigger("ajaxSend",[k,g])}var f=function(s){if(k.readyState==0){if(d){clearInterval(d);d=null;if(g.global&&!--T.active){T.event.trigger("ajaxStop")}}}else{if(!j&&k&&(k.readyState==4||s=="timeout")){j=true;if(d){clearInterval(d);d=null}b=s=="timeout"?"timeout":!T.httpSuccess(k)?"error":g.ifModified&&T.httpNotModified(k,g.url)?"notmodified":"success";if(b=="success"){try{B=T.httpData(k,g.dataType,g)}catch(q){b="parsererror"}}if(b=="success"){var r;try{r=k.getResponseHeader("Last-Modified")}catch(q){}if(g.ifModified&&r){T.lastModified[g.url]=r}if(!A){l()}}else{T.handleError(g,k,b)}h();if(s){k.abort()}if(g.async){k=null}}}};if(g.async){var d=setInterval(f,13);if(g.timeout>0){setTimeout(function(){if(k&&!j){f("timeout")}},g.timeout)}}try{k.send(g.data)}catch(a){T.handleError(g,k,null,a)}if(!g.async){f()}function l(){if(g.success){g.success(B,b)}if(g.global){T.event.trigger("ajaxSuccess",[k,g])}}function h(){if(g.complete){g.complete(k,b)}if(g.global){T.event.trigger("ajaxComplete",[k,g])}if(g.global&&!--T.active){T.event.trigger("ajaxStop")}}return k},handleError:function(C,A,D,B){if(C.error){C.error(A,D,B)}if(C.global){T.event.trigger("ajaxError",[A,C,B])}},active:0,httpSuccess:function(A){try{return !A.status&&location.protocol=="file:"||(A.status>=200&&A.status<300)||A.status==304||A.status==1223}catch(B){}return false},httpNotModified:function(B,D){try{var A=B.getResponseHeader("Last-Modified");return B.status==304||A==T.lastModified[D]}catch(C){}return false},httpData:function(A,C,D){var a=A.getResponseHeader("content-type"),b=C=="xml"||!C&&a&&a.indexOf("xml")>=0,B=b?A.responseXML:A.responseText;if(b&&B.documentElement.tagName=="parsererror"){throw"parsererror"}if(D&&D.dataFilter){B=D.dataFilter(B,C)}if(typeof B==="string"){if(C=="script"){T.globalEval(B)}if(C=="json"){B=W["eval"]("("+B+")")}}return B},param:function(D){var B=[];function A(b,a){B[B.length]=encodeURIComponent(b)+"="+encodeURIComponent(a)}if(T.isArray(D)||D.jquery){T.each(D,function(){A(this.name,this.value)})}else{for(var C in D){if(T.isArray(D[C])){T.each(D[C],function(){A(C,this)})}else{A(C,T.isFunction(D[C])?D[C]():D[C])}}}return B.join("&").replace(/%20/g,"+")}});var V={},U,AE=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function K(B,C){var A={};T.each(AE.concat.apply([],AE.slice(0,C)),function(){A[this]=B});return A}T.fn.extend({show:function(C,A){if(C){return this.animate(K("show",3),C,A)}else{for(var a=0,c=this.length;a<c;a++){var d=T.data(this[a],"olddisplay");this[a].style.display=d||"";if(T.css(this[a],"display")==="none"){var b=this[a].tagName,B;if(V[b]){B=V[b]}else{var D=T("<"+b+" />").appendTo("body");B=D.css("display");if(B==="none"){B="block"}D.remove();V[b]=B}T.data(this[a],"olddisplay",B)}}for(var a=0,c=this.length;a<c;a++){this[a].style.display=T.data(this[a],"olddisplay")||""}return this}},hide:function(B,A){if(B){return this.animate(K("hide",3),B,A)}else{for(var C=0,D=this.length;C<D;C++){var a=T.data(this[C],"olddisplay");if(!a&&a!=="none"){T.data(this[C],"olddisplay",T.css(this[C],"display"))}}for(var C=0,D=this.length;C<D;C++){this[C].style.display="none"}return this}},_toggle:T.fn.toggle,toggle:function(A,B){var C=typeof A==="boolean";return T.isFunction(A)&&T.isFunction(B)?this._toggle.apply(this,arguments):A==null||C?this.each(function(){var D=C?A:T(this).is(":hidden");T(this)[D?"show":"hide"]()}):this.animate(K("toggle",3),A,B)},fadeTo:function(C,A,B){return this.animate({opacity:A},C,B)},animate:function(A,D,B,C){var a=T.speed(D,B,C);return this[a.queue===false?"each":"queue"](function(){var c=T.extend({},a),e,b=this.nodeType==1&&T(this).is(":hidden"),d=this;for(e in A){if(A[e]=="hide"&&b||A[e]=="show"&&!b){return c.complete.call(this)}if((e=="height"||e=="width")&&this.style){c.display=T.css(this,"display");c.overflow=this.style.overflow}}if(c.overflow!=null){this.style.overflow="hidden"}c.curAnim=T.extend({},A);T.each(A,function(l,g){var h=new T.fx(d,c,l);if(/toggle|show|hide/.test(g)){h[g=="toggle"?b?"show":"hide":g](A)}else{var j=g.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),f=h.cur(true)||0;if(j){var m=parseFloat(j[2]),k=j[3]||"px";if(k!="px"){d.style[l]=(m||1)+k;f=((m||1)/h.cur(true))*f;d.style[l]=f+k}if(j[1]){m=((j[1]=="-="?-1:1)*m)+f}h.custom(f,m,k)}else{h.custom(f,g,"")}}});return true})},stop:function(B,C){var A=T.timers;if(B){this.queue([])}this.each(function(){for(var D=A.length-1;D>=0;D--){if(A[D].elem==this){if(C){A[D](true)}A.splice(D,1)}}});if(!C){this.dequeue()}return this}});T.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(B,A){T.fn[B]=function(D,C){return this.animate(A,D,C)}});T.extend({speed:function(B,A,C){var D=typeof B==="object"?B:{complete:C||!C&&A||T.isFunction(B)&&B,duration:B,easing:C&&A||A&&!T.isFunction(A)&&A};D.duration=T.fx.off?0:typeof D.duration==="number"?D.duration:T.fx.speeds[D.duration]||T.fx.speeds._default;D.old=D.complete;D.complete=function(){if(D.queue!==false){T(this).dequeue()}if(T.isFunction(D.old)){D.old.call(this)}};return D},easing:{linear:function(B,A,D,C){return D+C*B},swing:function(B,A,D,C){return((-Math.cos(B*Math.PI)/2)+0.5)*C+D}},timers:[],fx:function(B,C,A){this.options=C;this.elem=B;this.prop=A;if(!C.orig){C.orig={}}}});T.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(T.fx.step[this.prop]||T.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(A){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var B=parseFloat(T.css(this.elem,this.prop,A));return B&&B>-10000?B:parseFloat(T.curCSS(this.elem,this.prop))||0},custom:function(A,B,C){this.startTime=AD();this.start=A;this.end=B;this.unit=C||this.unit||"px";this.now=this.start;this.pos=this.state=0;var a=this;function D(b){return a.step(b)}D.elem=this.elem;if(D()&&T.timers.push(D)&&!U){U=setInterval(function(){var b=T.timers;for(var c=0;c<b.length;c++){if(!b[c]()){b.splice(c--,1)}}if(!b.length){clearInterval(U);U=AB}},13)}},show:function(){this.options.orig[this.prop]=T.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());T(this.elem).show()},hide:function(){this.options.orig[this.prop]=T.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(C){var D=AD();if(C||D>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var b=true;for(var a in this.options.curAnim){if(this.options.curAnim[a]!==true){b=false}}if(b){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(T.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){T(this.elem).hide()}if(this.options.hide||this.options.show){for(var B in this.options.curAnim){T.attr(this.elem.style,B,this.options.orig[B])}}this.options.complete.call(this.elem)}return false}else{var A=D-this.startTime;this.state=A/this.options.duration;this.pos=T.easing[this.options.easing||(T.easing.swing?"swing":"linear")](this.state,A,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};T.extend(T.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(A){T.attr(A.elem.style,"opacity",A.now)},_default:function(A){if(A.elem.style&&A.elem.style[A.prop]!=null){A.elem.style[A.prop]=A.now+A.unit}else{A.elem[A.prop]=A.now}}}});if(document.documentElement.getBoundingClientRect){T.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return T.offset.bodyOffset(this[0])}var b=this[0].getBoundingClientRect(),C=this[0].ownerDocument,c=C.body,d=C.documentElement,A=d.clientTop||c.clientTop||0,B=d.clientLeft||c.clientLeft||0,D=b.top+(self.pageYOffset||T.boxModel&&d.scrollTop||c.scrollTop)-A,a=b.left+(self.pageXOffset||T.boxModel&&d.scrollLeft||c.scrollLeft)-B;return{top:D,left:a}}}else{T.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return T.offset.bodyOffset(this[0])}T.offset.initialized||T.offset.initialize();var b=this[0],e=b.offsetParent,f=b,A=b.ownerDocument,C,d=A.documentElement,a=A.body,D=A.defaultView,g=D.getComputedStyle(b,null),B=b.offsetTop,c=b.offsetLeft;while((b=b.parentNode)&&b!==a&&b!==d){C=D.getComputedStyle(b,null);B-=b.scrollTop,c-=b.scrollLeft;if(b===e){B+=b.offsetTop,c+=b.offsetLeft;if(T.offset.doesNotAddBorder&&!(T.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.tagName))){B+=parseInt(C.borderTopWidth,10)||0,c+=parseInt(C.borderLeftWidth,10)||0}f=e,e=b.offsetParent}if(T.offset.subtractsBorderForOverflowNotVisible&&C.overflow!=="visible"){B+=parseInt(C.borderTopWidth,10)||0,c+=parseInt(C.borderLeftWidth,10)||0}g=C}if(g.position==="relative"||g.position==="static"){B+=a.offsetTop,c+=a.offsetLeft}if(g.position==="fixed"){B+=Math.max(d.scrollTop,a.scrollTop),c+=Math.max(d.scrollLeft,a.scrollLeft)}return{top:B,left:c}}}T.offset={initialize:function(){if(this.initialized){return }var C=document.body,e=document.createElement("div"),c,d,A,b,B,f,a=C.style.marginTop,D='<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>';B={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(f in B){e.style[f]=B[f]}e.innerHTML=D;C.insertBefore(e,C.firstChild);c=e.firstChild,d=c.firstChild,b=c.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(d.offsetTop!==5);this.doesAddBorderForTableAndCells=(b.offsetTop===5);c.style.overflow="hidden",c.style.position="relative";this.subtractsBorderForOverflowNotVisible=(d.offsetTop===-5);C.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(C.offsetTop===0);C.style.marginTop=a;C.removeChild(e);this.initialized=true},bodyOffset:function(C){T.offset.initialized||T.offset.initialize();var A=C.offsetTop,B=C.offsetLeft;if(T.offset.doesNotIncludeMarginInBodyOffset){A+=parseInt(T.curCSS(C,"marginTop",true),10)||0,B+=parseInt(T.curCSS(C,"marginLeft",true),10)||0}return{top:A,left:B}}};T.fn.extend({position:function(){var B=0,C=0,a;if(this[0]){var D=this.offsetParent(),A=this.offset(),b=/^body|html$/i.test(D[0].tagName)?{top:0,left:0}:D.offset();A.top-=Y(this,"marginTop");A.left-=Y(this,"marginLeft");b.top+=Y(D,"borderTopWidth");b.left+=Y(D,"borderLeftWidth");a={top:A.top-b.top,left:A.left-b.left}}return a},offsetParent:function(){var A=this[0].offsetParent||document.body;while(A&&(!/^body|html$/i.test(A.tagName)&&T.css(A,"position")=="static")){A=A.offsetParent}return T(A)}});T.each(["Left","Top"],function(B,C){var A="scroll"+C;T.fn[A]=function(D){if(!this[0]){return null}return D!==AB?this.each(function(){this==W||this==document?W.scrollTo(!B?D:T(W).scrollLeft(),B?D:T(W).scrollTop()):this[A]=D}):this[0]==W||this[0]==document?self[B?"pageYOffset":"pageXOffset"]||T.boxModel&&document.documentElement[A]||document.body[A]:this[0][A]}});T.each(["Height","Width"],function(B,D){var b=B?"Left":"Top",C=B?"Right":"Bottom",a=D.toLowerCase();T.fn["inner"+D]=function(){return this[0]?T.css(this[0],a,false,"padding"):null};T.fn["outer"+D]=function(c){return this[0]?T.css(this[0],a,false,c?"margin":"border"):null};var A=D.toLowerCase();T.fn[A]=function(c){return this[0]==W?document.compatMode=="CSS1Compat"&&document.documentElement["client"+D]||document.body["client"+D]:this[0]==document?Math.max(document.documentElement["client"+D],document.body["scroll"+D],document.documentElement["scroll"+D],document.body["offset"+D],document.documentElement["offset"+D]):c===AB?(this.length?T.css(this[0],A):null):this.css(A,typeof c==="string"?c:c+"px")}})})();jQuery.iUtil={getPosition:function(D,A){var H=0;var F=0;var I=D.style;var J=false;if(A&&jQuery.curCSS(D,"display")=="none"){var E=I.visibility;var G=I.position;J=true;I.visibility="hidden";I.display="block";I.position="absolute"}var B=D;if(B.getBoundingClientRect){var C=B.getBoundingClientRect();H=C.left+Math.max(document.documentElement.scrollLeft,document.body.scrollLeft)-2;F=C.top+Math.max(document.documentElement.scrollTop,document.body.scrollTop)-2}else{H=B.offsetLeft;F=B.offsetTop;B=B.offsetParent;if(D!=B){while(B){H+=B.offsetLeft;F+=B.offsetTop;B=B.offsetParent}}if(jQuery.browser.safari&&jQuery.curCSS(D,"position")=="absolute"){H-=document.body.offsetLeft;F-=document.body.offsetTop}B=D.parentNode;while(B&&B.tagName.toUpperCase()!="BODY"&&B.tagName.toUpperCase()!="HTML"){if(jQuery.curCSS(B,"display")!="inline"){H-=B.scrollLeft;F-=B.scrollTop}B=B.parentNode}}if(J==true){I.display="none";I.position=G;I.visibility=E}return{x:H,y:F}},getPositionLite:function(B){var A=0,C=0;while(B){A+=B.offsetLeft||0;C+=B.offsetTop||0;B=B.offsetParent}return{x:A,y:C}},getSize:function(E){var B=0;var C=0;var D=0;var G=0;if(jQuery.curCSS(E,"display")!="none"){D=E.offsetWidth;G=E.offsetHeight;B=parseInt(jQuery.curCSS(E,"width"),10);C=parseInt(jQuery.curCSS(E,"height"),10)}else{var F=E.style;var A=$(E).attr("style");F.visibility="hidden";F.display="block";F.position="absolute";D=E.offsetWidth;G=E.offsetHeight;B=parseInt(jQuery.curCSS(E,"width"),10);C=parseInt(jQuery.curCSS(E,"height"),10);$(E).attr("style",A||"")}return{w:B,h:C,wb:D,hb:G}},getSizeLite:function(A){return{wb:A.offsetWidth||0,hb:A.offsetHeight||0}},getClient:function(C){var B,A;if(C){A=C.clientWidth;B=C.clientHeight}else{var D=document.documentElement;A=window.innerWidth||self.innerWidth||(D&&D.clientWidth)||document.body.clientWidth;B=window.innerHeight||self.innerHeight||(D&&D.clientHeight)||document.body.clientHeight}return{w:A,h:B}},getScroll:function(G){var D=0,B=0,A=0,E=0,C=0,F=0;if(G&&G.nodeName.toLowerCase()!="body"){D=G.scrollTop;B=G.scrollLeft;A=G.scrollWidth;E=G.scrollHeight}else{if(document.documentElement){D=document.documentElement.scrollTop;B=document.documentElement.scrollLeft;A=document.documentElement.scrollWidth;E=document.documentElement.scrollHeight}else{if(document.body){D=document.body.scrollTop;B=document.body.scrollLeft;A=document.body.scrollWidth;E=document.body.scrollHeight}}if(typeof pageYOffset!="undefined"){D=pageYOffset;B=pageXOffset}C=self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;F=self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}return{t:D,l:B,w:A,h:E,iw:C,ih:F}},getMargins:function(F,C){var D=jQuery.curCSS(F,"marginTop")||"";var E=jQuery.curCSS(F,"marginRight")||"";var A=jQuery.curCSS(F,"marginBottom")||"";var B=jQuery.curCSS(F,"marginLeft")||"";if(C){return{t:parseInt(D,10)||0,r:parseInt(E,10)||0,b:parseInt(A,10)||0,l:parseInt(B,10)}}else{return{t:D,r:E,b:A,l:B}}},getPadding:function(F,C){var D=jQuery.curCSS(F,"paddingTop")||"";var E=jQuery.curCSS(F,"paddingRight")||"";var A=jQuery.curCSS(F,"paddingBottom")||"";var B=jQuery.curCSS(F,"paddingLeft")||"";if(C){return{t:parseInt(D,10)||0,r:parseInt(E,10)||0,b:parseInt(A,10)||0,l:parseInt(B,10)}}else{return{t:D,r:E,b:A,l:B}}},getBorder:function(F,C){var D=jQuery.curCSS(F,"borderTopWidth")||"";var E=jQuery.curCSS(F,"borderRightWidth")||"";var A=jQuery.curCSS(F,"borderBottomWidth")||"";var B=jQuery.curCSS(F,"borderLeftWidth")||"";if(C){return{t:parseInt(D,10)||0,r:parseInt(E,10)||0,b:parseInt(A,10)||0,l:parseInt(B,10)||0}}else{return{t:D,r:E,b:A,l:B}}},getPointer:function(B){var A=B.pageX||(B.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))||0;var C=B.pageY||(B.clientY+(document.documentElement.scrollTop||document.body.scrollTop))||0;return{x:A,y:C}},traverseDOM:function(A,B){B(A);A=A.firstChild;while(A){jQuery.iUtil.traverseDOM(A,B);A=A.nextSibling}},purgeEvents:function(A){jQuery.iUtil.traverseDOM(A,function(C){for(var B in C){if(typeof C[B]==="function"){C[B]=null}}})},centerEl:function(D,C){var A=$.iUtil.getScroll();var B=$.iUtil.getSize(D);if(!C||C=="vertically"){$(D).css({top:A.t+((Math.max(A.h,A.ih)-A.t-B.hb)/2)+"px"})}if(!C||C=="horizontally"){$(D).css({left:A.l+((Math.max(A.w,A.iw)-A.l-B.wb)/2)+"px"})}},fixPNG:function(B,D){var A=$('img[@src*="png"]',B||document),C;A.each(function(){C=this.src;this.src=D;this.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+C+"')"})}};[].indexOf||(Array.prototype.indexOf=function(B,D){D=(D==null)?0:D;var A=this.length;for(var C=D;C<A;C++){if(this[C]==B){return C}}return -1});(function(A){A.fn.extend({ScrollTo:function(D,C,E,B){return this.eq(0).each(function(){var G=A.iUtil.getPosition(this,true),H={scrollTop:0,scrollLeft:0},F=A.iUtil.getScroll();if(C=="vertical"||!C){H.scrollTop=G.y-F.t}if(C=="horizontal"||!C){H.scrollLeft=G.x-F.l}A(this).css("fakeScroll","0").animate({fakeScroll:100},{duration:D,easing:E,complete:B,step:function(I){window.scrollTo(F.l+H.scrollLeft*I/100,F.t+H.scrollTop*I/100)}})}).end()},ScrollToAnchors:function(D,C,E,B){A("a",this).each(function(){if(this.hash&&this.hash!=""){A(this).bind("click",function(){A(this.hash=="#"?document.body:this.hash).ScrollTo(D,C,E,B)})}})}})})(jQuery);(function(A){A.fn.expander=function(D){var F=A.extend({},A.fn.expander.defaults,D);var C;return this.each(function(){var O=A(this);var I=A.meta?A.extend({},F,O.data()):F;var Q,U,K;var N=O.html();var R=N.slice(0,I.slicePoint).replace(/\w+$/,"");U=R.match(/<\w[^>]*>/g);if(U){R=N.slice(0,I.slicePoint+U.join("").length).replace(/\w+$/,"")}if(R.lastIndexOf("<")>R.lastIndexOf(">")){R=R.slice(0,R.lastIndexOf("<"))}var J=N.slice(R.length);if(!A("span.details",this).length){if(J.replace(/\s+$/,"").split(" ").length<I.widow){return }if(J.indexOf("</")>-1){K=J.match(/<(\/)?[^>]*>/g);for(var M=0;M<K.length;M++){if(K[M].indexOf("</")>-1){var T,P=false;for(var L=0;L<M;L++){T=K[L].slice(0,K[L].indexOf(" ")).replace(/(\w)$/,"$1>");if(T==G(K[M])){P=true}}if(!P){R=R+K[M];var H=false;for(var W=U.length-1;W>=0;W--){if(U[W].slice(0,U[W].indexOf(" ")).replace(/(\w)$/,"$1>")==G(K[M])&&H==false){Q=Q?U[W]+Q:U[W];H=true}}}}}J=Q&&Q+J||J}O.html([R,'<span class="read-more">',I.expandPrefix,'<a href="#">',I.expandText,"</a>","</span>",'<span class="details">',J,"</span>"].join(""))}var S=A("span.details",this),V=A("span.read-more",this);S.hide();V.find("a").click(function(){V.hide();if(I.expandEffect==="show"&&!I.expandSpeed){I.beforeExpand(O);S.show();I.afterExpand(O);E(I,S)}else{I.beforeExpand(O);S[I.expandEffect](I.expandSpeed,function(){S.css({zoom:""});I.afterExpand(O);E(I,S)})}return false});if(I.userCollapse){O.find("span.details").append('<span class="re-collapse">'+I.userCollapsePrefix+'<a href="#">'+I.userCollapseText+"</a></span>");O.find("span.re-collapse a").click(function(){clearTimeout(C);var X=A(this).parents("span.details");B(X);I.onCollapse(O,true);return false})}});function B(H){H.hide().prev("span.read-more").show()}function E(I,H){if(I.collapseTimer){C=setTimeout(function(){B(H);I.onCollapse(H.parent(),false)},I.collapseTimer)}}function G(H){return H.replace(/\//,"")}};A.fn.expander.defaults={slicePoint:100,widow:4,expandText:"read more",expandPrefix:"&hellip; ",collapseTimer:0,expandEffect:"fadeIn",expandSpeed:"",userCollapse:true,userCollapseText:"[collapse expanded text]",userCollapsePrefix:" ",beforeExpand:function(B){},afterExpand:function(B){},onCollapse:function(C,B){}}})(jQuery);(function(A){A.number_format=function(G,E){var C=A.extend({precision:2,decimal:".",thousands:",","default":"0,00",allow_negative:true},E);var F=(G.toString().indexOf("-")==0&&C.allow_negative)?"-":"";if(D(G)==0||D(G)==""){return F+C["default"]}var I=D(G);I=F+B(I);return I;function D(L){var J=L.toString().replace(/[^\d]*/g,"");var K=L.toString().indexOf("-")==0?-1:1;return parseInt(J*K)}function B(Q){var O=Q.toString();var P=O.charAt(0)=="-"?1:0;var L="";var N="";var K="";var J=0;if(C.precision>0){J=P?(C.precision+1):C.precision;if(O.length<=J){L="0";if(O.length<J){for(var M=0;M<C.precision-O.length;M++){N+="0"}}N+=P?O.slice(1):O;K+=L+C.decimal+N}else{L=O.slice(0,O.length-C.precision);N=O.slice(O.length-C.precision);K=H(L)+C.decimal+N}}else{K=H(O)}return K}function H(P){var K=0;var M="";var N="";var O=P.charAt(0)=="-"?1:0;var J=P.split("");for(var L=P.length-1;L>=O;L--){N=(K>0&&K%3==0)?C.thousands:"";M=J[L]+N+M;K++}return M}}})(jQuery);(function(A){A.fn.number_format=function(B){return A(this).each(function(){A(this).val(A.number_format(A(this).val(),B));A(this).keyup(function(){A(this).val(A.number_format(A(this).val(),B))}).blur(function(){A(this).trigger("keyup")}).focus(function(){A(this).select()})})}})(jQuery);(function(A){A.fn.ajaxSubmit=function(K){if(typeof K=="function"){K={success:K}}K=A.extend({url:this.attr("action")||window.location.toString(),type:this.attr("method")||"GET"},K||{});var M={};this.trigger("form-pre-serialize",[this,K,M]);if(M.veto){return this}var G=this.formToArray(K.semantic);if(K.data){K.extraData=K.data;for(var D in K.data){G.push({name:D,value:K.data[D]})}}if(K.beforeSubmit&&K.beforeSubmit(G,this,K)===false){return this}this.trigger("form-submit-validate",[G,this,K,M]);if(M.veto){return this}var C=A.param(G);if(K.type.toUpperCase()=="GET"){K.url+=(K.url.indexOf("?")>=0?"&":"?")+C;K.data=null}else{K.data=C}var L=this,F=[];if(K.resetForm){F.push(function(){L.resetForm()})}if(K.clearForm){F.push(function(){L.clearForm()})}if(!K.dataType&&K.target){var I=K.success||function(){};F.push(function(N){A(K.target).html(N).each(I,arguments)})}else{if(K.success){F.push(K.success)}}K.success=function(Q,O){for(var P=0,N=F.length;P<N;P++){F[P](Q,O,L)}};var B=A("input:file",this).fieldValue();var J=false;for(var E=0;E<B.length;E++){if(B[E]){J=true}}if(K.iframe||J){if(A.browser.safari&&K.closeKeepAlive){A.get(K.closeKeepAlive,H)}else{H()}}else{A.ajax(K)}this.trigger("form-submit-notify",[this,K]);return this;function H(){var Q=L[0];var O=A.extend({},A.ajaxSettings,K);var P="jqFormIO"+(new Date().getTime());var U=A('<iframe id="'+P+'" name="'+P+'" />');var W=U[0];var X=A.browser.opera&&window.opera.version()<9;if(A.browser.msie||X){W.src='javascript:false;document.write("");'}U.css({position:"absolute",top:"-1000px",left:"-1000px"});var Y={responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){}};var V=O.global;if(V&&!A.active++){A.event.trigger("ajaxStart")}if(V){A.event.trigger("ajaxSend",[Y,O])}var N=0;var R=0;setTimeout(function(){var c=L.attr("target"),Z=L.attr("action");L.attr({target:P,encoding:"multipart/form-data",enctype:"multipart/form-data",method:"POST",action:O.url});if(O.timeout){setTimeout(function(){R=true;S()},O.timeout)}var b=[];try{if(K.extraData){for(var d in K.extraData){b.push(A('<input type="hidden" name="'+d+'" value="'+K.extraData[d]+'" />').appendTo(Q)[0])}}U.appendTo("body");W.attachEvent?W.attachEvent("onload",S):W.addEventListener("load",S,false);Q.submit()}finally{L.attr("action",Z);c?L.attr("target",c):L.removeAttr("target");A(b).remove()}},10);function S(){if(N++){return }W.detachEvent?W.detachEvent("onload",S):W.removeEventListener("load",S,false);var a=true;try{if(R){throw"timeout"}var b,d;d=W.contentWindow?W.contentWindow.document:W.contentDocument?W.contentDocument:W.document;Y.responseText=d.body?d.body.innerHTML:null;Y.responseXML=d.XMLDocument?d.XMLDocument:d;Y.getResponseHeader=function(f){var e={"content-type":O.dataType};return e[f]};if(O.dataType=="json"||O.dataType=="script"){var Z=d.getElementsByTagName("textarea")[0];Y.responseText=Z?Z.value:Y.responseText}else{if(O.dataType=="xml"&&!Y.responseXML&&Y.responseText!=null){Y.responseXML=T(Y.responseText)}}b=A.httpData(Y,O.dataType)}catch(c){a=false;A.handleError(O,Y,"error",c)}if(a){O.success(b,"success");if(V){A.event.trigger("ajaxSuccess",[Y,O])}}if(V){A.event.trigger("ajaxComplete",[Y,O])}if(V&&!--A.active){A.event.trigger("ajaxStop")}if(O.complete){O.complete(Y,a?"success":"error")}setTimeout(function(){U.remove();Y.responseXML=null},100)}function T(Z,a){if(window.ActiveXObject){a=new ActiveXObject("Microsoft.XMLDOM");a.async="false";a.loadXML(Z)}else{a=(new DOMParser()).parseFromString(Z,"text/xml")}return(a&&a.documentElement&&a.documentElement.tagName!="parsererror")?a:null}}};A.fn.ajaxForm=function(B){return this.ajaxFormUnbind().bind("submit.form-plugin",function(){A(this).ajaxSubmit(B);return false}).each(function(){A(":submit,input:image",this).bind("click.form-plugin",function(D){var C=this.form;C.clk=this;if(this.type=="image"){if(D.offsetX!=undefined){C.clk_x=D.offsetX;C.clk_y=D.offsetY}else{if(typeof A.fn.offset=="function"){var E=A(this).offset();C.clk_x=D.pageX-E.left;C.clk_y=D.pageY-E.top}else{C.clk_x=D.pageX-this.offsetLeft;C.clk_y=D.pageY-this.offsetTop}}}setTimeout(function(){C.clk=C.clk_x=C.clk_y=null},10)})})};A.fn.ajaxFormUnbind=function(){this.unbind("submit.form-plugin");return this.each(function(){A(":submit,input:image",this).unbind("click.form-plugin")})};A.fn.formToArray=function(M){var L=[];if(this.length==0){return L}var C=this[0];var G=M?C.getElementsByTagName("*"):C.elements;if(!G){return L}for(var H=0,J=G.length;H<J;H++){var D=G[H];var E=D.name;if(!E){continue}if(M&&C.clk&&D.type=="image"){if(!D.disabled&&C.clk==D){L.push({name:E+".x",value:C.clk_x},{name:E+".y",value:C.clk_y})}continue}var N=A.fieldValue(D,true);if(N&&N.constructor==Array){for(var F=0,B=N.length;F<B;F++){L.push({name:E,value:N[F]})}}else{if(N!==null&&typeof N!="undefined"){L.push({name:E,value:N})}}}if(!M&&C.clk){var I=C.getElementsByTagName("input");for(var H=0,J=I.length;H<J;H++){var K=I[H];var E=K.name;if(E&&!K.disabled&&K.type=="image"&&C.clk==K){L.push({name:E+".x",value:C.clk_x},{name:E+".y",value:C.clk_y})}}}return L};A.fn.formSerialize=function(B){return A.param(this.formToArray(B))};A.fn.fieldSerialize=function(C){var B=[];this.each(function(){var G=this.name;if(!G){return }var E=A.fieldValue(this,C);if(E&&E.constructor==Array){for(var F=0,D=E.length;F<D;F++){B.push({name:G,value:E[F]})}}else{if(E!==null&&typeof E!="undefined"){B.push({name:this.name,value:E})}}});return A.param(B)};A.fn.fieldValue=function(G){for(var F=[],D=0,B=this.length;D<B;D++){var E=this[D];var C=A.fieldValue(E,G);if(C===null||typeof C=="undefined"||(C.constructor==Array&&!C.length)){continue}C.constructor==Array?A.merge(F,C):F.push(C)}return F};A.fieldValue=function(B,H){var D=B.name,M=B.type,N=B.tagName.toLowerCase();if(typeof H=="undefined"){H=true}if(H&&(!D||B.disabled||M=="reset"||M=="button"||(M=="checkbox"||M=="radio")&&!B.checked||(M=="submit"||M=="image")&&B.form&&B.form.clk!=B||N=="select"&&B.selectedIndex==-1)){return null}if(N=="select"){var I=B.selectedIndex;if(I<0){return null}var K=[],C=B.options;var F=(M=="select-one");var J=(F?I+1:C.length);for(var E=(F?I:0);E<J;E++){var G=C[E];if(G.selected){var L=A.browser.msie&&!(G.attributes.value.specified)?G.text:G.value;if(F){return L}K.push(L)}}return K}return B.value};A.fn.clearForm=function(){return this.each(function(){A("input,select,textarea",this).clearFields()})};A.fn.clearFields=A.fn.clearInputs=function(){return this.each(function(){var C=this.type,B=this.tagName.toLowerCase();if(C=="text"||C=="password"||B=="textarea"){this.value=""}else{if(C=="checkbox"||C=="radio"){this.checked=false}else{if(B=="select"){this.selectedIndex=-1}}}})};A.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};A.fn.enable=function(B){if(B==undefined){B=true}return this.each(function(){this.disabled=!B})};A.fn.select=function(B){if(B==undefined){B=true}return this.each(function(){var C=this.type;if(C=="checkbox"||C=="radio"){this.checked=B}else{if(this.tagName.toLowerCase()=="option"){var D=A(this).parent("select");if(B&&D[0]&&D[0].type=="select-one"){D.find("option").select(false)}this.selected=B}}})}})(jQuery);var Game={base_url:"",base_href:"",def_params:false,timers:{},nf_params:{precision:0,decimal:".",thousands:",","default":"0"},ITM_setAction:function(B,A,C){var D=new Date();Game.hideMessages(function(){var E=$("#item-"+B+"").find("#"+C+"_qty").val();var F={};if(Game.def_params){F=Game.def_params}F.item_id=B;F.item_qty=E;F.sign=A;F.t=D.getTime();$.getJSON("/json/items/"+C+"/",F,function(G){$("#item-"+B+"").find("#"+C+"_qty option:first").attr("selected","selected");if(G.msgs){Game.showMessages(G,function(){})}if(G.error){return }Game.CHR_setCoins(G["char"]);Game.CHR_setIncome(G["char"]);Game.ITM_setMarketScreen(G["char"])})})},ITM_setMarketScreen:function(H){var G=$(".items").get().length;for(i=0;i<G;i++){var F=$(".items").eq(i);var E=F.find("#item_id").val();if(E&&H.items["items"][E]){F.find("#item_owned").html(H.items["items"][E])}else{F.find("#item_owned").html("0")}}var D="";var A=0;var C=parseInt(H.friends_count)+1;$(".count_all").html(C);for(var B in H.items["groups_count"]){A=parseInt(H.items["groups_count"][B]);if(A>=C){D="p3"}else{if((A/C)<0.75){D="p1"}else{D="p2"}}$("#group_count_"+B).attr("class",D);$("#group_count_"+B).find("#count_one").html(A)}},BLD_setAction:function(D,A,B){var C=new Date();Game.hideMessages(function(){var E=$("#building-"+D+"").find("#"+B+"_qty").val();var F={};if(Game.def_params){F=Game.def_params}F.building_id=D;F.building_qty=E;F.sign=A;F.t=C.getTime();$.getJSON("/json/buildings/"+B+"/",F,function(G){$("#building-"+D+"").find("#"+B+"_qty option:first").attr("selected","selected");if(G.msgs){Game.showMessages(G,function(){})}if(G.error){return }Game.CHR_setCoins(G["char"]);Game.CHR_setIncome(G["char"]);Game.BLD_setMarketScreen(G["char"]["buildings"])})})},BLD_setMarketScreen:function(C){var H=$(".buildings").get().length;for(i=0;i<H;i++){var G=$(".buildings").eq(i);var F=G.find("#building_id").val();if(F&&C.buildings[F]){G.find("#building_owned").html(C.buildings[F]);var E=parseInt(G.find("#building_price_one").val());var B=parseInt(G.find("#building_increase").val());var D=parseInt(C.buildings[F]);var A=E+(D*B);G.find("#building_price").html($.number_format(A,Game.nf_params))}else{G.find("#building_owned").html("0");var E=parseInt(G.find("#building_price_one").val());G.find("#building_price").html($.number_format(E,Game.nf_params))}}},MSN_setDoit:function(B,A){var C=new Date();var D={};if(Game.def_params){D=Game.def_params}D.mission_id=B;D.sign=A;D.t=C.getTime();Game.hideMessages(function(){$.getJSON("/json/missions/doit/",D,function(E){if(E.msgs){Game.showMessages(E,function(){})}if(E.error){return }Game.CHR_setPanelRefresh(E);if(E["char"]){Game.MSN_setMainScreen(E["char"])}})})},MSN_setMainScreen:function(A){Game.MSN_setMissionsScreen(A);Game.MSN_setRanksScreen(A)},MSN_setMissionsScreen:function(F){var B;var C;var A;var G=$(".missions").get().length;for(i=0;i<G;i++){var D=$(".missions").eq(i);var E=D.find("#mission_id").val();if(E&&F.missions["missions"][E]){B=parseInt(D.find("#mission_msry_amount").html());if(F.missions["missions"][E]==B){C=100;D.find("#mission_owned").parent().attr("class","gr")}else{C=Math.floor((100/B)*F.missions["missions"][E])}if(C>=33&&C<66){A="c2"}else{if(C>=66){A="c1"}else{A="c3"}}D.find("#mission_owned").html(F.missions["missions"][E]);D.find("#mission_owned_w").attr("class",A);D.find("#mission_owned_w").animate({width:C+"%"},1000);if(F.missions["missions"][E]==B){D.find("#mission_owned_img").attr("src",Game.base_url+"/img/attack.png")}}else{D.find("#mission_owned").html("0")}}},MSN_setRanksScreen:function(C){var A=$(".ranks").get().length;for(i=0;i<A;i++){var B=$(".ranks").eq(i);var D=B.find("#rank_id").val();if(D&&C.missions["ranks"][D]){msry_amount=parseInt(B.find("#rank_msry_amount").html());if(C.missions["ranks"][D]==msry_amount){B.find("#rank_owned").parent().attr("class","green2")}else{B.find("#rank_owned").parent().attr("class","red2")}B.find("#rank_owned").html(C.missions["ranks"][D])}}},STH_setScreen:function(A){$("#hide_coins").val(A.coins);if(A.stash){$("#hidden_balance").val(A.stash)}$("#retrieve_coins").val("0");$("#hide_coins").number_format(Game.nf_params);$("#hidden_balance").number_format(Game.nf_params);$("#retrieve_coins").number_format(Game.nf_params)},STH_setAction:function(A,B){var C=new Date();Game.hideMessages(function(){var D=$("#"+B+"_coins").val();if(!D){return }var E={};if(Game.def_params){E=Game.def_params}E.action=B;E.coins=D;E.sign=A;E.t=C.getTime();$.getJSON("/json/characters/stash_action/",E,function(F){if(F.msgs){Game.showMessages(F,function(){})}if(F.error){return }Game.CHR_setCoins(F["char"]);Game.STH_setScreen(F["char"])})})},HPT_setAction:function(A,B){var C=new Date();Game.hideMessages(function(){var D={};if(Game.def_params){D=Game.def_params}D.action=B;D.sign=A;D.t=C.getTime();$.getJSON("/json/characters/hospital_action/",D,function(E){if(E.msgs){Game.showMessages(E,function(){})}if(E.error){return }Game.CHR_setPanelRefresh(E)})})},FTH_setAttack:function(C,A){var B=new Date();Game.hideMessages(function(){var D={};if(Game.def_params){D=Game.def_params}D.character_id=C;D.sign=A;D.t=B.getTime();$.getJSON("/json/characters/fight_attack/",D,function(E){if(E.msgs){Game.showMessages(E,function(){})}if(E.error){return }Game.CHR_setPanelRefresh(E)})})},CTH_setAction:function(C,A,B){var D=new Date();Game.hideMessages(function(){var E={};if(Game.def_params){E=Game.def_params}E.offer_id=C;E.sign=A;E.t=D.getTime();$.getJSON("/json/cityhall_offers/"+B+"/",E,function(F){if(F.msgs){Game.showMessages(F,function(){})}if(F.error){return }if(F.location){window.location.href=F.location;return }$("#yh_credits").html(F["char"]["credits"]);Game.CHR_setPanelRefresh(F)})})},CTH_setBuyCredits:function(A){Game.hideMessages(function(){})},CTH_setConfirm:function(msg,js_code){Game.hideMessages(function(){Game.showMessages({msgs:[{"class":"confirm",msg:msg}]},function(){$("#messages").find("#yes").bind("click",function(e){eval(js_code);return false});$("#messages").find("#no").bind("click",function(e){Game.hideMessages(function(){});return false})})})},CRD_PCG_setAction:function(C,A,B){window.location.href="/credits/purchase/request/?package_id="+C+"&sign="+A+""},FRD_setInvite:function(A){var B=$("#friend_invite_code").val();if(!B){return }Game.hideMessages(function(){$.getJSON("/json/character_friends/invite/",{code:B,sign:A},function(C){if(C.msgs){Game.showMessages(C,function(){})}if(C.error){return }$("#friend_invite_code").val("")})})},FRD_setInviteAction:function(D,B,A){var C=new Date();Game.hideMessages(function(){var E={};if(Game.def_params){E=Game.def_params}E.invite_id=D;E.action=B;E.sign=A;E.t=C.getTime();$.getJSON("/json/character_friends_invitations/action/",E,function(F){if(F.msgs){Game.showMessages(F,function(){})}if(F.error){return }$("#invite-"+D+"").find("#button").hide();Game.CHR_setPanelRefresh(F)})})},FRD_setAction:function(D,B,A){var C=new Date();Game.hideMessages(function(){var E={};if(Game.def_params){E=Game.def_params}E.friend_id=D;E.action=B;E.sign=A;E.t=C.getTime();$.getJSON("/json/character_friends/action/",E,function(F){if(F.msgs){Game.showMessages(F,function(){})}if(F.error){return }$("#friend-"+D+"").find("#button").hide();Game.CHR_setPanelRefresh(F)})})},WIN_setAction:function(B,A,C){var D=new Date();Game.hideMessages(function(){var E={};if(Game.def_params){E=Game.def_params}E.good_id=B;E.sign=A;E.t=D.getTime();$.getJSON("/json/window_goods/"+C+"/",E,function(F){if(F.msgs){Game.showMessages(F,function(){})}if(F.error){return }$("#yh_credits").html(F["char"]["credits"]);Game.CHR_setPanelRefresh(F)})})},GOD_setSacrifice:function(B,A){var C=new Date();Game.hideMessages(function(){var D={};if(Game.def_params){D=Game.def_params}D.god_id=B;D.sign=A;D.t=C.getTime();$.getJSON("/json/gods/sacrifice/",D,function(E){if(E.msgs){Game.showMessages(E,function(){})}if(E.error){return }Game.CHR_setPanelRefresh(E)})})},CHR_setCoins:function(A){$("#chr_con").html($.number_format(A.coins,Game.nf_params))},CHR_setIncome:function(A){if(A.income>0){$("#chr_income_val").html("+"+$.number_format(A.income,Game.nf_params))}else{if(A.income<0){$("#chr_income_val").attr("class","col");$("#chr_income_val").html($.number_format(A.income,Game.nf_params))}else{$("#chr_income_val").html("");$("#chr_income_tp").hide();return }}if(A.income_time){$("#chr_income_tp").show();Timer.setTimerEnd("income",A.income_time);Timer.setStart("income")}else{$("#chr_income_tp").hide()}},CHR_setCredits:function(A){if(A.credits>0){$("#chr_cdt").html("["+$.number_format(A.credits,Game.nf_params)+"]");$("#chr_cdt").show()}else{$("#chr_cdt").hide()}},CHR_setStatPoints:function(A){if(A.statpoints>0){$("#chr_statpoints_val").html("["+A.statpoints+"]");$("#chr_statpoints_val").show()}else{$("#chr_statpoints_val").hide()}},CHR_setTimerStop:function(B){var C=parseInt($("#chr_"+B+"_val").html());var A=parseInt($("#chr_"+B+"_val_cur").html());if(Game.timers[B]&&A<C){A=A+1;$("#chr_"+B+"_val_cur").html(A);if(A<C){Game.CHR_setTimer(B,Game.timers[B])}else{Game.CHR_setTimer(B,false)}}else{Game.CHR_setTimer(B,false)}},CHR_setTimerStopIncome:function(A){var B=new Date();var C={};if(Game.def_params){C=Game.def_params}$.getJSON("/json/characters/info/",C,function(D){if(D.error){return Dialog.setShow(D.message)}Game.CHR_setCoins(D["char"]);Game.CHR_setIncome(D["char"])})},CHR_setRank:function(A){if(!A.rank){return }$("#chr_rank").html('<img src="'+A.rank["image"]+'" alt="" /><div>'+A.rank["name"]+"</div>")},CHR_setPanelRefresh:function(B){if(B.timers){Game.timers=B.timers}if(B["char"]["health"]){$("#chr_health_val_cur").html(B["char"]["health_cur"]);$("#chr_health_val").html(B["char"]["health"]);Game.CHR_setTimer("health",B["char"]["health_time"]);if(parseInt(B["char"]["health_cur"])<parseInt(B["char"]["health"])){$("#chr_hospital").show()}else{$("#chr_hospital").hide()}}$("#chr_stamina_val_cur").html(B["char"]["stamina_cur"]);$("#chr_stamina_val").html(B["char"]["stamina"]);Game.CHR_setTimer("stamina",B["char"]["stamina_time"]);$("#chr_physical_val_cur").html(B["char"]["physical_cur"]);$("#chr_physical_val").html(B["char"]["physical"]);Game.CHR_setTimer("physical",B["char"]["physical_time"]);$("#chr_psychical_val_cur").html(B["char"]["psychical_cur"]);$("#chr_psychical_val").html(B["char"]["psychical"]);Game.CHR_setTimer("psychical",B["char"]["psychical_time"]);Game.CHR_setRank(B);Game.CHR_setCoins(B["char"]);Game.CHR_setIncome(B["char"]);Game.CHR_setCredits(B["char"]);Game.CHR_setStatPoints(B["char"]);if(B["char"]["level"]){$("#chr_level_val").html(B["char"]["level"]);var A=parseInt(B["char"]["level"])*parseInt(B.settings["game_mf_multiply"]);if(A>parseInt(B.settings["game_maxfriends"])){A=parseInt(B.settings["game_maxfriends"])}$("#chr_sectants_max").html(A)}if(B.lvls){B.lvls["exp_max"]=parseInt(B.lvls["exp_max"])+1;$("#chr_exp").html($.number_format(B["char"]["exp"],Game.nf_params));$("#chr_exp_lm").html($.number_format(B.lvls["exp_max"],Game.nf_params));$("#chr_exp_w").animate({width:Math.floor((100/(B.lvls["exp_max"]-B.lvls["exp_min"]))*(B["char"]["exp"]-B.lvls["exp_min"]))+"%"},1000)}if(B["char"]["friends_count"]){$("#chr_friends_count_val").html(B["char"]["friends_count"])}if(B["char"]["kills_today"]){$("#chr_kills_today_val").html(B["char"]["kills_today"])}},CHR_setProfilePage:function(A){var B={};if(A["char"]["name"]){B.pfl_name=A["char"]["name"]}if(A["char"]["level"]){B.pfl_level=A["char"]["level"]}if(A["char"]["statpoints"]){B.pfl_statpoints=A["char"]["statpoints"]}if(A["char"]["attack"]){B.pfl_attack=A["char"]["attack"]}if(A["char"]["defense"]){B.pfl_defense=A["char"]["defense"]}if(A["char"]["health"]){B.pfl_health=A["char"]["health"]}if(A["char"]["stamina"]){B.pfl_stamina=A["char"]["stamina"]}if(A["char"]["physical"]){B.pfl_physical=A["char"]["physical"]}if(A["char"]["psychical"]){B.pfl_psychical=A["char"]["psychical"]}if(A["char"]["attack_power"]){B.pfl_attack_power=$.number_format(A["char"]["attack_power"],Game.nf_params)}if(A["char"]["defense_power"]){B.pfl_defense_power=$.number_format(A["char"]["defense_power"],Game.nf_params)}if(A["char"]["mission_completed"]){B.pfl_mission_completed=$.number_format(A["char"]["mission_completed"],Game.nf_params)}if(A["char"]["fights_won"]){B.pfl_fights_won=$.number_format(A["char"]["fights_won"],Game.nf_params)}if(A["char"]["fights_lost"]){B.pfl_fights_lost=$.number_format(A["char"]["fights_lost"],Game.nf_params)}if(A["char"]["deaths"]){B.pfl_deaths=$.number_format(A["char"]["deaths"],Game.nf_params)}if(A["char"]["kills"]){B.pfl_kills=$.number_format(A["char"]["kills"],Game.nf_params)}if(A["char"]["kills_bosses"]){B.pfl_kills_bosses=$.number_format(A["char"]["kills_bosses"],Game.nf_params)}if(A["char"]["sacrifice_completed"]){B.pfl_sacrifice_completed=$.number_format(A["char"]["sacrifice_completed"],Game.nf_params)}if(A.rank){B.pfl_rank='<img src="'+A.rank["image"]+'" title="'+A.rank["name"]+'"">'}Game.PGE_setVariable(B)},CHR_setProperty:function(C,A,B){var D=new Date();var E={};Game.hideMessages(function(){var F={};if(Game.def_params){F=Game.def_params}F.property=C;F.sign=A;F.action=B;F.t=D.getTime();$.getJSON("/json/characters/set_property/",F,function(G){if(G.msgs){Game.showMessages(G,function(){})}if(G.error){return }if(G["char"][""+C]){E["chr_"+C+"_val"]=G["char"][""+C];E["chr_"+C+"_val_cur"]=G["char"][""+C+"_cur"]}if(G["char"]["statpoints"]>0){E.pfl_statpoints=G["char"]["statpoints"]}else{E.pfl_statpoints="0"}Game.PGE_setVariable(E);Game.CHR_setProfilePage(G);Game.CHR_setStatPoints(G["char"])})})},CHR_setTimer:function(B,C){var A=new Date();if(C){$("#chr_"+B+"_tp").show();if(!Timer.timerEnd[B]||Timer.timerEnd[B]<A){Timer.setTimerEnd(B,C);Timer.setStart(B)}else{Timer.setTimerEnd(B,C)}}else{Timer.timerEnd[B]=false;$("#chr_"+B+"_tp").hide()}},hideMessages:function(A){if($("#messages").css("display")=="block"){$("#messages").fadeOut("fast",A)}else{A()}},showMessages:function(C,D){var B="";var A=C.msgs.length;if(!A){return }for(i=0;i<A;i++){$("#message_"+C.msgs[i]["class"]).find(".message_"+C.msgs[i]["class"]+" p").html(C.msgs[i]["msg"]);B+=$("#message_"+C.msgs[i]["class"]).html()}$(".logo").ScrollTo(800);$("#messages").html(B);$("#messages").fadeIn("slow",D)},PGE_setVariable:function(B){for(var A in B){if(B[A]){$("#"+A).html(B[A])}}}};var Timer={timerNow:0,timerEnd:{},timerStop:{},stopCallbacks:{income:"Game.CHR_setTimerStopIncome",physical:"Game.CHR_setTimerStop",psychical:"Game.CHR_setTimerStop",stamina:"Game.CHR_setTimerStop",health:"Game.CHR_setTimerStop"},setStart:function(key){if(!Timer.timerEnd[key]||Timer.timerStop[key]){return }var DSTAdjust=0;var oneMinute=1000*60;var expired=0;var time=new Date();if(time.getTime()>Timer.timerEnd[key].getTime()){expired=1}else{DSTAdjust=(Timer.timerEnd[key].getTimezoneOffset()-time.getTimezoneOffset())*oneMinute;var diff=Math.abs(Timer.timerEnd[key].getTime()-time.getTime())-DSTAdjust;var minutes=Math.floor(diff/oneMinute);var seconds=Math.floor(diff/1000)%60;var mseconds=diff%1000;if(Timer.StrLen(minutes)==1){minutes="0"+minutes}if(Timer.StrLen(seconds)==1){seconds="0"+seconds}}if(document.getElementById("chr_"+key+"_tmr")){if(expired){document.getElementById("chr_"+key+"_tmr").innerHTML='[<font id="chr_'+key+'_tmr_m">00</font>:<font id="chr_'+key+'_tmr_s">00</font>]';if(Timer.stopCallbacks[key]){eval(Timer.stopCallbacks[key]+'("'+key+'");')}}else{document.getElementById("chr_"+key+"_tmr_m").innerHTML=minutes;document.getElementById("chr_"+key+"_tmr_s").innerHTML=seconds;setTimeout('Timer.setStart("'+key+'")',1000)}}},setStartDef:function(J){if(!Timer.timerEnd[J]||Timer.timerStop[J]){return }var K=0;var D=1000*60;var I=0;var A=new Date();var E='<font id="'+J+'_tmr_h">00</font>:<font id="'+J+'_tmr_m">00</font>:<font id="'+J+'_tmr_s">00</font>';if(A.getTime()>Timer.timerEnd[J].getTime()){I=1}else{K=(Timer.timerEnd[J].getTimezoneOffset()-A.getTimezoneOffset())*D;var H=Math.abs(Timer.timerEnd[J].getTime()-A.getTime())-K;var F=Math.floor(H/(60*D));var B=Math.floor(H/D)%60;var G=Math.floor(H/1000)%60;var C=H%1000;if(Timer.StrLen(F)==1){F="0"+F}if(Timer.StrLen(B)==1){B="0"+B}if(Timer.StrLen(G)==1){G="0"+G}}if(document.getElementById(J+"_tmr")){if(I){document.getElementById(J+"_tmr").innerHTML=E}else{document.getElementById(J+"_tmr_h").innerHTML=F;document.getElementById(J+"_tmr_m").innerHTML=B;document.getElementById(J+"_tmr_s").innerHTML=G;setTimeout('Timer.setStartDef("'+J+'")',1000)}}},setTimerEnd:function(A,B){Timer.timerNow=new Date();B=(parseInt(B)+3)*1000;Timer.timerEnd[A]=new Date(Timer.timerNow.getTime()+B)},StrLen:function(C){var B="",A=0;B=C+"";if(B.length){return B.length}return 0},startAlarm:function(A){$("#timer_"+A+"").css("color","#BF2212")},stopAlarm:function(A){$("#timer_"+A+"").css("color","#FFFFFF")}};var Tooltip={t_last:"",setTooltip:function(){var A=-15;var B=0;$("a.tooltip").hover(function(C){this.t=$(this).find(".tooltip_cnt").html();if(this.t){$("body").append("<div id='tooltip'><div class='tooltip_main'>"+this.t+"</div></div>");$("#tooltip").css("top",(C.pageY-A)+"px").css("left",(C.pageX+B)+"px").fadeIn("fast")}},function(){$("#tooltip").remove()});$("a.tooltip").mousemove(function(C){$("#tooltip").css("top",(C.pageY-A)+"px").css("left",(C.pageX+B)+"px")})},setTooltipClick:function(B){var A=-15;var C=0;$("a.tooltip-click").click(function(E){$("#tooltip").remove();var D=$(this).next();if(Tooltip.t_last&&Tooltip.t_last==D.attr("id")){Tooltip.t_last="";return }$("body").append("<div id='tooltip'><div class='"+B+"'>"+D.html()+"</div></div>");$("#tooltip").css("top",(E.pageY-A)+"px").css("left",(E.pageX+C)+"px").fadeIn("fast");Tooltip.t_last=D.attr("id")})},setTooltipCustom:function(B){var A=-15;var C=0;$("a.tooltip").hover(function(D){this.t=$(this).find(".tooltip_cnt").html();if(this.t){$("body").append("<div id='tooltip'><div class='tooltip_"+B+"_main'>"+this.t+"</div></div>");$("#tooltip").css("top",(D.pageY-A)+"px").css("left",(D.pageX+C)+"px").fadeIn("fast")}},function(){$("#tooltip").remove()});$("a.tooltip").mousemove(function(D){$("#tooltip").css("top",(D.pageY-A)+"px").css("left",(D.pageX+C)+"px")})},setTooltipMini:function(){var A=-25;var B=-15;$("a.tooltip2").hover(function(C){this.t=this.title;this.title="";if(this.t){$("body").append("<div id='tooltip2'><div class='tooltip_top2'><div class='tooltip_foot2'><div class='tooltip_main2'><p>"+this.t+"</p></div></div></div></div>");$("#tooltip2").css("top",(C.pageY-A)+"px").css("left",(C.pageX+B)+"px").fadeIn("fast")}},function(){this.title=this.t;$("#tooltip2").remove()});$("a.tooltip2").mousemove(function(C){$("#tooltip2").css("top",(C.pageY-A)+"px").css("left",(C.pageX+B)+"px")})},Tooltip:function(){Tooltip.setTooltip()}};