/*
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
(function(){var m=this,g,B=m.jQuery,q=m.$,p=m.jQuery=m.$=function(H,I){return new p.fn.init(H,I)},G=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;p.fn=p.prototype={init:function(H,K){H=H||document;if(H.nodeType){this[0]=H;this.length=1;this.context=H;return this}if(typeof H==="string"){var J=G.exec(H);if(J&&(J[1]||!K)){if(J[1]){H=p.clean([J[1]],K)}else{var L=document.getElementById(J[3]);if(L&&L.id!=J[3]){return p().find(H)}var I=p(L||[]);I.context=document;I.selector=H;return I}}else{return p(K).find(H)}}else{if(p.isFunction(H)){return p(document).ready(H)}}if(H.selector&&H.context){this.selector=H.selector;this.context=H.context}return this.setArray(p.isArray(H)?H:p.makeArray(H))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(H){return H===g?Array.prototype.slice.call(this):this[H]},pushStack:function(I,K,H){var J=p(I);J.prevObject=this;J.context=this.context;if(K==="find"){J.selector=this.selector+(this.selector?" ":"")+H}else{if(K){J.selector=this.selector+"."+K+"("+H+")"}}return J},setArray:function(H){this.length=0;Array.prototype.push.apply(this,H);return this},each:function(I,H){return p.each(this,I,H)},index:function(H){return p.inArray(H&&H.jquery?H[0]:H,this)},attr:function(I,K,J){var H=I;if(typeof I==="string"){if(K===g){return this[0]&&p[J||"attr"](this[0],I)}else{H={};H[I]=K}}return this.each(function(L){for(I in H){p.attr(J?this.style:this,I,p.prop(this,H[I],J,L,I))}})},css:function(H,I){if((H=="width"||H=="height")&&parseFloat(I)<0){I=g}return this.attr(H,I,"curCSS")},text:function(I){if(typeof I!=="object"&&I!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(I))}var H="";p.each(I||this,function(){p.each(this.childNodes,function(){if(this.nodeType!=8){H+=this.nodeType!=1?this.nodeValue:p.fn.text([this])}})});return H},wrapAll:function(H){if(this[0]){var I=p(H,this[0].ownerDocument).clone();if(this[0].parentNode){I.insertBefore(this[0])}I.map(function(){var J=this;while(J.firstChild){J=J.firstChild}return J}).append(this)}return this},wrapInner:function(H){return this.each(function(){p(this).contents().wrapAll(H)})},wrap:function(H){return this.each(function(){p(this).wrapAll(H)})},append:function(){return this.domManip(arguments,true,function(H){if(this.nodeType==1){this.appendChild(H)}})},prepend:function(){return this.domManip(arguments,true,function(H){if(this.nodeType==1){this.insertBefore(H,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(H){this.parentNode.insertBefore(H,this)})},after:function(){return this.domManip(arguments,false,function(H){this.parentNode.insertBefore(H,this.nextSibling)})},end:function(){return this.prevObject||p([])},push:[].push,sort:[].sort,splice:[].splice,find:function(H){if(this.length===1){var I=this.pushStack([],"find",H);I.length=0;p.find(H,this[0],I);return I}else{return this.pushStack(p.unique(p.map(this,function(J){return p.find(H,J)})),"find",H)}},clone:function(J){var H=this.map(function(){if(!p.support.noCloneEvent&&!p.isXMLDoc(this)){var L=this.outerHTML;if(!L){var M=this.ownerDocument.createElement("div");M.appendChild(this.cloneNode(true));L=M.innerHTML}return p.clean([L.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(J===true){var K=this.find("*").andSelf(),I=0;H.find("*").andSelf().each(function(){if(this.nodeName!==K[I].nodeName){return}var L=p.data(K[I],"events");for(var N in L){for(var M in L[N]){p.event.add(this,N,L[N][M],L[N][M].data)}}I++})}return H},filter:function(H){return this.pushStack(p.isFunction(H)&&p.grep(this,function(J,I){return H.call(J,I)})||p.multiFilter(H,p.grep(this,function(I){return I.nodeType===1})),"filter",H)},closest:function(H){var J=p.expr.match.POS.test(H)?p(H):null,I=0;return this.map(function(){var K=this;while(K&&K.ownerDocument){if(J?J.index(K)>-1:p(K).is(H)){p.data(K,"closest",I);return K}K=K.parentNode;I++}})},not:function(H){if(typeof H==="string"){if(f.test(H)){return this.pushStack(p.multiFilter(H,this,true),"not",H)}else{H=p.multiFilter(H,this)}}var I=H.length&&H[H.length-1]!==g&&!H.nodeType;return this.filter(function(){return I?p.inArray(this,H)<0:this!=H})},add:function(H){return this.pushStack(p.unique(p.merge(this.get(),typeof H==="string"?p(H):p.makeArray(H))))},is:function(H){return !!H&&p.multiFilter(H,this).length>0},hasClass:function(H){return !!H&&this.is("."+H)},val:function(N){if(N===g){var H=this[0];if(H){if(p.nodeName(H,"option")){return(H.attributes.value||{}).specified?H.value:H.text}if(p.nodeName(H,"select")){var L=H.selectedIndex,O=[],P=H.options,K=H.type=="select-one";if(L<0){return null}for(var I=K?L:0,M=K?L+1:P.length;I<M;I++){var J=P[I];if(J.selected){N=p(J).val();if(K){return N}O.push(N)}}return O}return(H.value||"").replace(/\r/g,"")}return g}if(typeof N==="number"){N+=""}return this.each(function(){if(this.nodeType!=1){return}if(p.isArray(N)&&/radio|checkbox/.test(this.type)){this.checked=(p.inArray(this.value,N)>=0||p.inArray(this.name,N)>=0)}else{if(p.nodeName(this,"select")){var Q=p.makeArray(N);p("option",this).each(function(){this.selected=(p.inArray(this.value,Q)>=0||p.inArray(this.text,Q)>=0)});if(!Q.length){this.selectedIndex=-1}}else{this.value=N}}})},html:function(H){return H===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(H)},replaceWith:function(H){return this.after(H).remove()},eq:function(H){return this.slice(H,+H+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(H){return this.pushStack(p.map(this,function(J,I){return H.call(J,I,J)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(M,P,O){if(this[0]){var L=(this[0].ownerDocument||this[0]).createDocumentFragment(),I=p.clean(M,(this[0].ownerDocument||this[0]),L),K=L.firstChild;if(K){for(var J=0,H=this.length;J<H;J++){O.call(N(this[J],K),this.length>1||J>0?L.cloneNode(true):L)}}if(I){p.each(I,C)}}return this;function N(Q,R){return P&&p.nodeName(Q,"table")&&p.nodeName(R,"tr")?(Q.getElementsByTagName("tbody")[0]||Q.appendChild(Q.ownerDocument.createElement("tbody"))):Q}}};p.fn.init.prototype=p.fn;function C(H,I){if(I.src){p.ajax({url:I.src,async:false,dataType:"script"})}else{p.globalEval(I.text||I.textContent||I.innerHTML||"")}if(I.parentNode){I.parentNode.removeChild(I)}}function e(){return +new Date}p.extend=p.fn.extend=function(){var M=arguments[0]||{},K=1,L=arguments.length,H=false,J;if(typeof M==="boolean"){H=M;M=arguments[1]||{};K=2}if(typeof M!=="object"&&!p.isFunction(M)){M={}}if(L==K){M=this;--K}for(;K<L;K++){if((J=arguments[K])!=null){for(var I in J){var N=M[I],O=J[I];if(M===O){continue}if(H&&O&&typeof O==="object"&&!O.nodeType){M[I]=p.extend(H,N||(O.length!=null?[]:{}),O)}else{if(O!==g){M[I]=O}}}}}return M};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,r=document.defaultView||{},t=Object.prototype.toString;p.extend({noConflict:function(H){m.$=q;if(H){m.jQuery=B}return p},isFunction:function(H){return t.call(H)==="[object Function]"},isArray:function(H){return t.call(H)==="[object Array]"},isXMLDoc:function(H){return H.nodeType===9&&H.documentElement.nodeName!=="HTML"||!!H.ownerDocument&&p.isXMLDoc(H.ownerDocument)},globalEval:function(J){if(J&&/\S/.test(J)){var I=document.getElementsByTagName("head")[0]||document.documentElement,H=document.createElement("script");H.type="text/javascript";if(p.support.scriptEval){H.appendChild(document.createTextNode(J))}else{H.text=J}I.insertBefore(H,I.firstChild);I.removeChild(H)}},nodeName:function(I,H){return I.nodeName&&I.nodeName.toUpperCase()==H.toUpperCase()},each:function(J,N,I){var H,K=0,L=J.length;if(I){if(L===g){for(H in J){if(N.apply(J[H],I)===false){break}}}else{for(;K<L;){if(N.apply(J[K++],I)===false){break}}}}else{if(L===g){for(H in J){if(N.call(J[H],H,J[H])===false){break}}}else{for(var M=J[0];K<L&&N.call(M,K,M)!==false;M=J[++K]){}}}return J},prop:function(K,L,J,I,H){if(p.isFunction(L)){L=L.call(K,I)}return typeof L==="number"&&J=="curCSS"&&!b.test(H)?L+"px":L},className:{add:function(H,I){p.each((I||"").split(/\s+/),function(J,K){if(H.nodeType==1&&!p.className.has(H.className,K)){H.className+=(H.className?" ":"")+K}})},remove:function(H,I){if(H.nodeType==1){H.className=I!==g?p.grep(H.className.split(/\s+/),function(J){return !p.className.has(I,J)}).join(" "):""}},has:function(I,H){return I&&p.inArray(H,(I.className||I).toString().split(/\s+/))>-1}},swap:function(K,J,L){var H={};for(var I in J){H[I]=K.style[I];K.style[I]=J[I]}L.call(K);for(var I in J){K.style[I]=H[I]}},css:function(K,I,M,H){if(I=="width"||I=="height"){var O,J={position:"absolute",visibility:"hidden",display:"block"},N=I=="width"?["Left","Right"]:["Top","Bottom"];function L(){O=I=="width"?K.offsetWidth:K.offsetHeight;if(H==="border"){return}p.each(N,function(){if(!H){O-=parseFloat(p.curCSS(K,"padding"+this,true))||0}if(H==="margin"){O+=parseFloat(p.curCSS(K,"margin"+this,true))||0}else{O-=parseFloat(p.curCSS(K,"border"+this+"Width",true))||0}})}if(K.offsetWidth!==0){L()}else{p.swap(K,J,L)}return Math.max(0,Math.round(O))}return p.curCSS(K,I,M)},curCSS:function(L,I,J){var O,H=L.style;if(I=="opacity"&&!p.support.opacity){O=p.attr(H,"opacity");return O==""?"1":O}if(I.match(/float/i)){I=y}if(!J&&H&&H[I]){O=H[I]}else{if(r.getComputedStyle){if(I.match(/float/i)){I="float"}I=I.replace(/([A-Z])/g,"-$1").toLowerCase();var P=r.getComputedStyle(L,null);if(P){O=P.getPropertyValue(I)}if(I=="opacity"&&O==""){O="1"}}else{if(L.currentStyle){var M=I.replace(/\-(\w)/g,function(Q,R){return R.toUpperCase()});O=L.currentStyle[I]||L.currentStyle[M];if(!/^\d+(px)?$/i.test(O)&&/^\d/.test(O)){var K=H.left,N=L.runtimeStyle.left;L.runtimeStyle.left=L.currentStyle.left;H.left=O||0;O=H.pixelLeft+"px";H.left=K;L.runtimeStyle.left=N}}}}return O},clean:function(I,N,L){N=N||document;if(typeof N.createElement==="undefined"){N=N.ownerDocument||N[0]&&N[0].ownerDocument||document}if(!L&&I.length===1&&typeof I[0]==="string"){var K=/^<(\w+)\s*\/?>$/.exec(I[0]);if(K){return[N.createElement(K[1])]}}var J=[],H=[],O=N.createElement("div");p.each(I,function(S,V){if(typeof V==="number"){V+=""}if(!V){return}if(typeof V==="string"){V=V.replace(/(<(\w+)[^>]*?)\/>/g,function(X,Y,W){return W.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?X:Y+"></"+W+">"});var R=V.replace(/^\s+/,"").substring(0,10).toLowerCase();var T=!R.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!R.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||R.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!R.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!R.indexOf("<td")||!R.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!R.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!p.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];O.innerHTML=T[1]+V+T[2];while(T[0]--){O=O.lastChild}if(!p.support.tbody){var U=/<tbody/i.test(V),Q=!R.indexOf("<table")&&!U?O.firstChild&&O.firstChild.childNodes:T[1]=="<table>"&&!U?O.childNodes:[];for(var P=Q.length-1;P>=0;--P){if(p.nodeName(Q[P],"tbody")&&!Q[P].childNodes.length){Q[P].parentNode.removeChild(Q[P])}}}if(!p.support.leadingWhitespace&&/^\s/.test(V)){O.insertBefore(N.createTextNode(V.match(/^\s*/)[0]),O.firstChild)}V=p.makeArray(O.childNodes)}if(V.nodeType){J.push(V)}else{J=p.merge(J,V)}});if(L){for(var M=0;J[M];M++){if(p.nodeName(J[M],"script")&&(!J[M].type||J[M].type.toLowerCase()==="text/javascript")){H.push(J[M].parentNode?J[M].parentNode.removeChild(J[M]):J[M])}else{if(J[M].nodeType===1){J.splice.apply(J,[M+1,0].concat(p.makeArray(J[M].getElementsByTagName("script"))))}L.appendChild(J[M])}}return H}return J},attr:function(M,J,N){if(!M||M.nodeType==3||M.nodeType==8){return g}var K=!p.isXMLDoc(M),O=N!==g;J=K&&p.props[J]||J;if(M.tagName){var I=/href|src|style/.test(J);if(J=="selected"&&M.parentNode){M.parentNode.selectedIndex}if(J in M&&K&&!I){if(O){if(J=="type"&&p.nodeName(M,"input")&&M.parentNode){throw"type property can't be changed"}M[J]=N}if(p.nodeName(M,"form")&&M.getAttributeNode(J)){return M.getAttributeNode(J).nodeValue}if(J=="tabIndex"){var L=M.getAttributeNode("tabIndex");return L&&L.specified?L.value:M.nodeName.match(/(button|input|object|select|textarea)/i)?0:M.nodeName.match(/^(a|area)$/i)&&M.href?0:g}return M[J]}if(!p.support.style&&K&&J=="style"){return p.attr(M.style,"cssText",N)}if(O){M.setAttribute(J,""+N)}var H=!p.support.hrefNormalized&&K&&I?M.getAttribute(J,2):M.getAttribute(J);return H===null?g:H}if(!p.support.opacity&&J=="opacity"){if(O){M.zoom=1;M.filter=(M.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(N)+""=="NaN"?"":"alpha(opacity="+N*100+")")}return M.filter&&M.filter.indexOf("opacity=")>=0?(parseFloat(M.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}J=J.replace(/-([a-z])/ig,function(P,Q){return Q.toUpperCase()});if(O){M[J]=N}return M[J]},trim:function(H){return(H||"").replace(/^\s+|\s+$/g,"")},makeArray:function(J){var H=[];if(J!=null){var I=J.length;if(I==null||typeof J==="string"||p.isFunction(J)||J.setInterval){H[0]=J}else{while(I){H[--I]=J[I]}}}return H},inArray:function(J,K){for(var H=0,I=K.length;H<I;H++){if(K[H]===J){return H}}return -1},merge:function(K,H){var I=0,J,L=K.length;if(!p.support.getAll){while((J=H[I++])!=null){if(J.nodeType!=8){K[L++]=J}}}else{while((J=H[I++])!=null){K[L++]=J}}return K},unique:function(N){var I=[],H={};try{for(var J=0,K=N.length;J<K;J++){var M=p.data(N[J]);if(!H[M]){H[M]=true;I.push(N[J])}}}catch(L){I=N}return I},grep:function(I,M,H){var J=[];for(var K=0,L=I.length;K<L;K++){if(!H!=!M(I[K],K)){J.push(I[K])}}return J},map:function(H,M){var I=[];for(var J=0,K=H.length;J<K;J++){var L=M(H[J],J);if(L!=null){I[I.length]=L}}return I.concat.apply([],I)}});var F=navigator.userAgent.toLowerCase();p.browser={version:(F.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(F),opera:/opera/.test(F),msie:/msie/.test(F)&&!/opera/.test(F),mozilla:/mozilla/.test(F)&&!/(compatible|webkit)/.test(F)};p.each({parent:function(H){return H.parentNode},parents:function(H){return p.dir(H,"parentNode")},next:function(H){return p.nth(H,2,"nextSibling")},prev:function(H){return p.nth(H,2,"previousSibling")},nextAll:function(H){return p.dir(H,"nextSibling")},prevAll:function(H){return p.dir(H,"previousSibling")},siblings:function(H){return p.sibling(H.parentNode.firstChild,H)},children:function(H){return p.sibling(H.firstChild)},contents:function(H){return p.nodeName(H,"iframe")?H.contentDocument||H.contentWindow.document:p.makeArray(H.childNodes)}},function(H,I){p.fn[H]=function(J){var K=p.map(this,I);if(J&&typeof J=="string"){K=p.multiFilter(J,K)}return this.pushStack(p.unique(K),H,J)}});p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(H,I){p.fn[H]=function(J){var M=[],O=p(J);for(var N=0,K=O.length;N<K;N++){var L=(N>0?this.clone(true):this).get();p.fn[I].apply(p(O[N]),L);M=M.concat(L)}return this.pushStack(M,H,J)}});p.each({removeAttr:function(H){p.attr(this,H,"");if(this.nodeType==1){this.removeAttribute(H)}},addClass:function(H){p.className.add(this,H)},removeClass:function(H){p.className.remove(this,H)},toggleClass:function(I,H){if(typeof H!=="boolean"){H=!p.className.has(this,I)}p.className[H?"add":"remove"](this,I)},remove:function(H){if(!H||p.filter(H,[this]).length){p("*",this).add([this]).each(function(){p.event.remove(this);p.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){p(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(H,I){p.fn[H]=function(){return this.each(I,arguments)}});function k(H,I){return H[0]&&parseInt(p.curCSS(H[0],I,true),10)||0}var h="jQuery"+e(),w=0,D={};p.extend({cache:{},data:function(I,H,J){I=I==m?D:I;var K=I[h];if(!K){K=I[h]=++w}if(H&&!p.cache[K]){p.cache[K]={}}if(J!==g){p.cache[K][H]=J}return H?p.cache[K][H]:K},removeData:function(I,H){I=I==m?D:I;var K=I[h];if(H){if(p.cache[K]){delete p.cache[K][H];H="";for(H in p.cache[K]){break}if(!H){p.removeData(I)}}}else{try{delete I[h]}catch(J){if(I.removeAttribute){I.removeAttribute(h)}}delete p.cache[K]}},queue:function(I,H,K){if(I){H=(H||"fx")+"queue";var J=p.data(I,H);if(!J||p.isArray(K)){J=p.data(I,H,p.makeArray(K))}else{if(K){J.push(K)}}}return J},dequeue:function(K,J){var H=p.queue(K,J),I=H.shift();if(!J||J==="fx"){I=H[0]}if(I!==g){I.call(K)}}});p.fn.extend({data:function(H,J){var K=H.split(".");K[1]=K[1]?"."+K[1]:"";if(J===g){var I=this.triggerHandler("getData"+K[1]+"!",[K[0]]);if(I===g&&this.length){I=p.data(this[0],H)}return I===g&&K[1]?this.data(K[0]):I}else{return this.trigger("setData"+K[1]+"!",[K[0],J]).each(function(){p.data(this,H,J)})}},removeData:function(H){return this.each(function(){p.removeData(this,H)})},queue:function(H,I){if(typeof H!=="string"){I=H;H="fx"}if(I===g){return p.queue(this[0],H)}return this.each(function(){var J=p.queue(this,H,I);if(H=="fx"&&J.length==1){J[0].call(this)}})},dequeue:function(H){return this.each(function(){p.dequeue(this,H)})}});
/*
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var U=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,O=0,K=Object.prototype.toString;var I=function(ab,X,ae,af){ae=ae||[];X=X||document;if(X.nodeType!==1&&X.nodeType!==9){return[]}if(!ab||typeof ab!=="string"){return ae}var ac=[],Z,ai,al,W,ag,Y,aa=true;U.lastIndex=0;while((Z=U.exec(ab))!==null){ac.push(Z[1]);if(Z[2]){Y=RegExp.rightContext;break}}if(ac.length>1&&P.exec(ab)){if(ac.length===2&&L.relative[ac[0]]){ai=M(ac[0]+ac[1],X)}else{ai=L.relative[ac[0]]?[X]:I(ac.shift(),X);while(ac.length){ab=ac.shift();if(L.relative[ab]){ab+=ac.shift()}ai=M(ab,ai)}}}else{var ah=af?{expr:ac.pop(),set:H(af)}:I.find(ac.pop(),ac.length===1&&X.parentNode?X.parentNode:X,T(X));ai=I.filter(ah.expr,ah.set);if(ac.length>0){al=H(ai)}else{aa=false}while(ac.length){var ak=ac.pop(),aj=ak;if(!L.relative[ak]){ak=""}else{aj=ac.pop()}if(aj==null){aj=X}L.relative[ak](al,aj,T(X))}}if(!al){al=ai}if(!al){throw"Syntax error, unrecognized expression: "+(ak||ab)}if(K.call(al)==="[object Array]"){if(!aa){ae.push.apply(ae,al)}else{if(X.nodeType===1){for(var ad=0;al[ad]!=null;ad++){if(al[ad]&&(al[ad]===true||al[ad].nodeType===1&&N(X,al[ad]))){ae.push(ai[ad])}}}else{for(var ad=0;al[ad]!=null;ad++){if(al[ad]&&al[ad].nodeType===1){ae.push(ai[ad])}}}}}else{H(al,ae)}if(Y){I(Y,X,ae,af);if(J){hasDuplicate=false;ae.sort(J);if(hasDuplicate){for(var ad=1;ad<ae.length;ad++){if(ae[ad]===ae[ad-1]){ae.splice(ad--,1)}}}}}return ae};I.matches=function(W,X){return I(W,null,null,X)};I.find=function(ad,W,ae){var ac,aa;if(!ad){return[]}for(var Z=0,Y=L.order.length;Z<Y;Z++){var ab=L.order[Z],aa;if((aa=L.match[ab].exec(ad))){var X=RegExp.leftContext;if(X.substr(X.length-1)!=="\\"){aa[1]=(aa[1]||"").replace(/\\/g,"");ac=L.find[ab](aa,W,ae);if(ac!=null){ad=ad.replace(L.match[ab],"");break}}}}if(!ac){ac=W.getElementsByTagName("*")}return{set:ac,expr:ad}};I.filter=function(ag,af,aj,Z){var Y=ag,al=[],ad=af,ab,W,ac=af&&af[0]&&T(af[0]);while(ag&&af.length){for(var ae in L.filter){if((ab=L.match[ae].exec(ag))!=null){var X=L.filter[ae],ak,ai;W=false;if(ad==al){al=[]}if(L.preFilter[ae]){ab=L.preFilter[ae](ab,ad,aj,al,Z,ac);if(!ab){W=ak=true}else{if(ab===true){continue}}}if(ab){for(var aa=0;(ai=ad[aa])!=null;aa++){if(ai){ak=X(ai,ab,aa,ad);var ah=Z^!!ak;if(aj&&ak!=null){if(ah){W=true}else{ad[aa]=false}}else{if(ah){al.push(ai);W=true}}}}}if(ak!==g){if(!aj){ad=al}ag=ag.replace(L.match[ae],"");if(!W){return[]}break}}}if(ag==Y){if(W==null){throw"Syntax error, unrecognized expression: "+ag}else{break}}Y=ag}return ad};var L=I.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(W){return W.getAttribute("href")}},relative:{"+":function(ad,W,ac){var aa=typeof W==="string",ae=aa&&!/\W/.test(W),ab=aa&&!ae;if(ae&&!ac){W=W.toUpperCase()}for(var Z=0,Y=ad.length,X;Z<Y;Z++){if((X=ad[Z])){while((X=X.previousSibling)&&X.nodeType!==1){}ad[Z]=ab||X&&X.nodeName===W?X||false:X===W}}if(ab){I.filter(W,ad,true)}},">":function(ac,X,ad){var aa=typeof X==="string";if(aa&&!/\W/.test(X)){X=ad?X:X.toUpperCase();for(var Y=0,W=ac.length;Y<W;Y++){var ab=ac[Y];if(ab){var Z=ab.parentNode;ac[Y]=Z.nodeName===X?Z:false}}}else{for(var Y=0,W=ac.length;Y<W;Y++){var ab=ac[Y];if(ab){ac[Y]=aa?ab.parentNode:ab.parentNode===X}}if(aa){I.filter(X,ac,true)}}},"":function(Z,X,ab){var Y=O++,W=V;if(!X.match(/\W/)){var aa=X=ab?X:X.toUpperCase();W=S}W("parentNode",X,Y,Z,aa,ab)},"~":function(Z,X,ab){var Y=O++,W=V;if(typeof X==="string"&&!X.match(/\W/)){var aa=X=ab?X:X.toUpperCase();W=S}W("previousSibling",X,Y,Z,aa,ab)}},find:{ID:function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?[W]:[]}},NAME:function(Y,ab,ac){if(typeof ab.getElementsByName!=="undefined"){var X=[],aa=ab.getElementsByName(Y[1]);for(var Z=0,W=aa.length;Z<W;Z++){if(aa[Z].getAttribute("name")===Y[1]){X.push(aa[Z])}}return X.length===0?null:X}},TAG:function(W,X){return X.getElementsByTagName(W[1])}},preFilter:{CLASS:function(Z,X,Y,W,ac,ad){Z=" "+Z[1].replace(/\\/g,"")+" ";if(ad){return Z}for(var aa=0,ab;(ab=X[aa])!=null;aa++){if(ab){if(ac^(ab.className&&(" "+ab.className+" ").indexOf(Z)>=0)){if(!Y){W.push(ab)}}else{if(Y){X[aa]=false}}}}return false},ID:function(W){return W[1].replace(/\\/g,"")},TAG:function(X,W){for(var Y=0;W[Y]===false;Y++){}return W[Y]&&T(W[Y])?X[1]:X[1].toUpperCase()},CHILD:function(W){if(W[1]=="nth"){var X=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(W[2]=="even"&&"2n"||W[2]=="odd"&&"2n+1"||!/\D/.test(W[2])&&"0n+"+W[2]||W[2]);W[2]=(X[1]+(X[2]||1))-0;W[3]=X[3]-0}W[0]=O++;return W},ATTR:function(aa,X,Y,W,ab,ac){var Z=aa[1].replace(/\\/g,"");if(!ac&&L.attrMap[Z]){aa[1]=L.attrMap[Z]}if(aa[2]==="~="){aa[4]=" "+aa[4]+" "}return aa},PSEUDO:function(aa,X,Y,W,ab){if(aa[1]==="not"){if(aa[3].match(U).length>1||/^\w/.test(aa[3])){aa[3]=I(aa[3],null,null,X)}else{var Z=I.filter(aa[3],X,Y,true^ab);if(!Y){W.push.apply(W,Z)}return false}}else{if(L.match.POS.test(aa[0])||L.match.CHILD.test(aa[0])){return true}}return aa},POS:function(W){W.unshift(true);return W}},filters:{enabled:function(W){return W.disabled===false&&W.type!=="hidden"},disabled:function(W){return W.disabled===true},checked:function(W){return W.checked===true},selected:function(W){W.parentNode.selectedIndex;return W.selected===true},parent:function(W){return !!W.firstChild},empty:function(W){return !W.firstChild},has:function(Y,X,W){return !!I(W[3],Y).length},header:function(W){return/h\d/i.test(W.nodeName)},text:function(W){return"text"===W.type},radio:function(W){return"radio"===W.type},checkbox:function(W){return"checkbox"===W.type},file:function(W){return"file"===W.type},password:function(W){return"password"===W.type},submit:function(W){return"submit"===W.type},image:function(W){return"image"===W.type},reset:function(W){return"reset"===W.type},button:function(W){return"button"===W.type||W.nodeName.toUpperCase()==="BUTTON"},input:function(W){return/input|select|textarea|button/i.test(W.nodeName)}},setFilters:{first:function(X,W){return W===0},last:function(Y,X,W,Z){return X===Z.length-1},even:function(X,W){return W%2===0},odd:function(X,W){return W%2===1},lt:function(Y,X,W){return X<W[3]-0},gt:function(Y,X,W){return X>W[3]-0},nth:function(Y,X,W){return W[3]-0==X},eq:function(Y,X,W){return W[3]-0==X}},filter:{PSEUDO:function(ac,Y,Z,ad){var X=Y[1],aa=L.filters[X];if(aa){return aa(ac,Z,Y,ad)}else{if(X==="contains"){return(ac.textContent||ac.innerText||"").indexOf(Y[3])>=0}else{if(X==="not"){var ab=Y[3];for(var Z=0,W=ab.length;Z<W;Z++){if(ab[Z]===ac){return false}}return true}}}},CHILD:function(W,Z){var ac=Z[1],X=W;switch(ac){case"only":case"first":while(X=X.previousSibling){if(X.nodeType===1){return false}}if(ac=="first"){return true}X=W;case"last":while(X=X.nextSibling){if(X.nodeType===1){return false}}return true;case"nth":var Y=Z[2],af=Z[3];if(Y==1&&af==0){return true}var ab=Z[0],ae=W.parentNode;if(ae&&(ae.sizcache!==ab||!W.nodeIndex)){var aa=0;for(X=ae.firstChild;X;X=X.nextSibling){if(X.nodeType===1){X.nodeIndex=++aa}}ae.sizcache=ab}var ad=W.nodeIndex-af;if(Y==0){return ad==0}else{return(ad%Y==0&&ad/Y>=0)}}},ID:function(X,W){return X.nodeType===1&&X.getAttribute("id")===W},TAG:function(X,W){return(W==="*"&&X.nodeType===1)||X.nodeName===W},CLASS:function(X,W){return(" "+(X.className||X.getAttribute("class"))+" ").indexOf(W)>-1},ATTR:function(ab,Z){var Y=Z[1],W=L.attrHandle[Y]?L.attrHandle[Y](ab):ab[Y]!=null?ab[Y]:ab.getAttribute(Y),ac=W+"",aa=Z[2],X=Z[4];return W==null?aa==="!=":aa==="="?ac===X:aa==="*="?ac.indexOf(X)>=0:aa==="~="?(" "+ac+" ").indexOf(X)>=0:!X?ac&&W!==false:aa==="!="?ac!=X:aa==="^="?ac.indexOf(X)===0:aa==="$="?ac.substr(ac.length-X.length)===X:aa==="|="?ac===X||ac.substr(0,X.length+1)===X+"-":false},POS:function(aa,X,Y,ab){var W=X[2],Z=L.setFilters[W];if(Z){return Z(aa,Y,X,ab)}}}};var P=L.match.POS;for(var R in L.match){L.match[R]=RegExp(L.match[R].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var H=function(X,W){X=Array.prototype.slice.call(X);if(W){W.push.apply(W,X);return W}return X};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(Q){H=function(aa,Z){var X=Z||[];if(K.call(aa)==="[object Array]"){Array.prototype.push.apply(X,aa)}else{if(typeof aa.length==="number"){for(var Y=0,W=aa.length;Y<W;Y++){X.push(aa[Y])}}else{for(var Y=0;aa[Y];Y++){X.push(aa[Y])}}}return X}}var J;if(document.documentElement.compareDocumentPosition){J=function(X,W){var Y=X.compareDocumentPosition(W)&4?-1:X===W?0:1;if(Y===0){hasDuplicate=true}return Y}}else{if("sourceIndex" in document.documentElement){J=function(X,W){var Y=X.sourceIndex-W.sourceIndex;if(Y===0){hasDuplicate=true}return Y}}else{if(document.createRange){J=function(Z,X){var Y=Z.ownerDocument.createRange(),W=X.ownerDocument.createRange();Y.selectNode(Z);Y.collapse(true);W.selectNode(X);W.collapse(true);var aa=Y.compareBoundaryPoints(Range.START_TO_END,W);if(aa===0){hasDuplicate=true}return aa}}}}(function(){var X=document.createElement("form"),Y="script"+(new Date).getTime();X.innerHTML="<input name='"+Y+"'/>";var W=document.documentElement;W.insertBefore(X,W.firstChild);if(!!document.getElementById(Y)){L.find.ID=function(aa,ab,ac){if(typeof ab.getElementById!=="undefined"&&!ac){var Z=ab.getElementById(aa[1]);return Z?Z.id===aa[1]||typeof Z.getAttributeNode!=="undefined"&&Z.getAttributeNode("id").nodeValue===aa[1]?[Z]:g:[]}};L.filter.ID=function(ab,Z){var aa=typeof ab.getAttributeNode!=="undefined"&&ab.getAttributeNode("id");return ab.nodeType===1&&aa&&aa.nodeValue===Z}}W.removeChild(X)})();(function(){var W=document.createElement("div");W.appendChild(document.createComment(""));if(W.getElementsByTagName("*").length>0){L.find.TAG=function(X,ab){var aa=ab.getElementsByTagName(X[1]);if(X[1]==="*"){var Z=[];for(var Y=0;aa[Y];Y++){if(aa[Y].nodeType===1){Z.push(aa[Y])}}aa=Z}return aa}}W.innerHTML="<a href='#'></a>";if(W.firstChild&&typeof W.firstChild.getAttribute!=="undefined"&&W.firstChild.getAttribute("href")!=="#"){L.attrHandle.href=function(X){return X.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var W=I,X=document.createElement("div");X.innerHTML="<p class='TEST'></p>";if(X.querySelectorAll&&X.querySelectorAll(".TEST").length===0){return}I=function(ab,aa,Y,Z){aa=aa||document;if(!Z&&aa.nodeType===9&&!T(aa)){try{return H(aa.querySelectorAll(ab),Y)}catch(ac){}}return W(ab,aa,Y,Z)};I.find=W.find;I.filter=W.filter;I.selectors=W.selectors;I.matches=W.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var W=document.createElement("div");W.innerHTML="<div class='test e'></div><div class='test'></div>";if(W.getElementsByClassName("e").length===0){return}W.lastChild.className="e";if(W.getElementsByClassName("e").length===1){return}L.order.splice(1,0,"CLASS");L.find.CLASS=function(X,Y,Z){if(typeof Y.getElementsByClassName!=="undefined"&&!Z){return Y.getElementsByClassName(X[1])}}})()}function S(X,ac,ab,ag,ad,af){var ae=X=="previousSibling"&&!af;for(var Z=0,Y=ag.length;Z<Y;Z++){var W=ag[Z];if(W){if(ae&&W.nodeType===1){W.sizcache=ab;W.sizset=Z}W=W[X];var aa=false;while(W){if(W.sizcache===ab){aa=ag[W.sizset];break}if(W.nodeType===1&&!af){W.sizcache=ab;W.sizset=Z}if(W.nodeName===ac){aa=W;break}W=W[X]}ag[Z]=aa}}}function V(X,ac,ab,ag,ad,af){var ae=X=="previousSibling"&&!af;for(var Z=0,Y=ag.length;Z<Y;Z++){var W=ag[Z];if(W){if(ae&&W.nodeType===1){W.sizcache=ab;W.sizset=Z}W=W[X];var aa=false;while(W){if(W.sizcache===ab){aa=ag[W.sizset];break}if(W.nodeType===1){if(!af){W.sizcache=ab;W.sizset=Z}if(typeof ac!=="string"){if(W===ac){aa=true;break}}else{if(I.filter(ac,[W]).length>0){aa=W;break}}}W=W[X]}ag[Z]=aa}}}var N=document.compareDocumentPosition?function(X,W){return X.compareDocumentPosition(W)&16}:function(X,W){return X!==W&&(X.contains?X.contains(W):true)};var T=function(W){return W.nodeType===9&&W.documentElement.nodeName!=="HTML"||!!W.ownerDocument&&T(W.ownerDocument)};var M=function(W,ad){var Z=[],aa="",ab,Y=ad.nodeType?[ad]:ad;while((ab=L.match.PSEUDO.exec(W))){aa+=ab[0];W=W.replace(L.match.PSEUDO,"")}W=L.relative[W]?W+"*":W;for(var ac=0,X=Y.length;ac<X;ac++){I(W,Y[ac],Z)}return I.filter(aa,Z)};p.find=I;p.filter=I.filter;p.expr=I.selectors;p.expr[":"]=p.expr.filters;I.selectors.filters.hidden=function(W){return W.offsetWidth===0||W.offsetHeight===0};I.selectors.filters.visible=function(W){return W.offsetWidth>0||W.offsetHeight>0};I.selectors.filters.animated=function(W){return p.grep(p.timers,function(X){return W===X.elem}).length};p.multiFilter=function(Y,W,X){if(X){Y=":not("+Y+")"}return I.matches(Y,W)};p.dir=function(Y,X){var W=[],Z=Y[X];while(Z&&Z!=document){if(Z.nodeType==1){W.push(Z)}Z=Z[X]}return W};p.nth=function(aa,W,Y,Z){W=W||1;var X=0;for(;aa;aa=aa[Y]){if(aa.nodeType==1&&++X==W){break}}return aa};p.sibling=function(Y,X){var W=[];for(;Y;Y=Y.nextSibling){if(Y.nodeType==1&&Y!=X){W.push(Y)}}return W};return;m.Sizzle=I})();p.event={add:function(L,I,K,N){if(L.nodeType==3||L.nodeType==8){return}if(L.setInterval&&L!=m){L=m}if(!K.guid){K.guid=this.guid++}if(N!==g){var J=K;K=this.proxy(J);K.data=N}var H=p.data(L,"events")||p.data(L,"events",{}),M=p.data(L,"handle")||p.data(L,"handle",function(){return typeof p!=="undefined"&&!p.event.triggered?p.event.handle.apply(arguments.callee.elem,arguments):g});M.elem=L;p.each(I.split(/\s+/),function(P,Q){var R=Q.split(".");Q=R.shift();K.type=R.slice().sort().join(".");var O=H[Q];if(p.event.specialAll[Q]){p.event.specialAll[Q].setup.call(L,N,R)}if(!O){O=H[Q]={};if(!p.event.special[Q]||p.event.special[Q].setup.call(L,N,R)===false){if(L.addEventListener){L.addEventListener(Q,M,false)}else{if(L.attachEvent){L.attachEvent("on"+Q,M)}}}}O[K.guid]=K;p.event.global[Q]=true});L=null},guid:1,global:{},remove:function(N,K,M){if(N.nodeType==3||N.nodeType==8){return}var J=p.data(N,"events"),I,H;if(J){if(K===g||(typeof K==="string"&&K.charAt(0)==".")){for(var L in J){this.remove(N,L+(K||""))}}else{if(K.type){M=K.handler;K=K.type}p.each(K.split(/\s+/),function(P,R){var T=R.split(".");R=T.shift();var Q=RegExp("(^|\\.)"+T.slice().sort().join(".*\\.")+"(\\.|$)");if(J[R]){if(M){delete J[R][M.guid]}else{for(var S in J[R]){if(Q.test(J[R][S].type)){delete J[R][S]}}}if(p.event.specialAll[R]){p.event.specialAll[R].teardown.call(N,T)}for(I in J[R]){break}if(!I){if(!p.event.special[R]||p.event.special[R].teardown.call(N,T)===false){if(N.removeEventListener){N.removeEventListener(R,p.data(N,"handle"),false)}else{if(N.detachEvent){N.detachEvent("on"+R,p.data(N,"handle"))}}}I=null;delete J[R]}}})}for(I in J){break}if(!I){var O=p.data(N,"handle");if(O){O.elem=null}p.removeData(N,"events");p.removeData(N,"handle")}}},trigger:function(L,N,K,H){var J=L.type||L;if(!H){L=typeof L==="object"?L[h]?L:p.extend(p.Event(J),L):p.Event(J);if(J.indexOf("!")>=0){L.type=J=J.slice(0,-1);L.exclusive=true}if(!K){L.stopPropagation();if(this.global[J]){p.each(p.cache,function(){if(this.events&&this.events[J]){p.event.trigger(L,N,this.handle.elem)}})}}if(!K||K.nodeType==3||K.nodeType==8){return g}L.result=g;L.target=K;N=p.makeArray(N);N.unshift(L)}L.currentTarget=K;var M=p.data(K,"handle");if(M){M.apply(K,N)}if((!K[J]||(p.nodeName(K,"a")&&J=="click"))&&K["on"+J]&&K["on"+J].apply(K,N)===false){L.result=false}if(!H&&K[J]&&!L.isDefaultPrevented()&&!(p.nodeName(K,"a")&&J=="click")){this.triggered=true;try{K[J]()}catch(O){}}this.triggered=false;if(!L.isPropagationStopped()){var I=K.parentNode||K.ownerDocument;if(I){p.event.trigger(L,N,I,true)}}},handle:function(N){var M,H;N=arguments[0]=p.event.fix(N||m.event);N.currentTarget=this;var O=N.type.split(".");N.type=O.shift();M=!O.length&&!N.exclusive;var L=RegExp("(^|\\.)"+O.slice().sort().join(".*\\.")+"(\\.|$)");H=(p.data(this,"events")||{})[N.type];for(var J in H){var K=H[J];if(M||L.test(K.type)){N.handler=K;N.data=K.data;var I=K.apply(this,arguments);if(I!==g){N.result=I;if(I===false){N.preventDefault();N.stopPropagation()}}if(N.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(K){if(K[h]){return K}var I=K;K=p.Event(I);for(var J=this.props.length,M;J;){M=this.props[--J];K[M]=I[M]}if(!K.target){K.target=K.srcElement||document}if(K.target.nodeType==3){K.target=K.target.parentNode}if(!K.relatedTarget&&K.fromElement){K.relatedTarget=K.fromElement==K.target?K.toElement:K.fromElement}if(K.pageX==null&&K.clientX!=null){var L=document.documentElement,H=document.body;K.pageX=K.clientX+(L&&L.scrollLeft||H&&H.scrollLeft||0)-(L.clientLeft||0);K.pageY=K.clientY+(L&&L.scrollTop||H&&H.scrollTop||0)-(L.clientTop||0)}if(!K.which&&((K.charCode||K.charCode===0)?K.charCode:K.keyCode)){K.which=K.charCode||K.keyCode}if(!K.metaKey&&K.ctrlKey){K.metaKey=K.ctrlKey}if(!K.which&&K.button){K.which=(K.button&1?1:(K.button&2?3:(K.button&4?2:0)))}return K},proxy:function(I,H){H=H||function(){return I.apply(this,arguments)};H.guid=I.guid=I.guid||H.guid||this.guid++;return H},special:{ready:{setup:E,teardown:function(){}}},specialAll:{live:{setup:function(H,I){p.event.add(this,I[0],c)},teardown:function(J){if(J.length){var H=0,I=RegExp("(^|\\.)"+J[0]+"(\\.|$)");p.each((p.data(this,"events").live||{}),function(){if(I.test(this.type)){H++}});if(H<1){p.event.remove(this,J[0],c)}}}}}};p.Event=function(H){if(!this.preventDefault){return new p.Event(H)}if(H&&H.type){this.originalEvent=H;this.type=H.type}else{this.type=H}this.timeStamp=e();this[h]=true};function l(){return false}function v(){return true}p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=v;var H=this.originalEvent;if(!H){return}if(H.preventDefault){H.preventDefault()}H.returnValue=false},stopPropagation:function(){this.isPropagationStopped=v;var H=this.originalEvent;if(!H){return}if(H.stopPropagation){H.stopPropagation()}H.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=v;this.stopPropagation()},isDefaultPrevented:l,isPropagationStopped:l,isImmediatePropagationStopped:l};var a=function(I){var H=I.relatedTarget;while(H&&H!=this){try{H=H.parentNode}catch(J){H=this}}if(H!=this){I.type=I.data;p.event.handle.apply(this,arguments)}};p.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(I,H){p.event.special[H]={setup:function(){p.event.add(this,I,a,H)},teardown:function(){p.event.remove(this,I,a)}}});p.fn.extend({bind:function(I,J,H){return I=="unload"?this.one(I,J,H):this.each(function(){p.event.add(this,I,H||J,H&&J)})},one:function(J,K,I){var H=p.event.proxy(I||K,function(L){p(this).unbind(L,H);return(I||K).apply(this,arguments)});return this.each(function(){p.event.add(this,J,H,I&&K)})},unbind:function(I,H){return this.each(function(){p.event.remove(this,I,H)})},trigger:function(H,I){return this.each(function(){p.event.trigger(H,I,this)})},triggerHandler:function(H,J){if(this[0]){var I=p.Event(H);I.preventDefault();I.stopPropagation();p.event.trigger(I,J,this[0]);return I.result}},toggle:function(J){var H=arguments,I=1;while(I<H.length){p.event.proxy(J,H[I++])}return this.click(p.event.proxy(J,function(K){this.lastToggle=(this.lastToggle||0)%I;K.preventDefault();return H[this.lastToggle++].apply(this,arguments)||false}))},hover:function(H,I){return this.mouseenter(H).mouseleave(I)},ready:function(H){E();if(p.isReady){H.call(document,p)}else{p.readyList.push(H)}return this},live:function(J,I){var H=p.event.proxy(I);H.guid+=this.selector+J;p(document).bind(j(J,this.selector),this.selector,H);return this},die:function(I,H){p(document).unbind(j(I,this.selector),H?{guid:H.guid+this.selector+I}:null);return this}});function c(K){var H=RegExp("(^|\\.)"+K.type+"(\\.|$)"),J=true,I=[];p.each(p.data(this,"events").live||[],function(L,M){if(H.test(M.type)){var N=p(K.target).closest(M.data)[0];if(N){I.push({elem:N,fn:M})}}});I.sort(function(M,L){return p.data(M.elem,"closest")-p.data(L.elem,"closest")});p.each(I,function(){if(this.fn.call(this.elem,K,this.fn.data)===false){return(J=false)}});return J}function j(I,H){return["live",I,H.replace(/\./g,"`").replace(/ /g,"|")].join(".")}p.extend({isReady:false,readyList:[],ready:function(){if(!p.isReady){p.isReady=true;if(p.readyList){p.each(p.readyList,function(){this.call(document,p)});p.readyList=null}p(document).triggerHandler("ready")}}});var z=false;function E(){if(z){return}z=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);p.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);p.ready()}});if(document.documentElement.doScroll&&m==m.top){(function(){if(p.isReady){return}try{document.documentElement.doScroll("left")}catch(H){setTimeout(arguments.callee,0);return}p.ready()})()}}}p.event.add(m,"load",p.ready)}p.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(I,H){p.fn[H]=function(J){return J?this.bind(H,J):this.trigger(H)}});p(m).bind("unload",function(){for(var H in p.cache){if(H!=1&&p.cache[H].handle){p.event.remove(p.cache[H].handle.elem)}}});(function(){p.support={};var I=document.documentElement,J=document.createElement("script"),N=document.createElement("div"),M="script"+(new Date).getTime();N.style.display="none";N.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 K=N.getElementsByTagName("*"),H=N.getElementsByTagName("a")[0];if(!K||!K.length||!H){return}p.support={leadingWhitespace:N.firstChild.nodeType==3,tbody:!N.getElementsByTagName("tbody").length,objectAll:!!N.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!N.getElementsByTagName("link").length,style:/red/.test(H.getAttribute("style")),hrefNormalized:H.getAttribute("href")==="/a",opacity:H.style.opacity==="0.5",cssFloat:!!H.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};J.type="text/javascript";try{J.appendChild(document.createTextNode("window."+M+"=1;"))}catch(L){}I.insertBefore(J,I.firstChild);if(m[M]){p.support.scriptEval=true;delete m[M]}I.removeChild(J);if(N.attachEvent&&N.fireEvent){N.attachEvent("onclick",function(){p.support.noCloneEvent=false;N.detachEvent("onclick",arguments.callee)});N.cloneNode(true).fireEvent("onclick")}p(function(){var O=document.createElement("div");O.style.width=O.style.paddingLeft="1px";document.body.appendChild(O);p.boxModel=p.support.boxModel=O.offsetWidth===2;document.body.removeChild(O).style.display="none"})})();var y=p.support.cssFloat?"cssFloat":"styleFloat";p.props={"for":"htmlFor","class":"className","float":y,cssFloat:y,styleFloat:y,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};p.fn.extend({_load:p.fn.load,load:function(J,M,N){if(typeof J!=="string"){return this._load(J)}var L=J.indexOf(" ");if(L>=0){var H=J.slice(L,J.length);J=J.slice(0,L)}var K="GET";if(M){if(p.isFunction(M)){N=M;M=null}else{if(typeof M==="object"){M=p.param(M);K="POST"}}}var I=this;p.ajax({url:J,type:K,dataType:"html",data:M,complete:function(P,O){if(O=="success"||O=="notmodified"){I.html(H?p("<div/>").append(P.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(H):P.responseText)}if(N){I.each(N,[P.responseText,O,P])}}});return this},serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.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(H,I){var J=p(this).val();return J==null?null:p.isArray(J)?p.map(J,function(L,K){return{name:I.name,value:L}}):{name:I.name,value:J}}).get()}});p.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(H,I){p.fn[I]=function(J){return this.bind(I,J)}});var s=e();p.extend({get:function(H,J,K,I){if(p.isFunction(J)){K=J;J=null}return p.ajax({type:"GET",url:H,data:J,success:K,dataType:I})},getScript:function(H,I){return p.get(H,null,I,"script")},getJSON:function(H,I,J){return p.get(H,I,J,"json")},post:function(H,J,K,I){if(p.isFunction(J)){K=J;J={}}return p.ajax({type:"POST",url:H,data:J,success:K,dataType:I})},ajaxSetup:function(H){p.extend(p.ajaxSettings,H)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return m.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(P){P=p.extend(true,P,p.extend(true,{},p.ajaxSettings,P));var Z,I=/=\?(&|$)/g,U,Y,J=P.type.toUpperCase();if(P.data&&P.processData&&typeof P.data!=="string"){P.data=p.param(P.data)}if(P.dataType=="jsonp"){if(J=="GET"){if(!P.url.match(I)){P.url+=(P.url.match(/\?/)?"&":"?")+(P.jsonp||"callback")+"=?"}}else{if(!P.data||!P.data.match(I)){P.data=(P.data?P.data+"&":"")+(P.jsonp||"callback")+"=?"}}P.dataType="json"}if(P.dataType=="json"&&(P.data&&P.data.match(I)||P.url.match(I))){Z="jsonp"+s++;if(P.data){P.data=(P.data+"").replace(I,"="+Z+"$1")}P.url=P.url.replace(I,"="+Z+"$1");P.dataType="script";m[Z]=function(aa){Y=aa;L();O();m[Z]=g;try{delete m[Z]}catch(ab){}if(K){K.removeChild(W)}}}if(P.dataType=="script"&&P.cache==null){P.cache=false}if(P.cache===false&&J=="GET"){var H=e();var X=P.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+H+"$2");P.url=X+((X==P.url)?(P.url.match(/\?/)?"&":"?")+"_="+H:"")}if(P.data&&J=="GET"){P.url+=(P.url.match(/\?/)?"&":"?")+P.data;P.data=null}if(P.global&&!p.active++){p.event.trigger("ajaxStart")}var T=/^(\w+:)?\/\/([^\/?#]+)/.exec(P.url);if(P.dataType=="script"&&J=="GET"&&T&&(T[1]&&T[1]!=location.protocol||T[2]!=location.host)){var K=document.getElementsByTagName("head")[0];var W=document.createElement("script");W.src=P.url;if(P.scriptCharset){W.charset=P.scriptCharset}if(!Z){var R=false;W.onload=W.onreadystatechange=function(){if(!R&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){R=true;L();O();W.onload=W.onreadystatechange=null;K.removeChild(W)}}}K.appendChild(W);return g}var N=false;var M=P.xhr();if(P.username){M.open(J,P.url,P.async,P.username,P.password)}else{M.open(J,P.url,P.async)}try{if(P.data){M.setRequestHeader("Content-Type",P.contentType)}if(P.ifModified){M.setRequestHeader("If-Modified-Since",p.lastModified[P.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}M.setRequestHeader("X-Requested-With","XMLHttpRequest");M.setRequestHeader("Accept",P.dataType&&P.accepts[P.dataType]?P.accepts[P.dataType]+", */*":P.accepts._default)}catch(V){}if(P.beforeSend&&P.beforeSend(M,P)===false){if(P.global&&!--p.active){p.event.trigger("ajaxStop")}M.abort();return false}if(P.global){p.event.trigger("ajaxSend",[M,P])}var Q=function(aa){if(M.readyState==0){if(S){clearInterval(S);S=null;if(P.global&&!--p.active){p.event.trigger("ajaxStop")}}}else{if(!N&&M&&(M.readyState==4||aa=="timeout")){N=true;if(S){clearInterval(S);S=null}U=aa=="timeout"?"timeout":!p.httpSuccess(M)?"error":P.ifModified&&p.httpNotModified(M,P.url)?"notmodified":"success";if(U=="success"){try{Y=p.httpData(M,P.dataType,P)}catch(ac){U="parsererror"}}if(U=="success"){var ab;try{ab=M.getResponseHeader("Last-Modified")}catch(ac){}if(P.ifModified&&ab){p.lastModified[P.url]=ab}if(!Z){L()}}else{p.handleError(P,M,U)}O();if(aa){M.abort()}if(P.async){M=null}}}};if(P.async){var S=setInterval(Q,13);if(P.timeout>0){setTimeout(function(){if(M&&!N){Q("timeout")}},P.timeout)}}try{M.send(P.data)}catch(V){p.handleError(P,M,null,V)}if(!P.async){Q()}function L(){if(P.success){P.success(Y,U)}if(P.global){p.event.trigger("ajaxSuccess",[M,P])}}function O(){if(P.complete){P.complete(M,U)}if(P.global){p.event.trigger("ajaxComplete",[M,P])}if(P.global&&!--p.active){p.event.trigger("ajaxStop")}}return M},handleError:function(I,K,H,J){if(I.error){I.error(K,H,J)}if(I.global){p.event.trigger("ajaxError",[K,I,J])}},active:0,httpSuccess:function(I){try{return !I.status&&location.protocol=="file:"||(I.status>=200&&I.status<300)||I.status==304||I.status==1223}catch(H){}return false},httpNotModified:function(J,H){try{var K=J.getResponseHeader("Last-Modified");return J.status==304||K==p.lastModified[H]}catch(I){}return false},httpData:function(M,K,J){var I=M.getResponseHeader("content-type"),H=K=="xml"||!K&&I&&I.indexOf("xml")>=0,L=H?M.responseXML:M.responseText;if(H&&L.documentElement.tagName=="parsererror"){throw"parsererror"}if(J&&J.dataFilter){L=J.dataFilter(L,K)}if(typeof L==="string"){if(K=="script"){p.globalEval(L)}if(K=="json"){L=m["eval"]("("+L+")")}}return L},param:function(H){var J=[];function K(L,M){J[J.length]=encodeURIComponent(L)+"="+encodeURIComponent(M)}if(p.isArray(H)||H.jquery){p.each(H,function(){K(this.name,this.value)})}else{for(var I in H){if(p.isArray(H[I])){p.each(H[I],function(){K(I,this)})}else{K(I,p.isFunction(H[I])?H[I]():H[I])}}}return J.join("&").replace(/%20/g,"+")}});var n={},o,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function u(I,H){var J={};p.each(d.concat.apply([],d.slice(0,H)),function(){J[this]=I});return J}p.fn.extend({show:function(M,O){if(M){return this.animate(u("show",3),M,O)}else{for(var K=0,I=this.length;K<I;K++){var H=p.data(this[K],"olddisplay");this[K].style.display=H||"";if(p.css(this[K],"display")==="none"){var J=this[K].tagName,N;if(n[J]){N=n[J]}else{var L=p("<"+J+" />").appendTo("body");N=L.css("display");if(N==="none"){N="block"}L.remove();n[J]=N}p.data(this[K],"olddisplay",N)}}for(var K=0,I=this.length;K<I;K++){this[K].style.display=p.data(this[K],"olddisplay")||""}return this}},hide:function(K,L){if(K){return this.animate(u("hide",3),K,L)}else{for(var J=0,I=this.length;J<I;J++){var H=p.data(this[J],"olddisplay");if(!H&&H!=="none"){p.data(this[J],"olddisplay",p.css(this[J],"display"))}}for(var J=0,I=this.length;J<I;J++){this[J].style.display="none"}return this}},_toggle:p.fn.toggle,toggle:function(J,I){var H=typeof J==="boolean";return p.isFunction(J)&&p.isFunction(I)?this._toggle.apply(this,arguments):J==null||H?this.each(function(){var K=H?J:p(this).is(":hidden");p(this)[K?"show":"hide"]()}):this.animate(u("toggle",3),J,I)},fadeTo:function(H,J,I){return this.animate({opacity:J},H,I)},animate:function(L,I,K,J){var H=p.speed(I,K,J);return this[H.queue===false?"each":"queue"](function(){var N=p.extend({},H),P,O=this.nodeType==1&&p(this).is(":hidden"),M=this;for(P in L){if(L[P]=="hide"&&O||L[P]=="show"&&!O){return N.complete.call(this)}if((P=="height"||P=="width")&&this.style){N.display=p.css(this,"display");N.overflow=this.style.overflow}}if(N.overflow!=null){this.style.overflow="hidden"}N.curAnim=p.extend({},L);p.each(L,function(R,V){var U=new p.fx(M,N,R);if(/toggle|show|hide/.test(V)){U[V=="toggle"?O?"show":"hide":V](L)}else{var T=V.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),W=U.cur(true)||0;if(T){var Q=parseFloat(T[2]),S=T[3]||"px";if(S!="px"){M.style[R]=(Q||1)+S;W=((Q||1)/U.cur(true))*W;M.style[R]=W+S}if(T[1]){Q=((T[1]=="-="?-1:1)*Q)+W}U.custom(W,Q,S)}else{U.custom(W,V,"")}}});return true})},stop:function(I,H){var J=p.timers;if(I){this.queue([])}this.each(function(){for(var K=J.length-1;K>=0;K--){if(J[K].elem==this){if(H){J[K](true)}J.splice(K,1)}}});if(!H){this.dequeue()}return this}});p.each({slideDown:u("show",1),slideUp:u("hide",1),slideToggle:u("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(H,I){p.fn[H]=function(J,K){return this.animate(I,J,K)}});p.extend({speed:function(J,K,I){var H=typeof J==="object"?J:{complete:I||!I&&K||p.isFunction(J)&&J,duration:J,easing:I&&K||K&&!p.isFunction(K)&&K};H.duration=p.fx.off?0:typeof H.duration==="number"?H.duration:p.fx.speeds[H.duration]||p.fx.speeds._default;H.old=H.complete;H.complete=function(){if(H.queue!==false){p(this).dequeue()}if(p.isFunction(H.old)){H.old.call(this)}};return H},easing:{linear:function(J,K,H,I){return H+I*J},swing:function(J,K,H,I){return((-Math.cos(J*Math.PI)/2)+0.5)*I+H}},timers:[],fx:function(I,H,J){this.options=H;this.elem=I;this.prop=J;if(!H.orig){H.orig={}}}});p.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(p.fx.step[this.prop]||p.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(I){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var H=parseFloat(p.css(this.elem,this.prop,I));return H&&H>-10000?H:parseFloat(p.curCSS(this.elem,this.prop))||0},custom:function(L,K,J){this.startTime=e();this.start=L;this.end=K;this.unit=J||this.unit||"px";this.now=this.start;this.pos=this.state=0;var H=this;function I(M){return H.step(M)}I.elem=this.elem;if(I()&&p.timers.push(I)&&!o){o=setInterval(function(){var N=p.timers;for(var M=0;M<N.length;M++){if(!N[M]()){N.splice(M--,1)}}if(!N.length){clearInterval(o);o=g}},13)}},show:function(){this.options.orig[this.prop]=p.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());p(this.elem).show()},hide:function(){this.options.orig[this.prop]=p.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(K){var J=e();if(K||J>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var H=true;for(var I in this.options.curAnim){if(this.options.curAnim[I]!==true){H=false}}if(H){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(p.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){p(this.elem).hide()}if(this.options.hide||this.options.show){for(var L in this.options.curAnim){p.attr(this.elem.style,L,this.options.orig[L])}}this.options.complete.call(this.elem)}return false}else{var M=J-this.startTime;this.state=M/this.options.duration;this.pos=p.easing[this.options.easing||(p.easing.swing?"swing":"linear")](this.state,M,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};p.extend(p.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(H){p.attr(H.elem.style,"opacity",H.now)},_default:function(H){if(H.elem.style&&H.elem.style[H.prop]!=null){H.elem.style[H.prop]=H.now+H.unit}else{H.elem[H.prop]=H.now}}}});if(document.documentElement.getBoundingClientRect){p.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return p.offset.bodyOffset(this[0])}var J=this[0].getBoundingClientRect(),M=this[0].ownerDocument,I=M.body,H=M.documentElement,O=H.clientTop||I.clientTop||0,N=H.clientLeft||I.clientLeft||0,L=J.top+(self.pageYOffset||p.boxModel&&H.scrollTop||I.scrollTop)-O,K=J.left+(self.pageXOffset||p.boxModel&&H.scrollLeft||I.scrollLeft)-N;return{top:L,left:K}}}else{p.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return p.offset.bodyOffset(this[0])}p.offset.initialized||p.offset.initialize();var M=this[0],J=M.offsetParent,I=M,R=M.ownerDocument,P,K=R.documentElement,N=R.body,O=R.defaultView,H=O.getComputedStyle(M,null),Q=M.offsetTop,L=M.offsetLeft;while((M=M.parentNode)&&M!==N&&M!==K){P=O.getComputedStyle(M,null);Q-=M.scrollTop,L-=M.scrollLeft;if(M===J){Q+=M.offsetTop,L+=M.offsetLeft;if(p.offset.doesNotAddBorder&&!(p.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(M.tagName))){Q+=parseInt(P.borderTopWidth,10)||0,L+=parseInt(P.borderLeftWidth,10)||0}I=J,J=M.offsetParent}if(p.offset.subtractsBorderForOverflowNotVisible&&P.overflow!=="visible"){Q+=parseInt(P.borderTopWidth,10)||0,L+=parseInt(P.borderLeftWidth,10)||0}H=P}if(H.position==="relative"||H.position==="static"){Q+=N.offsetTop,L+=N.offsetLeft}if(H.position==="fixed"){Q+=Math.max(K.scrollTop,N.scrollTop),L+=Math.max(K.scrollLeft,N.scrollLeft)}return{top:Q,left:L}}}p.offset={initialize:function(){if(this.initialized){return}var O=document.body,I=document.createElement("div"),K,J,Q,L,P,H,M=O.style.marginTop,N='<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>';P={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(H in P){I.style[H]=P[H]}I.innerHTML=N;O.insertBefore(I,O.firstChild);K=I.firstChild,J=K.firstChild,L=K.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(J.offsetTop!==5);this.doesAddBorderForTableAndCells=(L.offsetTop===5);K.style.overflow="hidden",K.style.position="relative";this.subtractsBorderForOverflowNotVisible=(J.offsetTop===-5);O.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(O.offsetTop===0);O.style.marginTop=M;O.removeChild(I);this.initialized=true},bodyOffset:function(H){p.offset.initialized||p.offset.initialize();var J=H.offsetTop,I=H.offsetLeft;if(p.offset.doesNotIncludeMarginInBodyOffset){J+=parseInt(p.curCSS(H,"marginTop",true),10)||0,I+=parseInt(p.curCSS(H,"marginLeft",true),10)||0}return{top:J,left:I}}};p.fn.extend({position:function(){var L=0,K=0,I;if(this[0]){var J=this.offsetParent(),M=this.offset(),H=/^body|html$/i.test(J[0].tagName)?{top:0,left:0}:J.offset();M.top-=k(this,"marginTop");M.left-=k(this,"marginLeft");H.top+=k(J,"borderTopWidth");H.left+=k(J,"borderLeftWidth");I={top:M.top-H.top,left:M.left-H.left}}return I},offsetParent:function(){var H=this[0].offsetParent||document.body;while(H&&(!/^body|html$/i.test(H.tagName)&&p.css(H,"position")=="static")){H=H.offsetParent}return p(H)}});p.each(["Left","Top"],function(I,H){var J="scroll"+H;p.fn[J]=function(K){if(!this[0]){return null}return K!==g?this.each(function(){this==m||this==document?m.scrollTo(!I?K:p(m).scrollLeft(),I?K:p(m).scrollTop()):this[J]=K}):this[0]==m||this[0]==document?self[I?"pageYOffset":"pageXOffset"]||p.boxModel&&document.documentElement[J]||document.body[J]:this[0][J]}});p.each(["Height","Width"],function(L,J){var H=L?"Left":"Top",K=L?"Right":"Bottom",I=J.toLowerCase();p.fn["inner"+J]=function(){return this[0]?p.css(this[0],I,false,"padding"):null};p.fn["outer"+J]=function(N){return this[0]?p.css(this[0],I,false,N?"margin":"border"):null};var M=J.toLowerCase();p.fn[M]=function(N){return this[0]==m?document.compatMode=="CSS1Compat"&&document.documentElement["client"+J]||document.body["client"+J]:this[0]==document?Math.max(document.documentElement["client"+J],document.body["scroll"+J],document.documentElement["scroll"+J],document.body["offset"+J],document.documentElement["offset"+J]):N===g?(this.length?p.css(this[0],M):null):this.css(M,typeof N==="string"?N:N+"px")}})})();var _no_global_dollar_override=true;var mochi_compat={};mochi_compat.debug=false;mochi_compat.unsafe_innerhtml=false;var $j=function(b,a){return $("#"+b,a)[0]};var $m=function(b,a){return $j(b,a)};var jq=function(b,a){return $j(b,a)};var getObject=function(b,a){return $j(b,a)};if(typeof(_globals)=="undefined"){var _globals={}}_globals._mochi_load_events=[];var addLoadEvent=function(a){if(_globals._mochi_load_events){_globals._mochi_load_events.push(a)}};jQuery(document).ready(function(){for(var a=0;a<_globals._mochi_load_events.length;++a){if($.isFunction(_globals._mochi_load_events[a])){_globals._mochi_load_events[a]()}}});var asyncAction=function(c,b,d){var a="/"+c;if(b.fb_uid||b.fb_session_key||self.url_parameters.get("fb_sig_user")||self.url_parameters.get("user_token")){b.fb_sig_user=self.url_parameters.get("fb_sig_user")||0;b.fb_sig_session_key=self.url_parameters.get("fb_sig_session_key")||"";b.user_token=self.url_parameters.get("user_token")||"";b.fb_uid=0;b.fb_session_key=""}return jQuery.post(a,b,d)};var __bindable_attrs=["onclick","onmouseover","onmouseout","onfocus","onblur","onkeypress","onkeydown","onkeyup","onchange"];var _safeAttributeSet=function(b,a,c){var d=a.toLowerCase();if(d=="class"){$(b).addClass(c);return}if(typeof(c)=="function"){$(b).bind(d.substr(2),c)}else{if($.inArray(d,__bindable_attrs)>=0){b[d]=function(){var e=new Function(c);return e.call(b)}}else{$(b).attr(d,c)}}};var createDOM=function(g,d){if($.browser.msie&&g=="input"&&d&&"type" in d&&d.type.toLowerCase()=="radio"&&"name" in d){var b=document.createElement('<input type="radio" name="'+d.name+'">')}else{var b=document.createElement(g)}for(var a in d){_safeAttributeSet(b,a,d[a])}if((arguments!=null)&&(arguments.length>2)){var c=arguments[2];c=createDOM.flatten_array(c);for(var f=1;f<c.length;++f){if(typeof(c[f])=="function"){b.appendChild(c[f]())}else{if(typeof(c[f])=="number"){b.appendChild(document.createTextNode(c[f]))}else{if((c[f]!=null)&&(typeof(c[f])=="object")){b.appendChild(c[f])}else{if(typeof(c[f])=="string"){try{if(mochi_compat.unsafe_innerhtml){b.appendChild(document.createTextNode(createDOM.unescape_HTML(c[f])))}else{b.appendChild(document.createTextNode(createDOM.unescape_HTML(c[f].replace(/</g,"&lt;").replace(/>/g,"&gt;"))))}}catch(e){if(mochi_compat.debug){alert("Failed to set "+g+".innerHTML in IE (you cannot insert a block element into a non-block element")}b.appendChild(document.createTextNode(c[f]))}}}}}}}return b};createDOM.unescape_HTML=function(b){var a=document.createElement("div");a.innerHTML=b;if(a.innerText!==undefined){return a.innerText}else{return a.textContent}};createDOM.flatten_array=function(a){if(!a){return a}if(!a.slice){a=Array.prototype.slice.call(a)}var e,f,d,c,b;for(d=0;d<a.length;d++){e=a[d];if(typeof(e)!=="object"){continue}if(!e){continue}if(e.nodeType){continue}if(e.length===undefined){continue}if(e.propertyIsEnumerable("length")&&!e.jquery){continue}c=a.slice(0,d);e=Array.prototype.slice.call(e);b=a.slice(d+1,a.length);a=c.concat(e).concat(b)}return a};var _nodes=["table","thead","tbody","tfoot","th","tr","td","a","strong","div","img","br","span","li","ul","ol","iframe","textarea","input","label","label","p","form","em","object","param","embed","h1","h2","h3","h4","h5","h6","small","big","blockquote","button","center","label","dl","dt","dd","q","select","option","b","hr"];for(var i=0;i<_nodes.length;i++){eval("function "+_nodes[i].toUpperCase()+'(attrs) { return createDOM("'+_nodes[i]+'", attrs, arguments); }')}var appendChildNodes=function(a){for(var b=1;b<arguments.length;b++){$(a).append(arguments[b])}};var replaceChildNodes=function(a,b){$(a).empty();$(a).append(b)};var replaceChildren=function(a,b){a.empty();a.append(b)};var repr=function(a){if(a&&a.repr){return a.repr()}else{if(typeof(a)=="string"){return a}}return""};var serializeJSON=function(a){return $.toJSON(a)};var evalJSON=function(){return eval("("+arguments[0]+")")};var map=function(b,a){return $.map(a,b)};var list=function(a){return map(function(b){return b},a)};var FormHandler=function(){this._form=new Object();var b=location.search.replace(/^\?/,"");b=b.replace(/\&$/,"");var a=this;jQuery.each(b.split("&"),function(c){var d=this.split("=")[0];var e=this.split("=")[1];if(e){a._form[d]=e}})};FormHandler.prototype.get=function(a){return this._form[a]};self.url_parameters=new FormHandler();jQuery.ui||(function(c){var j=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.1",plugin:{add:function(l,m,o){var n=c.ui[l].prototype;for(var k in o){n.plugins[k]=n.plugins[k]||[];n.plugins[k].push([m,o[k]])}},call:function(k,m,l){var o=k.plugins[m];if(!o||!k.element[0].parentNode){return}for(var n=0;n<o.length;n++){if(k.options[o[n][0]]){o[n][1].apply(k.element,l)}}}},contains:function(l,k){return document.compareDocumentPosition?l.compareDocumentPosition(k)&16:l!==k&&l.contains(k)},hasScroll:function(n,l){if(c(n).css("overflow")=="hidden"){return false}var k=(l&&l=="left")?"scrollLeft":"scrollTop",m=false;if(n[k]>0){return true}n[k]=1;m=(n[k]>0);n[k]=0;return m},isOverAxis:function(l,k,m){return(l>k)&&(l<(k+m))},isOver:function(p,l,o,n,k,m){return c.ui.isOverAxis(p,o,k)&&c.ui.isOverAxis(l,n,m)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(l,k,m){var n=m!==undefined;return(k=="role"?(n?f.call(this,l,k,"wairole:"+m):(f.apply(this,arguments)||"").replace(b,"")):(a.test(k)?(n?l.setAttributeNS(h,k.replace(a,"aaa:"),m):f.call(this,l,k.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(k){return(a.test(k)?this.each(function(){this.removeAttributeNS(h,k.replace(a,""))}):e.call(this,k))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return j.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var k;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){k=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{k=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!k.length?c(document):k}});c.extend(c.expr[":"],{data:function(m,l,k){return !!c.data(m,k[3])},focusable:function(l){var m=l.nodeName.toLowerCase(),k=c.attr(l,"tabindex");return(/input|select|textarea|button|object/.test(m)?!l.disabled:"a"==m||"area"==m?l.href||!isNaN(k):!isNaN(k))&&!c(l)["area"==m?"parents":"closest"](":hidden").length},tabbable:function(l){var k=c.attr(l,"tabindex");return(isNaN(k)||k>=0)&&c(l).is(":focusable")}});function g(n,o,p,m){function l(r){var q=c[n][o][r]||[];return(typeof q=="string"?q.split(/,?\s+/):q)}var k=l("getter");if(m.length==1&&typeof m[0]=="string"){k=k.concat(l("getterSetter"))}return(c.inArray(p,k)!=-1)}c.widget=function(l,k){var m=l.split(".")[0];l=l.split(".")[1];c.fn[l]=function(q){var o=(typeof q=="string"),p=Array.prototype.slice.call(arguments,1);if(o&&q.substring(0,1)=="_"){return this}if(o&&g(m,l,q,p)){var n=c.data(this[0],l);return(n?n[q].apply(n,p):undefined)}return this.each(function(){var r=c.data(this,l);(!r&&!o&&c.data(this,l,new c[m][l](this,q))._init());(r&&o&&c.isFunction(r[q])&&r[q].apply(r,p))})};c[m]=c[m]||{};c[m][l]=function(p,o){var n=this;this.namespace=m;this.widgetName=l;this.widgetEventPrefix=c[m][l].eventPrefix||l;this.widgetBaseClass=m+"-"+l;this.options=c.extend({},c.widget.defaults,c[m][l].defaults,c.metadata&&c.metadata.get(p)[l],o);this.element=c(p).bind("setData."+l,function(r,q,s){if(r.target==p){return n._setData(q,s)}}).bind("getData."+l,function(r,q){if(r.target==p){return n._getData(q)}}).bind("remove",function(){return n.destroy()})};c[m][l].prototype=c.extend({},c.widget.prototype,k);c[m][l].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(m,n){var l=m,k=this;if(typeof m=="string"){if(n===undefined){return this._getData(m)}l={};l[m]=n}c.each(l,function(o,p){k._setData(o,p)})},_getData:function(k){return this.options[k]},_setData:function(k,l){this.options[k]=l;if(k=="disabled"){this.element[l?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",l)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(m,n,o){var q=this.options[m],k=(m==this.widgetEventPrefix?m:this.widgetEventPrefix+m);n=c.Event(n);n.type=k;if(n.originalEvent){for(var l=c.event.props.length,p;l;){p=c.event.props[--l];n[p]=n.originalEvent[p]}}this.element.trigger(n,o);return !(c.isFunction(q)&&q.call(this.element[0],n,o)===false||n.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var k=this;this.element.bind("mousedown."+this.widgetName,function(l){return k._mouseDown(l)}).bind("click."+this.widgetName,function(l){if(k._preventClickEvent){k._preventClickEvent=false;l.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(m){m.originalEvent=m.originalEvent||{};if(m.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(m));this._mouseDownEvent=m;var l=this,n=(m.which==1),k=(typeof this.options.cancel=="string"?c(m.target).parents().add(m.target).filter(this.options.cancel).length:false);if(!n||k||!this._mouseCapture(m)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){l.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(m)&&this._mouseDelayMet(m)){this._mouseStarted=(this._mouseStart(m)!==false);if(!this._mouseStarted){m.preventDefault();return true}}this._mouseMoveDelegate=function(o){return l._mouseMove(o)};this._mouseUpDelegate=function(o){return l._mouseUp(o)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||m.preventDefault());m.originalEvent.mouseHandled=true;return true},_mouseMove:function(k){if(c.browser.msie&&!k.button){return this._mouseUp(k)}if(this._mouseStarted){this._mouseDrag(k);return k.preventDefault()}if(this._mouseDistanceMet(k)&&this._mouseDelayMet(k)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,k)!==false);(this._mouseStarted?this._mouseDrag(k):this._mouseUp(k))}return !this._mouseStarted},_mouseUp:function(k){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(k.target==this._mouseDownEvent.target);this._mouseStop(k)}return false},_mouseDistanceMet:function(k){return(Math.max(Math.abs(this._mouseDownEvent.pageX-k.pageX),Math.abs(this._mouseDownEvent.pageY-k.pageY))>=this.options.distance)},_mouseDelayMet:function(k){return this.mouseDelayMet},_mouseStart:function(k){},_mouseDrag:function(k){},_mouseStop:function(k){},_mouseCapture:function(k){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);(function(c){var b={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},a="ui-dialog ui-widget ui-widget-content ui-corner-all ";c.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var m=this,n=this.options,k=n.title||this.originalTitle||"&nbsp;",e=c.ui.dialog.getTitleId(this.element),l=(this.uiDialog=c("<div/>")).appendTo(document.body).hide().addClass(a+n.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:n.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(o){(n.closeOnEscape&&o.keyCode&&o.keyCode==c.ui.keyCode.ESCAPE&&m.close(o))}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(o){m.moveToTop(false,o)}),g=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(l),f=(this.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(l),j=c('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){j.addClass("ui-state-hover")},function(){j.removeClass("ui-state-hover")}).focus(function(){j.addClass("ui-state-focus")}).blur(function(){j.removeClass("ui-state-focus")}).mousedown(function(o){o.stopPropagation()}).click(function(o){m.close(o);return false}).appendTo(f),h=(this.uiDialogTitlebarCloseText=c("<span/>")).addClass("ui-icon ui-icon-closethick").text(n.closeText).appendTo(j),d=c("<span/>").addClass("ui-dialog-title").attr("id",e).html(k).prependTo(f);f.find("*").add(f).disableSelection();(n.draggable&&c.fn.draggable&&this._makeDraggable());(n.resizable&&c.fn.resizable&&this._makeResizable());this._createButtons(n.buttons);this._isOpen=false;(n.bgiframe&&c.fn.bgiframe&&l.bgiframe());(n.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(e){var d=this;if(false===d._trigger("beforeclose",e)){return}(d.overlay&&d.overlay.destroy());d.uiDialog.unbind("keypress.ui-dialog");(d.options.hide?d.uiDialog.hide(d.options.hide,function(){d._trigger("close",e)}):d.uiDialog.hide()&&d._trigger("close",e));c.ui.dialog.overlay.resize();d._isOpen=false},isOpen:function(){return this._isOpen},moveToTop:function(f,e){if((this.options.modal&&!f)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",e)}if(this.options.zIndex>c.ui.dialog.maxZ){c.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=++c.ui.dialog.maxZ));var d={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++c.ui.dialog.maxZ);this.element.attr(d);this._trigger("focus",e)},open:function(){if(this._isOpen){return}var e=this.options,d=this.uiDialog;this.overlay=e.modal?new c.ui.dialog.overlay(this):null;(d.next().length&&d.appendTo("body"));this._size();this._position(e.position);d.show(e.show);this.moveToTop(true);(e.modal&&d.bind("keypress.ui-dialog",function(h){if(h.keyCode!=c.ui.keyCode.TAB){return}var g=c(":tabbable",this),j=g.filter(":first")[0],f=g.filter(":last")[0];if(h.target==f&&!h.shiftKey){setTimeout(function(){j.focus()},1)}else{if(h.target==j&&h.shiftKey){setTimeout(function(){f.focus()},1)}}}));c([]).add(d.find(".ui-dialog-content :tabbable:first")).add(d.find(".ui-dialog-buttonpane :tabbable:first")).add(d).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(g){var f=this,d=false,e=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof g=="object"&&g!==null&&c.each(g,function(){return !(d=true)}));if(d){c.each(g,function(h,j){c('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(h).click(function(){j.apply(f.element[0],arguments)}).hover(function(){c(this).addClass("ui-state-hover")},function(){c(this).removeClass("ui-state-hover")}).focus(function(){c(this).addClass("ui-state-focus")}).blur(function(){c(this).removeClass("ui-state-focus")}).appendTo(e)});e.appendTo(this.uiDialog)}},_makeDraggable:function(){var d=this,f=this.options,e;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){e=f.height;c(this).height(c(this).height()).addClass("ui-dialog-dragging");(f.dragStart&&f.dragStart.apply(d.element[0],arguments))},drag:function(){(f.drag&&f.drag.apply(d.element[0],arguments))},stop:function(){c(this).removeClass("ui-dialog-dragging").height(e);(f.dragStop&&f.dragStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}})},_makeResizable:function(g){g=(g===undefined?this.options.resizable:g);var d=this,f=this.options,e=typeof g=="string"?g:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:f.minHeight,start:function(){c(this).addClass("ui-dialog-resizing");(f.resizeStart&&f.resizeStart.apply(d.element[0],arguments))},resize:function(){(f.resize&&f.resize.apply(d.element[0],arguments))},handles:e,stop:function(){c(this).removeClass("ui-dialog-resizing");f.height=c(this).height();f.width=c(this).width();(f.resizeStop&&f.resizeStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(j){var e=c(window),f=c(document),g=f.scrollTop(),d=f.scrollLeft(),h=g;if(c.inArray(j,["center","top","right","bottom","left"])>=0){j=[j=="right"||j=="left"?j:"center",j=="top"||j=="bottom"?j:"middle"]}if(j.constructor!=Array){j=["center","middle"]}if(j[0].constructor==Number){d+=j[0]}else{switch(j[0]){case"left":d+=0;break;case"right":d+=e.width()-this.uiDialog.outerWidth();break;default:case"center":d+=(e.width()-this.uiDialog.outerWidth())/2}}if(j[1].constructor==Number){g+=j[1]}else{switch(j[1]){case"top":g+=0;break;case"bottom":g+=e.height()-this.uiDialog.outerHeight();break;default:case"middle":g+=(e.height()-this.uiDialog.outerHeight())/2}}g=Math.max(g,h);this.uiDialog.css({top:g,left:d})},_setData:function(e,f){(b[e]&&this.uiDialog.data(b[e],f));switch(e){case"buttons":this._createButtons(f);break;case"closeText":this.uiDialogTitlebarCloseText.text(f);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(a+f);break;case"draggable":(f?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(f);break;case"position":this._position(f);break;case"resizable":var d=this.uiDialog,g=this.uiDialog.is(":data(resizable)");(g&&!f&&d.resizable("destroy"));(g&&typeof f=="string"&&d.resizable("option","handles",f));(g||this._makeResizable(f));break;case"title":c(".ui-dialog-title",this.uiDialogTitlebar).html(f||"&nbsp;");break;case"width":this.uiDialog.width(f);break}c.widget.prototype._setData.apply(this,arguments)},_size:function(){var e=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var d=this.uiDialog.css({height:"auto",width:e.width}).height();this.element.css({minHeight:Math.max(e.minHeight-d,0),height:e.height=="auto"?"auto":Math.max(e.height-d,0)})}});c.extend(c.ui.dialog,{version:"1.7.1",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function(d){return"ui-dialog-title-"+(d.attr("id")||++this.uuid)},overlay:function(d){this.$el=c.ui.dialog.overlay.create(d)}});c.extend(c.ui.dialog.overlay,{instances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(d){return d+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length===0){setTimeout(function(){c(document).bind(c.ui.dialog.overlay.events,function(f){var g=c(f.target).parents(".ui-dialog").andSelf().css("zIndex")||0;return(g>c.ui.dialog.overlay.maxZ)})},1);c(document).bind("keydown.dialog-overlay",function(f){(e.options.closeOnEscape&&f.keyCode&&f.keyCode==c.ui.keyCode.ESCAPE&&e.close(f))});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var d=c("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(e.options.bgiframe&&c.fn.bgiframe&&d.bgiframe());this.instances.push(d);return d},destroy:function(d){this.instances.splice(c.inArray(this.instances,d),1);if(this.instances.length===0){c([document,window]).unbind(".dialog-overlay")}d.remove()},height:function(){if(c.browser.msie&&c.browser.version<7){var e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(e<d){return c(window).height()+"px"}else{return e+"px"}}else{return c(document).height()+"px"}},width:function(){if(c.browser.msie&&c.browser.version<7){var d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var e=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(d<e){return c(window).width()+"px"}else{return d+"px"}}else{return c(document).width()+"px"}},resize:function(){var d=c([]);c.each(c.ui.dialog.overlay.instances,function(){d=d.add(this)});d.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",win=window,doc=document,nav=navigator,domLoadFnArr=[],regObjArr=[],objIdArr=[],listenersArr=[],script,timer=null,storedAltContent=null,storedAltContentId=null,isDomLoaded=false,isExpressInstallActive=false;var ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF,playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d&&!(typeof nav.mimeTypes!=UNDEF&&nav.mimeTypes[FLASH_MIME_TYPE]&&!nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)){d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/r/.test(d)?parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof win.ActiveXObject!=UNDEF){var a=null,fp6Crash=false;try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".7")}catch(e){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".6");playerVersion=[6,0,21];a.AllowScriptAccess="always"}catch(e){if(playerVersion[0]==6){fp6Crash=true}}if(!fp6Crash){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX)}catch(e){}}}if(!fp6Crash&&a){try{d=a.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)]}}catch(e){}}}}var u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=false,windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u);
/*@cc_on
			ie = true;
			@if (@_win32)
				windows = true;
			@elif (@_mac)
				mac = true;
			@end
		@*/
