/*
 *                                   VKitty - Copyright 2009
 *                                     All rights reserved
 *
 * Don't decompile this code. If you're really THAT interested in it, join the development team.
 *      Just send an email to jobs <at> VKitty <dot> net with your qualifications.
 */
(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(e,b){e=e||document;if(e.nodeType){this[0]=e;this.length=1;this.context=e;return this}if(typeof e==="string"){var c=M.exec(e);if(c&&(c[1]||!b)){if(c[1]){e=T.clean([c[1]],b)}else{var a=document.getElementById(c[3]);if(a&&a.id!=c[3]){return T().find(e)}var d=T(a||[]);d.context=document;d.selector=e;return d}}else{return T(b).find(e)}}else{if(T.isFunction(e)){return T(document).ready(e)}}if(e.selector&&e.context){this.selector=e.selector;this.context=e.context}return this.setArray(T.isArray(e)?e:T.makeArray(e))},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(e){for(c in d){T.attr(b?this.style:this,c,T.prop(this,d[c],b,e,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 f=this.outerHTML;if(!f){var e=this.ownerDocument.createElement("div");e.appendChild(this.cloneNode(true));f=e.innerHTML}return T.clean([f.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 g=T.data(a[c],"events");for(var e in g){for(var f in g[e]){T.event.add(this,e,g[e][f],g[e][f].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 j=this[0];if(j){if(T.nodeName(j,"option")){return(j.attributes.value||{}).specified?j.value:j.text}if(T.nodeName(j,"select")){var e=j.selectedIndex,b=[],a=j.options,f=j.type=="select-one";if(e<0){return null}for(var h=f?e:0,d=f?e+1:a.length;h<d;h++){var g=a[h];if(g.selected){c=T(g).val();if(f){return c}b.push(c)}}return b}return(j.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 k=T.makeArray(c);T("option",this).each(function(){this.selected=(T.inArray(this.value,k)>=0||T.inArray(this.text,k)>=0)});if(!k.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 e=(this[0].ownerDocument||this[0]).createDocumentFragment(),h=T.clean(d,(this[0].ownerDocument||this[0]),e),f=e.firstChild;if(f){for(var g=0,j=this.length;g<j;g++){b.call(c(this[g],f),this.length>1||g>0?e.cloneNode(true):e)}}if(h){T.each(h,E)}}return this;function c(m,k){return a&&T.nodeName(m,"table")&&T.nodeName(k,"tr")?(m.getElementsByTagName("tbody")[0]||m.appendChild(m.ownerDocument.createElement("tbody"))):m}}};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]||{},e=1,d=arguments.length,h=false,f;if(typeof c==="boolean"){h=c;c=arguments[1]||{};e=2}if(typeof c!=="object"&&!T.isFunction(c)){c={}}if(d==e){c=this;--e}for(;e<d;e++){if((f=arguments[e])!=null){for(var g in f){var b=c[g],a=f[g];if(c===a){continue}if(h&&a&&typeof a==="object"&&!a.nodeType){c[g]=T.extend(h,b||(a.length!=null?[]:{}),a)}else{if(a!==ab){c[g]=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(e,a,f){var g,d=0,c=e.length;if(f){if(c===ab){for(g in e){if(a.apply(e[g],f)===false){break}}}else{for(;d<c;){if(a.apply(e[d++],f)===false){break}}}}else{if(c===ab){for(g in e){if(a.call(e[g],g,e[g])===false){break}}}else{for(var b=e[0];d<c&&a.call(b,d,b)!==false;b=e[++d]){}}}return e},prop:function(b,a,c,d,e){if(T.isFunction(a)){a=a.call(b,d)}return typeof a==="number"&&c=="curCSS"&&!ag.test(e)?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 e={};for(var d in c){e[d]=b.style[d];b.style[d]=c[d]}a.call(b);for(var d in c){b.style[d]=e[d]}},css:function(e,g,c,h){if(g=="width"||g=="height"){var a,f={position:"absolute",visibility:"hidden",display:"block"},b=g=="width"?["Left","Right"]:["Top","Bottom"];function d(){a=g=="width"?e.offsetWidth:e.offsetHeight;if(h==="border"){return}T.each(b,function(){if(!h){a-=parseFloat(T.curCSS(e,"padding"+this,true))||0}if(h==="margin"){a+=parseFloat(T.curCSS(e,"margin"+this,true))||0}else{a-=parseFloat(T.curCSS(e,"border"+this+"Width",true))||0}})}if(e.offsetWidth!==0){d()}else{T.swap(e,f,d)}return Math.max(0,Math.round(a))}return T.curCSS(e,g,c)},curCSS:function(e,h,g){var b,j=e.style;if(h=="opacity"&&!T.support.opacity){b=T.attr(j,"opacity");return b==""?"1":b}if(h.match(/float/i)){h=H}if(!g&&j&&j[h]){b=j[h]}else{if(Q.getComputedStyle){if(h.match(/float/i)){h="float"}h=h.replace(/([A-Z])/g,"-$1").toLowerCase();var a=Q.getComputedStyle(e,null);if(a){b=a.getPropertyValue(h)}if(h=="opacity"&&b==""){b="1"}}else{if(e.currentStyle){var d=h.replace(/\-(\w)/g,function(m,k){return k.toUpperCase()});b=e.currentStyle[h]||e.currentStyle[d];if(!/^\d+(px)?$/i.test(b)&&/^\d/.test(b)){var f=j.left,c=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left;j.left=b||0;b=j.pixelLeft+"px";j.left=f;e.runtimeStyle.left=c}}}}return b},clean:function(g,b,d){b=b||document;if(typeof b.createElement==="undefined"){b=b.ownerDocument||b[0]&&b[0].ownerDocument||document}if(!d&&g.length===1&&typeof g[0]==="string"){var e=/^<(\w+)\s*\/?>$/.exec(g[0]);if(e){return[b.createElement(e[1])]}}var f=[],h=[],a=b.createElement("div");T.each(g,function(n,j){if(typeof j==="number"){j+=""}if(!j){return}if(typeof j==="string"){j=j.replace(/(<(\w+)[^>]*?)\/>/g,function(t,s,u){return u.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?t:s+"></"+u+">"});var o=j.replace(/^\s+/,"").substring(0,10).toLowerCase();var m=!o.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!o.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||o.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!o.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!o.indexOf("<td")||!o.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!o.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!T.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];a.innerHTML=m[1]+j+m[2];while(m[0]--){a=a.lastChild}if(!T.support.tbody){var k=/<tbody/i.test(j),p=!o.indexOf("<table")&&!k?a.firstChild&&a.firstChild.childNodes:m[1]=="<table>"&&!k?a.childNodes:[];for(var q=p.length-1;q>=0;--q){if(T.nodeName(p[q],"tbody")&&!p[q].childNodes.length){p[q].parentNode.removeChild(p[q])}}}if(!T.support.leadingWhitespace&&/^\s/.test(j)){a.insertBefore(b.createTextNode(j.match(/^\s*/)[0]),a.firstChild)}j=T.makeArray(a.childNodes)}if(j.nodeType){f.push(j)}else{f=T.merge(f,j)}});if(d){for(var c=0;f[c];c++){if(T.nodeName(f[c],"script")&&(!f[c].type||f[c].type.toLowerCase()==="text/javascript")){h.push(f[c].parentNode?f[c].parentNode.removeChild(f[c]):f[c])}else{if(f[c].nodeType===1){f.splice.apply(f,[c+1,0].concat(T.makeArray(f[c].getElementsByTagName("script"))))}d.appendChild(f[c])}}return h}return f},attr:function(c,f,b){if(!c||c.nodeType==3||c.nodeType==8){return ab}var e=!T.isXMLDoc(c),a=b!==ab;f=e&&T.props[f]||f;if(c.tagName){var g=/href|src|style/.test(f);if(f=="selected"&&c.parentNode){c.parentNode.selectedIndex}if(f in c&&e&&!g){if(a){if(f=="type"&&T.nodeName(c,"input")&&c.parentNode){throw"type property can't be changed"}c[f]=b}if(T.nodeName(c,"form")&&c.getAttributeNode(f)){return c.getAttributeNode(f).nodeValue}if(f=="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[f]}if(!T.support.style&&e&&f=="style"){return T.attr(c.style,"cssText",b)}if(a){c.setAttribute(f,""+b)}var h=!T.support.hrefNormalized&&e&&g?c.getAttribute(f,2):c.getAttribute(f);return h===null?ab:h}if(!T.support.opacity&&f=="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)+"":""}f=f.replace(/-([a-z])/ig,function(k,j){return j.toUpperCase()});if(a){c[f]=b}return c[f]},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,e){var d=0,c,a=b.length;if(!T.support.getAll){while((c=e[d++])!=null){if(c.nodeType!=8){b[a++]=c}}}else{while((c=e[d++])!=null){b[a++]=c}}return b},unique:function(a){var f=[],g={};try{for(var e=0,d=a.length;e<d;e++){var b=T.data(a[e]);if(!g[b]){g[b]=true;f.push(a[e])}}}catch(c){f=a}return f},grep:function(e,a,f){var d=[];for(var c=0,b=e.length;c<b;c++){if(!f!=!a(e[c],c)){d.push(e[c])}}return d},map:function(f,a){var e=[];for(var d=0,c=f.length;d<c;d++){var b=a(f[d],d);if(b!=null){e[e.length]=b}}return e.concat.apply([],e)}});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(h){var e=[],c=T(h);for(var d=0,g=c.length;d<g;d++){var f=(d>0?this.clone(true):this).get();T.fn[a].apply(T(c[d]),f);e=e.concat(f)}return this.pushStack(e,b,h)}});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,h=0,n=Object.prototype.toString;var p=function(u,y,am,al){am=am||[];y=y||document;if(y.nodeType!==1&&y.nodeType!==9){return[]}if(!u||typeof u!=="string"){return am}var t=[],w,ai,A,z,ak,x,v=true;b.lastIndex=0;while((w=b.exec(u))!==null){t.push(w[1]);if(w[2]){x=RegExp.rightContext;break}}if(t.length>1&&g.exec(u)){if(t.length===2&&m.relative[t[0]]){ai=k(t[0]+t[1],y)}else{ai=m.relative[t[0]]?[y]:p(t.shift(),y);while(t.length){u=t.shift();if(m.relative[u]){u+=t.shift()}ai=k(u,ai)}}}else{var aj=al?{expr:t.pop(),set:q(al)}:p.find(t.pop(),t.length===1&&y.parentNode?y.parentNode:y,c(y));ai=p.filter(aj.expr,aj.set);if(t.length>0){A=q(ai)}else{v=false}while(t.length){var B=t.pop(),D=B;if(!m.relative[B]){B=""}else{D=t.pop()}if(D==null){D=y}m.relative[B](A,D,c(y))}}if(!A){A=ai}if(!A){throw"Syntax error, unrecognized expression: "+(B||u)}if(n.call(A)==="[object Array]"){if(!v){am.push.apply(am,A)}else{if(y.nodeType===1){for(var s=0;A[s]!=null;s++){if(A[s]&&(A[s]===true||A[s].nodeType===1&&j(y,A[s]))){am.push(ai[s])}}}else{for(var s=0;A[s]!=null;s++){if(A[s]&&A[s].nodeType===1){am.push(ai[s])}}}}}else{q(A,am)}if(x){p(x,y,am,al);if(o){hasDuplicate=false;am.sort(o);if(hasDuplicate){for(var s=1;s<am.length;s++){if(am[s]===am[s-1]){am.splice(s--,1)}}}}}return am};p.matches=function(t,s){return p(t,null,null,s)};p.find=function(s,z,A){var t,v;if(!s){return[]}for(var w=0,x=m.order.length;w<x;w++){var u=m.order[w],v;if((v=m.match[u].exec(s))){var y=RegExp.leftContext;if(y.substr(y.length-1)!=="\\"){v[1]=(v[1]||"").replace(/\\/g,"");t=m.find[u](v,z,A);if(t!=null){s=s.replace(m.match[u],"");break}}}}if(!t){t=z.getElementsByTagName("*")}return{set:t,expr:s}};p.filter=function(ak,al,D,w){var x=ak,A=[],s=al,u,z,t=al&&al[0]&&c(al[0]);while(ak&&al.length){for(var am in m.filter){if((u=m.match[am].exec(ak))!=null){var y=m.filter[am],B,ai;z=false;if(s==A){A=[]}if(m.preFilter[am]){u=m.preFilter[am](u,s,D,A,w,t);if(!u){z=B=true}else{if(u===true){continue}}}if(u){for(var v=0;(ai=s[v])!=null;v++){if(ai){B=y(ai,u,v,s);var aj=w^!!B;if(D&&B!=null){if(aj){z=true}else{s[v]=false}}else{if(aj){A.push(ai);z=true}}}}}if(B!==ab){if(!D){s=A}ak=ak.replace(m.match[am],"");if(!z){return[]}break}}}if(ak==x){if(z==null){throw"Syntax error, unrecognized expression: "+ak}else{break}}x=ak}return s};var m=p.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(s){return s.getAttribute("href")}},relative:{"+":function(s,z,t){var v=typeof z==="string",A=v&&!/\W/.test(z),u=v&&!A;if(A&&!t){z=z.toUpperCase()}for(var w=0,x=s.length,y;w<x;w++){if((y=s[w])){while((y=y.previousSibling)&&y.nodeType!==1){}s[w]=u||y&&y.nodeName===z?y||false:y===z}}if(u){p.filter(z,s,true)}},">":function(x,u,w){var z=typeof u==="string";if(z&&!/\W/.test(u)){u=w?u:u.toUpperCase();for(var t=0,v=x.length;t<v;t++){var y=x[t];if(y){var s=y.parentNode;x[t]=s.nodeName===u?s:false}}}else{for(var t=0,v=x.length;t<v;t++){var y=x[t];if(y){x[t]=z?y.parentNode:y.parentNode===u}}if(z){p.filter(u,x,true)}}},"":function(s,u,w){var t=h++,v=a;if(!u.match(/\W/)){var x=u=w?u:u.toUpperCase();v=d}v("parentNode",u,t,s,x,w)},"~":function(s,u,w){var t=h++,v=a;if(typeof u==="string"&&!u.match(/\W/)){var x=u=w?u:u.toUpperCase();v=d}v("previousSibling",u,t,s,x,w)}},find:{ID:function(u,t,s){if(typeof t.getElementById!=="undefined"&&!s){var v=t.getElementById(u[1]);return v?[v]:[]}},NAME:function(t,x,w){if(typeof x.getElementsByName!=="undefined"){var u=[],y=x.getElementsByName(t[1]);for(var s=0,v=y.length;s<v;s++){if(y[s].getAttribute("name")===t[1]){u.push(y[s])}}return u.length===0?null:u}},TAG:function(t,s){return s.getElementsByTagName(t[1])}},preFilter:{CLASS:function(s,u,t,v,x,w){s=" "+s[1].replace(/\\/g,"")+" ";if(w){return s}for(var z=0,y;(y=u[z])!=null;z++){if(y){if(x^(y.className&&(" "+y.className+" ").indexOf(s)>=0)){if(!t){v.push(y)}}else{if(t){u[z]=false}}}}return false},ID:function(s){return s[1].replace(/\\/g,"")},TAG:function(t,u){for(var s=0;u[s]===false;s++){}return u[s]&&c(u[s])?t[1]:t[1].toUpperCase()},CHILD:function(t){if(t[1]=="nth"){var s=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(t[2]=="even"&&"2n"||t[2]=="odd"&&"2n+1"||!/\D/.test(t[2])&&"0n+"+t[2]||t[2]);t[2]=(s[1]+(s[2]||1))-0;t[3]=s[3]-0}t[0]=h++;return t},ATTR:function(y,u,t,v,x,w){var s=y[1].replace(/\\/g,"");if(!w&&m.attrMap[s]){y[1]=m.attrMap[s]}if(y[2]==="~="){y[4]=" "+y[4]+" "}return y},PSEUDO:function(x,u,t,v,w){if(x[1]==="not"){if(x[3].match(b).length>1||/^\w/.test(x[3])){x[3]=p(x[3],null,null,u)}else{var s=p.filter(x[3],u,t,true^w);if(!t){v.push.apply(v,s)}return false}}else{if(m.match.POS.test(x[0])||m.match.CHILD.test(x[0])){return true}}return x},POS:function(s){s.unshift(true);return s}},filters:{enabled:function(s){return s.disabled===false&&s.type!=="hidden"},disabled:function(s){return s.disabled===true},checked:function(s){return s.checked===true},selected:function(s){s.parentNode.selectedIndex;return s.selected===true},parent:function(s){return !!s.firstChild},empty:function(s){return !s.firstChild},has:function(s,t,u){return !!p(u[3],s).length},header:function(s){return/h\d/i.test(s.nodeName)},text:function(s){return"text"===s.type},radio:function(s){return"radio"===s.type},checkbox:function(s){return"checkbox"===s.type},file:function(s){return"file"===s.type},password:function(s){return"password"===s.type},submit:function(s){return"submit"===s.type},image:function(s){return"image"===s.type},reset:function(s){return"reset"===s.type},button:function(s){return"button"===s.type||s.nodeName.toUpperCase()==="BUTTON"},input:function(s){return/input|select|textarea|button/i.test(s.nodeName)}},setFilters:{first:function(s,t){return t===0},last:function(t,u,v,s){return u===s.length-1},even:function(s,t){return t%2===0},odd:function(s,t){return t%2===1},lt:function(s,t,u){return t<u[3]-0},gt:function(s,t,u){return t>u[3]-0},nth:function(s,t,u){return u[3]-0==t},eq:function(s,t,u){return u[3]-0==t}},filter:{PSEUDO:function(x,t,s,w){var u=t[1],z=m.filters[u];if(z){return z(x,s,t,w)}else{if(u==="contains"){return(x.textContent||x.innerText||"").indexOf(t[3])>=0}else{if(u==="not"){var y=t[3];for(var s=0,v=y.length;s<v;s++){if(y[s]===x){return false}}return true}}}},CHILD:function(z,w){var t=w[1],y=z;switch(t){case"only":case"first":while(y=y.previousSibling){if(y.nodeType===1){return false}}if(t=="first"){return true}y=z;case"last":while(y=y.nextSibling){if(y.nodeType===1){return false}}return true;case"nth":var x=w[2],A=w[3];if(x==1&&A==0){return true}var u=w[0],B=z.parentNode;if(B&&(B.sizcache!==u||!z.nodeIndex)){var v=0;for(y=B.firstChild;y;y=y.nextSibling){if(y.nodeType===1){y.nodeIndex=++v}}B.sizcache=u}var s=z.nodeIndex-A;if(x==0){return s==0}else{return(s%x==0&&s/x>=0)}}},ID:function(s,t){return s.nodeType===1&&s.getAttribute("id")===t},TAG:function(s,t){return(t==="*"&&s.nodeType===1)||s.nodeName===t},CLASS:function(s,t){return(" "+(s.className||s.getAttribute("class"))+" ").indexOf(t)>-1},ATTR:function(x,s){var t=s[1],v=m.attrHandle[t]?m.attrHandle[t](x):x[t]!=null?x[t]:x.getAttribute(t),w=v+"",y=s[2],u=s[4];return v==null?y==="!=":y==="="?w===u:y==="*="?w.indexOf(u)>=0:y==="~="?(" "+w+" ").indexOf(u)>=0:!u?w&&v!==false:y==="!="?w!=u:y==="^="?w.indexOf(u)===0:y==="$="?w.substr(w.length-u.length)===u:y==="|="?w===u||w.substr(0,u.length+1)===u+"-":false},POS:function(x,u,t,w){var v=u[2],s=m.setFilters[v];if(s){return s(x,t,u,w)}}}};var g=m.match.POS;for(var e in m.match){m.match[e]=RegExp(m.match[e].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var q=function(s,t){s=Array.prototype.slice.call(s);if(t){t.push.apply(t,s);return t}return s};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(f){q=function(w,s){var u=s||[];if(n.call(w)==="[object Array]"){Array.prototype.push.apply(u,w)}else{if(typeof w.length==="number"){for(var t=0,v=w.length;t<v;t++){u.push(w[t])}}else{for(var t=0;w[t];t++){u.push(w[t])}}}return u}}var o;if(document.documentElement.compareDocumentPosition){o=function(t,u){var s=t.compareDocumentPosition(u)&4?-1:t===u?0:1;if(s===0){hasDuplicate=true}return s}}else{if("sourceIndex" in document.documentElement){o=function(t,u){var s=t.sourceIndex-u.sourceIndex;if(s===0){hasDuplicate=true}return s}}else{if(document.createRange){o=function(s,u){var t=s.ownerDocument.createRange(),v=u.ownerDocument.createRange();t.selectNode(s);t.collapse(true);v.selectNode(u);v.collapse(true);var w=t.compareBoundaryPoints(Range.START_TO_END,v);if(w===0){hasDuplicate=true}return w}}}}(function(){var t=document.createElement("form"),s="script"+(new Date).getTime();t.innerHTML="<input name='"+s+"'/>";var u=document.documentElement;u.insertBefore(t,u.firstChild);if(!!document.getElementById(s)){m.find.ID=function(y,x,w){if(typeof x.getElementById!=="undefined"&&!w){var v=x.getElementById(y[1]);return v?v.id===y[1]||typeof v.getAttributeNode!=="undefined"&&v.getAttributeNode("id").nodeValue===y[1]?[v]:ab:[]}};m.filter.ID=function(w,v){var x=typeof w.getAttributeNode!=="undefined"&&w.getAttributeNode("id");return w.nodeType===1&&x&&x.nodeValue===v}}u.removeChild(t)})();(function(){var s=document.createElement("div");s.appendChild(document.createComment(""));if(s.getElementsByTagName("*").length>0){m.find.TAG=function(v,w){var x=w.getElementsByTagName(v[1]);if(v[1]==="*"){var t=[];for(var u=0;x[u];u++){if(x[u].nodeType===1){t.push(x[u])}}x=t}return x}}s.innerHTML="<a href='#'></a>";if(s.firstChild&&typeof s.firstChild.getAttribute!=="undefined"&&s.firstChild.getAttribute("href")!=="#"){m.attrHandle.href=function(t){return t.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var t=p,s=document.createElement("div");s.innerHTML="<p class='TEST'></p>";if(s.querySelectorAll&&s.querySelectorAll(".TEST").length===0){return}p=function(x,y,v,u){y=y||document;if(!u&&y.nodeType===9&&!c(y)){try{return q(y.querySelectorAll(x),v)}catch(w){}}return t(x,y,v,u)};p.find=t.find;p.filter=t.filter;p.selectors=t.selectors;p.matches=t.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var s=document.createElement("div");s.innerHTML="<div class='test e'></div><div class='test'></div>";if(s.getElementsByClassName("e").length===0){return}s.lastChild.className="e";if(s.getElementsByClassName("e").length===1){return}m.order.splice(1,0,"CLASS");m.find.CLASS=function(v,u,t){if(typeof u.getElementsByClassName!=="undefined"&&!t){return u.getElementsByClassName(v[1])}}})()}function d(y,t,u,A,s,B){var D=y=="previousSibling"&&!B;for(var w=0,x=A.length;w<x;w++){var z=A[w];if(z){if(D&&z.nodeType===1){z.sizcache=u;z.sizset=w}z=z[y];var v=false;while(z){if(z.sizcache===u){v=A[z.sizset];break}if(z.nodeType===1&&!B){z.sizcache=u;z.sizset=w}if(z.nodeName===t){v=z;break}z=z[y]}A[w]=v}}}function a(y,t,u,A,s,B){var D=y=="previousSibling"&&!B;for(var w=0,x=A.length;w<x;w++){var z=A[w];if(z){if(D&&z.nodeType===1){z.sizcache=u;z.sizset=w}z=z[y];var v=false;while(z){if(z.sizcache===u){v=A[z.sizset];break}if(z.nodeType===1){if(!B){z.sizcache=u;z.sizset=w}if(typeof t!=="string"){if(z===t){v=true;break}}else{if(p.filter(t,[z]).length>0){v=z;break}}}z=z[y]}A[w]=v}}}var j=document.compareDocumentPosition?function(s,t){return s.compareDocumentPosition(t)&16}:function(s,t){return s!==t&&(s.contains?s.contains(t):true)};var c=function(s){return s.nodeType===9&&s.documentElement.nodeName!=="HTML"||!!s.ownerDocument&&c(s.ownerDocument)};var k=function(v,x){var s=[],z="",y,t=x.nodeType?[x]:x;while((y=m.match.PSEUDO.exec(v))){z+=y[0];v=v.replace(m.match.PSEUDO,"")}v=m.relative[v]?v+"*":v;for(var w=0,u=t.length;w<u;w++){p(v,t[w],s)}return p.filter(z,s)};T.find=p;T.filter=p.filter;T.expr=p.selectors;T.expr[":"]=T.expr.filters;p.selectors.filters.hidden=function(s){return s.offsetWidth===0||s.offsetHeight===0};p.selectors.filters.visible=function(s){return s.offsetWidth>0||s.offsetHeight>0};p.selectors.filters.animated=function(s){return T.grep(T.timers,function(t){return s===t.elem}).length};T.multiFilter=function(s,u,t){if(t){s=":not("+s+")"}return p.matches(s,u)};T.dir=function(t,u){var v=[],s=t[u];while(s&&s!=document){if(s.nodeType==1){v.push(s)}s=s[u]}return v};T.nth=function(w,v,t,s){v=v||1;var u=0;for(;w;w=w[t]){if(w.nodeType==1&&++u==v){break}}return w};T.sibling=function(s,t){var u=[];for(;s;s=s.nextSibling){if(s.nodeType==1&&s!=t){u.push(s)}}return u};return;W.Sizzle=p})();T.event={add:function(c,f,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 e=d;d=this.proxy(e);d.data=a}var g=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(f.split(/\s+/),function(m,k){var j=k.split(".");k=j.shift();d.type=j.slice().sort().join(".");var h=g[k];if(T.event.specialAll[k]){T.event.specialAll[k].setup.call(c,a,j)}if(!h){h=g[k]={};if(!T.event.special[k]||T.event.special[k].setup.call(c,a,j)===false){if(c.addEventListener){c.addEventListener(k,b,false)}else{if(c.attachEvent){c.attachEvent("on"+k,b)}}}}h[d.guid]=d;T.event.global[k]=true});c=null},guid:1,global:{},remove:function(b,e,c){if(b.nodeType==3||b.nodeType==8){return}var f=T.data(b,"events"),g,h;if(f){if(e===ab||(typeof e==="string"&&e.charAt(0)==".")){for(var d in f){this.remove(b,d+(e||""))}}else{if(e.type){c=e.handler;e=e.type}T.each(e.split(/\s+/),function(o,m){var j=m.split(".");m=j.shift();var n=RegExp("(^|\\.)"+j.slice().sort().join(".*\\.")+"(\\.|$)");if(f[m]){if(c){delete f[m][c.guid]}else{for(var k in f[m]){if(n.test(f[m][k].type)){delete f[m][k]}}}if(T.event.specialAll[m]){T.event.specialAll[m].teardown.call(b,j)}for(g in f[m]){break}if(!g){if(!T.event.special[m]||T.event.special[m].teardown.call(b,j)===false){if(b.removeEventListener){b.removeEventListener(m,T.data(b,"handle"),false)}else{if(b.detachEvent){b.detachEvent("on"+m,T.data(b,"handle"))}}}g=null;delete f[m]}}})}for(g in f){break}if(!g){var a=T.data(b,"handle");if(a){a.elem=null}T.removeData(b,"events");T.removeData(b,"handle")}}},trigger:function(d,b,e,h){var f=d.type||d;if(!h){d=typeof d==="object"?d[aa]?d:T.extend(T.Event(f),d):T.Event(f);if(f.indexOf("!")>=0){d.type=f=f.slice(0,-1);d.exclusive=true}if(!e){d.stopPropagation();if(this.global[f]){T.each(T.cache,function(){if(this.events&&this.events[f]){T.event.trigger(d,b,this.handle.elem)}})}}if(!e||e.nodeType==3||e.nodeType==8){return ab}d.result=ab;d.target=e;b=T.makeArray(b);b.unshift(d)}d.currentTarget=e;var c=T.data(e,"handle");if(c){c.apply(e,b)}if((!e[f]||(T.nodeName(e,"a")&&f=="click"))&&e["on"+f]&&e["on"+f].apply(e,b)===false){d.result=false}if(!h&&e[f]&&!d.isDefaultPrevented()&&!(T.nodeName(e,"a")&&f=="click")){this.triggered=true;try{e[f]()}catch(a){}}this.triggered=false;if(!d.isPropagationStopped()){var g=e.parentNode||e.ownerDocument;if(g){T.event.trigger(d,b,g,true)}}},handle:function(b){var c,h;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(".*\\.")+"(\\.|$)");h=(T.data(this,"events")||{})[b.type];for(var f in h){var e=h[f];if(c||d.test(e.type)){b.handler=e;b.data=e.data;var g=e.apply(this,arguments);if(g!==ab){b.result=g;if(g===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 e=c;c=T.Event(e);for(var d=this.props.length,a;d;){a=this.props[--d];c[a]=e[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,f=document.body;c.pageX=c.clientX+(b&&b.scrollLeft||f&&f.scrollLeft||0)-(b.clientLeft||0);c.pageY=c.clientY+(b&&b.scrollTop||f&&f.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(e){T(this).unbind(e,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(g,f){if(d.test(f.type)){var e=T(a.target).closest(f.data)[0];if(e){c.push({elem:e,fn:f})}}});c.sort(function(e,f){return T.data(e.elem,"closest")-T.data(f.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 f=document.documentElement,e=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("*"),g=a.getElementsByTagName("a")[0];if(!d||!d.length||!g){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(g.getAttribute("style")),hrefNormalized:g.getAttribute("href")==="/a",opacity:g.style.opacity==="0.5",cssFloat:!!g.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};e.type="text/javascript";try{e.appendChild(document.createTextNode("window."+b+"=1;"))}catch(c){}f.insertBefore(e,f.firstChild);if(W[b]){T.support.scriptEval=true;delete W[b]}f.removeChild(e);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 h=document.createElement("div");h.style.width=h.style.paddingLeft="1px";document.body.appendChild(h);T.boxModel=T.support.boxModel=h.offsetWidth===2;document.body.removeChild(h).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(e,b,a){if(typeof e!=="string"){return this._load(e)}var c=e.indexOf(" ");if(c>=0){var g=e.slice(c,e.length);e=e.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 f=this;T.ajax({url:e,type:d,dataType:"html",data:b,complete:function(j,h){if(h=="success"||h=="notmodified"){f.html(g?T("<div/>").append(j.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(g):j.responseText)}if(a){f.each(a,[j.responseText,h,j])}}});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,e){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(m){m=T.extend(true,m,T.extend(true,{},T.ajaxSettings,m));var a,u=/=\?(&|$)/g,f,b,t=m.type.toUpperCase();if(m.data&&m.processData&&typeof m.data!=="string"){m.data=T.param(m.data)}if(m.dataType=="jsonp"){if(t=="GET"){if(!m.url.match(u)){m.url+=(m.url.match(/\?/)?"&":"?")+(m.jsonp||"callback")+"=?"}}else{if(!m.data||!m.data.match(u)){m.data=(m.data?m.data+"&":"")+(m.jsonp||"callback")+"=?"}}m.dataType="json"}if(m.dataType=="json"&&(m.data&&m.data.match(u)||m.url.match(u))){a="jsonp"+N++;if(m.data){m.data=(m.data+"").replace(u,"="+a+"$1")}m.url=m.url.replace(u,"="+a+"$1");m.dataType="script";W[a]=function(x){b=x;q();n();W[a]=ab;try{delete W[a]}catch(w){}if(s){s.removeChild(d)}}}if(m.dataType=="script"&&m.cache==null){m.cache=false}if(m.cache===false&&t=="GET"){var v=ad();var c=m.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+v+"$2");m.url=c+((c==m.url)?(m.url.match(/\?/)?"&":"?")+"_="+v:"")}if(m.data&&t=="GET"){m.url+=(m.url.match(/\?/)?"&":"?")+m.data;m.data=null}if(m.global&&!T.active++){T.event.trigger("ajaxStart")}var g=/^(\w+:)?\/\/([^\/?#]+)/.exec(m.url);if(m.dataType=="script"&&t=="GET"&&g&&(g[1]&&g[1]!=location.protocol||g[2]!=location.host)){var s=document.getElementsByTagName("head")[0];var d=document.createElement("script");d.src=m.url;if(m.scriptCharset){d.charset=m.scriptCharset}if(!a){var j=false;d.onload=d.onreadystatechange=function(){if(!j&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){j=true;q();n();d.onload=d.onreadystatechange=null;s.removeChild(d)}}}s.appendChild(d);return ab}var o=false;var p=m.xhr();if(m.username){p.open(t,m.url,m.async,m.username,m.password)}else{p.open(t,m.url,m.async)}try{if(m.data){p.setRequestHeader("Content-Type",m.contentType)}if(m.ifModified){p.setRequestHeader("If-Modified-Since",T.lastModified[m.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}p.setRequestHeader("X-Requested-With","XMLHttpRequest");p.setRequestHeader("Accept",m.dataType&&m.accepts[m.dataType]?m.accepts[m.dataType]+", */*":m.accepts._default)}catch(e){}if(m.beforeSend&&m.beforeSend(p,m)===false){if(m.global&&!--T.active){T.event.trigger("ajaxStop")}p.abort();return false}if(m.global){T.event.trigger("ajaxSend",[p,m])}var k=function(y){if(p.readyState==0){if(h){clearInterval(h);h=null;if(m.global&&!--T.active){T.event.trigger("ajaxStop")}}}else{if(!o&&p&&(p.readyState==4||y=="timeout")){o=true;if(h){clearInterval(h);h=null}f=y=="timeout"?"timeout":!T.httpSuccess(p)?"error":m.ifModified&&T.httpNotModified(p,m.url)?"notmodified":"success";if(f=="success"){try{b=T.httpData(p,m.dataType,m)}catch(w){f="parsererror"}}if(f=="success"){var x;try{x=p.getResponseHeader("Last-Modified")}catch(w){}if(m.ifModified&&x){T.lastModified[m.url]=x}if(!a){q()}}else{T.handleError(m,p,f)}n();if(y){p.abort()}if(m.async){p=null}}}};if(m.async){var h=setInterval(k,13);if(m.timeout>0){setTimeout(function(){if(p&&!o){k("timeout")}},m.timeout)}}try{p.send(m.data)}catch(e){T.handleError(m,p,null,e)}if(!m.async){k()}function q(){if(m.success){m.success(b,f)}if(m.global){T.event.trigger("ajaxSuccess",[p,m])}}function n(){if(m.complete){m.complete(p,f)}if(m.global){T.event.trigger("ajaxComplete",[p,m])}if(m.global&&!--T.active){T.event.trigger("ajaxStop")}}return p},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 e=a.getResponseHeader("content-type"),f=c=="xml"||!c&&e&&e.indexOf("xml")>=0,b=f?a.responseXML:a.responseText;if(f&&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(f,e){b[b.length]=encodeURIComponent(f)+"="+encodeURIComponent(e)}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 e=0,g=this.length;e<g;e++){var h=T.data(this[e],"olddisplay");this[e].style.display=h||"";if(T.css(this[e],"display")==="none"){var f=this[e].tagName,b;if(V[f]){b=V[f]}else{var d=T("<"+f+" />").appendTo("body");b=d.css("display");if(b==="none"){b="block"}d.remove();V[f]=b}T.data(this[e],"olddisplay",b)}}for(var e=0,g=this.length;e<g;e++){this[e].style.display=T.data(this[e],"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 e=T.data(this[c],"olddisplay");if(!e&&e!=="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 e=T.speed(d,b,c);return this[e.queue===false?"each":"queue"](function(){var g=T.extend({},e),j,f=this.nodeType==1&&T(this).is(":hidden"),h=this;for(j in a){if(a[j]=="hide"&&f||a[j]=="show"&&!f){return g.complete.call(this)}if((j=="height"||j=="width")&&this.style){g.display=T.css(this,"display");g.overflow=this.style.overflow}}if(g.overflow!=null){this.style.overflow="hidden"}g.curAnim=T.extend({},a);T.each(a,function(q,m){var n=new T.fx(h,g,q);if(/toggle|show|hide/.test(m)){n[m=="toggle"?f?"show":"hide":m](a)}else{var o=m.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),k=n.cur(true)||0;if(o){var s=parseFloat(o[2]),p=o[3]||"px";if(p!="px"){h.style[q]=(s||1)+p;k=((s||1)/n.cur(true))*k;h.style[q]=k+p}if(o[1]){s=((o[1]=="-="?-1:1)*s)+k}n.custom(k,s,p)}else{n.custom(k,m,"")}}});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 e=this;function d(f){return e.step(f)}d.elem=this.elem;if(d()&&T.timers.push(d)&&!U){U=setInterval(function(){var f=T.timers;for(var g=0;g<f.length;g++){if(!f[g]()){f.splice(g--,1)}}if(!f.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 f=true;for(var e in this.options.curAnim){if(this.options.curAnim[e]!==true){f=false}}if(f){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 f=this[0].getBoundingClientRect(),c=this[0].ownerDocument,g=c.body,h=c.documentElement,a=h.clientTop||g.clientTop||0,b=h.clientLeft||g.clientLeft||0,d=f.top+(self.pageYOffset||T.boxModel&&h.scrollTop||g.scrollTop)-a,e=f.left+(self.pageXOffset||T.boxModel&&h.scrollLeft||g.scrollLeft)-b;return{top:d,left:e}}}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 f=this[0],j=f.offsetParent,k=f,a=f.ownerDocument,c,h=a.documentElement,e=a.body,d=a.defaultView,m=d.getComputedStyle(f,null),b=f.offsetTop,g=f.offsetLeft;while((f=f.parentNode)&&f!==e&&f!==h){c=d.getComputedStyle(f,null);b-=f.scrollTop,g-=f.scrollLeft;if(f===j){b+=f.offsetTop,g+=f.offsetLeft;if(T.offset.doesNotAddBorder&&!(T.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(f.tagName))){b+=parseInt(c.borderTopWidth,10)||0,g+=parseInt(c.borderLeftWidth,10)||0}k=j,j=f.offsetParent}if(T.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"){b+=parseInt(c.borderTopWidth,10)||0,g+=parseInt(c.borderLeftWidth,10)||0}m=c}if(m.position==="relative"||m.position==="static"){b+=e.offsetTop,g+=e.offsetLeft}if(m.position==="fixed"){b+=Math.max(h.scrollTop,e.scrollTop),g+=Math.max(h.scrollLeft,e.scrollLeft)}return{top:b,left:g}}}T.offset={initialize:function(){if(this.initialized){return}var c=document.body,j=document.createElement("div"),g,h,a,f,b,k,e=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(k in b){j.style[k]=b[k]}j.innerHTML=d;c.insertBefore(j,c.firstChild);g=j.firstChild,h=g.firstChild,f=g.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(h.offsetTop!==5);this.doesAddBorderForTableAndCells=(f.offsetTop===5);g.style.overflow="hidden",g.style.position="relative";this.subtractsBorderForOverflowNotVisible=(h.offsetTop===-5);c.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(c.offsetTop===0);c.style.marginTop=e;c.removeChild(j);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,e;if(this[0]){var d=this.offsetParent(),a=this.offset(),f=/^body|html$/i.test(d[0].tagName)?{top:0,left:0}:d.offset();a.top-=Y(this,"marginTop");a.left-=Y(this,"marginLeft");f.top+=Y(d,"borderTopWidth");f.left+=Y(d,"borderLeftWidth");e={top:a.top-f.top,left:a.left-f.left}}return e},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 f=b?"Left":"Top",c=b?"Right":"Bottom",e=d.toLowerCase();T.fn["inner"+d]=function(){return this[0]?T.css(this[0],e,false,"padding"):null};T.fn["outer"+d]=function(g){return this[0]?T.css(this[0],e,false,g?"margin":"border"):null};var a=d.toLowerCase();T.fn[a]=function(g){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]):g===ab?(this.length?T.css(this[0],a):null):this.css(a,typeof g==="string"?g:g+"px")}})})();if(typeof Object.defineProperty!="undefined"&&typeof __defineGetter__=="undefined"){Element.prototype.__defineGetter__=Window.prototype.__defineGetter__=HTMLDocument.prototype.__defineGetter__=function(b,a){Object.defineProperty(this,b,{get:a})}}if(typeof Object.defineProperty!="undefined"&&typeof __defineSetter__=="undefined"){Element.prototype.__defineSetter__=Window.prototype.__defineSetter__=HTMLDocument.prototype.__defineSetter__=function(b,a){Object.defineProperty(this,b,{set:a})}}if(typeof Object.getOwnPropertyDescriptor!="undefined"&&typeof __lookupGetter__=="undefined"){Element.prototype.__lookupGetter__=Window.prototype.__lookupGetter__=HTMLDocument.prototype.__lookupGetter__=function(a){return Object.getOwnPropertyDescriptor(this,a).get||Object.getOwnPropertyDescriptor(this.constructor.prototype,a).get}}if(typeof Object.getOwnPropertyDescriptor!="undefined"&&typeof __lookupSetter__=="undefined"){Element.prototype.__lookupSetter__=Window.prototype.__lookupSetter__=HTMLDocument.prototype.__lookupSetter__=function(a){return Object.getOwnPropertyDescriptor(this,a).set||Object.getOwnPropertyDescriptor(this.constructor.prototype,a).set}}(function(){if(window.google&&google.gears){return}var a=null;if(typeof GearsFactory!="undefined"){a=new GearsFactory()}else{try{a=new ActiveXObject("Gears.Factory");if(a.getBuildInfo().indexOf("ie_mobile")!=-1){a.privateSetGlobalObject(this)}}catch(b){if((typeof navigator.mimeTypes!="undefined")&&navigator.mimeTypes["application/x-googlegears"]){a=document.createElement("object");a.style.display="none";a.width=0;a.height=0;a.type="application/x-googlegears";document.documentElement.appendChild(a)}}}if(!a){return}if(!window.google){google={}}if(!google.gears){google.gears={factory:a}}})();Persist=(function(){var e="0.1.0",d,g,a,f,c,b;b=(function(){var q="Thu, 01-Jan-1970 00:00:01 GMT",j=1000*60*60*24,s=["expires","path","domain"],m=escape,k=unescape,p=document,n;var t=function(){var u=new Date();u.setTime(u.getTime());return u};var h=function(x,A){var w,v,z,y=[],u=(arguments.length>2)?arguments[2]:{};y.push(m(x)+"="+m(A));for(w=0;w<s.length;w++){v=s[w];if(z=u[v]){y.push(v+"="+z)}}if(u.secure){y.push("secure")}return y.join("; ")};var o=function(){var w="__EC_TEST__",u=new Date();u=u.toGMTString();this.set(w,u);this.enabled=(this.remove(w)==u);return this.enabled};n={};n.set=function(y,B){var x=(arguments.length>2)?arguments[2]:{},w=t(),v,u={};if(x.expires){x.expires*=j;u.expires=new Date(w.getTime()+x.expires);u.expires=u.expires.toGMTString()}var A=["path","domain","secure"];for(i=0;i<A.length;i++){if(x[A[i]]){u[A[i]]=x[A[i]]}}var z=h(y,B,u);p.cookie=z;return B};n.has=function(v){v=m(v);var y=p.cookie,x=y.indexOf(v+"="),u=x+v.length+1,w=y.substring(0,v.length);return((!x&&v!=w)||x<0)?false:true};n.get=function(w){w=m(w);var z=p.cookie,y=z.indexOf(w+"="),u=y+w.length+1,x=z.substring(0,w.length),v;if((!y&&w!=x)||y<0){return null}v=z.indexOf(";",u);if(v<0){v=z.length}return k(z.substring(u,v))};n.remove=function(u){var w=n.get(u),v={expires:q};p.cookie=h(u,"",v);return w};n.keys=function(){var y=p.cookie,x=y.split("; "),u,w,v=[];for(u=0;u<x.length;u++){w=x[u].split("=");v.push(k(w[0]))}return v};n.all=function(){var y=p.cookie,x=y.split("; "),u,w,v=[];for(u=0;u<x.length;u++){w=x[u].split("=");v.push([k(w[0]),k(w[1])])}return v};n.version="0.2.1";n.enabled=o.call(n);return n})();c=function(){};a=function(h){return"PS"+h.replace(/_/g,"__").replace(/ /g,"_s")};C={search_order:["localstorage","whatwg_db","globalstorage","flash","ie","cookie"],name_re:/^[a-z][a-z0-9_ -]+$/i,methods:["init","get","set","remove","load","save"],sql:{version:"1",create:"CREATE TABLE IF NOT EXISTS persist_data (k TEXT UNIQUE NOT NULL PRIMARY KEY, v TEXT NOT NULL)",get:"SELECT v FROM persist_data WHERE k = ?",set:"INSERT INTO persist_data(k, v) VALUES (?, ?)",remove:"DELETE FROM persist_data WHERE k = ?"},flash:{div_id:"_persist_flash_wrap",id:"_persist_flash",path:"persist.swf",size:{w:1,h:1},args:{autostart:true}}};g={gears:{size:-1,test:function(){return(window.google&&window.google.gears)?true:false},methods:{transaction:function(j){var h=this.db;h.execute("BEGIN").close();j.call(this,h);h.execute("COMMIT").close()},init:function(){var h;h=this.db=google.gears.factory.create("beta.database");h.open(a(this.name));h.execute(C.sql.create).close()},get:function(h,k,j){var m,n=C.sql.get;if(!k){return}this.transaction(function(o){m=o.execute(n,[h]);if(m.isValidRow()){k.call(j||this,true,m.field(0))}else{k.call(j||this,false,null)}m.close()})},set:function(j,p,m,k){var h=C.sql.remove,o=C.sql.set,n;this.transaction(function(q){q.execute(h,[j]).close();q.execute(o,[j,p]).close();if(m){m.call(k||this,true,p)}})},remove:function(h,k,j){var m=C.sql.get;sql=C.sql.remove,r,val;this.transaction(function(n){if(k){r=n.execute(m,[h]);if(r.isValidRow()){val=r.field(0);n.execute(sql,[h]).close();k.call(j||this,true,val)}else{k.call(j||this,false,null)}r.close()}else{n.execute(sql,[h]).close()}})}}},whatwg_db:{size:200*1024,test:function(){var h="PersistJS Test",j="Persistent database test.";if(!window.openDatabase){return false}if(!window.openDatabase(h,C.sql.version,j,g.whatwg_db.size)){return false}return true},methods:{transaction:function(h){if(!this.db_created){var j=C.sql.create;this.db.transaction(function(k){k.executeSql(j,[],function(){this.db_created=true})},c)}this.db.transaction(h)},init:function(){var j,h;j=this.o.about||"Persistent storage for "+this.name;h=this.o.size||g.whatwg_db.size;this.db=openDatabase(this.name,C.sql.version,j,h)},get:function(h,k,j){var m=C.sql.get;if(!k){return}j=j||this;this.transaction(function(n){n.executeSql(m,[h],function(o,p){if(p.rows.length>0){k.call(j,true,p.rows.item(0)["v"])}else{k.call(j,false,null)}})})},set:function(j,o,m,k){var h=C.sql.remove,n=C.sql.set;this.transaction(function(p){p.executeSql(h,[j],function(){p.executeSql(n,[j,o],function(q,s){if(m){m.call(k||this,true,o)}})})});return o},remove:function(h,k,j){var m=C.sql.get;sql=C.sql.remove;this.transaction(function(n){if(k){n.executeSql(m,[h],function(o,p){if(p.rows.length>0){var q=p.rows.item(0)["v"];o.executeSql(sql,[h],function(s,u){k.call(j||this,true,q)})}else{k.call(j||this,false,null)}})}else{n.executeSql(sql,[h])}})}}},globalstorage:{size:5*1024*1024,test:function(){return window.globalStorage?true:false},methods:{key:function(h){return a(this.name)+a(h)},init:function(){this.store=globalStorage[this.o.domain]},get:function(h,k,j){h=this.key(h);if(globalStorage[this.o.domain].getItem){if(k){k.call(j||this,true,globalStorage[this.o.domain].getItem(h))}}else{if(k){k.call(j||this,true,globalStorage[this.o.domain][h]+"")}}},set:function(h,m,k,j){h=this.key(h);if(globalStorage[this.o.domain].setItem){globalStorage[this.o.domain].setItem(h,m)}else{globalStorage[this.o.domain][h]=m}if(k){k.call(j||this,true,m)}},remove:function(h,k,j){var m;h=this.key(h);m=globalStorage[this.o.domain][h];if(globalStorage[this.o.domain].removeItem){globalStorage[this.o.domain].removeItem(h)}else{delete globalStorage[this.o.domain][h]}if(k){k.call(j||this,(m!==null),m)}}}},localstorage:{size:-1,test:function(){return window.localStorage?true:false},methods:{key:function(h){return a(this.name)+a(h)},init:function(){this.store=localStorage},get:function(h,k,j){h=this.key(h);if(k){k.call(j||this,true,this.store.getItem(h))}},set:function(h,m,k,j){h=this.key(h);this.store.setItem(h,m);if(k){k.call(j||this,true,m)}},remove:function(h,k,j){var m;h=this.key(h);m=this.getItem(h);this.store.removeItem(h);if(k){k.call(j||this,(m!==null),m)}}}},ie:{prefix:"_persist_data-",size:64*1024,test:function(){return window.ActiveXObject?true:false},make_userdata:function(j){var h=document.createElement("div");h.id=j;h.style.display="none";h.addBehavior("#default#userData");document.body.appendChild(h);return h},methods:{init:function(){var h=g.ie.prefix+a(this.name);this.el=g.ie.make_userdata(h);if(this.o.defer){this.load()}},get:function(h,k,j){var m;h=a(h);if(!this.o.defer){this.load()}m=this.el.getAttribute(h);if(k){k.call(j||this,m?true:false,m)}},set:function(h,m,k,j){h=a(h);this.el.setAttribute(h,m);if(!this.o.defer){this.save()}if(k){k.call(j||this,true,m)}},load:function(){this.el.load(a(this.name))},save:function(){this.el.save(a(this.name))}}},cookie:{delim:":",size:4000,test:function(){return d.Cookie.enabled?true:false},methods:{key:function(h){return this.name+g.cookie.delim+h},get:function(h,m,k,j){h=this.key(h);m=b.get(h);if(k){k.call(j||this,m!=null,m)}},set:function(h,m,k,j){h=this.key(h);b.set(h,m,this.o);if(k){k.call(j||this,true,m)}},remove:function(h,m,k,j){var m;h=this.key(h);m=b.remove(h);if(k){k.call(j||this,m!=null,m)}}}},flash:{test:function(){if(!window.SWFObject||!deconcept||!deconcept.SWFObjectUtil){return false}var h=deconcept.SWFObjectUtil.getPlayerVersion().major;return(h>=8)?true:false},methods:{init:function(){if(!g.flash.el){var m,j,k,h=C.flash;k=document.createElement("div");k.id=h.div_id;document.body.appendChild(k);m=new SWFObject(this.o.swf_path||h.path,h.id,h.size.w,h.size.h,"8");for(j in h.args){m.addVariable(j,h.args[j])}m.write(k);g.flash.el=document.getElementById(h.id)}this.el=g.flash.el},get:function(h,k,j){var m;h=a(h);m=this.el.get(this.name,h);if(k){k.call(j||this,m!==null,m)}},set:function(j,n,m,k){var h;j=a(j);h=this.el.set(this.name,j,n);if(m){m.call(k||this,true,n)}},remove:function(h,k,j){var m;h=a(h);m=this.el.remove(this.name,h);if(k){k.call(j||this,true,m)}}}}};d={};$.extend(d,{VERSION:e,type:null,size:0,add:function(h){g[h.id]=h;C.search_order=[h.id].concat(C.search_order);f()},remove:function(j){var h=C.search_order.indexOf(j);if(h<0){return}C.search_order.splice(h,1);delete g[j];f()},Cookie:b,Store:function(h,j){if(!C.name_re.exec(h)){throw new Error("Invalid name")}if(!d.type){throw new Error("No suitable storage found")}j=j||{};this.name=h;j.domain=j.domain||location.hostname||"localhost.localdomain";this.o=j;j.expires=j.expires||365*2;j.path=j.path||"/";this.init()}});var f=function(){var n,j,h,m,k=C.methods,o=C.search_order;for(n=0,j=k.length;n<j;n++){d.Store.prototype[k[n]]=c}d.type=null;d.size=-1;for(n=0,j=o.length;!d.type&&n<j;n++){h=g[o[n]];if(h.test()){d.type=o[n];d.size=h.size;for(m in h.methods){d.Store.prototype[m]=h.methods[m]}}}d._init=true};f();return d})();(function(g){function h(){}function n(u){return typeof u!="undefined"}function b(u){return typeof u=="string"}function p(v,u){return v.toLowerCase()==u.toLowerCase()}function m(u){return g.nodeName(u[0],"input")?!!u.attr("type").match(/text|button|submit/i):false}function o(v,u,A,z){var y="",x,w={};if(typeof v=="object"){w=v}else{if(!u&&!A){x=v}if(!A&&u){if(typeof u=="object"){x=v;w=u}else{y=v;x=u}}if(v&&u&&A){y=v;x=u;w=A}w.from=y||w.from||"";w.to=x||w.to||""}if(w.fromOriginal){w.toggle=true}if(w.toggle){w.data=true}if(w.async===true){w.async=2}return g.extend({},d,(n(z)?g.fn.translate.defaults:g.translate.defaults),w)}function e(){}e.fn=e.prototype={version:"1.2.6",translateInit:function(E,A,z,y){var x=this,B,D,u;this.options=u=o(A,z,y);u.from=this.toLanguageCode(u.from)||"";u.to=this.toLanguageCode(u.to)||"";if(u.fromOriginal&&u.nodes[0]){u.nodes.each(function(F){var G=x.getData(this,u.from);if(!G){return false}E[F]=G})}if(b(E)){if(u.comments===false){E=this.stripComments(E)}this.rawSource="<div>"+E+"</div>";this.isString=true}else{if(u.comments===false){for(var w=0,v=E.length;w<v;w++){E[w]=this.stripComments(E[w])}}this.rawSource="<div>"+E.join("</div><div>")+"</div>";this.isString=false}this.from=u.from;this.to=u.to;this.source=E;this.elements=u.nodes;this.rawTranslation="";this.translation=[];this.startPos=0;this.i=0;this.numberOfCalls=0;this.stopped=false;u.start.call(this,u.nodes[0]?u.nodes:E,u.from,u.to,u);if(u.timeout>0){this.timeout=setTimeout(function(){u.onTimeout.call(x,u.nodes[0]?u.nodes:E,u.from,u.to,u)},u.timeout)}if(u.toggle&&u.nodes[0]){this.toggle()}return this.translate()},translate:function(){if(this.stopped){return}var B=this,u=this.options;this.rawSourceSub=this.truncate(this.rawSource.substring(this.startPos,this.startPos+u.limit));this.startPos+=this.rawSourceSub.length;var y=this.rawTranslation.length;while(this.rawTranslation.lastIndexOf("</div>",y)>-1){y=this.rawTranslation.lastIndexOf("</div>",y)-1;var D=this.rawTranslation.substr(0,y),A=D.match(/<div(>|( style=\";))/gi),z=D.match(/<\/div>/gi);A=A?A.length:0;z=z?z.length:0;if(A!=z+1){continue}var v=g(this.rawTranslation.substr(0,(y+7))),x=v.length,w=this.i;if(w==x){break}v.slice(w,x).each(function(F,G){(function(){if(this.stopped){return false}var I=g(G).html().replace(/^\s/,""),H=w+F,J=this.source,K=this.from.length<2&&this.detectedSourceLanguage||this.from;this.translation[H]=I;if(!u.nodes[0]){if(this.isString){this.translation=I}else{J=this.source[H]}u.each.call(this,H,I,J,K,this.to,u,this.numberOfCalls)}else{this.each(H,this.elements[H],I,this.source[H],K,this.to,u);u.each.call(this,H,this.elements[H],I,this.source[H],K,this.to,u,this.numberOfCalls)}this.i++}).call(B)});break}if(this.rawSourceSub.length>0){t.translate(this.rawSourceSub,this.from,this.to,function(F){(function(){if(F.error){return u.error.call(this,F.error,this.rawSourceSub,this.from,this.to,u,this.numberOfCalls)}this.rawTranslation+=F.translation;this.detectedSourceLanguage=F.detectedSourceLanguage;this.translate()}).call(B)});this.numberOfCalls++;if(!u.nodes[0]){return this}}else{if(!this.rawTranslation){return}var E=this.from.length<2&&this.detectedSourceLanguage||this.from;if(this.timeout){clearTimeout(this.timeout)}if(!u.nodes[0]){u.complete.call(this,this.translation,this.source,E,this.to,u,this.numberOfCalls)}else{u.complete.call(this,this.elements.end(),this.elements,this.translation,this.source,E,this.to,u,this.numberOfCalls)}}},each:function(w,v,D,E,A,B,u){var x=this,y=g(v),z;if(u.data===true){if(b(u.subject)){z=u.subject}else{if(u.altAndVal&&g.nodeName(v,"img")){z="alt"}else{if(u.altAndVal&&m(y)){z="value"}else{if(g.nodeName(v,"textarea")){z="value"}else{z="html"}}}}g.data(v,"translation."+A+"."+z,E);g.data(v,"translation."+B+"."+z,D)}this.setLangAttr(y,B,u);this.replace(y,D,u)},getData:function(u,x,w){var w=w||this.options||{subject:true},v="translation."+x+".";return b(w.subject)&&g.data(u,v+w.subject)||w.subject===true&&g.data(u,v+"html")||w.altAndVal&&g.data(u,v+"value")||w.altAndVal&&g.data(u,v+"alt")},toggle:function(){var w=this,z=[],x=this.options,v=x.nodes,y=x.to,u=false;v.each(function(A){var D=g(this),B=w.getData(this,y);if(n(B)){w.stop()}else{u=true;return false}w.setLangAttr(D,y,x);w.replace(D,B,x);z.push(B);x.each.call(w,A,w.elements[A],B,w.source[A],w.from,y,x)});if(!u){x.complete.call(this,v.end(),v,z,this.source,this.from,this.to,x)}},replace:function(w,v,x){if(x.replace===true){if(b(x.subject)){w.attr(x.subject,v)}else{if(x.from=="ar"||x.to=="ar"){if(x.from=="ar"){w.css("direction","ltr")}if(x.to=="ar"){w.css("direction","rtl")}if(w.css("text-align")=="right"){w.css("text-align","left")}if(w.css("text-align")=="left"){w.css("text-align","right")}}if(x.altAndVal&&g.nodeName(w[0],"img")){w.attr("alt",v)}else{if(x.altAndVal&&m(w)){w.val(v)}else{if(g.nodeName(w[0],"textarea")){w.val(v)}else{if(x.rebind===true){var u=w.find("*").not("script").clone(true);w.html(v);this.copyEvents(u,w.find("*"))}else{w.html(v)}}}}}}},setLangAttr:function(v,u,w){if(w.setLangAttr===true){v.attr("lang",u)}if(b(w.setLangAttr)){v.attr(w.setLangAttr,u)}},stripComments:function(u){return u.replace(/<![ \r\n\t]*(--([^\-]|[\r\n]|-[^\-])*--[ \r\n\t]*)>/g,"")},truncate:function(y){var x=/<(?![^<]*>)/.exec(y);if(!x){var w=/>\s*$/.exec(y);if(!w){var v=/[\.\?\!;:](?![^\.\?\!;:]*[\.\?\!;:])/.exec(y);if(v){var u=/>(?![^>]*<)/.exec(y);if(u){if(v.index>u.index){y=y.substring(0,v.index+1)}else{y=y.substring(0,u.index+1)}}else{y=y.substring(0,v.index+1)}}else{y=y}}else{y=y}}else{y=y.substring(0,x.index)}return y},copyEvents:function(v,u){u.each(function(x){var w=g.data(v[x],"events");if(!w){return false}for(var z in w){for(var y in w[z]){g.event.add(this,z,w[z][y],w[z][y].data)}}})},stop:function(){if(this.stopped){return this}this.stopped=true;this.options.error.call(this,{message:"stopped"});return this},ready:function(u,v){if(j){return u()}s.push(u);if(n(v)){return v}},getLanguages:function(u){if(!n(u)){return k}u={};for(var v in k){if(t.isTranslatable(k[v])){u[v]=k[v]}}return u},toLanguage:function(w,u){var v="UNKNOWN";for(l in k){if(p(k[l],w)||p(l,w)){v=l;break}}if(u=="lowercase"){v=v.toLowerCase()}if(u=="uppercase"){v=v.toUpperCase()}if(u=="capitalize"){v=v.charAt(0).toUpperCase()+v.substring(1).toLowerCase()}return v},toLanguageCode:function(u){for(l in k){if(p(k[l],u)||p(l,u)){return k[l]}}},isTranslatable:function(u){return t.isTranslatable(this.toLanguageCode(u))},getBranding:function(v,u){return g(t.getBranding(v,u))}};g.fn.translate=function(v,u,y){var w=o(v,u,y,true),x=g.extend({},d,g.fn.translate.defaults,w,{complete:function(A,z){w.nodes=A;g.translate(z,w)},each:h});if(n(g.fn.nodesContainingText)){return this.nodesContainingText(x)}w.nodes=this.get();return g.translate(w)};g.translate=function(w,v,u,y){if(g.isFunction(w)){return a(w)}var x=new e();if(!n(w)){return x}return a(function(){return x.translateInit(w,v,u,y)},x)};var d={limit:500,comments:false,start:h,error:h,each:h,complete:h,onTimeout:h,timeout:0,from:"",to:"",nodes:[],walk:true,returnAll:false,replace:true,rebind:true,data:true,setLangAttr:false,subject:true,not:"",altAndVal:true,async:false,toggle:false,fromOriginal:false},t,k,j=false,s=[],a=e.fn.ready;g.translate.defaults=g.fn.translate.defaults=d;g.translate.fn=g.translate.prototype=e.fn;function f(){t=e.prototype.GL=google.language;k=t.Languages;j=true;g.each(s,function(){this()})}function q(){google.load("language","1",{callback:f})}function c(u){if(typeof google!="undefined"&&typeof google.load!="undefined"){return q()}g.getScript("http://www.google.com/jsapi?"+(u?"key="+u:""),q)}c("ABQIAAAAAOoptSabWmkGOAabDXgL7RQrWfT26z5Ra21-QJ8ylY1kQ6FiyhT3itoa5ddxlSuESJvN2ZmXpX4yVA")})(jQuery);(function(b){function a(){}b.fn.language=function(d){d=d||{};var e=b.extend({},c,b.fn.language.defaults,d,{complete:function(g,f){d.nodes=g;b.language(f,d)},each:a,start:a,returnAll:true});if(typeof b.fn.nodesContainingText!="undefined"){return this.nodesContainingText(e)}d.nodes=this;return b.language(that,d)};b.language=function(d,f){f=f||{};var e=new b.translate();if(b.isFunction(d)){return e.ready(d)}if(typeof d=="undefined"){return e}return e.ready(function(){return e.detect(d,f)},e)};var c={start:a,each:a,complete:a,error:a,setLangAttr:true,subject:true,limit:500,walk:true,returnAll:false,not:"",altAndVal:false,async:false,nodes:[]};b.language.defaults=b.fn.language.defaults=c;b.language.fn=b.language.prototype=b.extend(b.translate.fn,{detect:function(n,f){if(typeof n=="undefined"){return this}this.options=f=b.extend({},c,(f.nodes[0]?b.fn.language.defaults:b.language.defaults),f);var m=this,h=0,p=[],g=[],j=[],d=f.nodes,e;if(typeof n=="string"){n=[n];e=true}var k=n.length;this.elements=d;this.text=n;this.stopped=false;this.languageCodes=p;this.languages=g;this.results=j;f.start.call(this,f.nodes[0]?f.nodes:n,f);b.each(n,function(q,o){m.GL.detect(o.substring(0,f.limit*1),function(s){(function(){if(this.stopped){return}if(s.error){if(d[0]){return f.error.call(this,s.error,d[q],o,q,f)}else{return f.error.call(this,s.error,o,q,f)}}var u=s.language,v=this.toLanguage(u);p.push(u);g.push(v);j.push(s);if(d[0]){var t=d[q];this.setLangAttr(b(t),u,f);f.each.call(this,q,t,o,u,v,s,f)}else{f.each.call(this,q,o,u,v,s,f)}if(q==k-1){if(e){return f.complete.call(this,n[0],p[0],g[0],j[0],f)}else{if(d[0]){return f.complete.call(this,d,n,p,g,j,f)}else{return f.complete.call(this,n,p,g,j,f)}}}}).call(m)})});return this}})})(jQuery);(function(a){a.translate.fn.ui=function(f,d,j){var h="",g="",e="";if(j){g="<"+j+">";e="</"+j+">"}a.each(this.getLanguages(true),function(b,c){h+=("<"+d+">"+g+b.charAt(0)+b.substring(1).toLowerCase()+e+"</"+d+">")});return a("<"+f+' class="jq-translate-ui">'+h+"</"+f+">")}})(jQuery);(function(a){a.translate.fn.progress=function(b,d){if(!this.i){this.pr=0}this.pr+=this.source[this.i].length;var c=100*this.pr/(this.rawSource.length-(11*(this.i+1)));if(b){var f=a(b);if(!this.i&&!f.hasClass("ui-progressbar")){f.progressbar(d)}f.progressbar("progress",c)}return c}})(jQuery);(function(d){function c(g,f){return g.nodeName&&g.nodeName.toUpperCase()==f.toUpperCase()}function b(g){if(!c(g[0],"input")){return false}var f=g.attr("type");return f=="text"||f=="button"||f=="submit"}function a(){}a.prototype={init:function(g,f){this.textArray=[];this.elements=[];this.options=f;this.jquery=g;this.n=-1;if(f.async===true){f.async=2}g=g.not("script, "+f.not);g=g.add(g.find("*").not("script, "+f.not));if(f.not){g=g.not(d(f.not).find("*"))}this.jq=g;this.jql=this.jq.length;return this.process()},process:function(){this.n++;var k=this,f=this.options,q="",j=false,h=false,g=this.jq[this.n],n,p,m;if(this.n==this.jql){m=this.jquery.pushStack(this.elements);f.complete.call(m,m,this.textArray);if(f.returnAll===false&&f.walk===false){return this.jquery}return m}if(!g){return this.process()}n=d(g);if(typeof f.subject=="string"){q=n.attr(f.subject)}else{if(f.altAndVal&&c(g,"img")){q=n.attr("alt")}else{if(f.altAndVal&&b(n)){q=n.val()}else{if(c(g,"textarea")){q=n.val()}else{p=g.firstChild;if(f.walk!==true){h=true}else{while(p){if(p.nodeType==1){h=true;break}p=p.nextSibling}}if(!h){q=n.text()}else{if(f.walk!==true){j=true}p=g.firstChild;while(p){if(p.nodeType==3&&p.nodeValue.match(/\S/)!==null){if(p.nodeValue.match(/<![ \r\n\t]*(--([^\-]|[\r\n]|-[^\-])*--[ \r\n\t]*)>/)!==null){if(p.nodeValue.match(/(\S+(?=.*<))|(>(?=.*\S+))/)!==null){j=true;break}}else{j=true;break}}p=p.nextSibling}if(j){q=n.html().replace(/<script[^<]+<[^<]+>/,"");this.jq=this.jq.not(n.find("*"))}}}}}}if(!q){return this.process()}this.elements.push(g);if(f.comments===false){q=this.stripComments(q)}this.textArray.push(q);f.each.call(g,this.elements.length-1,g,q);if(f.async){setTimeout(function(){k.process()},f.async);return this.jquery}else{return this.process()}},stripComments:function(f){return f.replace(/<![ \r\n\t]*(--([^\-]|[\r\n]|-[^\-])*--[ \r\n\t]*)>/g,"")}};d.fn.nodesContainingText=function(f){f=d.extend({},e,d.fn.nodesContainingText.defaults,f);return new a().init(this,f)};var e={not:"",async:false,each:function(){},complete:function(){},comments:false,returnAll:true,walk:true,altAndVal:false,subject:true};d.fn.nodesContainingText.defaults=e})(jQuery);(function($){$.fn.editable=function(target,options){if("disable"==target){$(this).data("disabled.editable",true);return}if("enable"==target){$(this).data("disabled.editable",false);return}if("destroy"==target){$(this).unbind($(this).data("event.editable")).removeData("disabled.editable").removeData("event.editable");return}var settings={target:target,name:"value",id:"id",type:"text",width:"auto",height:"auto",event:"click",onblur:"cancel",loadtype:"GET",loadtext:"Loading...",placeholder:"Click to edit",loaddata:{},submitdata:{},ajaxoptions:{}};if(options){$.extend(settings,options)}var plugin=$.editable.types[settings.type].plugin||function(){};var submit=$.editable.types[settings.type].submit||function(){};var buttons=$.editable.types[settings.type].buttons||$.editable.types.defaults.buttons;var content=$.editable.types[settings.type].content||$.editable.types.defaults.content;var element=$.editable.types[settings.type].element||$.editable.types.defaults.element;var reset=$.editable.types[settings.type].reset||$.editable.types.defaults.reset;var callback=settings.callback||function(){};var onedit=settings.onedit||function(){};var onsubmit=settings.onsubmit||function(){};var onreset=settings.onreset||function(){};var onerror=settings.onerror||reset;if(settings.tooltip){$(this).attr("title",settings.tooltip)}settings.autowidth="auto"==settings.width;settings.autoheight="auto"==settings.height;return this.each(function(){var self=this;var savedwidth=$(self).width();var savedheight=$(self).height();$(this).data("event.editable",settings.event);if(!$.trim($(this).html())){$(this).html(settings.placeholder)}$(this).bind(settings.event,function(e){if(true===$(this).data("disabled.editable")){return}if(self.editing){return}if(false===onedit.apply(this,[settings,self])){return}if(settings.tooltip){$(self).removeAttr("title")}if(0==$(self).width()){settings.width=savedwidth;settings.height=savedheight}else{if(settings.width!="none"){settings.width=settings.autowidth?$(self).width():settings.width}if(settings.height!="none"){settings.height=settings.autoheight?$(self).height():settings.height}}if($(this).html().toLowerCase().replace(/(;|")/g,"")==settings.placeholder.toLowerCase().replace(/(;|")/g,"")){$(this).html("")}self.editing=true;self.revert=$(self).html();$(self).html("");var form=$("<form />");if(settings.cssclass){if("inherit"==settings.cssclass){form.attr("class",$(self).attr("class"))}else{form.attr("class",settings.cssclass)}}if(settings.style){if("inherit"==settings.style){form.attr("style",$(self).attr("style"));form.css("display",$(self).css("display"))}else{form.attr("style",settings.style)}}var input=element.apply(form,[settings,self]);var input_content;if(settings.loadurl){var t=setTimeout(function(){input.disabled=true;content.apply(form,[settings.loadtext,settings,self])},100);var loaddata={};loaddata[settings.id]=self.id;if($.isFunction(settings.loaddata)){$.extend(loaddata,settings.loaddata.apply(self,[self.revert,settings]))}else{$.extend(loaddata,settings.loaddata)}$.ajax({type:settings.loadtype,url:settings.loadurl,data:loaddata,async:false,success:function(result){window.clearTimeout(t);input_content=result;input.disabled=false}})}else{if(settings.data){input_content=settings.data;if($.isFunction(settings.data)){input_content=settings.data.apply(self,[self.revert,settings])}}else{input_content=self.revert}}content.apply(form,[input_content,settings,self]);input.attr("name",settings.name);buttons.apply(form,[settings,self]);$(self).append(form);plugin.apply(form,[settings,self]);$(":input:visible:enabled:first",form).focus();if(settings.select){input.select()}input.keydown(function(e){if(e.keyCode==27){e.preventDefault();reset.apply(form,[settings,self])}});var t;if("cancel"==settings.onblur){input.blur(function(e){t=setTimeout(function(){reset.apply(form,[settings,self])},500)})}else{if("submit"==settings.onblur){input.blur(function(e){t=setTimeout(function(){form.submit()},200)})}else{if($.isFunction(settings.onblur)){input.blur(function(e){settings.onblur.apply(self,[input.val(),settings])})}else{input.blur(function(e){})}}}form.submit(function(e){if(t){clearTimeout(t)}e.preventDefault();if(false!==onsubmit.apply(form,[settings,self])){if(false!==submit.apply(form,[settings,self])){if($.isFunction(settings.target)){var str=settings.target.apply(self,[input.val(),settings]);$(self).html(str);self.editing=false;callback.apply(self,[self.innerHTML,settings]);if(!$.trim($(self).html())){$(self).html(settings.placeholder)}}else{var submitdata={};submitdata[settings.name]=input.val();submitdata[settings.id]=self.id;if($.isFunction(settings.submitdata)){$.extend(submitdata,settings.submitdata.apply(self,[self.revert,settings]))}else{$.extend(submitdata,settings.submitdata)}if("PUT"==settings.method){submitdata._method="put"}$(self).html(settings.indicator);var ajaxoptions={type:"POST",data:submitdata,url:settings.target,success:function(result,status){$(self).html(result);self.editing=false;callback.apply(self,[self.innerHTML,settings]);if(!$.trim($(self).html())){$(self).html(settings.placeholder)}},error:function(xhr,status,error){onerror.apply(form,[settings,self,xhr])}};$.extend(ajaxoptions,settings.ajaxoptions);$.ajax(ajaxoptions)}}}$(self).attr("title",settings.tooltip);return false})});this.reset=function(form){if(this.editing){if(false!==onreset.apply(form,[settings,self])){$(self).html(self.revert);self.editing=false;if(!$.trim($(self).html())){$(self).html(settings.placeholder)}if(settings.tooltip){$(self).attr("title",settings.tooltip)}}}}})};$.editable={types:{defaults:{element:function(settings,original){var input=$('<input type="hidden"></input>');$(this).append(input);return(input)},content:function(string,settings,original){$(":input:first",this).val(string)},reset:function(settings,original){original.reset(this)},buttons:function(settings,original){var form=this;if(settings.submit){if(settings.submit.match(/>$/)){var submit=$(settings.submit).click(function(){if(submit.attr("type")!="submit"){form.submit()}})}else{var submit=$('<button type="submit" />');submit.html(settings.submit)}$(this).append(submit)}if(settings.cancel){if(settings.cancel.match(/>$/)){var cancel=$(settings.cancel)}else{var cancel=$('<button type="cancel" />');cancel.html(settings.cancel)}$(this).append(cancel);$(cancel).click(function(event){if($.isFunction($.editable.types[settings.type].reset)){var reset=$.editable.types[settings.type].reset}else{var reset=$.editable.types.defaults.reset}reset.apply(form,[settings,original]);return false})}}},text:{element:function(settings,original){var input=$("<input />");if(settings.width!="none"){input.width(settings.width)}if(settings.height!="none"){input.height(settings.height)}input.attr("autocomplete","off");$(this).append(input);return(input)}},textarea:{element:function(settings,original){var textarea=$("<textarea />");if(settings.rows){textarea.attr("rows",settings.rows)}else{if(settings.height!="none"){textarea.height(settings.height)}}if(settings.cols){textarea.attr("cols",settings.cols)}else{if(settings.width!="none"){textarea.width(settings.width)}}$(this).append(textarea);return(textarea)}},select:{element:function(settings,original){var select=$("<select />");$(this).append(select);return(select)},content:function(data,settings,original){if(String==data.constructor){eval("var json = "+data)}else{var json=data}for(var key in json){if(!json.hasOwnProperty(key)){continue}if("selected"==key){continue}var option=$("<option />").val(key).append(json[key]);$("select",this).append(option)}$("select",this).children().each(function(){if($(this).val()==json.selected||$(this).text()==original.revert){$(this).attr("selected","selected")}})}}},addInputType:function(name,input){$.editable.types[name]=input}}})(jQuery);(function(b){b.fn.superfish=function(m){var g=b.fn.superfish,k=g.c,f=b(['<span class="',k.arrowClass,'"> &#187;</span>'].join("")),j=function(){var c=b(this),n=d(c);clearTimeout(n.sfTimer);c.showSuperfishUl().siblings().hideSuperfishUl()},e=function(){var c=b(this),p=d(c),n=g.op;clearTimeout(p.sfTimer);p.sfTimer=setTimeout(function(){n.retainPath=(b.inArray(c[0],n.$path)>-1);c.hideSuperfishUl();if(n.$path.length&&c.parents(["li.",n.hoverClass].join("")).length<1){j.call(n.$path)}},n.delay)},d=function(c){var n=c.parents(["ul.",k.menuClass,":first"].join(""))[0];g.op=g.o[n.serial];return n},h=function(c){c.addClass(k.anchorClass).append(f.clone())};return this.each(function(){var c=this.serial=g.o.length;var p=b.extend({},g.defaults,m);p.$path=b("li."+p.pathClass,this).slice(0,p.pathLevels).each(function(){b(this).addClass([p.hoverClass,k.bcClass].join(" ")).filter("li:has(ul)").removeClass(p.pathClass)});g.o[c]=g.op=p;b("li:has(ul)",this)[(b.fn.hoverIntent&&!p.disableHI)?"hoverIntent":"hover"](j,e).each(function(){if(p.autoArrows){h(b(">a:first-child",this))}}).not("."+k.bcClass).hideSuperfishUl();var n=b("a",this);n.each(function(o){var q=n.eq(o).parents("li");n.eq(o).focus(function(){j.call(q)}).blur(function(){e.call(q)})});p.onInit.call(this)}).each(function(){var c=[k.menuClass];if(g.op.dropShadows&&!(b.browser.msie&&b.browser.version<7)){c.push(k.shadowClass)}b(this).addClass(c.join(" "))})};var a=b.fn.superfish;a.o=[];a.op={};a.IE7fix=function(){var c=a.op;if(b.browser.msie&&b.browser.version>6&&c.dropShadows&&c.animation.opacity!=undefined){this.toggleClass(a.c.shadowClass+"-off")}};a.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};a.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};b.fn.extend({hideSuperfishUl:function(){var e=a.op,d=(e.retainPath===true)?e.$path:"";e.retainPath=false;var c=b(["li.",e.hoverClass].join(""),this).add(this).not(d).removeClass(e.hoverClass).find(">ul").hide().css("visibility","hidden");e.onHide.call(c);return this},showSuperfishUl:function(){var e=a.op,d=a.c.shadowClass+"-off",c=this.addClass(e.hoverClass).find(">ul:hidden").css("visibility","visible");a.IE7fix.call(c);e.onBeforeShow.call(c);c.animate(e.animation,e.speed,function(){a.IE7fix.call(c);e.onShow.call(c)});return this}})})(jQuery);function time_since(s,d){function f(){var H=/%%|%(\d+\$)?([-+#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuidfegEG])/g;var A=arguments,j=0,G=A[j++];var F=function(x,w,J,I){var y=(x.length>=w)?"":Array(1+w-x.length>>>0).join(J);return I?x+y:y+x};var E=function(x,w,K,J,I){var y=J-x.length;if(y>0){if(K||!I){x=F(x,J," ",K)}else{x=x.slice(0,w.length)+F("",y,"0",true)+x.slice(w.length)}}return x};var D=function(x,w,M,L,K,J,I){var y=x>>>0;M=M&&y&&{"2":"0b","8":"0","16":"0x"}[w]||"";x=M+F(y.toString(w),J||0,"0",false);return E(x,M,L,K,I)};var B=function(x,w,J,I,y){if(I!=null){x=x.slice(0,I)}return E(x,"",w,J,y)};var z=function(U,T,S,R,V,Q,P){if(U=="%%"){return"%"}var O=false,M="",L=false,K=false;for(var N=0;S&&N<S.length;N++){switch(S.charAt(N)){case" ":M=" ";break;case"+":M="+";break;case"-":O=true;break;case"0":L=true;break;case"#":K=true;break}}if(!R){R=0}else{if(R=="*"){R=+A[j++]}else{if(R.charAt(0)=="*"){R=+A[R.slice(1,-1)]}else{R=+R}}}if(R<0){R=-R;O=true}if(!isFinite(R)){throw new Error("sprintf: (minimum-)width must be finite")}if(!Q){Q="fFeE".indexOf(P)>-1?6:(P=="d")?0:void (0)}else{if(Q=="*"){Q=+A[j++]}else{if(Q.charAt(0)=="*"){Q=+A[Q.slice(1,-1)]}else{Q=+Q}}}var J=T?A[T.slice(0,-1)]:A[j++];switch(P){case"s":return B(String(J),O,R,Q,L);case"c":return B(String.fromCharCode(+J),O,R,Q,L);case"b":return D(J,2,K,O,R,Q,L);case"o":return D(J,8,K,O,R,Q,L);case"x":return D(J,16,K,O,R,Q,L);case"X":return D(J,16,K,O,R,Q,L).toUpperCase();case"u":return D(J,10,K,O,R,Q,L);case"i":case"d":var I=parseInt(+J);var y=I<0?"-":M;J=y+F(String(Math.abs(I)),Q,"0",false);return E(J,y,O,R,L);case"e":case"E":case"f":case"F":case"g":case"G":var I=+J;var y=I<0?"-":M;var x=["toExponential","toFixed","toPrecision"]["efg".indexOf(P.toLowerCase())];var w=["toString","toUpperCase"]["eEfFgG".indexOf(P)%2];J=y+Math.abs(I)[x](Q);return E(J,y,O,R,L)[w]();default:return U}};return G.replace(H,z)}var q=Math.round(new Date().getTime()/1000);var n=s;if(isNaN(n)){n=Math.round(new Date(n).getTime()/1000)}var h=[[60*60*24*365,"year","years"],[60*60*24*30,"month","months"],[60*60*24*7,"week","weeks"],[60*60*24,"day","days"],[60*60,"hour","hours"],[60,"minute","minutes"],[1,"second","seconds"]];var u=q-n;for(var p=0,o=h.length;p<o;p++){var g=h[p][0];var v=h[p][1];var m=h[p][2];var e=Math.floor(u/g);if(0!=e){break}}var a=f("%1$d %2$s",e,e==1||!d?v:m);if(p+1<o&&d){var c=h[p+1][0];var t=h[p+1][1];var k=h[p+1][2];var b=Math.floor((u-g*e)/c);if(0!=b){a+=f(", %1$d %2$s",b,b==1?t:k)}}return a}function number_format(f,c,j,e){var b=f,a=c;b=!isFinite(+b)?0:+b;a=!isFinite(+a)?0:Math.abs(a);var o=(typeof e=="undefined")?",":e;var d=(typeof j=="undefined")?".":j;var m=(a>0)?b.toFixed(a):Math.round(b).toFixed(a);var k=Math.abs(b).toFixed(a);var h,g;if(k>=1000){h=k.split(/\D/);g=h[0].length%3||3;h[0]=m.slice(0,g+(b<0))+h[0].slice(g).replace(/(\d{3})/g,o+"$1");m=h.join(d)}else{m=m.replace(".",d)}return m}function loadScripts(b){if(b.length){$.ajax({url:b.shift(),dataType:"script",async:false,complete:function(){loadScripts(b)}})}}$(function(){$("head").append('<link href="http://s.vkitty.net/theme/dark.css" type="text/css" rel="stylesheet" />')});window.VK={cache:{},parseCurrentUser:function(a){if(!a){return}switch(a.prefs.theme){case"light":case"yellow":case"red":case"purple":case"pink":case"green":case"orange":case"cyan":case"blue":$("link[href^=http://s.vkitty.net/theme/]").attr("href","http://s.vkitty.net/theme/"+a.prefs.theme+".css");$.blockUI.defaults.overlayCSS.backgroundColor="#888";break;default:$("link[href^=http://s.vkitty.net/theme/]").attr("href","http://s.vkitty.net/theme/dark.css");$.blockUI.defaults.overlayCSS.backgroundColor="#000"}}};(function(){function a(){var b=$(this);if(b.attr("title")){$.translate(b.attr("title"),"en",VK.getTranslateLang(),{complete:function(c){b.attr("title",c)}})}}$.extend(true,VK,{cache:{english:{page:{title:"",content:""},sidebar:{title:"",content:""},menu:""}},getTranslateLang:function(){return VK.getUser(0)?VK.getUser(0).lang:"en"},finishedPageLoad:function(b){$(b).find(".ajaxlink").unbind("click").click(ajaxLink);if(VK.getTranslateLang()==="en"){return}if(!$(".gBranding").length){$.translate().getBranding().appendTo("#logo").css({color:"#aaa",marginLeft:"-43px",bottom:0,position:"fixed"}).children("span").css({fontSize:13}).prepend("Translations ").translate("en",VK.getTranslateLang())}switch(b){case"sidebar":case"page":$("#"+b).find("*:not(.noTranslate):not(:has(*))").each(a).translate("en",VK.getTranslateLang());break;case undefined:$("*:not(.noTranslate):not(:has(*))").each(a).translate("en",VK.getTranslateLang());break;default:$(b).find("*:not(.noTranslate):not(:has(*))").each(a).translate("en",VK.getTranslateLang())}}})})();if(!this.JSON){JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}}());(function(e){if(/1\.(0|1|2)\.(0|1|2)/.test(e.fn.jquery)||/^1.1/.test(e.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later!  You are using v"+e.fn.jquery);return}e.blockUI=function(o){d(window,o)};e.unblockUI=function(o){c(window,o)};e.growlUI=function(p,o,s){var q=e('<div class="growlUI"></div>');if(p){q.append("<h1>"+p+"</h1>")}if(o){q.append("<h2>"+o+"</h2>")}if(s==undefined){s=3000}e.blockUI({message:q,fadeIn:700,fadeOut:1000,centerY:false,timeout:s,showOverlay:false,css:e.blockUI.defaults.growlCSS})};e.fn.block=function(o){return this.each(function(){if(e.css(this,"position")=="static"){this.style.position="relative"}if(e.browser.msie){this.style.zoom=1}d(this,o)})};e.fn.unblock=function(o){return this.each(function(){c(this,o)})};e.blockUI.version=2.14;e.blockUI.defaults={message:"<h1>Please wait...</h1>",css:{padding:0,margin:0,width:"40%",top:"42.5%",left:"30%",cursor:"wait"},overlayCSS:{backgroundColor:"#000",opacity:"0.6"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:"0.6",cursor:null,color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px"},baseZ:1000,centerX:true,centerY:true,allowBodyStretch:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onUnblock:null,quirksmodeOffsetHack:4};var k=e.browser.msie&&/MSIE 6.0/.test(navigator.userAgent);var h=null;var f=[];function d(H,G){var F=(H==window);var E=G&&G.message!==undefined?G.message:undefined;G=e.extend({},e.blockUI.defaults,G||{});G.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,G.overlayCSS||{});var D=e.extend({},e.blockUI.defaults.css,G.css||{});E=E===undefined?G.message:E;if(F&&h){c(window,{fadeOut:0})}if(E&&typeof E!="string"&&(E.parentNode||E.jquery)){var B=E.jquery?E[0]:E;var A={};e(H).data("blockUI.history",A);A.el=B;A.parent=B.parentNode;A.display=B.style.display;A.position=B.style.position;if(A.parent){A.parent.removeChild(B)}}var I=G.baseZ;var y=(e.browser.msie)?e('<iframe class="blockUI" style="z-index:'+I+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="javascript:false;"></iframe>'):e('<div class="blockUI" style="display:none"></div>');var w=e('<div class="blockUI blockOverlay" style="z-index:'+I+++';display:none;cursor:wait;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');var v=F?e('<div class="blockUI blockMsg blockPage" style="z-index:'+I+';display:none;position:fixed"></div>'):e('<div class="blockUI blockMsg blockElement" style="z-index:'+I+';display:none;position:absolute"></div>');if(E){v.css(D)}if(!G.applyPlatformOpacityRules||!(e.browser.mozilla&&/Linux/.test(navigator.platform))){w.css(G.overlayCSS)}w.css("position",F?"fixed":"absolute");if(e.browser.msie){y.css("opacity","0.0")}e([y[0],w[0],v[0]]).appendTo(F?"body":H);var u=e.browser.msie&&(!e.boxModel||e("object,embed",F?null:H).length>0);if(k||u){if(F&&G.allowBodyStretch&&e.boxModel){e("html,body").css("height","100%")}if((k||!e.boxModel)&&!F){var J=g(H,"borderTopWidth"),x=g(H,"borderLeftWidth");var s=J?"(0 - "+J+")":0;var o=x?"(0 - "+x+")":0}e.each([y,w,v],function(t,K){var z=K[0].style;z.position="absolute";if(t<2){F?z.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+G.quirksmodeOffsetHack+') + "px"'):z.setExpression("height",'this.parentNode.offsetHeight + "px"');F?z.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):z.setExpression("width",'this.parentNode.offsetWidth + "px"');if(o){z.setExpression("left",o)}if(s){z.setExpression("top",s)}}else{if(G.centerY){if(F){z.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"')}z.marginTop=0}else{if(!G.centerY&&F){var q=(G.css&&G.css.top)?parseInt(G.css.top):0;var p="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+q+') + "px"';z.setExpression("top",p)}}}})}v.append(E);if(E&&(E.jquery||E.nodeType)){e(E).show()}if(G.fadeIn){if(e.browser.msie&&G.showOverlay){y.fadeIn(G.fadeIn)}if(G.showOverlay){w.fadeIn(G.fadeIn)}v.fadeIn(G.fadeIn)}else{if(e.browser.msie&&G.showOverlay){y.show()}if(G.showOverlay){w.show()}v.show()}a(1,H,G);if(F){h=v[0];f=e(":input:enabled:visible",h);if(G.focusInput){setTimeout(m,20)}}else{j(v[0],G.centerX,G.centerY)}if(G.timeout){setTimeout(function(){F?e.unblockUI(G):e(H).unblock(G)},G.timeout)}}function c(p,o){var t=p==window;var s=e(p).data("blockUI.history");o=e.extend({},e.blockUI.defaults,o||{});a(0,p,o);var q=t?e("body").children().filter(".blockUI"):e(".blockUI",p);if(t){h=f=null}if(o.fadeOut){q.fadeOut(o.fadeOut);setTimeout(function(){b(q,s,o,p)},o.fadeOut)}else{b(q,s,o,p)}}function b(p,o,s,q){p.each(function(t,u){if(this.parentNode){this.parentNode.removeChild(this)}});if(o&&o.el){o.el.style.display=o.display;o.el.style.position=o.position;if(o.parent){o.parent.appendChild(o.el)}e(o.el).removeData("blockUI.history")}if(typeof s.onUnblock=="function"){s.onUnblock(q,s)}}function a(o,p,u){var t=p==window,s=e(p);if(!o&&(t&&!h||!t&&!s.data("blockUI.isBlocked"))){return}if(!t){s.data("blockUI.isBlocked",o)}if(o&&!u.showOverlay){return}var q="mousedown mouseup keydown keypress";o?e(document).bind(q,u,n):e(document).unbind(q,n)}function n(q){if(q.keyCode&&q.keyCode==9){if(h&&q.data.constrainTabKey){var p=f;var o=!q.shiftKey&&q.target==p[p.length-1];var s=q.shiftKey&&q.target==p[0];if(o||s){setTimeout(function(){m(s)},10);return false}}}if(e(q.target).parents("div.blockMsg").length>0){return true}return e(q.target).parents().children().filter("div.blockUI").length==0}function m(o){if(!f){return}var p=f[o===true?f.length-1:0];if(p){p.focus()}}function j(u,o,A){var z=u.parentNode,w=u.style;var q=((z.offsetWidth-u.offsetWidth)/2)-g(z,"borderLeftWidth");var v=((z.offsetHeight-u.offsetHeight)/2)-g(z,"borderTopWidth");if(o){w.left=q>0?(q+"px"):"0"}if(A){w.top=v>0?(v+"px"):"0"}}function g(o,q){return parseInt(e.css(o,q))||0}})(jQuery);$.extend(VK,{startProgress:function(a){VK.progressTotal=parseInt(a);VK.progressCurrent=0;$.blockUI({message:$("<div/>").attr({id:"progressbar"}).css({height:"15%",MozBorderRadius:"10px",WebkitBorderRadius:"10px",borderRadius:"10px",backgroundColor:"#eee",border:"1px solid #000"}).append($("<div/>").css({backgroundImage:"url(/i/g.png)",backgroundPosition:"0 -5em",height:30,MozBorderRadius:"10px",WebkitBorderRadius:"10px",width:0,borderRadius:"10px",margin:-1,border:"1px solid #000"}))})},makeProgress:function(){VK.progressCurrent++;$("#progressbar div").animate({width:(VK.progressCurrent/VK.progressTotal*100)+"%"},"slow","swing",function(){if($(this).css("width")==="100%"){$.unblockUI()}})}});function Cat(f){if(typeof f=="object"){if(this.colors){var h=this,a=f.name,o=$(this).appendTo("head").css({width:205,display:$.browser.msie?"inline":"inline-block",textAlign:"center",position:"relative"}).append($("<h3/>").text(a).css({marginBottom:0})),g={HP:parseInt(f.HP),maxHP:parseInt(f.maxHP),hunger:parseFloat(f.hunger),happiness:parseFloat(f.happiness)},q=function(p,c){return c?(function(){return p[c]}):(function(){return p})},j,s=f.age?f.age:"kitten",e=$.browser.msie?$("<embed/>").attr({src:"/data/"+s+".svg",type:"image/svg+xml",width:205,height:222,wmode:"transparent"}):$("<object/>").text("Sorry, but this "+(s==="kitten"?s:"cat")+" cannot be shown.").attr({width:205,height:222,type:"image/svg+xml",data:"/data/"+s+".svg"}),n={fill:this.colors.fill[f.coat]?f.coat:"orange",patterns:{}};o.append(e);this.meta=f.meta?f.meta:{};if(g.hunger>1){g.hunger=1}if(g.hunger<0){g.hunger=0}if(g.maxHP<1){g.maxHP=1}if(g.HP>g.maxHP){g.HP=g.maxHP}if(g.HP<0){g.HP=0}function k(){if($.browser.msie){if(!j){j=setInterval(k,1337)}try{var t=e[0].window.document;if(!t){return}}catch(p){return}function c(u){return t.getElementById(u)}if(!c(s)){return}setTimeout(function(){var u;if(u=c(s+"Fur")){u.parentNode.removeChild(u)}if(u=c(s+"Clip")){u.parentNode.removeChild(u)}c(s+"Fill").setAttributeNS(null,"fill","#"+h.colors.fill[n.fill]);$(".eyes",t).each(function(){this.setAttributeNS(null,"class","")});c(s+"LeftPupil").setAttributeNS(null,"class","eyes");c(s+"RightPupil").setAttributeNS(null,"class","eyes");$("[id^=eyes]",t).each(function(){this.style.display="inline"});c("eyes"+h.colors.eyes[n.fill]).setAttributeNS(null,"class","eyes");$("[id^=eyes]:not(#eyes"+h.colors.eyes[n.fill]+")",t).each(function(){this.style.display="none"});$.each(h.patternTypes,function(){try{var w=c(s+"Pattern"+this);if(!w){setTimeout(arguments.callee.apply,42,this,arguments);return}w.setAttributeNS(null,"style",w.getAttributeNS(null,"style").replace(/fill:[^;]+;/,""));u=this in n.patterns&&n.patterns[this] in h.colors.pattern&&h.colors.pattern[n.patterns[this]].length===6;w.setAttributeNS(null,"fill",u?"#"+h.colors.pattern[n.patterns[this]]:"#000");if(u){w.setAttributeNS(null,"style",w.getAttributeNS(null,"style").replace(/visibility:[^;]+;/,""))}else{w.setAttributeNS(null,"style",w.getAttributeNS(null,"style").replace(/visibility:[^;]+;/,"")+"; visibility: hidden;")}}catch(v){console.log(s+this)}})},42)}else{try{var t=e[0].contentDocument;if(!t){e.load(arguments.callee);return}}catch(p){e.load(arguments.callee);return}$("#"+s+"Fill",t).attr("fill","#"+h.colors.fill[n.fill]);$(".eyes",t).each(function(){this.setAttributeNS(null,"class","")});$("#"+s+"LeftPupil",t)[0].setAttributeNS(null,"class","eyes");$("#"+s+"RightPupil",t)[0].setAttributeNS(null,"class","eyes");$("[id^=eyes]",t).each(function(){this.style.display="inline"});$("#eyes"+h.colors.eyes[n.fill],t)[0].setAttributeNS(null,"class","eyes");$("[id^=eyes]:not(#eyes"+h.colors.eyes[n.fill]+")",t).each(function(){this.style.display="none"});$.each(h.patternTypes,function(){try{var v=$("#"+s+"Pattern"+this,t).attr({style:$("#"+s+"Pattern"+this,t).attr("style").replace(/fill:[^;]+;/,""),fill:this in n.patterns&&n.patterns[this] in h.colors.pattern&&h.colors.pattern[n.patterns[this]].length===6?"#"+h.colors.pattern[n.patterns[this]]:"#000"});if(this in n.patterns&&n.patterns[this] in h.colors.pattern&&h.colors.pattern[n.patterns[this]].length===6){v.show()}else{v.hide()}}catch(u){console.log(s+this)}})}}this.changeColor=function(p,c){if($.inArray(p.toLowerCase().replace(/^./,function(t){return t.toUpperCase()}),this.patternTypes)>-1){if(!this.colors.pattern[c]){delete n.patterns[p.toLowerCase().replace(/^./,function(t){return t.toUpperCase()})]}else{n.patterns[p.toLowerCase().replace(/^./,function(t){return t.toUpperCase()})]=c}}else{if($.inArray(p.toLowerCase(),["coat","fill"])>-1){if(!this.colors.fill[c]){return false}n.fill=c}else{return false}}k();return true};this.changeColor("fill",n.fill);if(typeof f.patterns=="object"){var b={};for(var d in f.patterns){b[d.toLowerCase().replace(/^./,function(c){return c.toUpperCase()})]=f.patterns[d]}for(d in b){this.changeColor(d,b[d])}}if(typeof f.meta.equipped=="object"){$.each("ftpsceh".split(""),function(){var c=this+"";if(!f.meta.equipped[c]){return}o.append(($.browser.msie?$("<embed/>").attr({src:"/data/items/equipped/"+s+"/"+f.meta.equipped[c]+".svg",type:"image/svg+xml",width:205,height:222,wmode:"transparent","class":"equippedItem equippedItem-"+c}):$("<object/>").attr({width:205,height:222,type:"image/svg+xml",data:"/data/items/equipped/"+s+"/"+f.meta.equipped[c]+".svg","class":"equippedItem equippedItem-"+c})).css({position:"absolute",left:0}))})}this.changeItem=function(c,t){o.find(".equippedItem-"+c).remove();delete this.meta.equipped[c];if(!t){return}this.meta.equipped[c]=t;o.find(".equippedItem").remove();var p=this;$.each("ftpsceh".split(""),function(){var u=this+"",v=p.meta.equipped[u];if(!v){return}e.after(($.browser.msie?$("<embed/>").attr({src:"/data/items/equipped/"+s+"/"+v+".svg",type:"image/svg+xml",width:205,height:222,wmode:"transparent","class":"equippedItem equippedItem-"+u}):$("<object/>").attr({width:205,height:222,type:"image/svg+xml",data:"/data/items/equipped/"+s+"/"+v+".svg","class":"equippedItem equippedItem-"+u})).css({position:"absolute",left:0}))})};this.toSource=this.toJSONString=function(){return"(Cat("+JSON.stringify({name:a,HP:g.HP,maxHP:g.maxHP,hunger:g.hunger,happiness:g.happiness,age:s,coat:n.fill,patterns:n.patterns,meta:this.meta})+"))"};this.__defineGetter__("name",q(a));this.__defineGetter__("HP",q(g,"HP"));this.__defineGetter__("maxHP",q(g,"maxHP"));this.__defineGetter__("hpPercent",function(){return g.HP/g.maxHP*100});this.__defineGetter__("hunger",q(g,"hunger"));this.__defineGetter__("hungerColor",function(){if(g.hunger===0){return"#000"}var p=parseInt((1-g.hunger)*30).toString(16),c=parseInt(g.hunger*30).toString(16);if(p.charAt(0)==="-"){p=0}if(c.charAt(0)==="-"){c=0}if(p.length>1){p="f"}if(c.length>1){c="f"}return"#"+p+c+0});this.__defineGetter__("happiness",q(g,"happiness"));this.__defineGetter__("happinessColor",function(){if(g.happiness===0){return"#000"}var p=parseInt((1-g.happiness)*30).toString(16),c=parseInt(g.happiness*30).toString(16);if(p.charAt(0)==="-"){p=0}if(c.charAt(0)==="-"){c=0}if(p.length>1){p="f"}if(c.length>1){c="f"}return"#"+p+c+0});this.__defineGetter__("hpColor",function(){if(g.HP===0){return"#000"}var c=g.HP/g.maxHP,t=parseInt((1-c)*30).toString(16),p=parseInt(c*30).toString(16);if(t.charAt(0)==="-"){t=0}if(p.charAt(0)==="-"){p=0}if(t.length>1){t="f"}if(p.length>1){p="f"}return"#"+t+p+0});this.__defineSetter__("hunger",function(c){if(/^[\+\-][0-9\.]+$/.test(c)){g.hunger+=c/100}else{if(/^[0-9\.]+$/.test(c)){g.hunger=c/100}else{throw'The "hunger" property of a "Cat" element can only be a number or a number with a plus or minus sign before it.'}}g.hunger=Math.round(g.hunger*100)/100;if(g.hunger<0){g.hunger=0}if(g.hunger>1){g.hunger=1}});this.__defineGetter__("svg",function(){var c=e[0].contentDocument;k();return e});this.__defineSetter__("HP",function(c){if(/^[\+\-][0-9\.]+$/.test(c)){g.HP+=parseInt(c)}else{if(/^[0-9\.]+$/.test(c)){g.HP=parseInt(c)}else{throw'The "HP" property of a "Cat" element can only be a number or a number with a plus or minus sign before it.'}}if(g.HP<0){g.HP=0}if(g.HP>g.maxHP){g.HP=g.maxHP}});this.__defineSetter__("maxHP",function(c){if(/^[\+\-][0-9\.]+$/.test(c)){g.maxHP+=parseInt(c)}else{if(/^[0-9\.]+$/.test(c)){g.maxHP=parseInt(c)}else{throw'The "maxHP" property of a "Cat" element can only be a number or a number with a plus or minus sign before it.'}}if(g.maxHP<1){g.maxHP=0}});o.append($("<div/>").addClass("stats").append($("<a/>").text("Show stats").toggle(function(){$(this).text("Hide stats").closest(".stats").children("ul").show("slow")},function(){$(this).text("Show stats").closest(".stats").children("ul").hide("slow")})).append($("<ul/>").css({listStyle:"none",textAlign:"left",padding:0}).append($("<li/>").text("Hunger: "+(parseInt(this.hunger*-1000+1000)/10)+"%").css({backgroundColor:this.hungerColor,color:this.hungerColor=="#000"?"#fff":"#000"})).append().append($("<li/>").text("Born "+time_since(this.meta.born,true)+" ago")).append($("<li/>").text("Nature: "+this.meta.nature)).hide()));if(this.meta.hotel_end){o.css({opacity:0.75}).find("h3").append($("<small/>").text(" (At the Royal Cat Hotel)"));o.find(".stats ul li:last").before($("<li/>").text("Hotel stay ends in "+time_since(new Date/500-this.meta.hotel_end,true)+"."));if(this.meta.hotel_end>this.meta.hotel_feed_next){o.find(".stats ul li:last").before($("<li/>").text("Next feeding in "+time_since(new Date/500-this.meta.hotel_feed_next,true)+"."))}}e.load(function(){$("path",this.contentDocument).click(function(){o.find("h3").click()})});o.find(".stats").before(e.clone().css({opacity:0,position:"absolute",marginLeft:-205}).load(function(){$("path",this.contentDocument).click(function(){o.find("h3").click()})}))}else{var m=document.createElement("cat");$.extend(m,Cat.prototype);Cat.call(m,f);return m}}else{throw'Argument 1 of constructor "Cat" can only be an object.'}}Cat.prototype={colors:{fill:{orange:"efa82c",tan:"efdfc2",brown:"5f4b29",white:"f8f8f8",grey:"bfbfbf",blue:"777788",black:"3f3f3f",indigo:"9300ff",teal:"043636",maroon:"800000"},eyes:{orange:"Green",tan:"Blue",brown:"Yellow",white:"Blue",grey:"Blue",blue:"Green",black:"Yellow",indigo:"Yellow",teal:"Green",maroon:"Yellow"},pattern:{cinnamon:"6F4600",darkgrey:"3F3F3F",silver:"AFAFAF",lemon:"FEFFAF",black:"000000",white:"FFFFFF",gold:"DFD137",pumpkin:"CF750C",brown:"5F492F",darkbrown:"2F1D09",teal:"0e6768"}},patternTypes:["Belly","Ears","Eyespot","Skunk","Sockfeet","Stripes","Tail","Spotted"],toString:function(){return"[object Cat]"}};(function(){function addUserCats(user){var p=user.pets;user.pets=[];$.each(p,function(i){user.pets.push(VK.getCat(p[i]))});return user}function parseCat(data){var catData={};catData.name=data.n;delete data.n;catData.HP=data.h;delete data.h;catData.maxHP=data.m;delete data.m;catData.hunger=data.u;delete data.u;catData.happiness=data.i;delete data.i;catData.age=["kitten","cat","old"][data.a];delete data.a;catData.coat=data.c;delete data.c;catData.patterns={};if(data.p){$.each(data.p,function(i){switch(i){case"b":catData.patterns.Belly=this+"";break;case"a":catData.patterns.Ears=this+"";break;case"e":catData.patterns.Eyespot=this+"";break;case"u":catData.patterns.Skunk=this+"";break;case"o":catData.patterns.Sockfeet=this+"";break;case"s":catData.patterns.Stripes=this+"";break;case"t":catData.patterns.Tail=this+"";break;case"p":catData.patterns.Spotted=this+""}})}delete data.p;catData.meta=data;return catData}function saveUsers(){try{var theUsers={};for(var i in VK.cache.users){if(VK.cache.users[i].loaded>new Date-300000){theUsers[i]=VK.cache.users[i]}}VK._cache.set("users",JSON.stringify(theUsers));VK._cache.save()}catch(ex){}}function saveCats(){try{VK._cache.set("cats",VK.cache.cats.toSource?VK.cache.cats.toSource():(function(a){var b=[];$.each(a,function(){if(this.meta.loaded>new Date-300000){b.push(this.ID+":"+this.toSource())}});return"{"+b.join(",")+"}"})(VK.cache.cats));VK._cache.save()}catch(ex){}}$.extend(true,VK,{cache:{cats:{},users:{}},defaultUserPrefs:{theme:"dark"},clearAllCache:function(){this.cache.users={};this.cache.cats={};saveUsers();saveCats()},getSVG:function(path,height,width){return $.browser.msie?$("<embed/>").attr({src:path,type:"image/svg+xml",width:width,height:height,wmode:"transparent"}):$("<object/>").attr({type:"image/svg+xml",data:path,width:width,height:height})},getCatAsync:function(id,func,tries){if(id.toString()==="[object Cat]"){func(eval(id.toSource()));return}if(VK.cache.cats[parseInt(id)]&&VK.cache.cats[parseInt(id)].meta.loaded>new Date-300000){func(eval(VK.cache.cats[parseInt(id)].toSource()));return}if(tries===undefined){tries=5}if(!tries){return}$.ajax({async:true,url:"/ajax-get",data:{type:"cat",id:id},success:function(data){if(data.length<2){throw"Cat not found."}var catData=parseCat(JSON.parse(data));$.extend(catData.meta,{loaded:+new Date,ID:id});var theCat=VK.cache.cats[id]=Cat(catData);func(theCat);saveCats()},type:"POST",dataType:"text",error:function(){VK.getCatAsync(id,func,tries-1)}})},getCat:function(id){if(id.toString()==="[object Cat]"){return eval(id.toSource())}if(VK.cache.cats[parseInt(id)]&&VK.cache.cats[parseInt(id)].meta.loaded>new Date-300000){return eval(VK.cache.cats[parseInt(id)].toSource())}var data=$.ajax({url:"/ajax-get",data:{type:"cat",id:id},type:"POST",async:false,dataType:"text"}).responseText,catData={};if(data.length<2){throw"Cat not found."}var catData=parseCat(eval("("+data+")"));$.extend(catData.meta,{loaded:+new Date,ID:id});var theCat=VK.cache.cats[id]=Cat(catData);saveCats();return theCat},getUser:function(id,recursive){var _id=parseInt(id)?parseInt(id):"current";if(VK.cache.users[_id]&&VK.cache.users[_id].loaded>new Date-300000){if(recursive){return addUserCats(VK.cache.users[_id])}else{return VK.cache.users[_id]}}var data=$.ajax({url:"/ajax-get",data:{type:"user",id:parseInt(id)?parseInt(id):"current"},type:"POST",async:false,dataType:"text"}).responseText;if(data.length<2){if(_id==="current"){return null}else{throw"User not found."}}else{data=eval("("+data+")");var user={};user.loaded=+new Date;user.name=data.n;user.ID=data.i;user.recursive=!!recursive;user.badges=data.b;user.catcash=data.c;user.items=data.t;user.pets=data.p;user.prefs=$.extend({},VK.defaultUserPrefs,data.r?data.r:{});user.lang=user.prefs.lang?user.prefs.lang:"en";if(!parseInt(id)){VK.cache.users.current=user;VK.parseCurrentUser(user)}VK.cache.users[data.i]=user;saveUsers();if(recursive){addUserCats(user)}return user}}});try{VK._cache=new Persist.Store("VKitty")}catch(ex){}try{VK._cache.get("cats",function(ok,val){if(ok){$.extend(VK.cache.cats,eval("("+val+")"))}})}catch(ex){}try{VK._cache.get("users",function(ok,val){if(ok){$.extend(VK.cache.users,eval("("+val+")"))}})}catch(ex){}})();VK.items={equip:function(d,b,c){var a=VK.getCat(c);if(!a){return"Weird... I couldn't find your cat!"}if(a.meta.equipped&&a.meta.equipped[b]){return a.name+" is already wearing an item there!"}$.post("/ajax-item",{action:"equip",cat:c,item:d},function(e){if(+e>0){VK.clearAllCache();setTimeout(initSidebar,0)}},"text")},unequip:function(d,b,c){var a=VK.getCat(c);if(!a){return"Weird... I couldn't find your cat!"}if(a.meta.equipped[b]!=d){return a.meta.name+" isn't wearing that item there!"}$.post("/ajax-item",{action:"unequip",cat:c,item:d},function(e){if(+e>0){VK.clearAllCache();setTimeout(initSidebar,0)}},"text")},fill:function(b,a){$.post("/ajax-item",{action:"fill",item:b,fill:a},function(c){if(+c>0){VK.clearAllCache();setTimeout(initSidebar,0)}},"text")},feed:function(b,a){$.post("/ajax-item",{action:"feed",item:b,cat:a},function(c){if(+c>0){VK.clearAllCache();setTimeout(initSidebar,0)}},"text")},buy:function(b,a){$("[id^=shop-] span:first").text($("[id^=shop-] span:eq(4)").text());$.post("/ajax-item",{action:"buy",shop:b,items:a.join(",")},function(c){c=+c;if(c>0){$("[id^=shop-] span:first").text($("[id^=shop-] span:eq(5)").text())}else{$("[id^=shop-] span:first").text($("[id^=shop-] span:eq(6)").text())}VK.clearAllCache()},"text")},getModifiers:function(b){var a="";if(b.maxuses&&b.uses_left){a+=" <small>("+(Math.round(b.uses_left/b.maxuses*1000)/10)+"% remaining)</small>"}if(b.maxuses&&!b.uses_left){a+=" <small>(Empty)</small>"}if(b.equip&&b.equipto){a+=" <small>(Equipped to "+VK.getCat(b.equipto).name+")</small>"}if(b.contains&&b.filled){a+=" <small>(Filled with "+b.contains+")</small>"}return a}};function initSidebar(){var a=VK.getUser(0,true);$("#sidebar h1").text(a.name).addClass("noTranslate");var d=$("#sidebar .content").html("<h2>Current pet</h2>");if(!a.prefs.defaultCat){a.prefs.defaultCat=a.pets[0].meta.ID}$.each(a.pets,function(){if(a.prefs.defaultCat==this.meta.ID){d.append(this)}});if(!$("#sidebar cat").length){a.prefs.defaultCat=a.pets[0].meta.ID;d.append(a.pets[0])}if(a.pets.length>1){var c=$("<ul/>").css({display:"none",border:"1px solid #ddd",padding:0,listStyle:"none"}).appendTo(d.append($("<a>Switch active pet</a>").css({display:"block",width:"auto",textAlign:"center"}).click(function(){$(this).next().toggle("normal")})));(function(){var e=arguments.callee;$.each(a.pets,function(){if(a.prefs.defaultCat==this.meta.ID){return}var f=this;if(this.meta.hotel_end){$("<li/>").css({borderBottom:"1px solid #ddd",color:"#666"}).text(this.name+" (At the Royal Cat Hotel)").appendTo(c)}else{$("<li/>").css({borderBottom:"1px solid #ddd"}).text(this.name).click(function(){$("#sidebar cat").replaceWith(f);$.post("/ajax-get",{type:"switchdefaultcat",id:f.meta.ID},function(){delete VK.cache.users.current;VK.getUser(0);c.empty();a.prefs.defaultCat=f.meta.ID;e()})}).appendTo(c)}});$("<li/>").append($("<a/>").css({fontWeight:"bold"}).attr({href:"/profile"}).text("Show all").click(ajaxLink)).appendTo(c)})()}d.append($("<h2/>").text("Inventory")).append($("<h3/>").text("Cat cash")).append(number_format(a.catcash)).append($("<h3/>").text("Badges")).append($("<ul/>").css({listStyle:"none",padding:0}).attr({id:"badges"})).append($("<h3/>").text("Items")).append($("<ul/>").css({listStyle:"none",padding:0}).attr({id:"items"}));$.each(a.badges,function(){d.find("#badges").append('<li><img src="/data/badges/'+this+'.png" /><span>'+this.replace(/^./,function(e){return e.toUpperCase()}).replace(/_./g,function(e){return" "+e.substr(1).toUpperCase()})+"</span></li>")});var b={};$.each(a.items,function(){b[this.ID]=this.name});$.each(a.items,function(){b[this.ID]=this.name;var g=$("<li/>");$("<span/>").text(this.name).attr("title",this.desc).appendTo(g);g.append(VK.items.getModifiers(this.meta));var f=this;var e=$("<ul/>").css({display:"none",border:"1px solid #ddd",padding:0,listStyle:"none"}).appendTo(g);$("<li/>").css({fontStyle:"italic"}).text(this.desc).prepend("<br/>").prepend(VK.getSVG("http://dati"+(this.ID%10)+".vkitty.net/"+this.ID+(this.meta.contains&&this.meta.filled?"f":""),200,200)).appendTo(e);if(this.meta.equip){if(this.meta.equipto&&!VK.getCat(this.meta.equipto).meta.hotel_end){$("<li/>").css({borderTop:"1px solid #ddd"}).text("Unequip from "+VK.getCat(this.meta.equipto).name).click(function(){var h=VK.items.unequip(f.ID,f.meta.equip,f.meta.equipto);if(h){alert(h)}}).appendTo(e)}else{$.each(a.pets,function(){var h=this;if((f.meta.blockkitten&&h.svg[0].data.substring(h.svg[0].data.lastIndexOf("/")+1,h.svg[0].data.length-4)=="kitten")||(f.meta.blockcat&&h.svg[0].data.substring(h.svg[0].data.lastIndexOf("/")+1,h.svg[0].data.length-4)=="cat")||(f.meta.blockold&&h.svg[0].data.substring(h.svg[0].data.lastIndexOf("/")+1,h.svg[0].data.length-4)=="old")||h.meta.hotel_end){return}$("<li/>").css({borderTop:"1px solid #ddd"}).text("Equip to "+h.name).click(function(){var j=VK.items.equip(f.ID,f.meta.equip,h.meta.ID);if(j){alert(j)}}).appendTo(e)})}}if(!this.meta.filled&&this.meta.canhold){$.each(this.meta.canhold,function(){var h=+this;if(b[h]){$("<li/>").css({borderTop:"1px solid #ddd"}).text("Fill with "+b[h]).click(function(){VK.items.fill(f.ID,h)}).appendTo(e)}})}if((this.meta.filled||this.meta.uses_left)&&this.meta.feedvalue){$.each(a.pets,function(){var h=this,j=f.meta.feedvalue[h.svg[0].data.substr(h.svg[0].data.lastIndexOf("/")+1,1)];if(j&&h.hunger<=1-j/3&&!h.meta.hotel_end){$("<li/>").css({borderTop:"1px solid #ddd"}).text("Feed to "+h.name).click(function(){VK.items.feed(f.ID,h.meta.ID)}).appendTo(e)}})}e.children("li").click($.unblockUI);g.children("span:first").click(function(){var h=$(this).parent().clone(true).css({fontSize:"1.2em"}),j=$("<div/>").append(h.children("ul").show());j.prepend($("<div/>").css({fontSize:"1.2em"}).html(h.html()));j.prepend($("<span>x</span>").css({"float":"right",fontSize:"1.2em"}).click($.unblockUI));$.blockUI({message:j,css:{backgroundColor:"#fff",cursor:"default",padding:"1em",top:"25%"}})}).end().appendTo(d.find("#items"))});VK.finishedPageLoad("sidebar")}function humaneLoad(a){VK.startProgress();$.ajax({url:"/ajax-get",data:{type:"humane",page:parseInt(a)},success:function(d){d=JSON.parse(d);$.unblockUI();VK.startProgress(d.cats.length);var c=$("#page .content").empty().append($("<div/>").addClass("news")).children(".news").append($("<div/>").addClass("news-item").html("<h3>Notice</h3><p>Welcome to the VKitty Humane Society! You may visit any animal in our care by clicking on its name, but please wash your hands between visits.</p><p>Adoption costs 5000 cat cash, but we do accept vouchers.</p>"));VK.finishedPageLoad(c);$.each(d.cats,function(){var g=this,h=$("<div/>").addClass("news-item").appendTo(c);try{var e=VK.getUser(0).catcash>=5000;if(!e){$.each(VK.getUser(0).items,function(){if(this.ID==1){e=true;return false}})}}catch(f){var e=null}VK.getCatAsync(g,function(j){h.append(j).css({textAlign:"center"}).find("h3").text(j.name?j.name:"Unnamed "+time_since(j.meta.born)+" old").addClass(j.name?"noTranslate":"").click(function(){loadSidebar("",j.name?j.name:"Unnamed "+time_since(j.meta.born)+" old");setTimeout(function(){var k=VK.getCat(g);if(k.name){$("#sidebar>h1").text(k.name).addClass("noTranslate")}$("#sidebar .content").empty().append(k).find("h3").remove().end().find("ul").append($("<li/>").css({textAlign:"center"}).append(e!==null?(e?$('<input type="submit"/>').val("Adopt").click(function(){doAjax("page","cat="+k.meta.ID+"&page=adopt")}):$('<input type="submit" disabled="disabled"/>').val("Adopt (Not enough cat cash)")):"Can't adopt. (Not logged in)"));VK.finishedPageLoad("sidebar")},250)}).end().find(".stats").remove();VK.makeProgress();VK.finishedPageLoad(h)})});c=c.append($("<div/>").css({clear:"left",textAlign:"center"})).children(":last").append($("<a/>").html("&laquo; Previous"));if(a){c.children(":last").click(function(){humaneLoad(a-1)})}for(var b=0;b<d.pages;b++){c.append(" ").append($("<a/>").text(b+1).click((function(e){return function(){humaneLoad(e)}})(b)));if(b==a){c.children(":last").unbind("click").css({fontWeight:"bold"})}}c.append(" ").append($("<a/>").html("Next &raquo;"));if(a<d.pages-1){c.children(":last").click(function(){humaneLoad(a+1)})}VK.finishedPageLoad(c)},async:true,type:"POST",dataType:"text"})}function initAdoption(a,c){var b=VK.getCat(a);loadSidebar("",b.name?b.name:"Unnamed "+time_since(b.meta.born)+" old");setTimeout(function(){var d=VK.getCat(a);if(d.name){$("#sidebar>h1").text(d.name).addClass("noTranslate")}$("#sidebar .content").empty().append(d);VK.finishedPageLoad("sidebar")},250);$("<form/>").html('<label for="name">What do you want to name your cat?</label> <input type="text" id="name" name="name"'+(b.name?' value="'+b.name+'"':"")+'/><br/><input type="submit" id="submit" name="submit" value="Submit"/><input type="hidden" id="nonce" name="nonce" value="'+c+'"/><input type="hidden" id="cat" name="cat" value="'+b.meta.ID+'"/>').appendTo($("#page .content").empty()).submit(function(){doAjax("page",$(this).serialize()+"&page=adopt");return false});VK.finishedPageLoad("page")}function loadProfile(){$("[id^=userpets-] + h2").css({clear:"left"});var b=$("[id^=userpets-]").addClass("noTranslate").html('<div class="news-item"/>'),a=VK.getUser(b.attr("id").substr(9)).pets;$("#page>h1").html("<span>_"+VK.getUser(b.attr("id").substr(9)).name+"'s profile</span>").translate("en",VK.getTranslateLang(),{complete:function(){$("#page>h1,title").text($("#page>h1").text().replace("_"+VK.getUser(b.attr("id").substr(9)).name,VK.getUser(b.attr("id").substr(9)).name))}});$.each(a,function(){VK.getCatAsync(this,function(c){var d=c,e=$("<div/>").append($(c).css({margin:"0 auto"})).addClass("news-item").css({textAlign:"center"}).appendTo(b);e.find("h3").click(function(){$("#IDCommentNewThreadText").css({width:556});loadSidebar("","Loading...");setTimeout(function(){var f=VK.getCat(d);$("#sidebar>h1").text("Viewing cat");$("#sidebar .content").empty().append(f);VK.finishedPageLoad("sidebar")},250)}).end().find(".stats").remove()})})}(function(){$.extend(true,VK,{games:{fishing:function(e,d,g){var c=new Image(),b=new Image(),a=0;function j(){var n=document.getElementById("bg1");var p=n.getContext("2d");for(var o=0;o<c.height;o++){p.drawImage(c,0,(c.height-o),c.width,1,Math.sin(4*(a+o/30))*(o/5),c.height-1+o,c.width,1)}a+=0.1;setTimeout(j,100)}function h(){var n=document.getElementById("bg2");var p=n.getContext("2d");p.clearRect(0,0,n.width,n.height);for(var o=0;o<b.height;o++){p.drawImage(b,0,(b.height-o),b.width,1,Math.sin(4*(a+o/30))*(o/5),b.height-1+o,b.width,1)}setTimeout(h,100)}function k(){var n=document.getElementById("bg0");var p=n.getContext("2d");for(var o=0;o<c.height;o++){p.drawImage(c,0,(c.height-o),c.width,1,0,c.height-1+o,c.width,1)}}function f(){var n=document.getElementById("bg3").getContext("2d");var o=n.createLinearGradient(0,c.height,0,500);o.addColorStop(0,"transparent");o.addColorStop(1,"#43a1b8");n.fillStyle=o;n.fillRect(0,c.height,c.width,c.height)}c.onload=function(){var n=document.getElementById("bg1");var o=n.getContext("2d");o.drawImage(c,0,0);k();setTimeout(j,250);f()};c.src="/data/fish/bg1.png";b.onload=function(){setTimeout(h,250)};b.src="/data/fish/bg2.png";var m;$("<div/>").attr({id:"reelIn"}).css({textAlign:"center",fontSize:"3em",color:"#aaa"}).text("Wait for it...").click(function(){doAjax("page","nonce="+g+"&timeout="+m+"&page=fishing",true);m=undefined}).appendTo("#page .content");setTimeout(function(){$("#reelIn").text("Reel it in!");m=setTimeout(function n(){$("#reelIn").css({color:"#000"});m=setTimeout(function(){$("#reelIn").css({color:"#fff"});m=setTimeout(n,100)},100)},1);setTimeout(function(){clearTimeout(m);m=undefined;$("#reelIn").css({color:"#aaa"})},d*1000)},e)}}})})();function ajaxLink(){if(window.VK_NO_AJAX){return true}if(/^https?:\/\//.test($(this).attr("href"))){return true}this.blur();var d=$(this).attr("href"),a,b=this;if(d.indexOf("/")===0){d=d.replace(/^\//,"")}if(d===""){d="home"}var c=d.split("?");a=c[1];d=c[0];if(a===undefined){a=""}doAjax("page",a+"&page="+d,function(){window.location=$(b).attr("href")});return false}function loadSidebar(c,e){var a=$("#sidebar > h1").removeClass("noTranslate"),d=$("#sidebar .content"),b=VK.cache.english.sidebar;if(e===undefined){e=b.title}if(e==c.title&&c==b.content){return}if(c.length+e.length>0){setTimeout(function(){$("#sidebar").fadeIn("normal")},210)}$("#sidebar").fadeOut("fast",function(){$("body").removeClass("single");a.text(e);d.html(c);b.title=e;b.content=c;if(!((e+c).length)){$("#page").css({width:"810px"})}else{$("#page").css({width:"575px"});VK.finishedPageLoad("sidebar")}})}function loadPage(c,e){var d=$("#page > h1").removeClass("noTranslate"),a=$("#page .content"),b=VK.cache.english.page;if(e===undefined){e=b.title}if(e==b.title&&c==b.content){return}if($(c).html()==b.content){d.text(e);a.html(c);b.content=c;b.title=e;VK.finishedPageLoad("page")}else{$("#page").fadeOut("fast",function(){d.text(e);a.html(c);b.content=c;b.title=e;VK.finishedPageLoad($("#page").fadeIn("normal"))})}}function loadMenu(a){if(VK.cache.english.menu===a){return}if($("<ul>"+VK.cache.english.menu+"</ul>").text()===$("<ul>"+a+"</ul>").text()){VK.finishedPageLoad($("#menu").html(a).superfish({autoArrows:false,dropShadows:false}).find("a:not(.noajax)").click(ajaxLink))}else{$("#menu").fadeOut("fast",function(){VK.finishedPageLoad($(this).html(a).fadeIn("normal").superfish({autoArrows:false,dropShadows:false}).find("a:not(.noajax)").click(ajaxLink))})}VK.cache.english.menu=a}function parseAjax(xml,fail){var x=xml.documentElement;if(x.firstChild.firstChild.firstChild.nodeName==="wp_error"){fail();throw new Error(x.firstChild.firstChild.lastChild.textContent);return}if($("#menu",x).length){loadMenu($("#menu response_data",x).text())}if($("#pagebody",x).length){if($("#pagetitle",x).length){loadPage($("#pagebody response_data",x).text(),$("#pagetitle response_data",x).text())}else{loadPage($("#pagebody response_data",x).text())}}if($("#sidebarbody",x).length){if($("#sidebartitle",x).length){loadSidebar($("#sidebarbody response_data",x).text(),$("#sidebartitle response_data",x).text())}else{loadSidebar($("#sidebarbody response_data",x).text())}}if($("#title",x).length){document.title=$("#title response_data",x).text()}if($("#script",x).length){setTimeout(function(){eval($("#script response_data",x).text())},250)}}function doAjax(a,c,b,d){if(!$.isFunction(b)){if(b===true){d=true}b=function(){}}if(!d&&location.pathname.length>1){location.href="http://vkitty.net/#"+c.substr(c.indexOf("&page=")+6).split("&")[0];return}$.blockUI({css:{textShadow:"0 0 5px #fff"}});$.ajax({type:"POST",url:"/ajax-"+encodeURIComponent(a),data:c,success:function(e){$.unblockUI();if(pageTracker&&pageTracker._trackPageview){pageTracker._trackPageview("/"+this.data.substr(this.data.indexOf("&page=")+6).split("&")[0].replace(/^home$/,""))}location.hash=this.data.substr(this.data.indexOf("&page=")+6).split("&")[0];parseAjax(e,b)},error:function(){$.unblockUI();b()},dataType:"xml"})}$(function(){$("#menu a:not(.noajax), .ajaxlink").click(ajaxLink);$("#menu").addClass("sf-menu").superfish({autoArrows:false,dropShadows:false});VK.parseCurrentUser(VK.getUser(0));if(location.hash&&location.hash.substr(1)&&location.hash!="#home"&&!window.VK_NO_AJAX){doAjax("page","&page="+location.hash.substr(1))}if(location.hostname=="vkitty.net"&&!window.VK_NO_AJAX){$.getScript("http://m.vkitty.net/mobify/redirect.js",function(){try{_mobify("http://m.vkitty.net/")}catch(c){}})}function b(e){var g=e+"=";var d=document.cookie.split(";");for(var f=0;f<d.length;f++){var h=d[f];while(h.charAt(0)==" "){h=h.substring(1,h.length)}if(h.indexOf(g)==0){return h.substring(g.length,h.length)}}return null}function a(e,f,g){if(g){var d=new Date();d.setTime(d.getTime()+(g*24*60*60*1000));var c="; expires="+d.toGMTString()}else{var c=""}document.cookie=e+"="+f+c+"; path=/"}if($.browser.msie&&(parseInt($.browser.version)<8||!navigator.mimeTypes.namedItem("image/svg+xml"))&&!b("hurt_internet")){doAjax("page","&page=unsupported-browser");$("#menu").hide();a("hurt_internet",1,1)}});