Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/site/app/webroot/js/jquery.addons.min.js
blob: 008964f78125c101b3e38b856934702add22fe32 (plain)
1
(function(){var W=this,AB,F=W.jQuery,R=W.$,T=W.jQuery=W.$=function(B,A){return new T.fn.init(B,A)},L=/^[^<]*(<(.|\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=L.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 c=this.outerHTML;if(!c){var a=this.ownerDocument.createElement("div");a.appendChild(this.cloneNode(true));c=a.innerHTML}return T.clean([c.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 d=T.data(A[C],"events");for(var a in d){for(var c in d[a]){T.event.add(this,a,d[a][c],d[a][c].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 f=this[0];if(f){if(T.nodeName(f,"option")){return(f.attributes.value||{}).specified?f.value:f.text}if(T.nodeName(f,"select")){var a=f.selectedIndex,B=[],A=f.options,c=f.type=="select-one";if(a<0){return null}for(var e=c?a:0,D=c?a+1:A.length;e<D;e++){var d=A[e];if(d.selected){C=T(d).val();if(c){return C}B.push(C)}}return B}return(f.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 g=T.makeArray(C);T("option",this).each(function(){this.selected=(T.inArray(this.value,g)>=0||T.inArray(this.text,g)>=0)});if(!g.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(),e=T.clean(D,(this[0].ownerDocument||this[0]),a),c=a.firstChild;if(c){for(var d=0,f=this.length;d<f;d++){B.call(C(this[d],c),this.length>1||d>0?a.cloneNode(true):a)}}if(e){T.each(e,E)}}return this;function C(h,g){return A&&T.nodeName(h,"table")&&T.nodeName(g,"tr")?(h.getElementsByTagName("tbody")[0]||h.appendChild(h.ownerDocument.createElement("tbody"))):h}}};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,e=false,c;if(typeof C==="boolean"){e=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((c=arguments[a])!=null){for(var d in c){var B=C[d],A=c[d];if(C===A){continue}if(e&&A&&typeof A==="object"&&!A.nodeType){C[d]=T.extend(e,B||(A.length!=null?[]:{}),A)}else{if(A!==AB){C[d]=A}}}}}return C};var AG=/z-?index|font-?weight|opacity|zoom|line-?height/i,Q=document.defaultView||{},M=Object.prototype.toString;T.extend({noConflict:function(A){W.$=R;if(A){W.jQuery=F}return T},isFunction:function(A){return M.call(A)==="[object Function]"},isArray:function(A){return M.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,c){var d,D=0,C=a.length;if(c){if(C===AB){for(d in a){if(A.apply(a[d],c)===false){break}}}else{for(;D<C;){if(A.apply(a[D++],c)===false){break}}}}else{if(C===AB){for(d in a){if(A.call(a[d],d,a[d])===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,d,C,e){if(d=="width"||d=="height"){var A,c={position:"absolute",visibility:"hidden",display:"block"},B=d=="width"?["Left","Right"]:["Top","Bottom"];function D(){A=d=="width"?a.offsetWidth:a.offsetHeight;if(e==="border"){return }T.each(B,function(){if(!e){A-=parseFloat(T.curCSS(a,"padding"+this,true))||0}if(e==="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,c,D)}return Math.max(0,Math.round(A))}return T.curCSS(a,d,C)},curCSS:function(a,e,d){var B,f=a.style;if(e=="opacity"&&!T.support.opacity){B=T.attr(f,"opacity");return B==""?"1":B}if(e.match(/float/i)){e=H}if(!d&&f&&f[e]){B=f[e]}else{if(Q.getComputedStyle){if(e.match(/float/i)){e="float"}e=e.replace(/([A-Z])/g,"-$1").toLowerCase();var A=Q.getComputedStyle(a,null);if(A){B=A.getPropertyValue(e)}if(e=="opacity"&&B==""){B="1"}}else{if(a.currentStyle){var D=e.replace(/\-(\w)/g,function(h,g){return g.toUpperCase()});B=a.currentStyle[e]||a.currentStyle[D];if(!/^\d+(px)?$/i.test(B)&&/^\d/.test(B)){var c=f.left,C=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;f.left=B||0;B=f.pixelLeft+"px";f.left=c;a.runtimeStyle.left=C}}}}return B},clean:function(d,B,D){B=B||document;if(typeof B.createElement==="undefined"){B=B.ownerDocument||B[0]&&B[0].ownerDocument||document}if(!D&&d.length===1&&typeof d[0]==="string"){var a=/^<(\w+)\s*\/?>$/.exec(d[0]);if(a){return[B.createElement(a[1])]}}var c=[],e=[],A=B.createElement("div");T.each(d,function(i,f){if(typeof f==="number"){f+=""}if(!f){return }if(typeof f==="string"){f=f.replace(/(<(\w+)[^>]*?)\/>/g,function(o,m,p){return p.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?o:m+"></"+p+">"});var j=f.replace(/^\s+/,"").substring(0,10).toLowerCase();var h=!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=h[1]+f+h[2];while(h[0]--){A=A.lastChild}if(!T.support.tbody){var g=/<tbody/i.test(f),k=!j.indexOf("<table")&&!g?A.firstChild&&A.firstChild.childNodes:h[1]=="<table>"&&!g?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(f)){A.insertBefore(B.createTextNode(f.match(/^\s*/)[0]),A.firstChild)}f=T.makeArray(A.childNodes)}if(f.nodeType){c.push(f)}else{c=T.merge(c,f)}});if(D){for(var C=0;c[C];C++){if(T.nodeName(c[C],"script")&&(!c[C].type||c[C].type.toLowerCase()==="text/javascript")){e.push(c[C].parentNode?c[C].parentNode.removeChild(c[C]):c[C])}else{if(c[C].nodeType===1){c.splice.apply(c,[C+1,0].concat(T.makeArray(c[C].getElementsByTagName("script"))))}D.appendChild(c[C])}}return e}return c},attr:function(C,c,B){if(!C||C.nodeType==3||C.nodeType==8){return AB}var a=!T.isXMLDoc(C),A=B!==AB;c=a&&T.props[c]||c;if(C.tagName){var d=/href|src|style/.test(c);if(c=="selected"&&C.parentNode){C.parentNode.selectedIndex}if(c in C&&a&&!d){if(A){if(c=="type"&&T.nodeName(C,"input")&&C.parentNode){throw"type property can't be changed"}C[c]=B}if(T.nodeName(C,"form")&&C.getAttributeNode(c)){return C.getAttributeNode(c).nodeValue}if(c=="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[c]}if(!T.support.style&&a&&c=="style"){return T.attr(C.style,"cssText",B)}if(A){C.setAttribute(c,""+B)}var e=!T.support.hrefNormalized&&a&&d?C.getAttribute(c,2):C.getAttribute(c);return e===null?AB:e}if(!T.support.opacity&&c=="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)+"":""}c=c.replace(/-([a-z])/ig,function(g,f){return f.toUpperCase()});if(A){C[c]=B}return C[c]},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 c=[],d={};try{for(var a=0,D=A.length;a<D;a++){var B=T.data(A[a]);if(!d[B]){d[B]=true;c.push(A[a])}}}catch(C){c=A}return c},grep:function(a,A,c){var D=[];for(var C=0,B=a.length;C<B;C++){if(!c!=!A(a[C],C)){D.push(a[C])}}return D},map:function(c,A){var a=[];for(var D=0,C=c.length;D<C;D++){var B=A(c[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(e){var a=[],C=T(e);for(var D=0,d=C.length;D<d;D++){var c=(D>0?this.clone(true):this).get();T.fn[A].apply(T(C[D]),c);a=a.concat(c)}return this.pushStack(a,B,e)}});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,S={};T.extend({cache:{},data:function(C,D,B){C=C==W?S: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?S: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,e=0,i=Object.prototype.toString;var k=function(p,t,AK,AJ){AK=AK||[];t=t||document;if(t.nodeType!==1&&t.nodeType!==9){return[]}if(!p||typeof p!=="string"){return AK}var o=[],r,y,v,u,AI,s,q=true;B.lastIndex=0;while((r=B.exec(p))!==null){o.push(r[1]);if(r[2]){s=RegExp.rightContext;break}}if(o.length>1&&d.exec(p)){if(o.length===2&&h.relative[o[0]]){y=g(o[0]+o[1],t)}else{y=h.relative[o[0]]?[t]:k(o.shift(),t);while(o.length){p=o.shift();if(h.relative[p]){p+=o.shift()}y=g(p,y)}}}else{var z=AJ?{expr:o.pop(),set:l(AJ)}:k.find(o.pop(),o.length===1&&t.parentNode?t.parentNode:t,C(t));y=k.filter(z.expr,z.set);if(o.length>0){v=l(y)}else{q=false}while(o.length){var w=o.pop(),x=w;if(!h.relative[w]){w=""}else{x=o.pop()}if(x==null){x=t}h.relative[w](v,x,C(t))}}if(!v){v=y}if(!v){throw"Syntax error, unrecognized expression: "+(w||p)}if(i.call(v)==="[object Array]"){if(!q){AK.push.apply(AK,v)}else{if(t.nodeType===1){for(var m=0;v[m]!=null;m++){if(v[m]&&(v[m]===true||v[m].nodeType===1&&f(t,v[m]))){AK.push(y[m])}}}else{for(var m=0;v[m]!=null;m++){if(v[m]&&v[m].nodeType===1){AK.push(y[m])}}}}}else{l(v,AK)}if(s){k(s,t,AK,AJ);if(j){hasDuplicate=false;AK.sort(j);if(hasDuplicate){for(var m=1;m<AK.length;m++){if(AK[m]===AK[m-1]){AK.splice(m--,1)}}}}}return AK};k.matches=function(o,m){return k(o,null,null,m)};k.find=function(m,u,v){var o,q;if(!m){return[]}for(var r=0,s=h.order.length;r<s;r++){var p=h.order[r],q;if((q=h.match[p].exec(m))){var t=RegExp.leftContext;if(t.substr(t.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");o=h.find[p](q,u,v);if(o!=null){m=m.replace(h.match[p],"");break}}}}if(!o){o=u.getElementsByTagName("*")}return{set:o,expr:m}};k.filter=function(AI,AJ,x,r){var s=AI,v=[],m=AJ,p,u,o=AJ&&AJ[0]&&C(AJ[0]);while(AI&&AJ.length){for(var AK in h.filter){if((p=h.match[AK].exec(AI))!=null){var t=h.filter[AK],w,y;u=false;if(m==v){v=[]}if(h.preFilter[AK]){p=h.preFilter[AK](p,m,x,v,r,o);if(!p){u=w=true}else{if(p===true){continue}}}if(p){for(var q=0;(y=m[q])!=null;q++){if(y){w=t(y,p,q,m);var z=r^!!w;if(x&&w!=null){if(z){u=true}else{m[q]=false}}else{if(z){v.push(y);u=true}}}}}if(w!==AB){if(!x){m=v}AI=AI.replace(h.match[AK],"");if(!u){return[]}break}}}if(AI==s){if(u==null){throw"Syntax error, unrecognized expression: "+AI}else{break}}s=AI}return m};var h=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,u,o){var q=typeof u==="string",v=q&&!/\W/.test(u),p=q&&!v;if(v&&!o){u=u.toUpperCase()}for(var r=0,s=m.length,t;r<s;r++){if((t=m[r])){while((t=t.previousSibling)&&t.nodeType!==1){}m[r]=p||t&&t.nodeName===u?t||false:t===u}}if(p){k.filter(u,m,true)}},">":function(s,p,r){var u=typeof p==="string";if(u&&!/\W/.test(p)){p=r?p:p.toUpperCase();for(var o=0,q=s.length;o<q;o++){var t=s[o];if(t){var m=t.parentNode;s[o]=m.nodeName===p?m:false}}}else{for(var o=0,q=s.length;o<q;o++){var t=s[o];if(t){s[o]=u?t.parentNode:t.parentNode===p}}if(u){k.filter(p,s,true)}}},"":function(m,p,r){var o=e++,q=A;if(!p.match(/\W/)){var s=p=r?p:p.toUpperCase();q=D}q("parentNode",p,o,m,s,r)},"~":function(m,p,r){var o=e++,q=A;if(typeof p==="string"&&!p.match(/\W/)){var s=p=r?p:p.toUpperCase();q=D}q("previousSibling",p,o,m,s,r)}},find:{ID:function(p,o,m){if(typeof o.getElementById!=="undefined"&&!m){var q=o.getElementById(p[1]);return q?[q]:[]}},NAME:function(o,s,r){if(typeof s.getElementsByName!=="undefined"){var p=[],t=s.getElementsByName(o[1]);for(var m=0,q=t.length;m<q;m++){if(t[m].getAttribute("name")===o[1]){p.push(t[m])}}return p.length===0?null:p}},TAG:function(o,m){return m.getElementsByTagName(o[1])}},preFilter:{CLASS:function(m,p,o,q,s,r){m=" "+m[1].replace(/\\/g,"")+" ";if(r){return m}for(var u=0,t;(t=p[u])!=null;u++){if(t){if(s^(t.className&&(" "+t.className+" ").indexOf(m)>=0)){if(!o){q.push(t)}}else{if(o){p[u]=false}}}}return false},ID:function(m){return m[1].replace(/\\/g,"")},TAG:function(o,p){for(var m=0;p[m]===false;m++){}return p[m]&&C(p[m])?o[1]:o[1].toUpperCase()},CHILD:function(o){if(o[1]=="nth"){var m=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(o[2]=="even"&&"2n"||o[2]=="odd"&&"2n+1"||!/\D/.test(o[2])&&"0n+"+o[2]||o[2]);o[2]=(m[1]+(m[2]||1))-0;o[3]=m[3]-0}o[0]=e++;return o},ATTR:function(t,p,o,q,s,r){var m=t[1].replace(/\\/g,"");if(!r&&h.attrMap[m]){t[1]=h.attrMap[m]}if(t[2]==="~="){t[4]=" "+t[4]+" "}return t},PSEUDO:function(s,p,o,q,r){if(s[1]==="not"){if(s[3].match(B).length>1||/^\w/.test(s[3])){s[3]=k(s[3],null,null,p)}else{var m=k.filter(s[3],p,o,true^r);if(!o){q.push.apply(q,m)}return false}}else{if(h.match.POS.test(s[0])||h.match.CHILD.test(s[0])){return true}}return s},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,o,p){return !!k(p[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,o){return o===0},last:function(o,p,q,m){return p===m.length-1},even:function(m,o){return o%2===0},odd:function(m,o){return o%2===1},lt:function(m,o,p){return o<p[3]-0},gt:function(m,o,p){return o>p[3]-0},nth:function(m,o,p){return p[3]-0==o},eq:function(m,o,p){return p[3]-0==o}},filter:{PSEUDO:function(s,o,m,r){var p=o[1],u=h.filters[p];if(u){return u(s,m,o,r)}else{if(p==="contains"){return(s.textContent||s.innerText||"").indexOf(o[3])>=0}else{if(p==="not"){var t=o[3];for(var m=0,q=t.length;m<q;m++){if(t[m]===s){return false}}return true}}}},CHILD:function(u,r){var o=r[1],t=u;switch(o){case"only":case"first":while(t=t.previousSibling){if(t.nodeType===1){return false}}if(o=="first"){return true}t=u;case"last":while(t=t.nextSibling){if(t.nodeType===1){return false}}return true;case"nth":var s=r[2],v=r[3];if(s==1&&v==0){return true}var p=r[0],w=u.parentNode;if(w&&(w.sizcache!==p||!u.nodeIndex)){var q=0;for(t=w.firstChild;t;t=t.nextSibling){if(t.nodeType===1){t.nodeIndex=++q}}w.sizcache=p}var m=u.nodeIndex-v;if(s==0){return m==0}else{return(m%s==0&&m/s>=0)}}},ID:function(m,o){return m.nodeType===1&&m.getAttribute("id")===o},TAG:function(m,o){return(o==="*"&&m.nodeType===1)||m.nodeName===o},CLASS:function(m,o){return(" "+(m.className||m.getAttribute("class"))+" ").indexOf(o)>-1},ATTR:function(s,m){var o=m[1],q=h.attrHandle[o]?h.attrHandle[o](s):s[o]!=null?s[o]:s.getAttribute(o),r=q+"",t=m[2],p=m[4];return q==null?t==="!=":t==="="?r===p:t==="*="?r.indexOf(p)>=0:t==="~="?(" "+r+" ").indexOf(p)>=0:!p?r&&q!==false:t==="!="?r!=p:t==="^="?r.indexOf(p)===0:t==="$="?r.substr(r.length-p.length)===p:t==="|="?r===p||r.substr(0,p.length+1)===p+"-":false},POS:function(s,p,o,r){var q=p[2],m=h.setFilters[q];if(m){return m(s,o,p,r)}}}};var d=h.match.POS;for(var a in h.match){h.match[a]=RegExp(h.match[a].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var l=function(m,o){m=Array.prototype.slice.call(m);if(o){o.push.apply(o,m);return o}return m};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(c){l=function(r,m){var p=m||[];if(i.call(r)==="[object Array]"){Array.prototype.push.apply(p,r)}else{if(typeof r.length==="number"){for(var o=0,q=r.length;o<q;o++){p.push(r[o])}}else{for(var o=0;r[o];o++){p.push(r[o])}}}return p}}var j;if(document.documentElement.compareDocumentPosition){j=function(o,p){var m=o.compareDocumentPosition(p)&4?-1:o===p?0:1;if(m===0){hasDuplicate=true}return m}}else{if("sourceIndex" in document.documentElement){j=function(o,p){var m=o.sourceIndex-p.sourceIndex;if(m===0){hasDuplicate=true}return m}}else{if(document.createRange){j=function(m,p){var o=m.ownerDocument.createRange(),q=p.ownerDocument.createRange();o.selectNode(m);o.collapse(true);q.selectNode(p);q.collapse(true);var r=o.compareBoundaryPoints(Range.START_TO_END,q);if(r===0){hasDuplicate=true}return r}}}}(function(){var o=document.createElement("form"),m="script"+(new Date).getTime();o.innerHTML="<input name='"+m+"'/>";var p=document.documentElement;p.insertBefore(o,p.firstChild);if(!!document.getElementById(m)){h.find.ID=function(t,s,r){if(typeof s.getElementById!=="undefined"&&!r){var q=s.getElementById(t[1]);return q?q.id===t[1]||typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id").nodeValue===t[1]?[q]:AB:[]}};h.filter.ID=function(r,q){var s=typeof r.getAttributeNode!=="undefined"&&r.getAttributeNode("id");return r.nodeType===1&&s&&s.nodeValue===q}}p.removeChild(o)})();(function(){var m=document.createElement("div");m.appendChild(document.createComment(""));if(m.getElementsByTagName("*").length>0){h.find.TAG=function(q,r){var s=r.getElementsByTagName(q[1]);if(q[1]==="*"){var o=[];for(var p=0;s[p];p++){if(s[p].nodeType===1){o.push(s[p])}}s=o}return s}}m.innerHTML="<a href='#'></a>";if(m.firstChild&&typeof m.firstChild.getAttribute!=="undefined"&&m.firstChild.getAttribute("href")!=="#"){h.attrHandle.href=function(o){return o.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var o=k,m=document.createElement("div");m.innerHTML="<p class='TEST'></p>";if(m.querySelectorAll&&m.querySelectorAll(".TEST").length===0){return }k=function(s,t,q,p){t=t||document;if(!p&&t.nodeType===9&&!C(t)){try{return l(t.querySelectorAll(s),q)}catch(r){}}return o(s,t,q,p)};k.find=o.find;k.filter=o.filter;k.selectors=o.selectors;k.matches=o.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 }h.order.splice(1,0,"CLASS");h.find.CLASS=function(q,p,o){if(typeof p.getElementsByClassName!=="undefined"&&!o){return p.getElementsByClassName(q[1])}}})()}function D(t,o,p,v,m,w){var x=t=="previousSibling"&&!w;for(var r=0,s=v.length;r<s;r++){var u=v[r];if(u){if(x&&u.nodeType===1){u.sizcache=p;u.sizset=r}u=u[t];var q=false;while(u){if(u.sizcache===p){q=v[u.sizset];break}if(u.nodeType===1&&!w){u.sizcache=p;u.sizset=r}if(u.nodeName===o){q=u;break}u=u[t]}v[r]=q}}}function A(t,o,p,v,m,w){var x=t=="previousSibling"&&!w;for(var r=0,s=v.length;r<s;r++){var u=v[r];if(u){if(x&&u.nodeType===1){u.sizcache=p;u.sizset=r}u=u[t];var q=false;while(u){if(u.sizcache===p){q=v[u.sizset];break}if(u.nodeType===1){if(!w){u.sizcache=p;u.sizset=r}if(typeof o!=="string"){if(u===o){q=true;break}}else{if(k.filter(o,[u]).length>0){q=u;break}}}u=u[t]}v[r]=q}}}var f=document.compareDocumentPosition?function(m,o){return m.compareDocumentPosition(o)&16}:function(m,o){return m!==o&&(m.contains?m.contains(o):true)};var C=function(m){return m.nodeType===9&&m.documentElement.nodeName!=="HTML"||!!m.ownerDocument&&C(m.ownerDocument)};var g=function(q,s){var m=[],u="",t,o=s.nodeType?[s]:s;while((t=h.match.PSEUDO.exec(q))){u+=t[0];q=q.replace(h.match.PSEUDO,"")}q=h.relative[q]?q+"*":q;for(var r=0,p=o.length;r<p;r++){k(q,o[r],m)}return k.filter(u,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(o){return m===o.elem}).length};T.multiFilter=function(m,p,o){if(o){m=":not("+m+")"}return k.matches(m,p)};T.dir=function(o,p){var q=[],m=o[p];while(m&&m!=document){if(m.nodeType==1){q.push(m)}m=m[p]}return q};T.nth=function(r,q,o,m){q=q||1;var p=0;for(;r;r=r[o]){if(r.nodeType==1&&++p==q){break}}return r};T.sibling=function(m,o){var p=[];for(;m;m=m.nextSibling){if(m.nodeType==1&&m!=o){p.push(m)}}return p};return ;W.Sizzle=k})();T.event={add:function(C,c,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 d=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(c.split(/\s+/),function(h,g){var f=g.split(".");g=f.shift();D.type=f.slice().sort().join(".");var e=d[g];if(T.event.specialAll[g]){T.event.specialAll[g].setup.call(C,A,f)}if(!e){e=d[g]={};if(!T.event.special[g]||T.event.special[g].setup.call(C,A,f)===false){if(C.addEventListener){C.addEventListener(g,B,false)}else{if(C.attachEvent){C.attachEvent("on"+g,B)}}}}e[D.guid]=D;T.event.global[g]=true});C=null},guid:1,global:{},remove:function(B,a,C){if(B.nodeType==3||B.nodeType==8){return }var c=T.data(B,"events"),d,e;if(c){if(a===AB||(typeof a==="string"&&a.charAt(0)==".")){for(var D in c){this.remove(B,D+(a||""))}}else{if(a.type){C=a.handler;a=a.type}T.each(a.split(/\s+/),function(j,h){var f=h.split(".");h=f.shift();var i=RegExp("(^|\\.)"+f.slice().sort().join(".*\\.")+"(\\.|$)");if(c[h]){if(C){delete c[h][C.guid]}else{for(var g in c[h]){if(i.test(c[h][g].type)){delete c[h][g]}}}if(T.event.specialAll[h]){T.event.specialAll[h].teardown.call(B,f)}for(d in c[h]){break}if(!d){if(!T.event.special[h]||T.event.special[h].teardown.call(B,f)===false){if(B.removeEventListener){B.removeEventListener(h,T.data(B,"handle"),false)}else{if(B.detachEvent){B.detachEvent("on"+h,T.data(B,"handle"))}}}d=null;delete c[h]}}})}for(d in c){break}if(!d){var A=T.data(B,"handle");if(A){A.elem=null}T.removeData(B,"events");T.removeData(B,"handle")}}},trigger:function(D,B,a,e){var c=D.type||D;if(!e){D=typeof D==="object"?D[AA]?D:T.extend(T.Event(c),D):T.Event(c);if(c.indexOf("!")>=0){D.type=c=c.slice(0,-1);D.exclusive=true}if(!a){D.stopPropagation();if(this.global[c]){T.each(T.cache,function(){if(this.events&&this.events[c]){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[c]||(T.nodeName(a,"a")&&c=="click"))&&a["on"+c]&&a["on"+c].apply(a,B)===false){D.result=false}if(!e&&a[c]&&!D.isDefaultPrevented()&&!(T.nodeName(a,"a")&&c=="click")){this.triggered=true;try{a[c]()}catch(A){}}this.triggered=false;if(!D.isPropagationStopped()){var d=a.parentNode||a.ownerDocument;if(d){T.event.trigger(D,B,d,true)}}},handle:function(B){var C,e;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(".*\\.")+"(\\.|$)");e=(T.data(this,"events")||{})[B.type];for(var c in e){var a=e[c];if(C||D.test(a.type)){B.handler=a;B.data=a.data;var d=a.apply(this,arguments);if(d!==AB){B.result=d;if(d===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,c=document.body;C.pageX=C.clientX+(B&&B.scrollLeft||c&&c.scrollLeft||0)-(B.clientLeft||0);C.pageY=C.clientY+(B&&B.scrollTop||c&&c.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(d,c){if(D.test(c.type)){var a=T(A.target).closest(c.data)[0];if(a){C.push({elem:a,fn:c})}}});C.sort(function(a,c){return T.data(a.elem,"closest")-T.data(c.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 c=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("*"),d=A.getElementsByTagName("a")[0];if(!D||!D.length||!d){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(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:d.style.opacity==="0.5",cssFloat:!!d.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};a.type="text/javascript";try{a.appendChild(document.createTextNode("window."+B+"=1;"))}catch(C){}c.insertBefore(a,c.firstChild);if(W[B]){T.support.scriptEval=true;delete W[B]}c.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 e=document.createElement("div");e.style.width=e.style.paddingLeft="1px";document.body.appendChild(e);T.boxModel=T.support.boxModel=e.offsetWidth===2;document.body.removeChild(e).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 d=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 c=this;T.ajax({url:a,type:D,dataType:"html",data:B,complete:function(f,e){if(e=="success"||e=="notmodified"){c.html(d?T("<div/>").append(f.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(d):f.responseText)}if(A){c.each(A,[f.responseText,e,f])}}});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(h){h=T.extend(true,h,T.extend(true,{},T.ajaxSettings,h));var A,p=/=\?(&|$)/g,c,B,o=h.type.toUpperCase();if(h.data&&h.processData&&typeof h.data!=="string"){h.data=T.param(h.data)}if(h.dataType=="jsonp"){if(o=="GET"){if(!h.url.match(p)){h.url+=(h.url.match(/\?/)?"&":"?")+(h.jsonp||"callback")+"=?"}}else{if(!h.data||!h.data.match(p)){h.data=(h.data?h.data+"&":"")+(h.jsonp||"callback")+"=?"}}h.dataType="json"}if(h.dataType=="json"&&(h.data&&h.data.match(p)||h.url.match(p))){A="jsonp"+N++;if(h.data){h.data=(h.data+"").replace(p,"="+A+"$1")}h.url=h.url.replace(p,"="+A+"$1");h.dataType="script";W[A]=function(s){B=s;l();i();W[A]=AB;try{delete W[A]}catch(r){}if(m){m.removeChild(D)}}}if(h.dataType=="script"&&h.cache==null){h.cache=false}if(h.cache===false&&o=="GET"){var q=AD();var C=h.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+q+"$2");h.url=C+((C==h.url)?(h.url.match(/\?/)?"&":"?")+"_="+q:"")}if(h.data&&o=="GET"){h.url+=(h.url.match(/\?/)?"&":"?")+h.data;h.data=null}if(h.global&&!T.active++){T.event.trigger("ajaxStart")}var d=/^(\w+:)?\/\/([^\/?#]+)/.exec(h.url);if(h.dataType=="script"&&o=="GET"&&d&&(d[1]&&d[1]!=location.protocol||d[2]!=location.host)){var m=document.getElementsByTagName("head")[0];var D=document.createElement("script");D.src=h.url;if(h.scriptCharset){D.charset=h.scriptCharset}if(!A){var f=false;D.onload=D.onreadystatechange=function(){if(!f&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){f=true;l();i();D.onload=D.onreadystatechange=null;m.removeChild(D)}}}m.appendChild(D);return AB}var j=false;var k=h.xhr();if(h.username){k.open(o,h.url,h.async,h.username,h.password)}else{k.open(o,h.url,h.async)}try{if(h.data){k.setRequestHeader("Content-Type",h.contentType)}if(h.ifModified){k.setRequestHeader("If-Modified-Since",T.lastModified[h.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}k.setRequestHeader("X-Requested-With","XMLHttpRequest");k.setRequestHeader("Accept",h.dataType&&h.accepts[h.dataType]?h.accepts[h.dataType]+", */*":h.accepts._default)}catch(a){}if(h.beforeSend&&h.beforeSend(k,h)===false){if(h.global&&!--T.active){T.event.trigger("ajaxStop")}k.abort();return false}if(h.global){T.event.trigger("ajaxSend",[k,h])}var g=function(t){if(k.readyState==0){if(e){clearInterval(e);e=null;if(h.global&&!--T.active){T.event.trigger("ajaxStop")}}}else{if(!j&&k&&(k.readyState==4||t=="timeout")){j=true;if(e){clearInterval(e);e=null}c=t=="timeout"?"timeout":!T.httpSuccess(k)?"error":h.ifModified&&T.httpNotModified(k,h.url)?"notmodified":"success";if(c=="success"){try{B=T.httpData(k,h.dataType,h)}catch(r){c="parsererror"}}if(c=="success"){var s;try{s=k.getResponseHeader("Last-Modified")}catch(r){}if(h.ifModified&&s){T.lastModified[h.url]=s}if(!A){l()}}else{T.handleError(h,k,c)}i();if(t){k.abort()}if(h.async){k=null}}}};if(h.async){var e=setInterval(g,13);if(h.timeout>0){setTimeout(function(){if(k&&!j){g("timeout")}},h.timeout)}}try{k.send(h.data)}catch(a){T.handleError(h,k,null,a)}if(!h.async){g()}function l(){if(h.success){h.success(B,c)}if(h.global){T.event.trigger("ajaxSuccess",[k,h])}}function i(){if(h.complete){h.complete(k,c)}if(h.global){T.event.trigger("ajaxComplete",[k,h])}if(h.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"),c=C=="xml"||!C&&a&&a.indexOf("xml")>=0,B=c?A.responseXML:A.responseText;if(c&&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(c,a){B[B.length]=encodeURIComponent(c)+"="+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,d=this.length;a<d;a++){var e=T.data(this[a],"olddisplay");this[a].style.display=e||"";if(T.css(this[a],"display")==="none"){var c=this[a].tagName,B;if(V[c]){B=V[c]}else{var D=T("<"+c+" />").appendTo("body");B=D.css("display");if(B==="none"){B="block"}D.remove();V[c]=B}T.data(this[a],"olddisplay",B)}}for(var a=0,d=this.length;a<d;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 d=T.extend({},a),f,c=this.nodeType==1&&T(this).is(":hidden"),e=this;for(f in A){if(A[f]=="hide"&&c||A[f]=="show"&&!c){return d.complete.call(this)}if((f=="height"||f=="width")&&this.style){d.display=T.css(this,"display");d.overflow=this.style.overflow}}if(d.overflow!=null){this.style.overflow="hidden"}d.curAnim=T.extend({},A);T.each(A,function(l,h){var i=new T.fx(e,d,l);if(/toggle|show|hide/.test(h)){i[h=="toggle"?c?"show":"hide":h](A)}else{var j=h.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),g=i.cur(true)||0;if(j){var m=parseFloat(j[2]),k=j[3]||"px";if(k!="px"){e.style[l]=(m||1)+k;g=((m||1)/i.cur(true))*g;e.style[l]=g+k}if(j[1]){m=((j[1]=="-="?-1:1)*m)+g}i.custom(g,m,k)}else{i.custom(g,h,"")}}});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(c){return a.step(c)}D.elem=this.elem;if(D()&&T.timers.push(D)&&!U){U=setInterval(function(){var c=T.timers;for(var d=0;d<c.length;d++){if(!c[d]()){c.splice(d--,1)}}if(!c.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 c=true;for(var a in this.options.curAnim){if(this.options.curAnim[a]!==true){c=false}}if(c){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 c=this[0].getBoundingClientRect(),C=this[0].ownerDocument,d=C.body,e=C.documentElement,A=e.clientTop||d.clientTop||0,B=e.clientLeft||d.clientLeft||0,D=c.top+(self.pageYOffset||T.boxModel&&e.scrollTop||d.scrollTop)-A,a=c.left+(self.pageXOffset||T.boxModel&&e.scrollLeft||d.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 c=this[0],f=c.offsetParent,g=c,A=c.ownerDocument,C,e=A.documentElement,a=A.body,D=A.defaultView,h=D.getComputedStyle(c,null),B=c.offsetTop,d=c.offsetLeft;while((c=c.parentNode)&&c!==a&&c!==e){C=D.getComputedStyle(c,null);B-=c.scrollTop,d-=c.scrollLeft;if(c===f){B+=c.offsetTop,d+=c.offsetLeft;if(T.offset.doesNotAddBorder&&!(T.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(c.tagName))){B+=parseInt(C.borderTopWidth,10)||0,d+=parseInt(C.borderLeftWidth,10)||0}g=f,f=c.offsetParent}if(T.offset.subtractsBorderForOverflowNotVisible&&C.overflow!=="visible"){B+=parseInt(C.borderTopWidth,10)||0,d+=parseInt(C.borderLeftWidth,10)||0}h=C}if(h.position==="relative"||h.position==="static"){B+=a.offsetTop,d+=a.offsetLeft}if(h.position==="fixed"){B+=Math.max(e.scrollTop,a.scrollTop),d+=Math.max(e.scrollLeft,a.scrollLeft)}return{top:B,left:d}}}T.offset={initialize:function(){if(this.initialized){return }var C=document.body,f=document.createElement("div"),d,e,A,c,B,g,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(g in B){f.style[g]=B[g]}f.innerHTML=D;C.insertBefore(f,C.firstChild);d=f.firstChild,e=d.firstChild,c=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(e.offsetTop!==5);this.doesAddBorderForTableAndCells=(c.offsetTop===5);d.style.overflow="hidden",d.style.position="relative";this.subtractsBorderForOverflowNotVisible=(e.offsetTop===-5);C.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(C.offsetTop===0);C.style.marginTop=a;C.removeChild(f);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(),c=/^body|html$/i.test(D[0].tagName)?{top:0,left:0}:D.offset();A.top-=Y(this,"marginTop");A.left-=Y(this,"marginLeft");c.top+=Y(D,"borderTopWidth");c.left+=Y(D,"borderLeftWidth");a={top:A.top-c.top,left:A.left-c.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 c=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(d){return this[0]?T.css(this[0],a,false,d?"margin":"border"):null};var A=D.toLowerCase();T.fn[A]=function(d){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]):d===AB?(this.length?T.css(this[0],A):null):this.css(A,typeof d==="string"?d:d+"px")}})})();var gPlatform=PLATFORM_WINDOWS;var gLatestVersionID=null;var gLatestAddonVersion=null;var gLatestAppVersion=null;var PLATFORM_OTHER=0;var PLATFORM_WINDOWS=1;var PLATFORM_LINUX=2;var PLATFORM_MACOSX=3;var PLATFORM_MAC=4;if(navigator.platform.indexOf("Win32")!=-1){gPlatform=PLATFORM_WINDOWS}else{if(navigator.platform.indexOf("Linux")!=-1){gPlatform=PLATFORM_LINUX}else{if(navigator.userAgent.indexOf("Mac OS X")!=-1){gPlatform=PLATFORM_MACOSX}else{if(navigator.userAgent.indexOf("MSIE 5.2")!=-1){gPlatform=PLATFORM_MACOSX}else{if(navigator.platform.indexOf("Mac")!=-1){gPlatform=PLATFORM_MAC}else{gPlatform=PLATFORM_OTHER}}}}}function getPlatformName(){if(gPlatform==PLATFORM_WINDOWS){return"Windows"}if(gPlatform==PLATFORM_LINUX){return"Linux"}if(gPlatform==PLATFORM_MACOSX){return"MacOSX"}return"Unknown"}function getInstallURL(A){var B=A.target;while(B&&!B.href){B=B.parentNode}return B&&B.href}function checkMatchUserAgentAppId(){var C=/(?:Firefox|Minefield|Shiretoko|GranParadiso|BonEcho|Iceweasel)/;var B=navigator.userAgent;var A=C.exec(B);if(A!=null&&APP_ID==1){return true}C=/(SeaMonkey|Iceape)/;B=navigator.userAgent;A=C.exec(B);if(A!=null&&APP_ID==59){return true}return false}function install(B,A,E,D){if(B.altKey||!window.InstallTrigger||!checkMatchUserAgentAppId()){return true}var C=getInstallURL(B);if(C){var F=new Array();F[A]={URL:C,IconURL:E,toString:function(){return this.URL}};if(D){F[A].Hash=D}InstallTrigger.install(F);return false}return true}function addEngine(A){if(window.external&&("AddSearchProvider" in window.external)){window.external.AddSearchProvider(A);return false}else{alert(error_opensearch_unsupported);return true}}function fixPlatformLinks(F,D){if(gPlatform==PLATFORM_OTHER){return true}var A=getPlatformName();var E=$("#install-"+F);var B=E.find("p.install-button");var C=B.not(".platform-ALL,.platform-"+A);C.hide();C.each(function(){var G=$(this).parents(".exp-loggedout, .exp-confirmed");if($(G).length){$(G).hide()}else{$(this).hide()}});if(B.length==C.length){E.find(".exp-loggedout").hide();E.append($('<p class="not-avail"></p>').append(sprintf(addOnNotAvailableForPlatform,D,A)))}return true}function installVersusDownloadCheck(G,F,B){var D=F;var E=/Mozilla.*(Firefox|Minefield|Shiretoko|GranParadiso|BonEcho|SeaMonkey|Iceweasel|Iceape)\/.*$/;var C=navigator.userAgent;var A=E.exec(C);if(!A||A.length<2||!checkMatchUserAgentAppId()){D=B}$("#"+G+" strong").text(D)}function addCompatibilityHints(D,K,Q,M,I,N){var A=/Mozilla.*(?:Firefox|Minefield|Shiretoko|GranParadiso|BonEcho|Iceweasel)\/([^\s]*).*$/;var O=navigator.userAgent;var R=A.exec(O);if(!R||R.length<2){return true}var B=$("#install-"+K);var G=R[1];var C=new VersionCompare();if(C.compareVersions(G,Q)<0){var P=true}else{if(C.compareVersions(G,M)>0){var P=false}else{if(gLatestVersionID==null){var L=B.find("p.install-button");if(L.find(".platform-ALL")||L.find(".platform-"+gPlatform)){gLatestVersionID=K;var J=B.prev().prev().prev();gLatestAddonVersion=J.clone();gLatestApplicationVersion=G}}return true}}if(N){return true}var E=B.find("p:visible a");if(E.length==0){return true}var F=B.clone();F.attr("id","orig-"+K);F.hide();B.after(F);$(E).each(function(){var S=$(this).parents(".exp-loggedout");if(S.length){$(S).find(".exp-confirm-install").hide();return }var T=document.createElement("div");T.setAttribute("class","exp-loggedout");B.wrapInner(T)});var H=E.attr("href");E.removeAttr("href");E.removeAttr("onClick");E.removeAttr("title");E.css("cursor","default");E.parent().css("float","none");E.attr("frozen","true");if(H.indexOf("downloads")>0){H=H.substring(0,H.indexOf("downloads"))}else{if(H.indexOf("addons")>0){H=H.substring(0,H.indexOf("addons"))}}H=H+"addons/versions/"+D;if(P&&I){E.parent().after(sprintf(app_compat_older_version_or_ignore_check,H,"removeCompatibilityHint("+K+");return false;"))}else{if(!P&&I){E.parent().after('<br /><a href="#" onclick="removeCompatibilityHint(\''+K+"');return false;\">"+app_compat_ignore_check+"</a>");E.parent().after(app_compat_older_firefox_only)}else{if(!P){E.parent().after(app_compat_older_firefox_only)}else{E.parent().after(sprintf(app_compat_try_old_version,H))}}}if(P){if(C.compareVersions(Q,LATEST_FIREFOX_DEVEL_VERSION)>=0){E.parent().after(sprintf("<strong>"+app_compat_unreleased_version+"</strong><br />","http://www.mozilla.com/"+LANG+"/firefox/all-beta.html#"+LANG,LATEST_FIREFOX_DEVEL_VERSION))}else{if(C.compareVersions(Q,LATEST_FIREFOX_VERSION)<0){E.parent().after(sprintf("<strong>"+app_compat_update_firefox+"</strong><br />","http://www.mozilla.com/"+LANG+"/firefox/all.html#"+LANG,LATEST_FIREFOX_VERSION))}}}return true}function removeCompatibilityHint(A){var B=$("#orig-"+A);B.prev().remove();B.attr("id","install-"+A);B.show();return true}function createLatestVersionElement(C,D){var A=$("#latest-version-container");A.wrapInner("<p>"+sprintf(C,D,gLatestApplicationVersion)+"</p>");A.append(gLatestAddonVersion);var E=$("#install-"+gLatestVersionID);var B=E.clone();B.attr("id","install-0"+gLatestVersionID);A.append(B);A.attr("id","latest-version");fixPlatformLinks("0"+gLatestVersionID,"")}function replaceOptions(C,B,A){$(C+" > *").remove();for(opt in B){sel_text="";val=B[opt];opt_obj=document.createElement("option");if(val==A){opt_obj.selected="selected"}opt_obj.value=val;opt_obj.appendChild(document.createTextNode(opt));$(C).append(opt_obj)}}function emailLink(F,D,E){var A=document.getElementById(F);var C=D+"@"+E;var B=document.createElement("a");B.setAttribute("href","mailto:"+C);B.appendChild(document.createTextNode(C));A.replaceChild(B,A.lastChild)}var translation_box={switchLocale:function(A,C){var B=$(A).parent().parent().parent();if(B.find(".translation-deletelocale").size()>0){return }B.find(".selected").removeClass("selected");$(A).addClass("selected");B.find("."+C).addClass("selected");this.checkDeleteButton(B);B.find(".translation-area .input.selected").trigger("onchange");B.find("."+C).focus()},checkDeleteButton:function(B){var C=B.find(".translation-area").attr("defaultLocale");var A=B.find(".translation-tab.selected").text();if(A==C||A==""){B.find(".translation-button.remove").hide()}else{B.find(".translation-button.remove").show()}},checkLength:function(C,A){var B=$(C).parent().parent();B.find(".translation-maxlength.selected span").text(C.value.length);if(C.value.length>A){B.find(".translation-maxlength.selected").addClass("over");B.addClass("errors")}else{B.find(".translation-maxlength.selected").removeClass("over");if(B.find(".translation-area .over").size()==0){B.removeClass("errors")}}},addTab:function(A){var C=$(A).parent().parent().parent();if(C.find(".translation-deletelocale").size()>0){return }if(C.find(".translation-tab").hasClass("new")){C.find(".selected").removeClass("selected");C.find(".new").addClass("selected");return }var B='<div class="translation-tab selected new" onclick="translation_box.switchLocale(this, \'new\');"></div>';C.find(".selected").removeClass("selected");C.find(".translation-tabs").append(B);C.find(".translation-area").append($(".translation-newlocale-container").html());C.find(".translation-tab:not(.new)").each(function(D,E){C.find('.translation-newlocale select option[value="'+$(E).text()+'"]').remove()});this.checkDeleteButton(C)},addLocale:function(C,E){var G=$(C).parent().parent().parent().parent().parent();var A=G;if(E==true){G=G.parent()}var F=A.find("select").val();var B=A.find("select option:selected").text();var D='<div class="translation-tab selected" title="'+B+'" onclick="translation_box.switchLocale(this, \''+F+"');\">"+F+"</div>";G.find(".input."+F+".deleted").remove();G.find(".translation-area:not(:has(."+F+"))").each(function(K,P){var M=$(P).attr("itemID");var N="data["+$(P).attr("table")+"]"+(M!=null?"["+M+"]":"")+"["+$(P).attr("field")+"]["+F+"]";$(P).parent().find(".selected").removeClass("selected");var J=$(P).find(".input")[0].tagName.toLowerCase();var I=$(P).find(".input").attr("style");if(J=="textarea"){var O='<textarea class="input '+F+' selected" name="'+N+'" style="'+I+'"';var L=$(P).find(".input").attr("maxLength");if(L){O+=' maxLength="'+L+'" onkeyup="translation_box.checkLength(this, '+L+');" onchange="translation_box.checkLength(this, '+L+');"';var H='<div class="translation-maxlength '+F+' selected">'+$(P).find(".translation-maxlength").html()+"</div>"}O+="></textarea>"}else{if(J=="input"){var O='<input type="text" class="input '+F+' selected" value="" name="'+N+'" style="'+I+'" />';var H=""}}$(P).append(O).append(H);G.find(".translation-area .input.selected").trigger("onchange");$(P).parent().find(".translation-tabs").append(D)});A.find(".new").remove();this.checkDeleteButton(G);A.find(".translation-area .selected").focus()},confirmRemove:function(A){var B=$(A).parent().parent().parent();if(B.find(".translation-deletelocale").size()>0){return }B.find(".translation-area .input.selected").hide();B.find(".translation-area .input:first").before($(".translation-deletelocale-container").html());B.find(".translation-deletelocale").css("width",B.css("width"))},removeLocale:function(A){var C=$(A).parent().parent().parent().parent().parent();var B=C.find(".translation-row .selected").text();C.find(".translation-tab:contains("+B+")").remove();C.find(".translation-area .input."+B).val("");C.find(".translation-area .input."+B).addClass("deleted");C.find(".translation-area .input."+B).removeClass("selected");C.find(".translation-maxlength."+B).remove();C.find(".translation-deletelocale").remove();C.find(".translation-area .input").removeClass("confirm-delete");var D=C.find(".translation-area").attr("defaultLocale");C.find(".translation-tab:contains("+D+")").addClass("selected");C.find(".translation-area ."+D).addClass("selected");this.checkDeleteButton(C)},cancelRemove:function(A){var B=$(A).parent().parent().parent().parent().parent();B.find(".translation-deletelocale").remove();B.find(".translation-area .input").removeClass("confirm-delete");B.find(".translation-area .input.selected").show();B.find(".translation-area .input.selected").focus()},cancelAdd:function(A){var B=$(A).parent().parent().parent().parent().parent();B.find(".translation-tabs .new").remove();B.find(".translation-newlocale").remove();var C=B.find(".translation-area").attr("defaultLocale");B.find(".translation-tab:contains("+C+")").addClass("selected");B.find(".translation-area ."+C).addClass("selected");this.checkDeleteButton(B)},showHelp:function(A){var B=$(A).parent().parent();if(B.prev(".translation-help").size()>0){return }B.before($(".translation-help-container").html());B.prev(".translation-help").slideDown("slow")},hideHelp:function(B){var A=$(B).parent().parent().parent().parent();A.slideUp("normal",function(){A.remove()})}};function sprintf(){if(!arguments||arguments.length<1||!RegExp){return null}var M=arguments[0];var L=/([^%]*)%((\d+)\$)?('.|0|\x20)?(-)?(\d+)?(\.\d+)?(%|b|c|d|u|f|o|s|x|X)(.*)/;var U=b=[],A=0,C=0;while((U=L.exec(M))){var K=U[1],F=U[3],R=U[4],I=U[5];var S=U[6],N=U[7],H=U[8];var D=U[9];C++;if(H=="%"){E="%"}else{if(F==""){A++;F=A}if(parseInt(F)>=arguments.length){alert("Error! Not enough function arguments ("+(arguments.length-1)+", excluding the string)\nfor the number of substitution parameters in string ("+A+" so far).")}var G=arguments[parseInt(F)];var T="";if(R&&R.substr(0,1)=="'"){T=K.substr(1,1)}else{if(R){T=R}}var P=true;if(I&&I==="-"){P=false}var J=-1;if(S){J=parseInt(S)}var O=-1;if(N&&H=="f"){O=parseInt(N.substring(1))}var E=G;switch(H){case"b":E=parseInt(G).toString(2);break;case"c":E=String.fromCharCode(parseInt(G));break;case"d":E=parseInt(G)?parseInt(G):0;break;case"u":E=Math.abs(G);break;case"f":E=(O>-1)?Math.round(parseFloat(G)*Math.pow(10,O))/Math.pow(10,O):parseFloat(G);break;case"o":E=parseInt(G).toString(8);break;case"s":E=G;break;case"x":E=(""+parseInt(G).toString(16)).toLowerCase();break;case"X":E=(""+parseInt(G).toString(16)).toUpperCase();break}var Q=J-E.toString().length;if(Q>0){var B=new Array(Q+1);var V=B.join(T?T:" ")}else{var V=""}}M=K+V+E+D}return M}if(jQuery){(function(A){A.fn.rating=function(C){C=A.extend({cancel:"",cancelValue:0,required:false,readOnly:false},C||{});var E=this;var F={};var D={fill:function(I,H,G){this.drain(I);A(H).prevAll(".star").andSelf().addClass(G||"star_hover")},drain:function(G){A(F[G].valueElem).siblings(".star").removeClass("star_on").removeClass("star_hover")},reset:function(G){if(!A(F[G].currentElem).is(".cancel")){A(F[G].currentElem).prevAll(".star").andSelf().addClass("star_on")}},click:function(I,G){F[I].currentElem=G;var H=A(G).children("a").text();A(F[I].valueElem).val(H);D.drain(I);D.reset(I);if(C.callback){C.callback.apply(F[I].valueElem,[H,G])}}};var B=A(this).find("input[type=radio]");A(this).empty();A(this).removeClass("degrade");B.each(function(G){var H=this.name;if(!F[H]){F[H]={count:0}}G=F[H].count;F[H].count++;if(G==0){C.readOnly=A(this).attr("disabled")||C.readOnly;F[H].valueElem=A('<input type="hidden" name="'+H+'" value=""'+(C.readOnly?' disabled="disabled"':"")+">");A(E).append(F[H].valueElem);if(C.readOnly||C.required){}else{}}eStar=A('<div class="star"><a title="'+(this.title||this.value)+'">'+this.value+"</a></div>");A(E).append(eStar);if(C.readOnly){A(eStar).addClass("star_readonly")}else{A(eStar).mouseover(function(){D.drain(H);D.fill(H,this)}).mouseout(function(){D.drain(H);D.reset(H)}).click(function(){D.click(H,this)})}if(this.checked){F[H].currentElem=eStar}if(G+1==this.length){D.reset(H)}});for(n in F){if(F[n].currentElem){D.fill(n,F[n].currentElem,"star_on");A(F[n].valueElem).val(A(F[n].currentElem).children("a").text())}}return this}})(jQuery)}function VersionCompare(){this.compareVersions=function(B,A){var G=B.split(".");var H=A.split(".");for(var D=0;D<G.length||D<H.length;D++){var C=(D<G.length?G[D]:null);var F=(D<H.length?H[D]:null);var E=this.compareVersionParts(C,F);if(E!=0){return E}}return 0};this.compareVersionParts=function(A,D){var E=this.parseVersionPart(A);var C=this.parseVersionPart(D);var B=this.cmp(E.numA,C.numA);if(B){return B}B=this.strcmp(E.strB,C.strB);if(B){return B}B=this.cmp(E.numC,C.numC);if(B){return B}return this.strcmp(E.extraD,C.extraD)};this.parseVersionPart=function(D){if(D=="*"){return{numA:Number.MAX_VALUE,strB:"",numC:0,extraD:""}}var B=/^([-\d]*)([^-\d]*)([-\d]*)(.*)$/;var A=B.exec(D);var C={numA:parseInt(A[1]),strB:A[2],numC:parseInt(A[3]),extraD:A[4]};if(C.strB=="+"){C.numA++;C.strB="pre"}return C};this.cmp=function(A,B){if(isNaN(A)){A=0}if(isNaN(B)){B=0}if(A<B){return -1}if(A>B){return 1}return 0};this.strcmp=function(A,B){if(A==B){return 0}if(A==""){return 1}if(B==""){return -1}if(A<B){return -1}else{if(A>B){return 1}else{return 0}}}}if(jQuery){(function(A){A.fn.slider=function(B){var C=arguments.callee.support;new C(this[0].id,B);return this};A.fn.slider.support=function(B,C){this.init(B,C)};A.fn.slider.support.prototype=function(){return{init:function(B,C){this.options=A.extend({duration:250,prev_img_src:"/img/slider-prev.gif",prev_disabled_img_src:"/img/slider-prev-disabled.gif",next_img_src:"/img/slider-next.gif",next_disabled_img_src:"/img/slider-next-disabled.gif"},C||{});this.slider_id=B;this.slider_sel="#"+B;this._resize_timer=null;var D=this;A(window).unload(function(){return D.onUnload()});A(window).resize(function(){return D.onResize()});A(document).ready(function(){return D.onReady()})},onReady:function(){this.items=A(this.slider_sel+" .item");this.item_idx=0;var B=this;A(this.slider_sel+" .controls .prev").click(function(C){return B.onClickPrev(C)});A(this.slider_sel+" .controls .next").click(function(C){return B.onClickNext(C)});this.onResize()},onUnload:function(){delete this.items},onResize:function(){var B=this;if(this._resize_timer){clearTimeout(this._resize_timer)}this._resize_timer=window.setTimeout(function(){B._doResize()},50)},_doResize:function(){var C=A(this.slider_sel);var B=C.select(".viewport")[0];A(this.slider_sel+" .addon").width(B.offsetWidth-260);this.revealSelectedItem(15)},onClickPrev:function(B){if((this.item_idx-1)<0){return false}this.item_idx--;return this.changeSelectedItem()},onClickNext:function(B){if((this.item_idx+1)>=this.items.length){return false}this.item_idx++;return this.changeSelectedItem()},changeSelectedItem:function(){this.updateItemNumber();this.updateButtonStates();this.revealSelectedItem();return false},updateItemNumber:function(){A(this.slider_sel+" .controls .index").text(this.item_idx+1)},updateButtonStates:function(){var B=A(this.slider_sel+" .controls .prev img")[0];if(this.item_idx==0){B.src=this.options.prev_disabled_img_src}else{B.src=this.options.prev_img_src}var C=A(this.slider_sel+" .controls .next img")[0];if(this.item_idx==this.items.length-1){C.src=this.options.next_disabled_img_src}else{C.src=this.options.next_img_src}},revealSelectedItem:function(B){if(!B){B=this.options.slide_duration}A(this.slider_sel+" .viewport").animate({scrollLeft:this.items[this.item_idx].offsetLeft},B)},EOF:null}}()})(jQuery)}if(jQuery){(function(A){A.fn.collection=function(B){B=A.extend({shoppingCart:false},B||{});var D=B.installUrl;A("input.want").change(function(){A("#done-"+A(this).attr("value")).slideToggle("fast");A(".installsubmit input").attr("disabled",(A("input.want:checked").length==0))});A("input.want:checked").each(function(){A("#done-"+A(this).attr("value")).show()});A(".installsubmit input").attr("disabled",(A("input.want:checked").length==0));var C=function(){A.post(D,A("input.want:checked").serialize(),function(F,E){A("#installdialog").html(F).jqmAddClose("#installdialog .installsubmit input.cancel").show()})};A("#installdialog").jqm({onShow:C,trigger:"#collectionform .installsubmit input,a.installlink",overlay:80});A(document).keypress(function(E){if(E.keyCode==27){A("#installdialog").jqmHide()}})}})(jQuery)}function confirmExpInstall(D){$(D).removeClass("exp-loggedout");$(D).addClass("exp-confirmed");var B=$(D).find(".install-button a");var A=$(B).attr("href");if(A&&A.match(/(policy|\.xml|\.xpi|\.jar)/)){if(A.match(/collection_id/)){A+="&confirmed"}else{A+="?confirmed"}$(B).attr("href",A)}var C=$(B).attr("engineURL");if(C&&C.match(/\.xml/)){if(C.match(/collection_id/)){C+="&confirmed"}else{C+="?confirmed"}$(B).attr("engineURL",C)}$(B).removeAttr("frozen")}function unconfirmExpInstall(D){$(D).removeClass("exp-confirmed");$(D).addClass("exp-loggedout");var B=$(D).find(".install-button a");var A=$(B).attr("href");if(A){A=A.replace(/\?confirmed/,"").replace(/&confirmed/,"");$(B).attr("href",A)}var C=$(B).attr("engineURL");if(C){C=C.replace(/\?confirmed/,"").replace(/&confirmed/,"");$(B).attr("engineURL",C)}$(B).attr("frozen","true")}$(document).ready(function(){$(".exp-confirm-install input").each(function(){var A=$(this).parents(".exp-loggedout, .exp-confirmed");if(this.checked){confirmExpInstall(A)}else{unconfirmExpInstall(A)}});$(".exp-confirm-install input").change(function(A){var B=$(this).parents(".exp-loggedout, .exp-confirmed");if(this.checked){confirmExpInstall(B)}else{unconfirmExpInstall(B)}})});function initExpConfirm(A){var B=$("#install-"+A);$(B).find(".exp-confirm-install").show();$(B).find(".exp-loggedout .install-button").show()}if(jQuery){(function(A){A.fn.rolloverReveal=function(C){var B=arguments.callee.support;A.each(this,function(){new B(this,C)});return this};A.fn.rolloverReveal.support=function(C,B){this.init(C,B)};A.fn.rolloverReveal.support.prototype=function(){var B={reveal_delay:250,dismiss_delay:1000,enable_rollover:true};return{timers:{},init:function(D,C){var E=this;this.options=A.extend({},B,C);this.root=A(D);this.to_reveal=this.root.find(".to-reveal");this.root.find(".activator").click(function(){E.toggle();return false}).mouseover(function(){if(!E.options.enable_rollover){return }E.schedule("reveal");E.cancel("dismiss")}).mouseout(function(){if(!E.options.enable_rollover){return }E.cancel("reveal");E.schedule("dismiss")}).end().find(".to-reveal").mouseover(function(){E.cancel("dismiss")}).mouseout(function(){E.schedule("dismiss")}).end().find(".to-reveal a").click(function(){E.dismiss();return true}).mouseover(function(){E.cancel("dismiss")}).mouseout(function(){E.schedule("dismiss")}).end()},reveal:function(){this.to_reveal.show().addClass("revealed")},revealStatus:function(){return this.to_reveal.hasClass("revealed")},dismiss:function(){this.to_reveal.hide().removeClass("revealed")},dismissStatus:function(){return !this.to_reveal.hasClass("revealed")},toggle:function(){return(this.revealStatus())?this.dismiss():this.reveal()},schedule:function(C){var D=this;if(this[C+"Status"]()){return }this.cancel(C);this.timers[C]=setTimeout(function(){D[C]()},this.options[C+"_delay"])},cancel:function(C){if(this.timers[C]){clearTimeout(this.timers[C])}},EOF:null}}()})(jQuery)}if(jQuery){(function(A){A.nl2br=function(B){return B.replace(/\n/g,"<br/>")};A.br2nl=function(B){return B.replace(RegExp("<brs*/?>","g"),"\n")}})(jQuery)}if(jQuery){(function(A){A.fn.delay=function(C,B){return this.each(function(){A(this).animate({opacity:1},C,B)})}})(jQuery)}if(jQuery){(function(A){A.fn.fadeRemove=function(){return this.each(function(){A(this).fadeOut("normal",function(){A(this).remove()})})}})(jQuery)}function urchinDownloadTrackingEvent(A){urchinTracker(A)}function installButtonAttachUrchin(A){if($(A).attr("isEULAPageLink")){return false}$(A).mousedown(function(B){if($(this).attr("frozen")=="true"){return false}urchinDownloadTrackingEvent($(this).attr("href"))})}function installButtonAttachInstallMethod(A){var B=$(A).attr("jsInstallMethod");$(A).click(function(C){if($(this).attr("frozen")=="true"){return false}if(B=="browser_app_addon_install"){return install(C,$(this).attr("addonName"),$(this).attr("addonIcon"),$(this).attr("addonHash"))}else{if(B=="search_engine_install"){return addEngine($(this).attr("engineURL"))}}})}$(document).ready(function(){$("p.install-button a").each(function(){installButtonAttachUrchin(this);installButtonAttachInstallMethod(this)})});function bandwagonRefreshEvent(){var A=document.createEvent("Events");A.initEvent("bandwagonRefresh",true,false);document.dispatchEvent(A)}var collections_edit={init:function(){$("#coll-edit .jsonly").show();this.tabs_init();this.nickname_init();this.icon_init();this.user_init();this.addon_init();this.addon_comment_init();$("#delete-coll").click(function(){$(this).hide();$("#delete-confirm").show()});$("#delete-coll-noscript").change(function(){if($(this).is(":checked")){$("#delete-warning").fadeIn();$("#submitbutton").val(collections_edit_submit_deletecollection)}else{$("#delete-warning").fadeOut();$("#submitbutton").val(collections_edit_submit)}});$("#saved_success").delay(10000,function(){$(this).fadeRemove()})},tabs_init:function(){$("#coll-edit > ul").tabs().bind("tabsselect",function(C,B,A){window.location.hash="#"+$(A.panel).attr("id")})},nickname_init:function(){this.nickname_old=$("#CollectionNickname").val();$("#nick-avail").click(this.nickname_check);$("#CollectionNickname").blur(this.nickname_check).keypress(function(A){if(A.which==KEYCODE_ENTER){collections_edit.nickname_check();A.preventDefault()}}).keyup(function(A){if(A.which!=KEYCODE_ENTER){collections_edit.nickname_checked=false;collections_edit.nickname_showButton()}})},nickname_check:function(){if(collections_edit.nickname_checked){return true}else{collections_edit.nickname_checked=true}var A=$.trim($("#CollectionNickname").val());$("#CollectionNickname").val(A);if(A==collections_edit.nickname_old){collections_edit.nickname_showLabel("available");return true}if(A.length>0){$("#CollectionNickname").siblings("img").show();$.getJSON(jsonURL+"/nickname",{nickname:A},function(B){$("#CollectionNickname").siblings("img").hide();$("#nick-avail").hide();if(B.nickname){$("#CollectionNickname").val(B.nickname)}if(B.error){var C=$('<span class="error">'+B.error_message+"</span>");C.insertAfter($("#CollectionNickname"));C.delay(3000,function(){$(this).fadeRemove();collections_edit.nickname_checked=false;collections_edit.nickname_showButton()});$("#CollectionNickname").select()}else{collections_edit.nickname_showLabel(B.taken?"taken":"available")}})}else{$("#nick-avail").hide().siblings("span").hide()}return true},nickname_showLabel:function(A){$("#nick-avail").hide().siblings("span").hide().filter("."+A).show()},nickname_showButton:function(){$("#nick-avail").siblings("span").hide();if($("#CollectionNickname").val().length>0){$("#nick-avail").show()}else{$("#nick-avail").hide()}},icon_init:function(){$("#icon_replace").click(this.icon_replace);$("#icon_remove").click(this.icon_delete);$("#icon>a.cancel").click(this.icon_reset);this.icon_reset()},icon_reset:function(){var A=$("#icon");if(A.children("img").length==0){return false}A.children("input:file,.toberemoved,.cancel").hide();A.children(".replaceremove").show();$("#IconDelete").remove();return false},icon_delete:function(){var A=$("#icon");if(A.children("img").length==0){return false}A.children("input:file,.replaceremove").hide();A.children(".cancel,.toberemoved").show();if($("#IconDelete").length==0){A.append('<input type="hidden" id="IconDelete" name="data[Icon][delete]" value="1"/>')}return false},icon_replace:function(){var A=$("#icon");if(A.children("img").length==0){return false}A.children("input:file,.cancel").show();A.children(".replaceremove,.toberemoved").hide();return false},addon_init:function(){$("#addonname").autocomplete(collURL+"/addonLookup",{minChars:2,max:0,formatItem:function(A){return'<img src="'+A[2]+'"/>&nbsp;'+A[0]},formatResult:function(A){return A[0]+" ["+A[1]+"]"},extraParams:{timestamp:null}});$("#addonname").keypress(function(A){if(A.which==KEYCODE_ENTER){$("#addon-add").click();return false}return true});$("#addon-add").click(function(){var A=/\[(\d+)\]/.exec($("#addonname").val());if(undefined==A||A.length!=2){return false}collections_edit.addon_add(A[1]);return true})},addon_show:function(E,B,L,G,C,J,F,I){var A=$('<div class="coll-addon" id="addon-'+E+'"/>');var K=$("#addon-new");var H=K.children("input:hidden").clone();H.val(E);A.append(H);var D=K.children("p").clone();D.find("img").attr("src",L);D.find(".name").text(B);D.find(".added").html(sprintf(D.find(".added").text(),G,C));A.append(D);if(F){A.append(K.children(".removeaddon").clone(true))}if(!I){$("#currentaddons").append(A)}else{$("#currentaddons #addon-new").after(A)}collections_edit.addon_comment_show(E,J,F);$("#currentaddons").show()},addon_add:function(A){$.post(jsonURL+"/addon/add",{sessionCheck:$("#collections>div.hsession>input[name=sessionCheck]").val(),collection_id:collection_id,addon_id:A},function(B){if(B.error){var C=$('<span class="error">'+B.error_message+"</span>");$("#addon-add").after(C);C.delay(2000,function(){$(this).fadeRemove()});$("#addonname").select()}else{collections_edit.addon_show(B.id,B.name,B.iconURL,B.date,B.publisher,"",1,1);$("#addonname").val("")}return true},"json")},addon_delete:function(){var A=$(this).parent().attr("id");var B=A.substr(A.lastIndexOf("-")+1);$.post(jsonURL+"/addon/del",{sessionCheck:$("#collections>div.hsession>input[name=sessionCheck]").val(),collection_id:collection_id,addon_id:B},function(C){if(C.error){alert(C.error_message)}else{$("#addon-"+C.id).fadeRemove();if($("#currentaddons").children("div:visible").length==0){$("#currentaddons").hide()}}return true},"json");return false},addon_comment_init:function(){var A=$("#addon-new");A.children("a.removeaddon").click(this.addon_delete);A.children("a.addlink").click(this.addon_comment_add);A.find("a.editlink").click(this.addon_comment_edit);A.find("a.deletelink").click(function(){var D=$(this).parent().parent();var C=D.attr("id");var B=C.substr(C.lastIndexOf("-")+1);collections_edit.addon_comment_save(B,"");return false});A.find(".editbox>input:button").click(function(){var E=$(this).siblings("textarea").val();var D=$(this).parent().parent();var C=D.attr("id");var B=C.substr(C.lastIndexOf("-")+1);collections_edit.addon_comment_save(B,E);return false})},addon_comment_show:function(C,E,B){var D=$("#addon-"+C);var A=$("#addon-new");if(E.length>0){D.append(A.children("blockquote").clone().html($.nl2br(E)));if(B){D.append(A.children(".editdelete").clone(true))}}else{if(B){D.append(A.children(".addlink").clone(true))}}},addon_comment_add:function(){var A=$("#addon-new>.editbox").clone(true);$(this).parent().append(A);$(this).remove();A.children("textarea").focus();return false},addon_comment_edit:function(){var B=$(this).parent().siblings("blockquote");var A=$("#addon-new>.editbox").clone(true);A.children("textarea").html($.br2nl(B.html()));$(this).parent().parent().append(A);$(this).parent().remove();B.remove();A.children("textarea").select();return false},addon_comment_save:function(A,B){$.post(jsonURL+"/addon/savecomment",{sessionCheck:$("#collections>div.hsession>input[name=sessionCheck]").val(),collection_id:collection_id,addon_id:A,comment:B},function(E){var C=/addon_id=(\d+)/.exec(this.data)[1];var D=$("#addon-"+C);if(E.error){var F=$('<div class="error">'+E.error_message+"</div>");D.append(F);F.delay(2000,function(){$(this).fadeRemove()})}else{D.children("blockquote,.addlink,.editdelete,.editbox").remove();collections_edit.addon_comment_show(C,E.comment,true)}return true},"json")},user_init:function(){$("#publishers>input:text,#managers>input:text").keypress(function(A){if(A.which==KEYCODE_ENTER){$(this).siblings("input:button").click();return false}return true});$("#publishers>input:button,#managers>input:button").click(collections_edit.user_check)},user_check:function(){var B=$(this).parent().attr("id");var A=$("#"+B+">:text").val();if(A.length==0){return }$(this).siblings("img").show();$.post(jsonURL+"/user/add",{sessionCheck:$("#collections>div.hsession>input[name=sessionCheck]").val(),collection_id:collection_id,role:B,email:A},function(C){var E=/role=(\w+)/.exec(this.data)[1];$("#"+E+">img").hide();if(C.error){var D=$('<li class="error">'+C.error_message+"</li>");$("#"+E+">ul").append(D);D.delay(2000,function(){$(this).fadeRemove()});$("#"+E+">input:text").select()}else{collections_edit.user_add(E,C.id,C.email);$("#"+E+">input:text").val("").focus()}return true},"json")},user_add:function(C,B,A){$("#"+C).siblings("input:radio[value=0]").attr("checked","checked");$("#"+C+">ul").append('<li><input type="hidden" name="'+C+'[]" value="'+B+'"/>'+A+' <a href="#" onclick="collections_edit.user_remove(this);return false;">Remove</a></li>')},user_remove:function(A){var B=$(A).siblings("input:hidden").val();$.post(jsonURL+"/user/del",{sessionCheck:$("#collections>div.hsession>input[name=sessionCheck]").val(),role:$(A).parent().parent().parent().attr("id"),collection_id:collection_id,user_id:B},function(C){var E=/role=(\w+)/.exec(this.data)[1];if(C.error){var D=$('<li class="error">'+C.error_message+"</li>");$("#"+E+">ul").append(D);D.delay(2000,function(){$(this).fadeRemove()});$("#"+E+">input:text").select()}else{$("#"+E+" input:hidden[value="+C.id+"]").parent().fadeRemove()}return true},"json")}};var addons_display={init:function(A){this.options=A;$(".stars").rating({readOnly:(!A.loggedIn)});$(".rollover-reveal").rolloverReveal({enable_rollover:false});$("#coll_publish input:submit").click(this.coll_publish)},coll_publish:function(){var B=$("#coll_publish option:selected").val();if(!B){return false}else{if(B=="new"){return true}}var A=$("#coll_publish input[name='data[addon_id]']").val();$.post(addons_display.options.jsonURL+"/addon/add",{sessionCheck:$("#coll_publish div.hsession>input[name=sessionCheck]").val(),collection_uuid:B,addon_id:A},function(D){if(D.error){var E=$('<div class="error">'+D.error_message+"</div>");$("#coll_publish>input:submit").after(E);E.delay(3000,function(){$(this).fadeRemove()})}else{var C=$("#coll_publish option:selected");var E=$("<div>"+sprintf(addons_display_collection_publish_success,D.name,'<a href="'+addons_display.options.collViewURL+C.val()+'">'+C.text()+"</a>")+"</div>");$("#coll_publish input:submit").after(E);E.delay(10000,function(){$(this).fadeRemove()});C.remove()}},"json");return false}};