return{w3cdom:w3cdom,pv:playerVersion,webkit:webkit,ie:ie,win:windows,mac:mac}}();var onDomLoad=function(){if(!ua.w3cdom){return}addDomLoadEvent(main);if(ua.ie&&ua.win){try{doc.write("<script id=__ie_ondomload defer=true src=//:><\/script>");script=getElementById("__ie_ondomload");if(script){addListener(script,"onreadystatechange",checkReadyState)}}catch(e){}}if(ua.webkit&&typeof doc.readyState!=UNDEF){timer=setInterval(function(){if(/loaded|complete/.test(doc.readyState)){callDomLoadFunctions()}},10)}if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,null)}addLoadEvent(callDomLoadFunctions)}();function checkReadyState(){if(script.readyState=="complete"){script.parentNode.removeChild(script);callDomLoadFunctions()}}function callDomLoadFunctions(){if(isDomLoaded){return}if(ua.ie&&ua.win){var s=createElement("span");try{var t=doc.getElementsByTagName("body")[0].appendChild(s);t.parentNode.removeChild(t)}catch(e){return}}isDomLoaded=true;if(timer){clearInterval(timer);timer=null}var dl=domLoadFnArr.length;for(var i=0;i<dl;i++){domLoadFnArr[i]()}}function addDomLoadEvent(fn){if(isDomLoaded){fn()}else{domLoadFnArr[domLoadFnArr.length]=fn}}function addLoadEvent(fn){if(typeof win.addEventListener!=UNDEF){win.addEventListener("load",fn,false)}else{if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("load",fn,false)}else{if(typeof win.attachEvent!=UNDEF){addListener(win,"onload",fn)}else{if(typeof win.onload=="function"){var fnOld=win.onload;win.onload=function(){fnOld();fn()}}else{win.onload=fn}}}}}function main(){var rl=regObjArr.length;for(var i=0;i<rl;i++){var id=regObjArr[i].id;if(ua.pv[0]>0){var obj=getElementById(id);if(obj){regObjArr[i].width=obj.getAttribute("width")?obj.getAttribute("width"):"0";regObjArr[i].height=obj.getAttribute("height")?obj.getAttribute("height"):"0";if(hasPlayerVersion(regObjArr[i].swfVersion)){if(ua.webkit&&ua.webkit<312){fixParams(obj)}setVisibility(id,true)}else{if(regObjArr[i].expressInstall&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){showExpressInstall(regObjArr[i])}else{displayAltContent(obj)}}}}else{setVisibility(id,true)}}}function fixParams(obj){var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var e=createElement("embed"),a=nestedObj.attributes;if(a){var al=a.length;for(var i=0;i<al;i++){if(a[i].nodeName=="DATA"){e.setAttribute("src",a[i].nodeValue)}else{e.setAttribute(a[i].nodeName,a[i].nodeValue)}}}var c=nestedObj.childNodes;if(c){var cl=c.length;for(var j=0;j<cl;j++){if(c[j].nodeType==1&&c[j].nodeName=="PARAM"){e.setAttribute(c[j].getAttribute("name"),c[j].getAttribute("value"))}}}obj.parentNode.replaceChild(e,obj)}}function showExpressInstall(regObj){isExpressInstallActive=true;var obj=getElementById(regObj.id);if(obj){if(regObj.altContentId){var ac=getElementById(regObj.altContentId);if(ac){storedAltContent=ac;storedAltContentId=regObj.altContentId}}else{storedAltContent=abstractAltContent(obj)}if(!(/%$/.test(regObj.width))&&parseInt(regObj.width,10)<310){regObj.width="310"}if(!(/%$/.test(regObj.height))&&parseInt(regObj.height,10)<137){regObj.height="137"}doc.title=doc.title.slice(0,47)+" - Flash Player Installation";var pt=ua.ie&&ua.win?"ActiveX":"PlugIn",dt=doc.title,fv="MMredirectURL="+win.location+"&MMplayerType="+pt+"&MMdoctitle="+dt,replaceId=regObj.id;if(ua.ie&&ua.win&&obj.readyState!=4){var newObj=createElement("div");replaceId+="SWFObjectNew";newObj.setAttribute("id",replaceId);obj.parentNode.insertBefore(newObj,obj);obj.style.display="none";var fn=function(){obj.parentNode.removeChild(obj)};addListener(win,"onload",fn)}createSWF({data:regObj.expressInstall,id:EXPRESS_INSTALL_ID,width:regObj.width,height:regObj.height},{flashvars:fv},replaceId)}}function displayAltContent(obj){if(ua.ie&&ua.win&&obj.readyState!=4){var el=createElement("div");obj.parentNode.insertBefore(el,obj);el.parentNode.replaceChild(abstractAltContent(obj),el);obj.style.display="none";var fn=function(){obj.parentNode.removeChild(obj)};addListener(win,"onload",fn)}else{obj.parentNode.replaceChild(abstractAltContent(obj),obj)}}function abstractAltContent(obj){var ac=createElement("div");if(ua.win&&ua.ie){ac.innerHTML=obj.innerHTML}else{var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var c=nestedObj.childNodes;if(c){var cl=c.length;for(var i=0;i<cl;i++){if(!(c[i].nodeType==1&&c[i].nodeName=="PARAM")&&!(c[i].nodeType==8)){ac.appendChild(c[i].cloneNode(true))}}}}}return ac}function createSWF(attObj,parObj,id){var r,el=getElementById(id);if(el){if(typeof attObj.id==UNDEF){attObj.id=id}if(ua.ie&&ua.win){var att="";for(var i in attObj){if(attObj[i]!=Object.prototype[i]){if(i.toLowerCase()=="data"){parObj.movie=attObj[i]}else{if(i.toLowerCase()=="styleclass"){att+=' class="'+attObj[i]+'"'}else{if(i.toLowerCase()!="classid"){att+=" "+i+'="'+attObj[i]+'"'}}}}}var par="";for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par+='<param name="'+j+'" value="'+parObj[j]+'" />'}}el.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+att+">"+par+"</object>";objIdArr[objIdArr.length]=attObj.id;r=getElementById(attObj.id)}else{if(ua.webkit&&ua.webkit<312){var e=createElement("embed");e.setAttribute("type",FLASH_MIME_TYPE);for(var k in attObj){if(attObj[k]!=Object.prototype[k]){if(k.toLowerCase()=="data"){e.setAttribute("src",attObj[k])}else{if(k.toLowerCase()=="styleclass"){e.setAttribute("class",attObj[k])}else{if(k.toLowerCase()!="classid"){e.setAttribute(k,attObj[k])}}}}}for(var l in parObj){if(parObj[l]!=Object.prototype[l]){if(l.toLowerCase()!="movie"){e.setAttribute(l,parObj[l])}}}el.parentNode.replaceChild(e,el);r=e}else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m])}else{if(m.toLowerCase()!="classid"){o.setAttribute(m,attObj[m])}}}}for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n.toLowerCase()!="movie"){createObjParam(o,n,parObj[n])}}el.parentNode.replaceChild(o,el);r=o}}}return r}function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p)}function removeSWF(id){var obj=getElementById(id);if(obj&&(obj.nodeName=="OBJECT"||obj.nodeName=="EMBED")){if(ua.ie&&ua.win){if(obj.readyState==4){removeObjectInIE(id)}else{win.attachEvent("onload",function(){removeObjectInIE(id)})}}else{obj.parentNode.removeChild(obj)}}}function removeObjectInIE(id){var obj=getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=null}}obj.parentNode.removeChild(obj)}}function getElementById(id){var el=null;try{el=doc.getElementById(id)}catch(e){}return el}function createElement(el){return doc.createElement(el)}function addListener(target,eventType,fn){target.attachEvent(eventType,fn);listenersArr[listenersArr.length]=[target,eventType,fn]}function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10)||0;v[2]=parseInt(v[2],10)||0;return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false}function createCSS(sel,decl){if(ua.ie&&ua.mac){return}var h=doc.getElementsByTagName("head")[0],s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media","screen");if(!(ua.ie&&ua.win)&&typeof doc.createTextNode!=UNDEF){s.appendChild(doc.createTextNode(sel+" {"+decl+"}"))}h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){var ls=doc.styleSheets[doc.styleSheets.length-1];if(typeof ls.addRule==OBJECT){ls.addRule(sel,decl)}}}function setVisibility(id,isVisible){var v=isVisible?"visible":"hidden";if(isDomLoaded&&getElementById(id)){getElementById(id).style.visibility=v}else{createCSS("#"+id,"visibility:"+v)}}function urlEncodeIfNecessary(s){var regex=/[\\\"<>\.;]/;var hasBadChars=regex.exec(s)!=null;return hasBadChars?encodeURIComponent(s):s}var cleanup=function(){if(ua.ie&&ua.win){window.attachEvent("onunload",function(){var ll=listenersArr.length;for(var i=0;i<ll;i++){listenersArr[i][0].detachEvent(listenersArr[i][1],listenersArr[i][2])}var il=objIdArr.length;for(var j=0;j<il;j++){removeSWF(objIdArr[j])}for(var k in ua){ua[k]=null}ua=null;for(var l in swfobject){swfobject[l]=null}swfobject=null})}}();return{registerObject:function(objectIdStr,swfVersionStr,xiSwfUrlStr){if(!ua.w3cdom||!objectIdStr||!swfVersionStr){return}var regObj={};regObj.id=objectIdStr;regObj.swfVersion=swfVersionStr;regObj.expressInstall=xiSwfUrlStr?xiSwfUrlStr:false;regObjArr[regObjArr.length]=regObj;setVisibility(objectIdStr,false)},getObjectById:function(objectIdStr){var r=null;if(ua.w3cdom){var o=getElementById(objectIdStr);if(o){var n=o.getElementsByTagName(OBJECT)[0];if(!n||(n&&typeof o.SetVariable!=UNDEF)){r=o}else{if(typeof n.SetVariable!=UNDEF){r=n}}}}return r},embedSWF:function(swfUrlStr,replaceElemIdStr,widthStr,heightStr,swfVersionStr,xiSwfUrlStr,flashvarsObj,parObj,attObj){if(!ua.w3cdom||!swfUrlStr||!replaceElemIdStr||!widthStr||!heightStr||!swfVersionStr){return}widthStr+="";heightStr+="";if(hasPlayerVersion(swfVersionStr)){setVisibility(replaceElemIdStr,false);var att={};if(attObj&&typeof attObj===OBJECT){for(var i in attObj){if(attObj[i]!=Object.prototype[i]){att[i]=attObj[i]}}}att.data=swfUrlStr;att.width=widthStr;att.height=heightStr;var par={};if(parObj&&typeof parObj===OBJECT){for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par[j]=parObj[j]}}}if(flashvarsObj&&typeof flashvarsObj===OBJECT){for(var k in flashvarsObj){if(flashvarsObj[k]!=Object.prototype[k]){if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+k+"="+flashvarsObj[k]}else{par.flashvars=k+"="+flashvarsObj[k]}}}}addDomLoadEvent(function(){createSWF(att,par,replaceElemIdStr);if(att.id==replaceElemIdStr){setVisibility(replaceElemIdStr,true)}})}else{if(xiSwfUrlStr&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){isExpressInstallActive=true;setVisibility(replaceElemIdStr,false);addDomLoadEvent(function(){var regObj={};regObj.id=regObj.altContentId=replaceElemIdStr;regObj.width=widthStr;regObj.height=heightStr;regObj.expressInstall=xiSwfUrlStr;showExpressInstall(regObj)})}}},getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]}},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(attObj,parObj,replaceElemIdStr){if(ua.w3cdom){return createSWF(attObj,parObj,replaceElemIdStr)}else{return undefined}},removeSWF:function(objElemIdStr){if(ua.w3cdom){removeSWF(objElemIdStr)}},createCSS:function(sel,decl){if(ua.w3cdom){createCSS(sel,decl)}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(param){var q=doc.location.search||doc.location.hash;if(param==null){return urlEncodeIfNecessary(q)}if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(isExpressInstallActive&&storedAltContent){var obj=getElementById(EXPRESS_INSTALL_ID);if(obj){obj.parentNode.replaceChild(storedAltContent,obj);if(storedAltContentId){setVisibility(storedAltContentId,true);if(ua.ie&&ua.win){storedAltContent.style.display="block"}}storedAltContent=null;storedAltContentId=null;isExpressInstallActive=false}}}}}();var boundEmbeds={};function std_json_callback(a){if(a.rc==0){if(a.url){top.location=a.url}else{top.location.reload()}}else{SP.util.alert(a.msg)}}function setCookie(c,e,a){c+="."+spp.base_domain;var d=""+c+"="+e+";path=/;domain="+spp.cookie_domain;if(a){var b=new Date();b.setTime(b.getTime()+3600000*24*a);d+=";expires="+b.toGMTString()}document.cookie=d}function setTimezoneOffsetInHours(){var b=new Date();var a=-b.getTimezoneOffset()/60;setCookie("timezone_offset",a)}function replace_quoted_times(){$(".spp_time").each(function(){var e=$(this);var b=new Date();var g=parseInt(e.attr("ut"))*1000;b.setTime(g);var h=b.getFullYear();var f=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][b.getMonth()];var k=b.getDate();k=""+(k<10?"0":"")+k;var d=b.getHours();var j="AM";if(d>11){d-=12;j="PM"}else{if(d==0){d=12}}d=""+(d<10?"0":"")+d;var c=b.getMinutes();c=""+(c<10?"0":"")+c;var a=b.getSeconds();a=""+(a<10?"0":"")+a;var l=f+" "+k+", "+h+" "+d+":"+c+" "+j;e.text(l)})}var embedSwf=function(a){swfobject.embedSWF(boundEmbeds[a].src,a,boundEmbeds[a].width,boundEmbeds[a].height,"9.0.0",SP.util.make_static_url("/widgets/expressInstall.swf"),boundEmbeds[a].flash_vars,boundEmbeds[a].flash_params,boundEmbeds[a].flash_attributes)};var bind_embed=function(element,width,height,id){var e=$(element);if(e.hasClass("bindedEmbed")){return false}var flash_vars=eval("("+e.attr("flashvars")+")");width=width||e.attr("width")||flash_vars.width||300;height=height||e.attr("height")||flash_vars.height||300;id=id||e.attr("id");var flash_params=eval("("+e.attr("flashparams")+")");if(!flash_params){flash_params={quality:e.attr("quality"),scale:e.attr("scale"),salign:e.attr("salign"),wmode:e.attr("wmode"),allowNetworking:e.attr("allowNetworking"),allowScriptAccess:e.attr("allowScriptAccess"),enableJavascript:e.attr("enableJavascript")}}var flash_attributes={};flash_attributes["class"]="bindedEmbed";flash_vars.width=width;flash_vars.height=height;boundEmbeds[id]={src:e.attr("data")||e.attr("src"),width:width,height:height,flash_vars:flash_vars,flash_params:flash_params,flash_attributes:flash_attributes};embedSwf(id)};var unbind_embed=function(element){var e=$(element);var unbind_id=e.attr("id");if(!unbind_id){var flash_attributes=eval("("+e.attr("flashattributes")+")");unbind_id=flash_attributes.name}swfobject.removeSWF(unbind_id)};var bind_embeds=function(){if(EPISODES.available){window.postMessage("EPISODES:mark:spp_bind_embeds","*")}var b=$(".bindableEmbed");for(var a=0;a<b.length;a++){bind_embed(b[a])}};var unbind_embeds=function(){var b=$(".bindedEmbed");for(var a=0;a<b.length;a++){var c=b[a];unbind_embed(c)}};var toast_timer;function show_coins_toast(a){$("#total_coins").text(SP.util.comma_separate(a));if($("#spp_coin_toast").css("display")=="none"){$("#spp_coin_toast").show("drop",{direction:"down"});toast_timer=$.timer(3000,function(b){$("#spp_coin_toast").hide("drop",{direction:"down"});b.stop()})}else{toast_timer.reset(3000)}}var server_call=function(b,c,d){var a;if(b.substring(0,5)=="ajax/"){a="/spp/"+b}else{a=spp.servlet_base_url+b}$.get(a,c,d,"json")};var ttimer;function show_toast(c,b){var a=$("#toast");$("#toast_title").html(c);$("#toast_content").html(b);if(a.css("display")=="none"){a.show("drop",{direction:"down"});ttimer=$.timer(3000,function(d){a.hide("drop",{direction:"down"});d.stop()})}else{ttimer.reset(3000)}}$(document).ready(function(){var b=SP.globals.tab;$("#tab_playground").hover(function(){if(b!="friends"){$(this).toggleClass("selected")}$("#friends_menu").slideDown("fast").show()},function(){$("#friends_menu").slideUp("fast");if(b!="friends"){$(this).toggleClass("selected")}});if(js_vars._is_club_member){$("#tab_club").hover(function(){if(b!="club"){$(this).toggleClass("selected")}$("#club_menu").slideDown("fast").show()},function(){$("#club_menu").slideUp("fast");if(b!="club"){$(this).toggleClass("selected")}})}$("#membership-popup").dialog({width:660,bgiframe:true,modal:true,autoOpen:false,title:"Sign up to be a SuperPoke! Pets Member!"});var a=false;$(".spp_header_right").css({"float":"right",width:200}).click(function(f){a=true;var d="http://spp.com";var c="SuperPoke! Pets";if(window.sidebar){}else{if(window.external||document.all){window.external.AddFavorite(d,c)}else{if(window.opera){$("#spp_header").attr("href",d);$("#spp_header").attr("title",c);$("#spp_header").attr("rel","sidebar")}else{}}}return false});$(".spp_header_left").click(function(c){if(!a){SP.spa.show_info_popup()}a=false});$.each(spp.havelist,function(){$("#wish_item_"+this).addClass("list_item_match")});$.each(spp.wishlist,function(){$("#have_item_"+this).addClass("list_item_match")});setTimezoneOffsetInHours();replace_quoted_times();bind_embeds();wait_for_data(SP.loadFuncs)});function on_pet_swf_click(a){SP.MemberForm.show({callback:function(){var c={action_type:5};var d="minipet_friend_action";c.action_token=a;var b=function(f){if(f.coins){show_coins_toast(f.coins);var e=$(".bindedEmbed")[0];if(e){e.play_sound()}}};SP.funcs.server_call(d,c,b)},show_toast:true,source:SP.Activity.Flags.memberform_source_minipet_click})}function wait_for_data(a){if(SP.get("data_ready")){a()}else{SP.add_listener("data_ready",a)}}var emailPattern=/^[_\.\+0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]*\.)+[a-zA-Z]{2,4}$/;var urlPattern=/^[-A-Za-z0-9]+$/i;var nameExcludePattern=/[<>"']/;var validate_member_properties=function(d){$("#"+d+" .memb_signup_error").hide();var e=$.trim($("#"+d+" .member_first_name_field").val()||"");var j=$.trim($("#"+d+" .member_last_name_field").val()||"");var f=$.trim($("#"+d+" .member_email_field").val()||"");var a=$.trim($("#"+d+" .member_url_field").val()||"");var g=false;if(!SP.validate(e+j,"member_name",true,false)){var b=$("#"+d+" .memb_name_error");b.text("You must enter a valid name (no punctuation!)").show();g=true}if(!SP.validate(f,"email",true,false)){var b=$("#"+d+" .memb_email_error");b.text("You must enter a valid email address").show();g=true}if(!SP.validate(a,"member_url",true,true)){var b=$("#"+d+" .memb_url_error");b.text("You must enter a valid SPP URL (no special characters!)").show();g=true}var h=null;$("#"+d+" .member_password_field").each(function(){h=$(this).val()});if(h!==null){var c=$("#"+d+" .member_confirm_password_field").val()||"";if(h.length<5){var b=$("#"+d+" .memb_password_error");b.text("Password must be 5 characters or longer").show();g=true}else{if(h!=c){var b=$("#"+d+" .memb_password_error");b.text("Passwords don't match").show();g=true}}}return g?null:{first_name:e,last_name:j,email:f,url:a,password:h,password_confirm:c}};Paginator=function(f,a,b,d,e){if(f==undefined){f=[]}else{if(typeof(f)=="string"){this.id=f;f=[f]}else{if(!f.length){f=[$(f)]}}}for(var c=0;c<f.length;c++){if(typeof(f[c])=="string"){f[c]=$("#"+f[c])}else{if(f[c] instanceof jQuery){f[c]=f[c][0]}}}if(!d){d=5}this.ids=f;this.currentPage=0;this.itemsPerPage=e?e:10;this.shown_pages=d;this.verbose=(typeof(a)=="undefined"?true:a);this.show_pagination=(typeof(b)=="undefined"?true:b);this.total=null};Paginator.prototype.update=function(c,d,b,g){var f=this;if(c){f.total=c}else{c=f.total}if(d){f.currentPage=d}else{if(f.currentPage==undefined){f.currentPage=0}d=f.currentPage}if(b){f.itemsPerPage=b}else{b=f.itemsPerPage}var e=(d*b)+1;if(c==0){e=0}var a=(d*b)+b;if(a>c){a=c}$.each(f.ids,function(m,o){var k=$(o);var p=SPAN({"class":"item_count"},"Items "+e+" - "+a+" of  "+c);var s=DIV({id:"controls_paginator_div"+((m>0)?("_"+m):("")),"class":"paginator",style:"padding: 5px 0px 10px;"});if(d>0){f.createLink(s,"Prev",d-1,g,false)}var q=Math.ceil(c/b);var h=parseInt(f.shown_pages/2);if(q>1){var r=(q>f.shown_pages&&d>h)?d-h:0;var l=(q>f.shown_pages)?f.shown_pages:q;if(d+h>q&&q>f.shown_pages){r=q-f.shown_pages}for(var n=r;n<(r+l);++n){if(n<q){f.createLink(s,(n+1),n,g,(n==d))}}}if(a<c){f.createLink(s,"Next",d+1,g,false)}k.empty();if(f.show_pagination){k.append(s)}if(f.verbose){k.append(p)}})};Paginator.prototype.createLink=function(a,f,e,g,c){var d=this;var b=SPAN({"class":(c?"paginator_selected":""),style:"padding-left: 2px; padding-right: 2px; cursor: pointer;"},A({onclick:function(){d.setCurrentPage(e);g(e);return false}},f));a.appendChild(b)};Paginator.prototype.setCurrentPage=function(a){this.currentPage=a};Paginator.prototype.getCurrentPage=function(){return this.currentPage};Paginator.prototype.getItemsPerPage=function(){return this.itemsPerPage};Paginator.prototype.setItemsPerPage=function(a){this.itemsPerPage=a};Paginator.prototype.renderPage=function(e){var b=this.getItemsPerPage();var a=this.my_data.length;var f=$(this.my_target).html("");for(var c=e*b;((c<a)&&(c<(e+1)*b));c++){f.append(this.callback(this.my_data[c]))}var d=this;this.update(false,e,false,function(g){d.renderPage(g)})};Paginator.prototype.paginateThis=function(b,a,c){this.total=a.length;this.my_data=a;this.my_target=b;this.callback=c;this.renderPage(0)};function display_badge_popup(b,a,c){SP.funcs.server_call("get_user_badges",{uid_tokens:b},function(g){var e=g[b];var d=3;if(e.length>12){d=5}row=Math.ceil(e.length/d);var f=new SP.controls.BadgePopup(e,function(j,h){$("body").append(j)},null,row,d);f.paginate();f.paginator.style={"background-color":"#00FFFF",border:"1px solid #0000FF","min-width":"10px","float":"left",margin:"2px",padding:"2px",color:"#0000FF"};f.paginator.disabled_style={"background-color":"#444444",color:"#AAAAAA"};SP.globals.badge_popup=f;f.popup(a,c,{padding:"10px"})})}function display_compliment_popup(b,a,c){SP.funcs.server_call("get_user_compliments",{uid_tokens:b},function(e){compliment_counts=e[b];compliment_map=SP.constants.compliments;compliments=[];for(var d in compliment_map){if("disabled" in compliment_map[d]&&compliment_map[d]["disabled"]){continue}compliment=compliment_map[d];if(d in compliment_counts){compliment.count=compliment_counts[d]}else{compliment.count=0}compliments.push(compliment)}contents=$(DIV());table=$(TABLE()).css({"margin-left":"5px"});tbody=$(TBODY());contents.append(table.append(tbody));for(var d=0;d<compliments.length;d++){row=$(TR());row.append($(TD()).append(SP.util.make_img(compliments[d].img_small)));row.append($(TD()).text(compliments[d].name_long).css({"font-weight":"normal",padding:"5px","padding-right":"70px"}));row.append($(TD()).text(compliments[d].count).css({"font-weight":"bold",color:"red"}));tbody.append(row)}popup=SP.util.show_info_popup("Compliments",a,c,contents);$("body").append(popup)})}var SP_FB_Connect={};var fbConnected=false;SP.globals.fbConnected=false;SP_FB_Connect.connected=false;SP_FB_Connect._onConnectStack=[];SP_FB_Connect.setConnected=function setConnected(a){fbConnected=SP.globals.fbConnected=SP_FB_Connect.connected=a;if(a){SP.console.info("FBConnect: connected")}else{SP.console.info("FBConnect: Not connected")}};SP_FB_Connect.isConnected=function isConnected(){return SP_FB_Connect.connected};var onConnected=SP_FB_Connect.onConnected=function onConnected(a){$.cookie("fbconnect",null,{path:"/",domain:spp.cookie_domain});if(spp.viewer_fb_id&&spp.viewer_fb_id!=a){SP.log.jsonp_log_impression("fbconnect_wronguser_impression",{context_info:a});SP.console.info("FBConnect: Wrong user");FB.Connect.logout(onNotConnected)}else{SP_FB_Connect.setConnected(true);$("#spp_info").hide();$("#fb_info").html('Logged in as: <fb:name uid="loggedinuser" useyou="false" ></fb:name>&nbsp;&nbsp;&nbsp;&nbsp;<fb:profile-pic uid="loggedinuser" linked="false" width="16" height="16" ></fb:profile-pic><img src="'+SP.util.make_static_url("/images/superpet/facebook/connect_light_small_short.gif")+'">');FB.XFBML.Host.parseDomTree();if(EPISODES.available){window.postMessage("EPISODES:measure:SP_FB_Connect","*")}SP.log.jsonp_log_impression("fbconnect_user_impression",{context_info:a});if(spp.on_fb_connect){spp.on_fb_connect()}while(SP_FB_Connect._onConnectStack.length>0){(SP_FB_Connect._onConnectStack.pop())()}}};SP_FB_Connect.wouldBeNice=function wouldBeNice(a){if(SP_FB_Connect.isConnected()){a()}else{SP_FB_Connect._onConnectStack.push(a)}};var onNotConnected=SP_FB_Connect.onConnected=function onConnected(){SP_FB_Connect.setConnected(false);$("#fb_info").html("");if(spp_profile.invite_page){window.location="/spp/profile/myprofile"}};var logout=SP_FB_Connect.logout=function logout(a){if(SP_FB_Connect.isConnected()){FB.Connect.logout(function(){window.location.href=a});$("#invite_fb_link:visible").fadeOut("fast");return false}return true};var requestFBConnection=SP_FB_Connect.requestFBConnection=function requestFBConnection(b,a){if(!spp.viewer_fb_id||($.cookie("fbconnect")&&!a)){if(b){return b()}else{return true}}FB.ensureInit(function(){FB.Connect.requireSession(b,true);if(!SP_FB_Connect.isConnected()){$.cookie("fbconnect","dontbotherme",{expires:1,path:"/",domain:spp.cookie_domain})}});return false};var announcement_banner_click=function(a){SP.log.jsonp_log_click("announcement_banner_click");window.open(a)};var announcement_banner_hide_click=function(){SP.log.jsonp_log_click("announcement_banner_closed");$("#announcement_banner").hide("blind");SP.funcs.server_call("hide_announcement_banner",{})};var select_tab=function(c,g){g=g||{};var b=false;var a="";var e="http://"+spp.cookie_domain;switch(c){case"playground":if(SP.get("tab")=="profile"&&"section" in g){SP.get("petsection").select_section(g.section);if("oldcustomize" in g){$("#tab_customize").removeClass("selected_tab").addClass("selected");$("#tab_profile").removeClass("selected").addClass("selected_tab")}else{$("#tab_customize").removeClass("selected").addClass("selected_tab");$("#tab_profile").removeClass("selected_tab").addClass("selected")}}else{b=spp_profile.home_url;if(spp_profile.profile_sid_token){a="&"+spp_profile.profile_sid_token}}break;case"friends":b="/spp/profile/friends";break;case"customize":b="/spp/customize";break;case"petshop":b="/spp/profile/petshop";break;case"arcade":b="/spp/arcade";break;case"inbox":b="/spp/profile/requests";break;case"invite":b="/spp/invite";break;case"getcoins":break;case"buygold":b="/spp/profile/petshop";a="&buy_gold=1";break;case"help":break;case"settings":b="/spp/profile/settings";break;case"forum":e="";b=spp.forum_url;break;case"home":default:b="/";a="&home=true";break}if(b){var d=b.match("^http://")?b:e+b;var f="?";if(d.indexOf("?")!==-1){f="&"}d+=f+a+"&"+$.param(g)+"&fv="+(Math.ceil(Math.random()*100000000));setTimeout(function(){window.location.href=d},0)}};var create_pet=function(b,d,j,e,g,h,c){var f=null;var a=$("#pet_create_swf")[0];SP.log.jsonp_log_click("create_pet_button_click");d=d.replace(/^\s*|\s*$/,"");j=j.replace(/^\s*|\s*$/,"");e=e.replace(/^\s*|\s*$/,"");if(!SP.validate(d,"member_name",true,false)||!SP.validate(j,"member_name",true,false)){f="You must enter a valid name (no punctuation!)"}if(!SP.validate(e,"email",true,false)){f="You must enter a valid email address"}if(h.length<5){f="Password must be 5 characters or longer"}else{if(h!=c){f="Passwords don't match"}}if(f){a.onCreateError(f)}else{spp_create_params.pet_name=b;spp_create_params.first_name=d;spp_create_params.last_name=j;spp_create_params.email=e;spp_create_params.pet_type=g;spp_create_params.password=h;spp_create_params.password_confirm=c;SP.funcs.server_call("create_pet",spp_create_params,function(k){if(k.rc==0){window.location=k.next_url}else{setTimeout(function(){a.onCreateError(k.msg)},0)}})}};SP=SuperPet;SP.fb=SP.platform==="fb";SP.os=SP.platform==="os";SP.petsqa=SP.platform==="petsqa";SP.spp=SP.platform==="spp";(function(){var m=SP.ajax={},e=SP.log={},f=SP.console={},h=SP.globals=SP.globals||{},n=SP.constants=SP.constants||{},g=jQuery,l,j,c,k;SP.preload=function(r,q,p,o,t){var s;q=q||"link",p=p||"href",o=o||' rel="stylesheet" media="print" ',t=t||"head";s=g(["<",q,o,p,'="',r,'"></',q,">"].join(""));s.load(function(){s.remove()});g(t).append(s);return s};m.crossDomain=function d(o,p,q){p.jsonp=1;return jQuery.ajax({url:o,dataType:"jsonp",data:p,success:function(r){if(q){q(r,0)}},error:function(r){if(q){q(r,1)}}})};c=function c(){if(SP.fb){return 16}else{if(SP.os){return SP.ms?600016:300016}else{if(SP.spp){return 400016}}}return 0};k=function k(){if(SP.fb){return _viewer_uid}else{if(SP.os){return _pxuid}else{if(SP.spp){return spp.viewer_id_token}}}return 0};SP.log={jsonp_log:function b(o,s,r,t){var q=c(),p;if(!q||!o){f.log("jsonp log called without a proper source or event_code");return}r=r||{};p={uid:k()||0,event_code:o||0,foreign_id:s||0,flags:r.flags||0,context_info:r.context_info||0,context_info2:r.context_info2||0,ext_id:r.ext_id||0,source:q,session_key:r.session_key||0};m.crossDomain(document.location.protocol+"//"+logging_domain+"/log/sse/pt",p,t);return false},jsonp_log_click:function(p,o,q){return SP.log.jsonp_log("std_link_click",p,o,q)},jsonp_log_button_click:function(p,o,q){return SP.log.jsonp_log("button_click",p,o,q)},jsonp_log_impression:function(p,o,q){return SP.log.jsonp_log("std_impression",p,o,q)}};l=!h.site_isLive;j=function j(q){var p,o,s,r,u,v,t=q;p={firebug:{bit:1,detect:function(){return"firebug" in window.console}},chromium:{bit:2,detect:function(){return"chromium" in window}},ie8:{bit:3,detect:function(){return jQuery.browser.msie&&jQuery.browser.version==="8.0"}},opera:{bit:4,detect:function(){return false}},safari:{bit:5,detect:function(){return jQuery.browser.safari}}};o=function o(){var w=Array.prototype.slice.call(arguments),z=0,y,B;for(y=0,B=w.length;y<B;y+=1){z+=(1<<p[w[y]].bit)}return z};s={log:o("firebug","chromium","safari","ie8"),debug:o("firebug","chromium","safari"),info:o("firebug","chromium","safari","ie8"),warn:o("firebug","chromium","safari","ie8"),error:o("firebug","chromium","safari","ie8"),assert:o("firebug","chromium","safari","ie8"),dir:o("firebug","chromium","safari"),dirxml:o("firebug","chromium","safari"),trace:o("firebug","chromium","safari"),group:o("firebug","chromium","safari"),groupEnd:o("firebug","chromium","safari"),time:o("firebug","chromium","safari"),timeEnd:o("firebug","chromium","safari"),count:o("firebug","chromium","safari")};r=function r(y){var z,w;for(z in p){if(p.hasOwnProperty(z)){w=p[z];if(w.detect()&&(s[y]&(1<<w.bit))){return true}}}return false};u=function u(w){return function(){if(l&&window.console&&r(w)){if(!jQuery.browser.msie){window.console[w].apply(window.console,arguments)}else{window.console[w](Array.prototype.join.call(arguments,", "))}}}};for(v in s){if(s.hasOwnProperty(v)){t[v]=u(v)}}t.turnOff=function(){l=false};t.turnOn=function(){l=true}};j(f);SP.assert=function a(o,p){if(!o){throw p}}}());SP.globals.rendered_popups=[];SP.globals.img_dirs={0:"themes",1:"habitats",2:"gold_items",3:"habitat_items_2",4:"pet_items_2"};SP.globals.button_funcs=[];SP.FlashCallbacks={};if(SP.fb||SP.spp||SP.petsqa){slide.console=SP.console}(function(){var a={};var b={};SP.getLoadFuncs=function(){return a};SP.getPreFuncs=function(){return b};SP.addPreLoadFunc=function(c,d){b[c]=d};SP.addLoadFunc=function(d,e,c){c=c||{};if(c.tabs&&!$.isArray(c.tabs)){c.tabs=[c.tabs]}a[d]=function(){if(c.tabs&&($.inArray(SP.get("tab"),c.tabs)==-1)){return}e();if(c.onceOnly){SP.removeLoadFunc(d)}}};SP.removeLoadFunc=function(c){delete a[c]};SP.globals.loadFuncs_run_once=false;SP.loadFuncs=function(){for(var c in a){a[c]()}SP.set("loadFuncs_run_once",true)}})();SP.get=function(b,a){var c={pet_coins:null,pet_gold:null};SP.console.assert(!((b in c)&&(a!="deprecated")),b+" is a deprecated SP global. A replacement wrapper probably exists for that field.");var e=0;var d;if(b in SP.globals){e++;d=SP.globals[b]}if(b in SP.constants){e++;d=SP.constants[b]}if(b in SP.objects){e++;d=SP.objects[b]}if(e==1){return d}else{if(e==0){if(a===undefined){SP.console.error("Variable not located in SP namespaces: "+b)}else{return a}}else{throw"Ambiguous variable name can refer to more than one SP namespace: "+b}}};SP.set=function(c,a,e){var d=(e===undefined)?undefined:a;var f=(d===undefined)?a:e;if(c in SP.constants){throw"Cannot set constant: "+c}else{if(!(c in SP.globals)){throw"Variable not found in globals: "+c}else{var b=SP.get(c);if(d===undefined){SP.globals[c]=f}else{b=b[d];SP.globals[c][d]=f}if(d!==undefined){SP.invoke_listeners(c,[d,f,b])}else{SP.invoke_listeners(c,[f,b])}}}};SP.create_or_set=function(b,a,d){if(b in SP.globals){SP.set(b,a,d);return false}var c=(d===undefined)?undefined:a;var e=(c===undefined)?a:d;if(c===undefined){SP.globals[b]=e;SP.invoke_listeners(b,[e,null])}else{SP.globals[b]={};SP.globals[b][c]=e;SP.invoke_listeners(b,[c,e,null])}return true};SP.get_or_create=function(b,a){try{value=SP.get(b)}catch(c){SP.globals[b]=a;value=a}finally{return value}};SP.update_dict=function(f,e,b,a){var d;var c;if(typeof(e)=="object"){d=e;c=b}else{d={};d[e]=b;c=a}var g=SP.get(f);if(typeof(g)!="object"){throw f+": "+g+" is not a valid dict."}if(d){for(field in d){if(!(field in g)||c){g[field]=d[field]}}}};SP.listeners={};SP.universal_listeners=[];SP.get_listeners=function(a){var b;if(a===null){b=SP.universal_listeners}else{b=SP.listeners[a];if(!b){b=[];SP.listeners[a]=b}}return b};SP.add_listener=function(a,c){var b=SP.get_listeners(a);b.push(c);var d=b.length-1;return d};SP.replace_listener=function(a,c,b){SP.get_listeners(a)[c]=b};SP.remove_listener=function(a,b){SP.get_listeners(a)[b]=null};SP.invoke_listeners=function(a,b){$.each(SP.universal_listeners,function(e,g){if($.isFunction(g)){var f=b||[];f=f.slice(0);f.unshift(a);g.apply(this,f)}});var d=SP.listeners[a];if(d){for(var c=0;c<d.length;c++){if(d[c]){d[c].apply(this,b||[])}}}};SP.by_platform=function(b,a){if(SP.platform in b){return b[SP.platform]}else{if(a===undefined){throw"SP.by_platform: Platform "+SP.platform+" not in "+$.toJSON(b)+" and no default value given."}else{return a}}};SP.bp=SP.by_platform;SP.exec_by_platform=function(a,b){if(SP.platform in a){var c=a[SP.platform];return c()}else{if(b){return b()}}};SP.ebp=SP.exec_by_platform;SP.interpret_by_platform=function(statements,default_value){if(SP.platform in statements){return eval(statements[SP.platform])}else{if(default_value===undefined){SP.console.warn("SP.interpret_by_platform: Platform "+SP.platform+" not in "+$.toJSON(statements)+" and no default value given.");return}else{return default_value}}};SP.ibp=SP.interpret_by_platform;SP._object_refs=[];SP._setup_control=function(c){var a=SP.controls[c];var b=function(){this._object_id=SP._object_refs.length;SP._object_refs.push(this);this._control_name=c;this._swf_objs=[];this.container=null;this.dom_obj=null;this._objects={};this.visible=true;this.onrender=null;this.mangle_object_ids=true;this._listener_ids={};var e=this;var d={};$.each(e,function(f,g){if(typeof(g)=="function"){d[f]=e[f];e[f]=function(){var h=d[f].apply(e,arguments);if(h===undefined){return e}else{return h}}}});return a.apply(this,arguments)};b.prototype=a.prototype;SP.controls[c]=b;SP.util.update_dict(b.prototype,{set:function(d){if(arguments.length==2){SP.assert(arguments[0] in this,"Field '"+arguments[0]+"' does not exist in object #"+this._object_id+" ("+this._control_name+")");this[arguments[0]]=arguments[1]}else{for(var e in d){SP.assert(e in this,"Field '"+e+"' does not exist in object #"+this._object_id+" ("+this._control_name+")");this[e]=d[e]}}},bind:function(e,f){var d;if(typeof(e)=="string"){d={};d[e]=f}else{d=e}for(event_name in d){this.set("on"+event_name,d[event_name])}},unbind:function(d){this.set("on"+d,null)},render:function(){var e=this;var d=false;if(!e.visible){return}if(!e._event_handler("render")){return}if(e.dom_obj){e.dom_obj.remove();if(e._popup){d=true}}e.dom_obj=$(DIV());e._render.apply(e,arguments);if(d){e._popup.show()}if(e.mangle_object_ids){e._id_dom_objects()}if(e.container){e.container.empty().append(e.dom_obj)}if(e.is_displayed){e.display_swfs()}},_id_dom_objects:function(){for(var d in this._objects){if(this._objects[d].size&&this._objects[d].size()==1){this._objects[d].attr("id","sp_obj_"+this._object_id+"_"+d)}}},render_:function(d){var e=this;return function(){if(!e.visible){return}else{SP.assert(d in e.render,e.control_name+".render."+d+" does not exist.");return e.render[d].apply(e,arguments)}}},render_to:function(d,e){this.container=d;this.render.apply(this,e||[])},_event_handler:function(f,d){var h=this;var e=h["on"+f];var g;if(e){g=e.apply(h,d||[])}return g!==false},show:function(){var d=this;if(!d.visible){d.visible=true;d.render();if(d._popup){d._popup.fadeIn(undefined,this._event_handler("show"))}}},hide:function(){var d=this;if(d.visible){d.visible=false;if(d._popup){this._popup.fadeOut()}else{if(d.dom_obj){d.dom_obj.hide()}}}},is_displayed:function(){return this.dom_obj&&this.dom_obj.parents().index($("body"))>=0||false},display_swfs:function(){this.dom_obj.find(".superpet_swf_container").each(function(f,d){var h=parseInt($(d).attr("objectid"));var e=parseInt($(d).attr("swfid"));var g=SP._object_refs[h]._swf_objs[e];g.insert_swf=function(){g.container.empty().append($(DIV()).attr("id",g.label).css("display","inline").text("..."));swfobject.createSWF(g.attributes,g.params,g.label);setTimeout(function(){g.dom_obj=$("#"+g.label)[0];$(g.dom_obj).css("outline","none")},1)};g.remove_swf=function(){swfobject.removeSWF(g.label)};g.refresh_swf=function(){g.remove_swf();g.insert_swf()};g.insert_swf()});return false},cleanup:function(){if(this._cleanup){this._cleanup()}if(this.is_displayed){this.dom_obj.find(".superpet_swf").each(function(e,f){var d=$(f).attr("id");swfobject.removeSWF(d)})}},set_listener:function(d,e){if(d in this._listener_ids){SP.replace_listener(d,this._listener_ids[d],e)}else{this._listener_ids[d]=SP.add_listener(d,e)}},make_swf:function(s,f,t,g,j,h,o){var n=this;var e=this._swf_objs.length;var p="superpet_obj_"+this._object_id+"_swf_"+e;var r=SP.get("pet_domain",null);var m="http://"+r;var l=r;if(SP.get("load_flash_from_static",false)){if(!s.match("^https?://")){s=SP.util.make_static_url(s)}l=SP.get("ver_domain")}var k=s.match("^https?://")?s:(m+s);if(!k.match("^https?://")){k="http://"+k}j=SP.util.update_dict({data:k,width:f,height:t},j,true);g=SP.util.update_dict({site:r,staticsite:l,owner_id:SP.get("owner_id",null)||SP.console.warn("No owner ID for "+p||0),viewer_id:SP.get("viewer_id",null)||SP.console.warn("No viewer ID for "+p||0),object_id:this._object_id,swf_id:e},g,true);h=SP.util.update_dict({quality:"high",allowNetworking:"all",allowScriptAccess:"always",wmode:"transparent",flashvars:SP.util.dict_to_paramstr(g)},h,true);o=SP.util.update_dict(o||{},SP.swf_callbacks,false);var d=$(DIV()).attr({id:p+"_container","class":"superpet_swf_container",objectid:this._object_id,swfid:e}).html("...");var q={id:e,label:p,attributes:j,params:h,flashvars:g,callbacks:o,dom_obj:d,container:d,insert_swf:function(){},remove_swf:function(){},refresh_swf:function(){}};$(q).css("outline","none");this._swf_objs.push(q);return q}},false)};SP.swf_callbacks={get_viewer_pet:function(){return get_viewer_pet()},"SP.swf_store":function(a,b){return SP.swf_store(a,b)},"SP.swf_load":function(a){return SP.swf_load(a)},updatePetPower:function(){}};SP.lookup_swf_callbacks_intelligently=function(a){var b=a.split(".");var c=self;var d;while(b.length>0){d=b.shift();if(d in c){c=c[d]}else{return undefined}}return c};SP.swfcall=function(object_id,swf_id,func_name,args){args=args||[];SP.assert(args instanceof Array,'The args parameter in swfcall is supposed to be an Array. But you called "'+func_name+'" with '+args);if(object_id===null||isNaN(object_id)){SP.console.warn('Function "'+func_name+'" is called by a SWF which does not belong to a control.');return eval(func_name).apply(null,args)}var obj=SP._object_refs[object_id];var callbacks=obj._swf_objs[swf_id].callbacks;var return_val;if(func_name in callbacks){return_val=callbacks[func_name].apply(obj,args)}else{SP.console.warn('Function "'+func_name+'" not found in callbacks dict for object #'+object_id+" swf #"+swf_id,callbacks);var func=SP.lookup_swf_callbacks_intelligently(func_name);if($.isFunction(func)){return_val=func.apply(null,args)}}if(return_val===obj){SP.console.warn("Hey, is the swf callback function "+obj._control_name+"."+func_name+" accidentally returning a reference to its container object?")}return return_val};SP._swf_data={};SP.swf_store=function(a,b){SP._swf_data[a]=b};SP.swf_load=function(a){return SP._swf_data[a]};SP.properties=SP.properties||{};SP.get_property=function(a){return SP.properties[a]};SP.set_property=function(b,a){SP.properties[b]=a;SP.funcs.server_call("set_property",{prop_name:b,value:a})};SP.get_property_int=function(a,b){var c=SP.get_property(a)||(b||0);return parseInt(c,10)};SP.read_setting=function(a){return SP.get("packed_settings")[a]};SP.write_setting=function(b,a){SP.get("packed_settings")[b]=a;SP.funcs.server_call("write_packed_setting",{setting_name:b,value:a})};SP.function_by_platform=function(a,b){if(b===undefined){return SP.funcs[a]}else{return SP.funcs[a].apply(this,b)}};SP.fbp=SP.function_by_platform;SP.funcs={server_call:function(a,c,d,b){c.nocache=parseInt(Math.random()*100000000);if(SP.constants.cross_platform_calls&&SP.constants.cross_platform_calls[a]&&!b){a="ajax/"+a}server_call(a,c,d)},select_tab:function(b,e){e=e||{};var a={fb:{friends:"playground"},spp:{playground:"friends",home:"playground"},os:{playground:"friends"}};b=SP.bp(a)[b]||b;if(b=="gardening"){SP.fbp("go_to_gardening")();return}if(SP.get("petheader",null)){SP.get("petheader").select_tab(b)}var d=SP.getPreFuncs();for(var c in d){e=d[c](b,e)}SP.ebp({fb:function(){select_tab(b,e)},os:function(){_slideTabsSelect(b,e)},spp:function(){select_tab(b,e)}})},source:function(){return SP.ibp({fb:16,os:"slide.network.name == 'ms' ? 600016 : 300016",spp:400016})},owner_id:function(){return SP.ibp({fb:"_viewer_uid",os:"slide.user.getId(slide.user.owner)",spp:"SP.globals.viewer"})},viewer_id:function(){return SP.ibp({fb:"_viewer_uid",os:"slide.user.getId(slide.user.viewer)",spp:"SP.globals.viewer"})},viewer_id_token:function(){return SP.ibp({fb:"_member_uid_tok",os:"_member_uid_tok",spp:"spp.viewer_id_token"})},viewer_name:function(){return SP.ebp({fb:function(){return get_person_name(_viewer_uid)},os:function(){return friendName(slide.user.viewer)},spp:function(){return spp_profile.owner_name}})},is_logged_in:function(){return SP.fbp("viewer_id")()||SP.fbp("viewer_id_token")()},logging_id:function(){return SP.ibp({fb:"_viewer_uid",os:"_pxuid",spp:"spp.viewer_id_token"})},get_user:function(a){if(a=="viewer"){a=SP.fbp("viewer_id")()}if(a=="0"){return{uid:"0",is_viewer:false,is_owner:false}}return SP.ebp({fb:function(){var b={uid:a,img_url:get_person_img(a),first_name:get_person_name(a,true),name:get_person_name(a),is_viewer:_viewer_uid==a,is_owner:_viewer_uid==a};return b},os:function(){var c;if(a==slide.user.getId(slide.user.viewer)){c=slide.user.viewer}else{c=slide.data.PersonCollectionCache[opensocial.DataRequest.Group.VIEWER_FRIENDS]._person_cache[a]}var b={uid:a,img_url:friendImage(c),first_name:friendName(c).split(" ")[0],name:friendName(c),is_viewer:a==slide.user.getId(slide.user.viewer),is_owner:a==slide.user.getId(slide.user.owner)};return b},spp:function(){var c=SP.get("users")[a];if(!c){return null}var b={uid:a,is_viewer:""+a==SP.globals.viewer,is_owner:c.is_owner,name:c.full_name,img_url:c.mugshot_url||spp.default_feed_user_image,is_admin:c.is_admin};SP.util.update_dict(b,c);return b}})},spp_login_url:function(b,c){var a=SP.util.spp_url({member_url:SP.get("member_info",false)?SP.get("member_info").member_url:null,uid_token:SP.get("member_info",false)?(SP.get("member_info").uid_tok||self._member_uid_tok):null,path:b,params:c});if(SP.spp){return a}return make_spp_login_url(a)},go_to_pet_shop_item:function(b,a){SP.globals.go_to_ps_section=b;SP.globals.go_to_ps_item=a;SP.fbp("select_tab")("petshop")},go_to_gardening:function(){return SP.ebp({fb:function(){if(!SP.gardening.unlocked()){SP.gardening.lockedPopup();return false}else{SP.fbp("select_tab")("home",{section:"garden"})}},os:function(){if(!SP.gardening.unlocked()){SP.gardening.lockedPopup();return false}else{SP.fbp("select_tab")("home",{section:"garden"})}},spp:function(){if(!SP.gardening.unlocked()&&SP.get("viewer_is_owner")){SP.gardening.lockedPopup();return false}if(spp_profile.viewer_is_owner&&SP.get("petsection",null)){document.location.hash="app_top";SP.get("petsection").select_section("garden")}else{document.location=spp_profile.gardening_url}}})}};SP.log.ual_log=function(a,b,c){b=b||{};b.event=a;SP.funcs.server_call("ual_log",b,c)};SP.log.error=function(a){SP.funcs.server_call("tb_log",{msg:a})};SP.assert=function(a,b){if(!a){if(Math.random()*100<1){SP.log.error("JS Assertion Fail: "+b)}throw b}};SP.util={spp_url:function(a){if(SP.spp){return"http://"+SP.get("superpokepets_domain")+a.path+"?"+SP.util.dict_to_paramstr(a.params)}else{if(a.member_url){return"http://"+a.member_url+"."+SP.get("superpokepets_domain")+a.path+"?"+SP.util.dict_to_paramstr(a.params)}else{if(a.uid_token){return"http://"+SP.get("superpokepets_domain")+a.path+"?uid="+a.uid_token+"&"+SP.util.dict_to_paramstr(a.params)}}}return"http://"+SP.get("superpokepets_domain")+a.path+"?"+SP.util.dict_to_paramstr(a.params)},make_clickhere:function(a,c){var b=$(DIV());b.append(SP.util.make_img("/images/clickherecallout.gif"));b.css({position:"absolute",left:a-30,top:c,"z-index":5});return b},make_static_url:function(c,a){if(c.substring(0,7)=="http://"){return c}if(!a){var d=SP.get("hashed_versions",{})[c];if(d){a=d}else{a=SP.get("version_id")}}var b="";if(c.charAt(0)!="/"){b="/"}var e="/version/"+a+b+c;return"http://"+SP.get("ver_domain")+e},make_img:function(c,d,a){if(!d){d=c;c={}}var e=SP.util.make_static_url(d,a);var b=IMG({src:e});if(typeof(c)=="string"){$(b).attr("style",c)}else{$(b).css(c)}return b},$make_img:function(c,a,b){return $(SP.util.make_img(c,a,b))},make_link:function(a,e){var f;var d;if(typeof(a)=="object"){f=a;f.href="#";if(typeof(f.onclick)=="function"){var b=f.onclick;d=function(g){var h=b(g);if(h==undefined){return false}else{return h}};delete f.onclick}}else{f={href:"#"};d=function(g){a(g);return false}}var c=A(f,e);if(d){$(c).unbind("click").click(d)}return c},$make_link:function(a,b){return $(SP.util.make_link(a,b))},append_swf:function(a,h,b,j,c,e,d,g){var f=new SP.controls.Control();f._render=function(){var k=this;k.dom_obj=a;k.dom_obj.each(function(l,n){var m=k.make_swf(h,b,j,c,e,d,g);$(n).append(m.dom_obj)})};f.render();return f._object_id},remove_swf:function(a){SP._object_refs[a].cleanup()},comma_separate:function(b){if(b==undefined){return"??"}var a=String(b);if(a.indexOf(".")>=0){return SP.util.comma_separate(a.substring(0,a.indexOf(".")))+a.substring(a.indexOf("."))}else{if(a.length<=3){return a}else{return SP.util.comma_separate(a.substring(0,a.length-3))+","+a.substring(a.length-3)}}},make_progress_bar:function(b,f,c,h){h=h||16;if(f==undefined||""+f=="NaN"){f=c}var a;var j;var g=Math.max(0,Math.min(b,parseInt(b*f)));var d=Math.max(0,Math.min(b,parseInt(b*c)));var e=$(DIV()).css({width:b*2,height:h}).append($(DIV()).css({"font-size":0,"float":"left"}).append(a=$(SP.util.make_img({width:g,height:h},"/images/superpet/home/progress_blue.gif"))),$(DIV()).css({"font-size":0,"float":"left"}).append(j=$(SP.util.make_img({width:b,height:h},"/images/superpet/home/progress_white.gif"))));if(c!=undefined&&c!=f){a.animate({width:d})}return $(DIV()).css({border:"solid 1px #C0C0C0",width:b,"overflow-x":"hidden","float":"left"}).append(e)},parseInt:function(a){a=""+a;a=a.replace(/,/g,"");if(""+parseInt(a)=="NaN"){return 0}else{return parseInt(a,10)}},apply_callback:function(d){if(typeof(d)=="function"){var b=[];for(var c=1;c<arguments.length;c++){b.push(arguments[c])}return d.apply(this,b)}},non_breaking:function(a){if(typeof(a)=="undefined"||!a){return""}return a.replace(/ /g,"&nbsp;")},html_escaped_span:function(b){var a=SPAN();if(b){$(a).html(b.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br>"))}return a},show_info_popup:function(a,m,k,d,j,c,o,g){if(c==undefined){c=false}if(typeof(d)=="string"){d=SPAN({},d)}d=$(d);var n=null;var f=a.indexOf(":");if(f>=0){n=a.substring(0,f);a=a.substring(f+1)}$("#info_popup_"+a).remove();if(n){$("."+n).remove()}var h;if(c){h=IMG({src:SP.util.make_static_url("/images/superpet/"+(j?"infoheaderlong_left.gif":"infoheader_left.gif"))})}else{h=IMG({src:SP.util.make_static_url("/images/superpet/"+(j?"infoheaderlong.gif":"infoheader.gif"))})}var l=$(DIV({id:"info_popup_"+a,"class":"pet_shop_item_info",style:"cursor:pointer;",onclick:function(){if(!g){SP.util.hide_info_popup(a);o&&o(l)}}},h,content_pane=DIV({id:"info_popup_body_"+a,"class":"pet_shop_item_info_body"},d[0],BR(),DIV({style:"text-align:right"},SP.util.make_link({href:"#",style:"font-size:8pt;font-weight:normal",onclick:function(){SP.util.hide_info_popup(a);o&&o(l)}},"Close")),DIV({style:"clear:both"}))));var b=214;if(j){b=350;l.css("width",350)}var e;if(c){e=m-b+22}else{e=m-22}l.css({left:e,top:k});l.addClass("info_popup");if(n){l.addClass(n)}return SP.util.show_popup(l)},show_popup:function(a){SP.ebp({fb:function(){$("#page_content").append(a)},os:function(){$("#entire_app").append(a)},spp:function(){$(".page_content").append(a)},petsqa:function(){$("#pets_div").append(a)}});SP.globals.rendered_popups.push(a);a.show();return a},hide_info_popup:function(a){$("#info_popup_"+a).hide("fast",function(){$("#info_popup_"+a).remove()})},blink:function(f,e,c,d,a){f=$(f);e=e||3;c=c||400;var d=d||function(){f.show()};var a=a||function(){f.hide()};for(var b=0;b<e;b++){setTimeout(a,2*b*c);setTimeout(d,(2*b+1)*c)}},animate_increment:function(e,g,c,b,d){if(d){if(c-g>d){e.html(SP.util.comma_separate(c));return}}e=$(e);b=b||Math.max(1,parseInt((c-g)/13));var f=g;var a=function(){e.html(SP.util.comma_separate(Math.min(f,c)));if(f<c){f+=b;setTimeout(a,1)}};a()},make_spacer:function(b,a){a=a||1;return SP.util.make_img({width:b,height:a},"/images/spacer.gif")},coin_symbol:function(b){var a=IMG({src:SP.util.make_static_url("/images/superpet/coinsymbol.gif"),style:"margin-right:3px;position:relative;top:2px;"});if(b===undefined){return a}else{return $(SPAN()).append(a,$(SPAN()).html(SP.util.comma_separate(b)).addClass("pet_coins"))}},gold_symbol:function(b){var a=IMG({src:SP.util.make_static_url("/images/superpet/goldsymbol.gif"),style:"margin-right:3px;position:relative;top:7px;"});if(b===undefined){return a}else{return $(SPAN()).append(a,$(SPAN()).html(SP.util.comma_separate(b)).addClass("pet_gold"))}},points_symbol:function(b){var a=IMG({src:SP.util.make_static_url("/images/superpet/home/bolt.gif"),style:"margin-right:3px;position:relative;top:2px;"});if(b===undefined){return a}else{return $(SPAN()).append(a,$(SPAN()).css({color:"#000","font-weight":"bold"}).html(SP.util.comma_separate(b)).addClass("pet_points"))}},pluralize:function(d,b,c,a){return d.replace(/\[num\]/g,b).replace(/\[x\]/g,b==1?c:a)},trimString:function(c,a,b){if(c&&c.length&&c.length>a){c=c.substr(0,b?(a-3):a)+"..."}return c},ago_string:function(d){var c=d[0];var b=d[1];var a=d[2];var e="";if(c){e+=c+(c==1?" day":" days")+", "}if(b){e+=b+(b==1?" hour":" hours")+" and "}e+=a+(a==1?" minute":" minutes");return e+" ago"},update_dict:function(c,b,a){if(b){for(field in b){if(!(field in c)||a){c[field]=b[field]}}}return c},make_user_img:function(h,a){var c=h;if(typeof(c)=="number"||typeof(c)=="string"){c=SP.fbp("get_user")(c)}a=a||{};var g=a.width||undefined;var f=a.height||a["max-height"]||undefined;var e={};$.each(a,function(j,k){if(j!="width"&&j!=="height"&&j!="max-height"){e[j]=k}});var d=$(DIV()).css({"vertical-align":"middle"}).css(e);if(g!==undefined){d.css("width",g)}if(f!==undefined){d.css("height",f)}var b=$(SP.util.make_img(c.img_url));if(g!=undefined||f!=undefined){b=SP.util.smart_image_resize(b,g,f)}d.append(b);return d},cutoff:function(a,b){if(a.length>b){return a.substring(0,b-2)+"..."}else{return a}},make_context:function(c,f,e,d){var a=[];for(var b=1;b<arguments.length;b++){a.push(arguments[b])}return function(){c.apply(this,a)}},scrapbook_url:function(a,b){var c=SP.spp?spp.base_domain:_superpokepets_domain;if(a){return"http://"+a+"."+c+"/spp/scrapbook"}if(b){return"http://"+c+"/spp/scrapbook?uid="+b}return"http://"+c+"/spp/scrapbook"},snapshot_url:function(a,c){var b=SP.spp?spp.base_domain:_superpokepets_domain;return"http://"+b+"/spp/scrapbook/snapshot?snap="+a+"&uid="+c},alert:function(t,C,q,j,d,v,z,f){var o,b,k="Cancel",u,h,r="auto";if(arguments.length==1){b=t;if(b.contents){t=b.contents;C=b.title;d=b.showOk;q=b.okCallback;v=b.showCancel;h=b.cancelCallback;u=b.cancelStyle;z=b.clickAnywhere;f=b.ypos}}d=d||true;z=z||true;f=f||j||200;if(typeof(t)=="string"){var e=$(SPAN()).css({margin:"15px 15px 15px 15px"}).text(t);if(t.length<25){e.css("width",180)}t=e}else{if(jQuery.browser.msie&&$(t).css("width")){r=SP.util.parseInt($(t).css("width"));if(!r){r="auto"}else{if(SP.spp){r+=40}}}}var l=$(CENTER()).css({margin:8,"padding-left":0,"padding-right":0,margin:0,"font-size":"12pt","font-weight":"bold","line-height":"145%"}).append(t),s,B,g;if(d||v){s=$("<div/>").css({margin:"8px auto 0",width:194});l.append(s)}if(d){if(typeof(d)=="string"){B=SP.util.make_button(d)}else{B=$("<img/>").attr("src",SP.util.make_static_url("/images/superpet/okay.gif")).css("cursor","pointer")}s.append(B)}var n=false;var w=function(){n=true;if(!q){o.fadeOut()}else{if(q()!==false){o.fadeOut()}}};var a=false;var m=function(){a=true;o.fadeOut();if(h){h()}};var c=function(){if(n||a){return}if(v&&h){h()}else{if(!v&&q){q()}}};if(v){if(typeof(v)=="string"){k=v}if(u==="side"){g=SP.util.make_subdued_button(k).click(m)}else{g=$("<div/>").append($("<a/>").attr("href","#").text(k).click(m))}s.append(g);B.click(w)}else{if(z){l.css("cursor","pointer");l.click(w)}else{B.click(w)}}if(d&&v&&u=="side"){s.css("width",398);B.css("float","left");g.css({"float":"left","margin-left":10})}o=new SP.controls.jqPopup(r,"auto",C,l,{closable:z,ypos:f,close_func:c},false);o.fadeIn(f);return o},okcancel:function(a,b,d,c){return SP.util.alert(a,b,d,c,true,true)},simpledialog:function(b,c,a,e,d){return SP.util.alert(b,c,e,d,a,true)},feeddialog:function(a){a.showOk=a.showOk||"Ok";a.showCancel=a.showCancel||"Cancel";a.cancelStyle="side";return SP.util.alert(a)},okonly:function(a,b,d,c){return SP.util.alert(a,b,d,c,true,false,false)},nobutton_ypos:function(a,b,d,c){return SP.util.alert(a,b,d,c,false,false,true,20)},item_image_path:function(a){return SP.PetShop.get_item(a.id).get_image_path()},bg_image:function(a){return"url("+SP.util.make_static_url(a)+")"},find:function(g){g=$.trim(g).split(" ");g=$.map(g,function(j){if(j){return j.toLowerCase()}});var a={};for(var d in SP.PetShop.items){var e=true;var h=SP.PetShop.get_item(d);for(var c in g){var k=g[c];var b=[h.name,h.info||""].concat(h.tags||[]);var f=b.join(" ").toLowerCase();if(f.indexOf(k)==-1){e=false;break}}if(e){a[d]=h}}return a},name_comparator:function(f,d){var e=SP.PetShop.get_item(f);var c=SP.PetShop.get_item(d);if(!e){slide.console.log("name_comparator called with unknown A item ID #"+f);return -1}if(!c){slide.console.log("name_comparator called with unknown B item ID #"+d);return 1}if(e.name>c.name){return 1}else{return -1}return f-d},make_speech_bubble:function(b){if(typeof(b)=="string"){b=$(DIV()).css({"font-size":"1.5em","font-weight":"bold","margin-top":5}).html(b)}var c=$(DIV()).css({padding:8}).append(b);var a=$(DIV()).append($(DIV()).css({height:49,width:13,"background-image":SP.util.bg_image("/images/superpet/speechbubble_left.gif"),"float":"left"}),$(DIV()).css({height:49,"background-image":SP.util.bg_image("/images/superpet/speechbubble_mid.gif"),"float":"left"}).append(c),$(DIV()).css({height:49,width:9,"background-image":SP.util.bg_image("/images/superpet/speechbubble_right.gif"),"float":"left"}));return a},get_keys:function(c){var a=[];for(var b in c){a.push(b)}return a},setdefault:function(c,b,a){if(b in c){return c[b]}else{c[b]=a;return a}},make_button:function(e,f,g,d,b){g=g||"auto";var a=$(DIV()).css({height:46,width:194,"font-size":"0.9em","font-weight":"bold",cursor:"pointer","text-align":"center",color:b?"#ffffff":"","background-image":b?SP.util.bg_image("/images/superpet/subdued_button_lg.gif"):SP.util.bg_image("/images/superpet/button_lg.gif"),"background-repeat":"no-repeat"}).append($(DIV()).css({padding:"13px 16px","font-size":"1.4em"}).html(e));if(d){var c=SP.get("button_funcs").length;SP.get("button_funcs").push(f);a.attr("onclickhack","SP.globals.button_funcs["+c+"]()")}else{if(f){a.click(f)}}return a},make_subdued_button:function(b,c,d,a){return SP.util.make_button(b,c,d,a,true)},make_item_box:function(c,d,a){if(a===undefined){a=d;d="customize"}var b=SP.PetShop.get_item(a);return $(CENTER()).attr("id",c+"_"+a).append(b.make_box({ie_overflow_compat:true}).attr("id","pet_"+d+"_"+a).addClass(d+"_item"))},cross_ajax_call:function(a,b,c){return SP.ajax.crossDomain.apply(this,arguments)},member_full_name:function(b){var a="";if(b.member_first_name){a+=b.member_first_name}if(b.member_last_name){if(a){a+=" "}a+=b.member_last_name}return a},member_first_name:function(b){var a="";if(b.member_first_name){a+=b.member_first_name}return a},flash_is_ready:function(d,c){setTimeout(function(){SP.events.triggerHandler("flash_is_ready")},500);var b=d==="tool_mode"?3:c.length;for(var a=0;a<b;a=a+1){if(c[a]!==0){return}}SP.spa.check_and_show_caretaking_promo()},textarea_maxlength:function(a,b){a.bind("keydown",function(){if(a.val().length>b){a.val(a.val().substring(0,b))}});a.bind("keyup",function(){if(a.val().length>b){a.val(a.val().substring(0,b))}})},dict_to_paramstr:function(c){var b="";for(var a in c){if(b){b+="&"}b+=a+"="+c[a]}return b},show_preloader:function(f,d,c,b){if(c==null){c=true}d=d||20;if(typeof(f)=="string"){var e=f.substring(0,1);if(e!="#"&&e!="."){f="#"+f}}var a=$(f);if(c==true){a.empty();$(a).each(function(g,h){var j=CENTER();h.appendChild(j)});a=a.find("center")}a.empty();if(b){if(typeof(b)=="string"){a.append($(DIV()).text(b))}else{a.append(b)}}return SP.util.append_swf(a,SP.util.make_static_url("/widgets/superpets/preloader.swf"),d,d,{},{wmode:"transparent",quality:"high"},{},{})},scrollToAnchor:function(a){SP.util.scroll_to_anchor(a)},scroll_to_anchor:function(a){if(SP.os){return slide.window.scrollTo(a)}document.location.hash="fakeanchor";document.location.hash=a;if(SP.spp){document.title=spp.page_title}},display_feed_form:function(){return SP.FB.display_feed_form.apply(this,arguments)},getWindowParam:function(b){var a=new RegExp("[\\?&]"+b+"=([^&#]*)").exec(window.location.href);return a?a[1]:0}};SP.events=$(DIV());SP.get_pending_notifications=function(){rc=[];var a=SP.get("daily_free_gifts",0);if(a){if(SP.fb){var f=SP.util.getWindowParam("debug_side");var e=SP.AB.test("freeGiftsImage",true,f);SP.globals.freegiftsimage_test=e.side;if(e.data.customImage){var b=new Date().getTime();var d=SP.PetShop.reduce(function(g){var h=(g.tags&&$.inArray("free_gift",g.tags)>=0&&g.start);if(!h){return false}var j=new SP.data.Item(g.id,false);h=(h&&(j.file_version()>(b-(5*24*60*60*1000)))&&j.file_version()<b);return h});gifts_arr=[];for(x in d){gifts_arr.push(d[x])}if(gifts_arr.length>0){gift=gifts_arr[Math.floor(Math.random()*gifts_arr.length)];SP.freegifts.notification.options.display="pet_items/"+gift.id+".swf";SP.globals.freegiftsimage_testitem=gift.id}}else{SP.freegifts.notification.options.mode="old"}SP.AB.logStart("freeGiftsImage",e.side,{context_info:SP.globals.freegiftsimage_testitem||0})}rc.push(SP.freegifts.notification)}var c=SP.get("daily_login_bonus",0);if(c){if(c==150&&!SP.get("daily_login_bonus_spin",0)){SP.daily_bonus.notification.message="Come back every day to claim your bonus coins!"}rc.push(SP.daily_bonus.notification)}return rc};var get_pending_notifications=SP.get_pending_notifications;SP.util.smart_image_resize=function(a,d,b){if(d===undefined){d=999999}if(b===undefined){b=999999}var c=function(f){var l=f.width;var j=f.height;if(l==0||j==0){var k=function(){c(f)};slide.console.log("looping resize_callback");setTimeout(k,500)}else{var h=d;var e=l/d;var g=Math.floor(j/e);if(g>b){g=b;e=j/b;h=Math.floor(l/e)}$(f).width(h).height(g)}};return $(a).onImagesLoad({itemCallback:c})};SP.sample_friends=function(c){var b={};b.fb=function(){return $.map(facebook_friend_list,function(d){if(d.uid==_viewer_uid){return null}return{id:d.uid,has_app:d.is_app_user,name:(d.first_name+" "+d.last_name),first_name:d.first_name,thumbnail:((d.pic==""||d.pic==null)?"http://static.ak.fbcdn.net/pics/s_silhouette.jpg":d.pic)}})};b.os=function(){var d=[];$.each(friendsDict,function(h,g){var f=get_cached_friend(h);var e=friendName(f);d.push({id:h,has_app:g.installed,name:e,first_name:e.split(" ")[0],thumbnail:friendImage(f)})});return d};b.spp=function(){return SP.globals.challenge_friends};var a=SP.ebp(b);a.sort(function(){return(0.5-Math.random())});return a.slice(0,c)};SP.Templates={memberForm:"_tmpl_memberform",freeGiftSuggestions:"_tmpl_freeGiftSuggestions",freeGiftSuggestionSingle:"_tmpl_freeGiftSuggestionSingle",freeGiftSuggestionPopup:"_tmpl_freeGiftSuggestionPopup",freeGiftSuggestionsDone:"_tmpl_freeGiftSuggestionsDone",arcadeFeedPopup:"_tmpl_arcadeFeed",invitePopup:"_tmpl_invitePopup"};SP.validate=function(e,d,b,a){var c={email:/^[_\.\+0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]*\.)+[a-zA-Z]{2,4}$/,member_url:/^[-A-Za-z0-9]{2,32}$/i,member_name:/^[^<>"&*^%#@$(){}[\]\\|\/:;+=~!?\.]+$/};if(d===undefined||d===null){return false}if(d.constructor!=RegExp){if(d in c){d=c[d]}else{return false}}if(b){e=$.trim(e)}return(a&&!e)||d.test(e)};SP.controls.Control=function(){};SP.controls.Control.prototype={};SP._setup_control("Control");SP.isToday=function(a){var b=new Date();var c=new Date();c.setTime(a*1000);return b.getDate()==c.getDate()&&b.getMonth()==c.getMonth()};spp_flags={};spp_flags.click_img=4;spp_flags.click_name=3;spp_flags.click_url=5;spp_flags.email_verified_source_email_link=3;spp_flags.email_verified_source_free_gold_promo=4;spp_flags.email_verified_source_password_reset=2;spp_flags.email_verified_source_verify_email=1;spp_flags.free_gold_already_claimed=1;spp_flags.free_gold_cc_already_used=3;spp_flags.free_gold_cc_verification_failed=2;spp_flags.free_gold_email_already_used=5;spp_flags.free_gold_no_payment_info=4;spp_flags.friend_request_source_invite=2;spp_flags.friend_request_source_profile=1;spp_flags.havelist=2;spp_flags.login_from_email_and_password=1;spp_flags.login_from_form_cookie=3;spp_flags.login_from_social_network_cookie=2;spp_flags.memberform_source_arcade=39;spp_flags.memberform_source_clubs=34;spp_flags.memberform_source_create_post=7;spp_flags.memberform_source_create_topic=6;spp_flags.memberform_source_customize_tab=3;spp_flags.memberform_source_edit_wishlist=22;spp_flags.memberform_source_find_friend_tab=24;spp_flags.memberform_source_flag_post=17;spp_flags.memberform_source_free_gold_promo=36;spp_flags.memberform_source_friends_tab=2;spp_flags.memberform_source_generic_profile=37;spp_flags.memberform_source_inbox_tab=5;spp_flags.memberform_source_minipet_click=12;spp_flags.memberform_source_my_club=33;spp_flags.memberform_source_new_topic=14;spp_flags.memberform_source_none=0;spp_flags.memberform_source_payment_removal=35;spp_flags.memberform_source_pet_create=13;spp_flags.memberform_source_petshop_checkout=21;spp_flags.memberform_source_petshop_tab=4;spp_flags.memberform_source_profile_block_user=27;spp_flags.memberform_source_profile_change_photo=18;spp_flags.memberform_source_profile_personalize_url=19;spp_flags.memberform_source_profile_tab=1;spp_flags.memberform_source_profile_validate_email=20;spp_flags.memberform_source_quick_compliment=26;spp_flags.memberform_source_quick_reply=8;spp_flags.memberform_source_quote_post=15;spp_flags.memberform_source_reply_post=16;spp_flags.memberform_source_request_friend=10;spp_flags.memberform_source_scrapbook=38;spp_flags.memberform_source_scrapbook_tab=23;spp_flags.memberform_source_send_gift=11;spp_flags.memberform_source_send_message=9;spp_flags.memberform_source_slidecom_review=32;spp_flags.memberform_source_topic_reply=25;spp_flags.message_is_reply=1;spp_flags.pet_create_SLIDELARGETICKER=100;spp_flags.pet_create_email_importer_invite_email=10;spp_flags.pet_create_email_importer_invite_email_post_tutorial=11;spp_flags.pet_create_source_widget_bebo=7;spp_flags.pet_create_source_widget_friendster=6;spp_flags.pet_create_source_widget_hi5=3;spp_flags.pet_create_source_widget_hyves=8;spp_flags.pet_create_source_widget_myspace=4;spp_flags.pet_create_source_widget_orkut=5;spp_flags.pet_create_source_widget_promo_banner=1;spp_flags.pet_create_source_widget_promo_email=2;spp_flags.pet_create_source_widget_tagged=9;spp_flags.post_with_habitat_img=1;spp_flags.post_with_wishlist=4;spp_flags.poster_is_newb=2;spp_flags.softblock_reason_email_verify=4;spp_flags.softblock_reason_forum_ban=3;spp_flags.softblock_reason_ip=1;spp_flags.softblock_reason_not_member=5;spp_flags.softblock_reason_sid=2;spp_flags.trialpay_gold_purchase=1;spp_flags.tweet_this_source_forum_topic=2;spp_flags.tweet_this_source_profile=1;spp_flags.tweet_this_source_scrapbook=3;spp_flags.wishlist=1;var recordSELog=function(b){var a={url:spp.ajax_base_url+"se_logger",data:b};$.ajax(a)};