/*
 * 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,z=m.jQuery,q=m.$,p=m.jQuery=m.$=function(G,H){return new p.fn.init(G,H)},F=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;p.fn=p.prototype={init:function(G,J){G=G||document;if(G.nodeType){this[0]=G;this.length=1;this.context=G;return this}if(typeof G==="string"){var I=F.exec(G);if(I&&(I[1]||!J)){if(I[1]){G=p.clean([I[1]],J)}else{var K=document.getElementById(I[3]);if(K&&K.id!=I[3]){return p().find(G)}var H=p(K||[]);H.context=document;H.selector=G;return H}}else{return p(J).find(G)}}else{if(p.isFunction(G)){return p(document).ready(G)}}if(G.selector&&G.context){this.selector=G.selector;this.context=G.context}return this.setArray(p.isArray(G)?G:p.makeArray(G))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(G){return G===g?Array.prototype.slice.call(this):this[G]},pushStack:function(H,J,G){var I=p(H);I.prevObject=this;I.context=this.context;if(J==="find"){I.selector=this.selector+(this.selector?" ":"")+G}else{if(J){I.selector=this.selector+"."+J+"("+G+")"}}return I},setArray:function(G){this.length=0;Array.prototype.push.apply(this,G);return this},each:function(H,G){return p.each(this,H,G)},index:function(G){return p.inArray(G&&G.jquery?G[0]:G,this)},attr:function(H,J,I){var G=H;if(typeof H==="string"){if(J===g){return this[0]&&p[I||"attr"](this[0],H)}else{G={};G[H]=J}}return this.each(function(K){for(H in G){p.attr(I?this.style:this,H,p.prop(this,G[H],I,K,H))}})},css:function(G,H){if((G=="width"||G=="height")&&parseFloat(H)<0){H=g}return this.attr(G,H,"curCSS")},text:function(H){if(typeof H!=="object"&&H!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(H))}var G="";p.each(H||this,function(){p.each(this.childNodes,function(){if(this.nodeType!=8){G+=this.nodeType!=1?this.nodeValue:p.fn.text([this])}})});return G},wrapAll:function(G){if(this[0]){var H=p(G,this[0].ownerDocument).clone();if(this[0].parentNode){H.insertBefore(this[0])}H.map(function(){var I=this;while(I.firstChild){I=I.firstChild}return I}).append(this)}return this},wrapInner:function(G){return this.each(function(){p(this).contents().wrapAll(G)})},wrap:function(G){return this.each(function(){p(this).wrapAll(G)})},append:function(){return this.domManip(arguments,true,function(G){if(this.nodeType==1){this.appendChild(G)}})},prepend:function(){return this.domManip(arguments,true,function(G){if(this.nodeType==1){this.insertBefore(G,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(G){this.parentNode.insertBefore(G,this)})},after:function(){return this.domManip(arguments,false,function(G){this.parentNode.insertBefore(G,this.nextSibling)})},end:function(){return this.prevObject||p([])},push:[].push,sort:[].sort,splice:[].splice,find:function(G){if(this.length===1){var H=this.pushStack([],"find",G);H.length=0;p.find(G,this[0],H);return H}else{return this.pushStack(p.unique(p.map(this,function(I){return p.find(G,I)})),"find",G)}},clone:function(I){var G=this.map(function(){if(!p.support.noCloneEvent&&!p.isXMLDoc(this)){var K=this.outerHTML;if(!K){var L=this.ownerDocument.createElement("div");L.appendChild(this.cloneNode(true));K=L.innerHTML}return p.clean([K.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(I===true){var J=this.find("*").andSelf(),H=0;G.find("*").andSelf().each(function(){if(this.nodeName!==J[H].nodeName){return}var K=p.data(J[H],"events");for(var M in K){for(var L in K[M]){p.event.add(this,M,K[M][L],K[M][L].data)}}H++})}return G},filter:function(G){return this.pushStack(p.isFunction(G)&&p.grep(this,function(I,H){return G.call(I,H)})||p.multiFilter(G,p.grep(this,function(H){return H.nodeType===1})),"filter",G)},closest:function(G){var I=p.expr.match.POS.test(G)?p(G):null,H=0;return this.map(function(){var J=this;while(J&&J.ownerDocument){if(I?I.index(J)>-1:p(J).is(G)){p.data(J,"closest",H);return J}J=J.parentNode;H++}})},not:function(G){if(typeof G==="string"){if(f.test(G)){return this.pushStack(p.multiFilter(G,this,true),"not",G)}else{G=p.multiFilter(G,this)}}var H=G.length&&G[G.length-1]!==g&&!G.nodeType;return this.filter(function(){return H?p.inArray(this,G)<0:this!=G})},add:function(G){return this.pushStack(p.unique(p.merge(this.get(),typeof G==="string"?p(G):p.makeArray(G))))},is:function(G){return !!G&&p.multiFilter(G,this).length>0},hasClass:function(G){return !!G&&this.is("."+G)},val:function(M){if(M===g){var G=this[0];if(G){if(p.nodeName(G,"option")){return(G.attributes.value||{}).specified?G.value:G.text}if(p.nodeName(G,"select")){var K=G.selectedIndex,N=[],O=G.options,J=G.type=="select-one";if(K<0){return null}for(var H=J?K:0,L=J?K+1:O.length;H<L;H++){var I=O[H];if(I.selected){M=p(I).val();if(J){return M}N.push(M)}}return N}return(G.value||"").replace(/\r/g,"")}return g}if(typeof M==="number"){M+=""}return this.each(function(){if(this.nodeType!=1){return}if(p.isArray(M)&&/radio|checkbox/.test(this.type)){this.checked=(p.inArray(this.value,M)>=0||p.inArray(this.name,M)>=0)}else{if(p.nodeName(this,"select")){var P=p.makeArray(M);p("option",this).each(function(){this.selected=(p.inArray(this.value,P)>=0||p.inArray(this.text,P)>=0)});if(!P.length){this.selectedIndex=-1}}else{this.value=M}}})},html:function(G){return G===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(G)},replaceWith:function(G){return this.after(G).remove()},eq:function(G){return this.slice(G,+G+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(G){return this.pushStack(p.map(this,function(I,H){return G.call(I,H,I)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(L,O,N){if(this[0]){var K=(this[0].ownerDocument||this[0]).createDocumentFragment(),H=p.clean(L,(this[0].ownerDocument||this[0]),K),J=K.firstChild;if(J){for(var I=0,G=this.length;I<G;I++){N.call(M(this[I],J),this.length>1||I>0?K.cloneNode(true):K)}}if(H){p.each(H,B)}}return this;function M(P,Q){return O&&p.nodeName(P,"table")&&p.nodeName(Q,"tr")?(P.getElementsByTagName("tbody")[0]||P.appendChild(P.ownerDocument.createElement("tbody"))):P}}};p.fn.init.prototype=p.fn;function B(G,H){if(H.src){p.ajax({url:H.src,async:false,dataType:"script"})}else{p.globalEval(H.text||H.textContent||H.innerHTML||"")}if(H.parentNode){H.parentNode.removeChild(H)}}function e(){return +new Date}p.extend=p.fn.extend=function(){var L=arguments[0]||{},J=1,K=arguments.length,G=false,I;if(typeof L==="boolean"){G=L;L=arguments[1]||{};J=2}if(typeof L!=="object"&&!p.isFunction(L)){L={}}if(K==J){L=this;--J}for(;J<K;J++){if((I=arguments[J])!=null){for(var H in I){var M=L[H],N=I[H];if(L===N){continue}if(G&&N&&typeof N==="object"&&!N.nodeType){L[H]=p.extend(G,M||(N.length!=null?[]:{}),N)}else{if(N!==g){L[H]=N}}}}}return L};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,r=document.defaultView||{},t=Object.prototype.toString;p.extend({noConflict:function(G){m.$=q;if(G){m.jQuery=z}return p},isFunction:function(G){return t.call(G)==="[object Function]"},isArray:function(G){return t.call(G)==="[object Array]"},isXMLDoc:function(G){return G.nodeType===9&&G.documentElement.nodeName!=="HTML"||!!G.ownerDocument&&p.isXMLDoc(G.ownerDocument)},globalEval:function(I){if(I&&/\S/.test(I)){var H=document.getElementsByTagName("head")[0]||document.documentElement,G=document.createElement("script");G.type="text/javascript";if(p.support.scriptEval){G.appendChild(document.createTextNode(I))}else{G.text=I}H.insertBefore(G,H.firstChild);H.removeChild(G)}},nodeName:function(H,G){return H.nodeName&&H.nodeName.toUpperCase()==G.toUpperCase()},each:function(I,M,H){var G,J=0,K=I.length;if(H){if(K===g){for(G in I){if(M.apply(I[G],H)===false){break}}}else{for(;J<K;){if(M.apply(I[J++],H)===false){break}}}}else{if(K===g){for(G in I){if(M.call(I[G],G,I[G])===false){break}}}else{for(var L=I[0];J<K&&M.call(L,J,L)!==false;L=I[++J]){}}}return I},prop:function(J,K,I,H,G){if(p.isFunction(K)){K=K.call(J,H)}return typeof K==="number"&&I=="curCSS"&&!b.test(G)?K+"px":K},className:{add:function(G,H){p.each((H||"").split(/\s+/),function(I,J){if(G.nodeType==1&&!p.className.has(G.className,J)){G.className+=(G.className?" ":"")+J}})},remove:function(G,H){if(G.nodeType==1){G.className=H!==g?p.grep(G.className.split(/\s+/),function(I){return !p.className.has(H,I)}).join(" "):""}},has:function(H,G){return H&&p.inArray(G,(H.className||H).toString().split(/\s+/))>-1}},swap:function(J,I,K){var G={};for(var H in I){G[H]=J.style[H];J.style[H]=I[H]}K.call(J);for(var H in I){J.style[H]=G[H]}},css:function(J,H,L,G){if(H=="width"||H=="height"){var N,I={position:"absolute",visibility:"hidden",display:"block"},M=H=="width"?["Left","Right"]:["Top","Bottom"];function K(){N=H=="width"?J.offsetWidth:J.offsetHeight;if(G==="border"){return}p.each(M,function(){if(!G){N-=parseFloat(p.curCSS(J,"padding"+this,true))||0}if(G==="margin"){N+=parseFloat(p.curCSS(J,"margin"+this,true))||0}else{N-=parseFloat(p.curCSS(J,"border"+this+"Width",true))||0}})}if(J.offsetWidth!==0){K()}else{p.swap(J,I,K)}return Math.max(0,Math.round(N))}return p.curCSS(J,H,L)},curCSS:function(K,H,I){var N,G=K.style;if(H=="opacity"&&!p.support.opacity){N=p.attr(G,"opacity");return N==""?"1":N}if(H.match(/float/i)){H=x}if(!I&&G&&G[H]){N=G[H]}else{if(r.getComputedStyle){if(H.match(/float/i)){H="float"}H=H.replace(/([A-Z])/g,"-$1").toLowerCase();var O=r.getComputedStyle(K,null);if(O){N=O.getPropertyValue(H)}if(H=="opacity"&&N==""){N="1"}}else{if(K.currentStyle){var L=H.replace(/\-(\w)/g,function(P,Q){return Q.toUpperCase()});N=K.currentStyle[H]||K.currentStyle[L];if(!/^\d+(px)?$/i.test(N)&&/^\d/.test(N)){var J=G.left,M=K.runtimeStyle.left;K.runtimeStyle.left=K.currentStyle.left;G.left=N||0;N=G.pixelLeft+"px";G.left=J;K.runtimeStyle.left=M}}}}return N},clean:function(H,M,K){M=M||document;if(typeof M.createElement==="undefined"){M=M.ownerDocument||M[0]&&M[0].ownerDocument||document}if(!K&&H.length===1&&typeof H[0]==="string"){var J=/^<(\w+)\s*\/?>$/.exec(H[0]);if(J){return[M.createElement(J[1])]}}var I=[],G=[],N=M.createElement("div");p.each(H,function(R,U){if(typeof U==="number"){U+=""}if(!U){return}if(typeof U==="string"){U=U.replace(/(<(\w+)[^>]*?)\/>/g,function(W,X,V){return V.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?W:X+"></"+V+">"});var Q=U.replace(/^\s+/,"").substring(0,10).toLowerCase();var S=!Q.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!Q.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||Q.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!Q.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!Q.indexOf("<td")||!Q.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!Q.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!p.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];N.innerHTML=S[1]+U+S[2];while(S[0]--){N=N.lastChild}if(!p.support.tbody){var T=/<tbody/i.test(U),P=!Q.indexOf("<table")&&!T?N.firstChild&&N.firstChild.childNodes:S[1]=="<table>"&&!T?N.childNodes:[];for(var O=P.length-1;O>=0;--O){if(p.nodeName(P[O],"tbody")&&!P[O].childNodes.length){P[O].parentNode.removeChild(P[O])}}}if(!p.support.leadingWhitespace&&/^\s/.test(U)){N.insertBefore(M.createTextNode(U.match(/^\s*/)[0]),N.firstChild)}U=p.makeArray(N.childNodes)}if(U.nodeType){I.push(U)}else{I=p.merge(I,U)}});if(K){for(var L=0;I[L];L++){if(p.nodeName(I[L],"script")&&(!I[L].type||I[L].type.toLowerCase()==="text/javascript")){G.push(I[L].parentNode?I[L].parentNode.removeChild(I[L]):I[L])}else{if(I[L].nodeType===1){I.splice.apply(I,[L+1,0].concat(p.makeArray(I[L].getElementsByTagName("script"))))}K.appendChild(I[L])}}return G}return I},attr:function(L,I,M){if(!L||L.nodeType==3||L.nodeType==8){return g}var J=!p.isXMLDoc(L),N=M!==g;I=J&&p.props[I]||I;if(L.tagName){var H=/href|src|style/.test(I);if(I=="selected"&&L.parentNode){L.parentNode.selectedIndex}if(I in L&&J&&!H){if(N){if(I=="type"&&p.nodeName(L,"input")&&L.parentNode){throw"type property can't be changed"}L[I]=M}if(p.nodeName(L,"form")&&L.getAttributeNode(I)){return L.getAttributeNode(I).nodeValue}if(I=="tabIndex"){var K=L.getAttributeNode("tabIndex");return K&&K.specified?K.value:L.nodeName.match(/(button|input|object|select|textarea)/i)?0:L.nodeName.match(/^(a|area)$/i)&&L.href?0:g}return L[I]}if(!p.support.style&&J&&I=="style"){return p.attr(L.style,"cssText",M)}if(N){L.setAttribute(I,""+M)}var G=!p.support.hrefNormalized&&J&&H?L.getAttribute(I,2):L.getAttribute(I);return G===null?g:G}if(!p.support.opacity&&I=="opacity"){if(N){L.zoom=1;L.filter=(L.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(M)+""=="NaN"?"":"alpha(opacity="+M*100+")")}return L.filter&&L.filter.indexOf("opacity=")>=0?(parseFloat(L.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}I=I.replace(/-([a-z])/ig,function(O,P){return P.toUpperCase()});if(N){L[I]=M}return L[I]},trim:function(G){return(G||"").replace(/^\s+|\s+$/g,"")},makeArray:function(I){var G=[];if(I!=null){var H=I.length;if(H==null||typeof I==="string"||p.isFunction(I)||I.setInterval){G[0]=I}else{while(H){G[--H]=I[H]}}}return G},inArray:function(I,J){for(var G=0,H=J.length;G<H;G++){if(J[G]===I){return G}}return -1},merge:function(J,G){var H=0,I,K=J.length;if(!p.support.getAll){while((I=G[H++])!=null){if(I.nodeType!=8){J[K++]=I}}}else{while((I=G[H++])!=null){J[K++]=I}}return J},unique:function(M){var H=[],G={};try{for(var I=0,J=M.length;I<J;I++){var L=p.data(M[I]);if(!G[L]){G[L]=true;H.push(M[I])}}}catch(K){H=M}return H},grep:function(H,L,G){var I=[];for(var J=0,K=H.length;J<K;J++){if(!G!=!L(H[J],J)){I.push(H[J])}}return I},map:function(G,L){var H=[];for(var I=0,J=G.length;I<J;I++){var K=L(G[I],I);if(K!=null){H[H.length]=K}}return H.concat.apply([],H)}});var E=navigator.userAgent.toLowerCase();p.browser={version:(E.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(E),opera:/opera/.test(E),msie:/msie/.test(E)&&!/opera/.test(E),mozilla:/mozilla/.test(E)&&!/(compatible|webkit)/.test(E)};p.each({parent:function(G){return G.parentNode},parents:function(G){return p.dir(G,"parentNode")},next:function(G){return p.nth(G,2,"nextSibling")},prev:function(G){return p.nth(G,2,"previousSibling")},nextAll:function(G){return p.dir(G,"nextSibling")},prevAll:function(G){return p.dir(G,"previousSibling")},siblings:function(G){return p.sibling(G.parentNode.firstChild,G)},children:function(G){return p.sibling(G.firstChild)},contents:function(G){return p.nodeName(G,"iframe")?G.contentDocument||G.contentWindow.document:p.makeArray(G.childNodes)}},function(G,H){p.fn[G]=function(I){var J=p.map(this,H);if(I&&typeof I=="string"){J=p.multiFilter(I,J)}return this.pushStack(p.unique(J),G,I)}});p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(G,H){p.fn[G]=function(I){var L=[],N=p(I);for(var M=0,J=N.length;M<J;M++){var K=(M>0?this.clone(true):this).get();p.fn[H].apply(p(N[M]),K);L=L.concat(K)}return this.pushStack(L,G,I)}});p.each({removeAttr:function(G){p.attr(this,G,"");if(this.nodeType==1){this.removeAttribute(G)}},addClass:function(G){p.className.add(this,G)},removeClass:function(G){p.className.remove(this,G)},toggleClass:function(H,G){if(typeof G!=="boolean"){G=!p.className.has(this,H)}p.className[G?"add":"remove"](this,H)},remove:function(G){if(!G||p.filter(G,[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(G,H){p.fn[G]=function(){return this.each(H,arguments)}});function k(G,H){return G[0]&&parseInt(p.curCSS(G[0],H,true),10)||0}var h="jQuery"+e(),w=0,C={};p.extend({cache:{},data:function(H,G,I){H=H==m?C:H;var J=H[h];if(!J){J=H[h]=++w}if(G&&!p.cache[J]){p.cache[J]={}}if(I!==g){p.cache[J][G]=I}return G?p.cache[J][G]:J},removeData:function(H,G){H=H==m?C:H;var J=H[h];if(G){if(p.cache[J]){delete p.cache[J][G];G="";for(G in p.cache[J]){break}if(!G){p.removeData(H)}}}else{try{delete H[h]}catch(I){if(H.removeAttribute){H.removeAttribute(h)}}delete p.cache[J]}},queue:function(H,G,J){if(H){G=(G||"fx")+"queue";var I=p.data(H,G);if(!I||p.isArray(J)){I=p.data(H,G,p.makeArray(J))}else{if(J){I.push(J)}}}return I},dequeue:function(J,I){var G=p.queue(J,I),H=G.shift();if(!I||I==="fx"){H=G[0]}if(H!==g){H.call(J)}}});p.fn.extend({data:function(G,I){var J=G.split(".");J[1]=J[1]?"."+J[1]:"";if(I===g){var H=this.triggerHandler("getData"+J[1]+"!",[J[0]]);if(H===g&&this.length){H=p.data(this[0],G)}return H===g&&J[1]?this.data(J[0]):H}else{return this.trigger("setData"+J[1]+"!",[J[0],I]).each(function(){p.data(this,G,I)})}},removeData:function(G){return this.each(function(){p.removeData(this,G)})},queue:function(G,H){if(typeof G!=="string"){H=G;G="fx"}if(H===g){return p.queue(this[0],G)}return this.each(function(){var I=p.queue(this,G,H);if(G=="fx"&&I.length==1){I[0].call(this)}})},dequeue:function(G){return this.each(function(){p.dequeue(this,G)})}});
/*
 * 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 T=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,N=0,J=Object.prototype.toString;var H=function(aa,W,ad,ae){ad=ad||[];W=W||document;if(W.nodeType!==1&&W.nodeType!==9){return[]}if(!aa||typeof aa!=="string"){return ad}var ab=[],Y,ah,ak,V,af,X,Z=true;T.lastIndex=0;while((Y=T.exec(aa))!==null){ab.push(Y[1]);if(Y[2]){X=RegExp.rightContext;break}}if(ab.length>1&&O.exec(aa)){if(ab.length===2&&K.relative[ab[0]]){ah=L(ab[0]+ab[1],W)}else{ah=K.relative[ab[0]]?[W]:H(ab.shift(),W);while(ab.length){aa=ab.shift();if(K.relative[aa]){aa+=ab.shift()}ah=L(aa,ah)}}}else{var ag=ae?{expr:ab.pop(),set:G(ae)}:H.find(ab.pop(),ab.length===1&&W.parentNode?W.parentNode:W,S(W));ah=H.filter(ag.expr,ag.set);if(ab.length>0){ak=G(ah)}else{Z=false}while(ab.length){var aj=ab.pop(),ai=aj;if(!K.relative[aj]){aj=""}else{ai=ab.pop()}if(ai==null){ai=W}K.relative[aj](ak,ai,S(W))}}if(!ak){ak=ah}if(!ak){throw"Syntax error, unrecognized expression: "+(aj||aa)}if(J.call(ak)==="[object Array]"){if(!Z){ad.push.apply(ad,ak)}else{if(W.nodeType===1){for(var ac=0;ak[ac]!=null;ac++){if(ak[ac]&&(ak[ac]===true||ak[ac].nodeType===1&&M(W,ak[ac]))){ad.push(ah[ac])}}}else{for(var ac=0;ak[ac]!=null;ac++){if(ak[ac]&&ak[ac].nodeType===1){ad.push(ah[ac])}}}}}else{G(ak,ad)}if(X){H(X,W,ad,ae);if(I){hasDuplicate=false;ad.sort(I);if(hasDuplicate){for(var ac=1;ac<ad.length;ac++){if(ad[ac]===ad[ac-1]){ad.splice(ac--,1)}}}}}return ad};H.matches=function(V,W){return H(V,null,null,W)};H.find=function(ac,V,ad){var ab,Z;if(!ac){return[]}for(var Y=0,X=K.order.length;Y<X;Y++){var aa=K.order[Y],Z;if((Z=K.match[aa].exec(ac))){var W=RegExp.leftContext;if(W.substr(W.length-1)!=="\\"){Z[1]=(Z[1]||"").replace(/\\/g,"");ab=K.find[aa](Z,V,ad);if(ab!=null){ac=ac.replace(K.match[aa],"");break}}}}if(!ab){ab=V.getElementsByTagName("*")}return{set:ab,expr:ac}};H.filter=function(af,ae,ai,Y){var X=af,ak=[],ac=ae,aa,V,ab=ae&&ae[0]&&S(ae[0]);while(af&&ae.length){for(var ad in K.filter){if((aa=K.match[ad].exec(af))!=null){var W=K.filter[ad],aj,ah;V=false;if(ac==ak){ak=[]}if(K.preFilter[ad]){aa=K.preFilter[ad](aa,ac,ai,ak,Y,ab);if(!aa){V=aj=true}else{if(aa===true){continue}}}if(aa){for(var Z=0;(ah=ac[Z])!=null;Z++){if(ah){aj=W(ah,aa,Z,ac);var ag=Y^!!aj;if(ai&&aj!=null){if(ag){V=true}else{ac[Z]=false}}else{if(ag){ak.push(ah);V=true}}}}}if(aj!==g){if(!ai){ac=ak}af=af.replace(K.match[ad],"");if(!V){return[]}break}}}if(af==X){if(V==null){throw"Syntax error, unrecognized expression: "+af}else{break}}X=af}return ac};var K=H.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(V){return V.getAttribute("href")}},relative:{"+":function(ac,V,ab){var Z=typeof V==="string",ad=Z&&!/\W/.test(V),aa=Z&&!ad;if(ad&&!ab){V=V.toUpperCase()}for(var Y=0,X=ac.length,W;Y<X;Y++){if((W=ac[Y])){while((W=W.previousSibling)&&W.nodeType!==1){}ac[Y]=aa||W&&W.nodeName===V?W||false:W===V}}if(aa){H.filter(V,ac,true)}},">":function(ab,W,ac){var Z=typeof W==="string";if(Z&&!/\W/.test(W)){W=ac?W:W.toUpperCase();for(var X=0,V=ab.length;X<V;X++){var aa=ab[X];if(aa){var Y=aa.parentNode;ab[X]=Y.nodeName===W?Y:false}}}else{for(var X=0,V=ab.length;X<V;X++){var aa=ab[X];if(aa){ab[X]=Z?aa.parentNode:aa.parentNode===W}}if(Z){H.filter(W,ab,true)}}},"":function(Y,W,aa){var X=N++,V=U;if(!W.match(/\W/)){var Z=W=aa?W:W.toUpperCase();V=R}V("parentNode",W,X,Y,Z,aa)},"~":function(Y,W,aa){var X=N++,V=U;if(typeof W==="string"&&!W.match(/\W/)){var Z=W=aa?W:W.toUpperCase();V=R}V("previousSibling",W,X,Y,Z,aa)}},find:{ID:function(W,X,Y){if(typeof X.getElementById!=="undefined"&&!Y){var V=X.getElementById(W[1]);return V?[V]:[]}},NAME:function(X,aa,ab){if(typeof aa.getElementsByName!=="undefined"){var W=[],Z=aa.getElementsByName(X[1]);for(var Y=0,V=Z.length;Y<V;Y++){if(Z[Y].getAttribute("name")===X[1]){W.push(Z[Y])}}return W.length===0?null:W}},TAG:function(V,W){return W.getElementsByTagName(V[1])}},preFilter:{CLASS:function(Y,W,X,V,ab,ac){Y=" "+Y[1].replace(/\\/g,"")+" ";if(ac){return Y}for(var Z=0,aa;(aa=W[Z])!=null;Z++){if(aa){if(ab^(aa.className&&(" "+aa.className+" ").indexOf(Y)>=0)){if(!X){V.push(aa)}}else{if(X){W[Z]=false}}}}return false},ID:function(V){return V[1].replace(/\\/g,"")},TAG:function(W,V){for(var X=0;V[X]===false;X++){}return V[X]&&S(V[X])?W[1]:W[1].toUpperCase()},CHILD:function(V){if(V[1]=="nth"){var W=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(V[2]=="even"&&"2n"||V[2]=="odd"&&"2n+1"||!/\D/.test(V[2])&&"0n+"+V[2]||V[2]);V[2]=(W[1]+(W[2]||1))-0;V[3]=W[3]-0}V[0]=N++;return V},ATTR:function(Z,W,X,V,aa,ab){var Y=Z[1].replace(/\\/g,"");if(!ab&&K.attrMap[Y]){Z[1]=K.attrMap[Y]}if(Z[2]==="~="){Z[4]=" "+Z[4]+" "}return Z},PSEUDO:function(Z,W,X,V,aa){if(Z[1]==="not"){if(Z[3].match(T).length>1||/^\w/.test(Z[3])){Z[3]=H(Z[3],null,null,W)}else{var Y=H.filter(Z[3],W,X,true^aa);if(!X){V.push.apply(V,Y)}return false}}else{if(K.match.POS.test(Z[0])||K.match.CHILD.test(Z[0])){return true}}return Z},POS:function(V){V.unshift(true);return V}},filters:{enabled:function(V){return V.disabled===false&&V.type!=="hidden"},disabled:function(V){return V.disabled===true},checked:function(V){return V.checked===true},selected:function(V){V.parentNode.selectedIndex;return V.selected===true},parent:function(V){return !!V.firstChild},empty:function(V){return !V.firstChild},has:function(X,W,V){return !!H(V[3],X).length},header:function(V){return/h\d/i.test(V.nodeName)},text:function(V){return"text"===V.type},radio:function(V){return"radio"===V.type},checkbox:function(V){return"checkbox"===V.type},file:function(V){return"file"===V.type},password:function(V){return"password"===V.type},submit:function(V){return"submit"===V.type},image:function(V){return"image"===V.type},reset:function(V){return"reset"===V.type},button:function(V){return"button"===V.type||V.nodeName.toUpperCase()==="BUTTON"},input:function(V){return/input|select|textarea|button/i.test(V.nodeName)}},setFilters:{first:function(W,V){return V===0},last:function(X,W,V,Y){return W===Y.length-1},even:function(W,V){return V%2===0},odd:function(W,V){return V%2===1},lt:function(X,W,V){return W<V[3]-0},gt:function(X,W,V){return W>V[3]-0},nth:function(X,W,V){return V[3]-0==W},eq:function(X,W,V){return V[3]-0==W}},filter:{PSEUDO:function(ab,X,Y,ac){var W=X[1],Z=K.filters[W];if(Z){return Z(ab,Y,X,ac)}else{if(W==="contains"){return(ab.textContent||ab.innerText||"").indexOf(X[3])>=0}else{if(W==="not"){var aa=X[3];for(var Y=0,V=aa.length;Y<V;Y++){if(aa[Y]===ab){return false}}return true}}}},CHILD:function(V,Y){var ab=Y[1],W=V;switch(ab){case"only":case"first":while(W=W.previousSibling){if(W.nodeType===1){return false}}if(ab=="first"){return true}W=V;case"last":while(W=W.nextSibling){if(W.nodeType===1){return false}}return true;case"nth":var X=Y[2],ae=Y[3];if(X==1&&ae==0){return true}var aa=Y[0],ad=V.parentNode;if(ad&&(ad.sizcache!==aa||!V.nodeIndex)){var Z=0;for(W=ad.firstChild;W;W=W.nextSibling){if(W.nodeType===1){W.nodeIndex=++Z}}ad.sizcache=aa}var ac=V.nodeIndex-ae;if(X==0){return ac==0}else{return(ac%X==0&&ac/X>=0)}}},ID:function(W,V){return W.nodeType===1&&W.getAttribute("id")===V},TAG:function(W,V){return(V==="*"&&W.nodeType===1)||W.nodeName===V},CLASS:function(W,V){return(" "+(W.className||W.getAttribute("class"))+" ").indexOf(V)>-1},ATTR:function(aa,Y){var X=Y[1],V=K.attrHandle[X]?K.attrHandle[X](aa):aa[X]!=null?aa[X]:aa.getAttribute(X),ab=V+"",Z=Y[2],W=Y[4];return V==null?Z==="!=":Z==="="?ab===W:Z==="*="?ab.indexOf(W)>=0:Z==="~="?(" "+ab+" ").indexOf(W)>=0:!W?ab&&V!==false:Z==="!="?ab!=W:Z==="^="?ab.indexOf(W)===0:Z==="$="?ab.substr(ab.length-W.length)===W:Z==="|="?ab===W||ab.substr(0,W.length+1)===W+"-":false},POS:function(Z,W,X,aa){var V=W[2],Y=K.setFilters[V];if(Y){return Y(Z,X,W,aa)}}}};var O=K.match.POS;for(var Q in K.match){K.match[Q]=RegExp(K.match[Q].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var G=function(W,V){W=Array.prototype.slice.call(W);if(V){V.push.apply(V,W);return V}return W};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(P){G=function(Z,Y){var W=Y||[];if(J.call(Z)==="[object Array]"){Array.prototype.push.apply(W,Z)}else{if(typeof Z.length==="number"){for(var X=0,V=Z.length;X<V;X++){W.push(Z[X])}}else{for(var X=0;Z[X];X++){W.push(Z[X])}}}return W}}var I;if(document.documentElement.compareDocumentPosition){I=function(W,V){var X=W.compareDocumentPosition(V)&4?-1:W===V?0:1;if(X===0){hasDuplicate=true}return X}}else{if("sourceIndex" in document.documentElement){I=function(W,V){var X=W.sourceIndex-V.sourceIndex;if(X===0){hasDuplicate=true}return X}}else{if(document.createRange){I=function(Y,W){var X=Y.ownerDocument.createRange(),V=W.ownerDocument.createRange();X.selectNode(Y);X.collapse(true);V.selectNode(W);V.collapse(true);var Z=X.compareBoundaryPoints(Range.START_TO_END,V);if(Z===0){hasDuplicate=true}return Z}}}}(function(){var W=document.createElement("form"),X="script"+(new Date).getTime();W.innerHTML="<input name='"+X+"'/>";var V=document.documentElement;V.insertBefore(W,V.firstChild);if(!!document.getElementById(X)){K.find.ID=function(Z,aa,ab){if(typeof aa.getElementById!=="undefined"&&!ab){var Y=aa.getElementById(Z[1]);return Y?Y.id===Z[1]||typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id").nodeValue===Z[1]?[Y]:g:[]}};K.filter.ID=function(aa,Y){var Z=typeof aa.getAttributeNode!=="undefined"&&aa.getAttributeNode("id");return aa.nodeType===1&&Z&&Z.nodeValue===Y}}V.removeChild(W)})();(function(){var V=document.createElement("div");V.appendChild(document.createComment(""));if(V.getElementsByTagName("*").length>0){K.find.TAG=function(W,aa){var Z=aa.getElementsByTagName(W[1]);if(W[1]==="*"){var Y=[];for(var X=0;Z[X];X++){if(Z[X].nodeType===1){Y.push(Z[X])}}Z=Y}return Z}}V.innerHTML="<a href='#'></a>";if(V.firstChild&&typeof V.firstChild.getAttribute!=="undefined"&&V.firstChild.getAttribute("href")!=="#"){K.attrHandle.href=function(W){return W.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var V=H,W=document.createElement("div");W.innerHTML="<p class='TEST'></p>";if(W.querySelectorAll&&W.querySelectorAll(".TEST").length===0){return}H=function(aa,Z,X,Y){Z=Z||document;if(!Y&&Z.nodeType===9&&!S(Z)){try{return G(Z.querySelectorAll(aa),X)}catch(ab){}}return V(aa,Z,X,Y)};H.find=V.find;H.filter=V.filter;H.selectors=V.selectors;H.matches=V.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var V=document.createElement("div");V.innerHTML="<div class='test e'></div><div class='test'></div>";if(V.getElementsByClassName("e").length===0){return}V.lastChild.className="e";if(V.getElementsByClassName("e").length===1){return}K.order.splice(1,0,"CLASS");K.find.CLASS=function(W,X,Y){if(typeof X.getElementsByClassName!=="undefined"&&!Y){return X.getElementsByClassName(W[1])}}})()}function R(W,ab,aa,af,ac,ae){var ad=W=="previousSibling"&&!ae;for(var Y=0,X=af.length;Y<X;Y++){var V=af[Y];if(V){if(ad&&V.nodeType===1){V.sizcache=aa;V.sizset=Y}V=V[W];var Z=false;while(V){if(V.sizcache===aa){Z=af[V.sizset];break}if(V.nodeType===1&&!ae){V.sizcache=aa;V.sizset=Y}if(V.nodeName===ab){Z=V;break}V=V[W]}af[Y]=Z}}}function U(W,ab,aa,af,ac,ae){var ad=W=="previousSibling"&&!ae;for(var Y=0,X=af.length;Y<X;Y++){var V=af[Y];if(V){if(ad&&V.nodeType===1){V.sizcache=aa;V.sizset=Y}V=V[W];var Z=false;while(V){if(V.sizcache===aa){Z=af[V.sizset];break}if(V.nodeType===1){if(!ae){V.sizcache=aa;V.sizset=Y}if(typeof ab!=="string"){if(V===ab){Z=true;break}}else{if(H.filter(ab,[V]).length>0){Z=V;break}}}V=V[W]}af[Y]=Z}}}var M=document.compareDocumentPosition?function(W,V){return W.compareDocumentPosition(V)&16}:function(W,V){return W!==V&&(W.contains?W.contains(V):true)};var S=function(V){return V.nodeType===9&&V.documentElement.nodeName!=="HTML"||!!V.ownerDocument&&S(V.ownerDocument)};var L=function(V,ac){var Y=[],Z="",aa,X=ac.nodeType?[ac]:ac;while((aa=K.match.PSEUDO.exec(V))){Z+=aa[0];V=V.replace(K.match.PSEUDO,"")}V=K.relative[V]?V+"*":V;for(var ab=0,W=X.length;ab<W;ab++){H(V,X[ab],Y)}return H.filter(Z,Y)};p.find=H;p.filter=H.filter;p.expr=H.selectors;p.expr[":"]=p.expr.filters;H.selectors.filters.hidden=function(V){return V.offsetWidth===0||V.offsetHeight===0};H.selectors.filters.visible=function(V){return V.offsetWidth>0||V.offsetHeight>0};H.selectors.filters.animated=function(V){return p.grep(p.timers,function(W){return V===W.elem}).length};p.multiFilter=function(X,V,W){if(W){X=":not("+X+")"}return H.matches(X,V)};p.dir=function(X,W){var V=[],Y=X[W];while(Y&&Y!=document){if(Y.nodeType==1){V.push(Y)}Y=Y[W]}return V};p.nth=function(Z,V,X,Y){V=V||1;var W=0;for(;Z;Z=Z[X]){if(Z.nodeType==1&&++W==V){break}}return Z};p.sibling=function(X,W){var V=[];for(;X;X=X.nextSibling){if(X.nodeType==1&&X!=W){V.push(X)}}return V};return;m.Sizzle=H})();p.event={add:function(K,H,J,M){if(K.nodeType==3||K.nodeType==8){return}if(K.setInterval&&K!=m){K=m}if(!J.guid){J.guid=this.guid++}if(M!==g){var I=J;J=this.proxy(I);J.data=M}var G=p.data(K,"events")||p.data(K,"events",{}),L=p.data(K,"handle")||p.data(K,"handle",function(){return typeof p!=="undefined"&&!p.event.triggered?p.event.handle.apply(arguments.callee.elem,arguments):g});L.elem=K;p.each(H.split(/\s+/),function(O,P){var Q=P.split(".");P=Q.shift();J.type=Q.slice().sort().join(".");var N=G[P];if(p.event.specialAll[P]){p.event.specialAll[P].setup.call(K,M,Q)}if(!N){N=G[P]={};if(!p.event.special[P]||p.event.special[P].setup.call(K,M,Q)===false){if(K.addEventListener){K.addEventListener(P,L,false)}else{if(K.attachEvent){K.attachEvent("on"+P,L)}}}}N[J.guid]=J;p.event.global[P]=true});K=null},guid:1,global:{},remove:function(M,J,L){if(M.nodeType==3||M.nodeType==8){return}var I=p.data(M,"events"),H,G;if(I){if(J===g||(typeof J==="string"&&J.charAt(0)==".")){for(var K in I){this.remove(M,K+(J||""))}}else{if(J.type){L=J.handler;J=J.type}p.each(J.split(/\s+/),function(O,Q){var S=Q.split(".");Q=S.shift();var P=RegExp("(^|\\.)"+S.slice().sort().join(".*\\.")+"(\\.|$)");if(I[Q]){if(L){delete I[Q][L.guid]}else{for(var R in I[Q]){if(P.test(I[Q][R].type)){delete I[Q][R]}}}if(p.event.specialAll[Q]){p.event.specialAll[Q].teardown.call(M,S)}for(H in I[Q]){break}if(!H){if(!p.event.special[Q]||p.event.special[Q].teardown.call(M,S)===false){if(M.removeEventListener){M.removeEventListener(Q,p.data(M,"handle"),false)}else{if(M.detachEvent){M.detachEvent("on"+Q,p.data(M,"handle"))}}}H=null;delete I[Q]}}})}for(H in I){break}if(!H){var N=p.data(M,"handle");if(N){N.elem=null}p.removeData(M,"events");p.removeData(M,"handle")}}},trigger:function(K,M,J,G){var I=K.type||K;if(!G){K=typeof K==="object"?K[h]?K:p.extend(p.Event(I),K):p.Event(I);if(I.indexOf("!")>=0){K.type=I=I.slice(0,-1);K.exclusive=true}if(!J){K.stopPropagation();if(this.global[I]){p.each(p.cache,function(){if(this.events&&this.events[I]){p.event.trigger(K,M,this.handle.elem)}})}}if(!J||J.nodeType==3||J.nodeType==8){return g}K.result=g;K.target=J;M=p.makeArray(M);M.unshift(K)}K.currentTarget=J;var L=p.data(J,"handle");if(L){L.apply(J,M)}if((!J[I]||(p.nodeName(J,"a")&&I=="click"))&&J["on"+I]&&J["on"+I].apply(J,M)===false){K.result=false}if(!G&&J[I]&&!K.isDefaultPrevented()&&!(p.nodeName(J,"a")&&I=="click")){this.triggered=true;try{J[I]()}catch(N){}}this.triggered=false;if(!K.isPropagationStopped()){var H=J.parentNode||J.ownerDocument;if(H){p.event.trigger(K,M,H,true)}}},handle:function(M){var L,G;M=arguments[0]=p.event.fix(M||m.event);M.currentTarget=this;var N=M.type.split(".");M.type=N.shift();L=!N.length&&!M.exclusive;var K=RegExp("(^|\\.)"+N.slice().sort().join(".*\\.")+"(\\.|$)");G=(p.data(this,"events")||{})[M.type];for(var I in G){var J=G[I];if(L||K.test(J.type)){M.handler=J;M.data=J.data;var H=J.apply(this,arguments);if(H!==g){M.result=H;if(H===false){M.preventDefault();M.stopPropagation()}}if(M.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(J){if(J[h]){return J}var H=J;J=p.Event(H);for(var I=this.props.length,L;I;){L=this.props[--I];J[L]=H[L]}if(!J.target){J.target=J.srcElement||document}if(J.target.nodeType==3){J.target=J.target.parentNode}if(!J.relatedTarget&&J.fromElement){J.relatedTarget=J.fromElement==J.target?J.toElement:J.fromElement}if(J.pageX==null&&J.clientX!=null){var K=document.documentElement,G=document.body;J.pageX=J.clientX+(K&&K.scrollLeft||G&&G.scrollLeft||0)-(K.clientLeft||0);J.pageY=J.clientY+(K&&K.scrollTop||G&&G.scrollTop||0)-(K.clientTop||0)}if(!J.which&&((J.charCode||J.charCode===0)?J.charCode:J.keyCode)){J.which=J.charCode||J.keyCode}if(!J.metaKey&&J.ctrlKey){J.metaKey=J.ctrlKey}if(!J.which&&J.button){J.which=(J.button&1?1:(J.button&2?3:(J.button&4?2:0)))}return J},proxy:function(H,G){G=G||function(){return H.apply(this,arguments)};G.guid=H.guid=H.guid||G.guid||this.guid++;return G},special:{ready:{setup:D,teardown:function(){}}},specialAll:{live:{setup:function(G,H){p.event.add(this,H[0],c)},teardown:function(I){if(I.length){var G=0,H=RegExp("(^|\\.)"+I[0]+"(\\.|$)");p.each((p.data(this,"events").live||{}),function(){if(H.test(this.type)){G++}});if(G<1){p.event.remove(this,I[0],c)}}}}}};p.Event=function(G){if(!this.preventDefault){return new p.Event(G)}if(G&&G.type){this.originalEvent=G;this.type=G.type}else{this.type=G}this.timeStamp=e();this[h]=true};function l(){return false}function v(){return true}p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=v;var G=this.originalEvent;if(!G){return}if(G.preventDefault){G.preventDefault()}G.returnValue=false},stopPropagation:function(){this.isPropagationStopped=v;var G=this.originalEvent;if(!G){return}if(G.stopPropagation){G.stopPropagation()}G.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=v;this.stopPropagation()},isDefaultPrevented:l,isPropagationStopped:l,isImmediatePropagationStopped:l};var a=function(H){var G=H.relatedTarget;while(G&&G!=this){try{G=G.parentNode}catch(I){G=this}}if(G!=this){H.type=H.data;p.event.handle.apply(this,arguments)}};p.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(H,G){p.event.special[G]={setup:function(){p.event.add(this,H,a,G)},teardown:function(){p.event.remove(this,H,a)}}});p.fn.extend({bind:function(H,I,G){return H=="unload"?this.one(H,I,G):this.each(function(){p.event.add(this,H,G||I,G&&I)})},one:function(I,J,H){var G=p.event.proxy(H||J,function(K){p(this).unbind(K,G);return(H||J).apply(this,arguments)});return this.each(function(){p.event.add(this,I,G,H&&J)})},unbind:function(H,G){return this.each(function(){p.event.remove(this,H,G)})},trigger:function(G,H){return this.each(function(){p.event.trigger(G,H,this)})},triggerHandler:function(G,I){if(this[0]){var H=p.Event(G);H.preventDefault();H.stopPropagation();p.event.trigger(H,I,this[0]);return H.result}},toggle:function(I){var G=arguments,H=1;while(H<G.length){p.event.proxy(I,G[H++])}return this.click(p.event.proxy(I,function(J){this.lastToggle=(this.lastToggle||0)%H;J.preventDefault();return G[this.lastToggle++].apply(this,arguments)||false}))},hover:function(G,H){return this.mouseenter(G).mouseleave(H)},ready:function(G){D();if(p.isReady){G.call(document,p)}else{p.readyList.push(G)}return this},live:function(I,H){var G=p.event.proxy(H);G.guid+=this.selector+I;p(document).bind(j(I,this.selector),this.selector,G);return this},die:function(H,G){p(document).unbind(j(H,this.selector),G?{guid:G.guid+this.selector+H}:null);return this}});function c(J){var G=RegExp("(^|\\.)"+J.type+"(\\.|$)"),I=true,H=[];p.each(p.data(this,"events").live||[],function(K,L){if(G.test(L.type)){var M=p(J.target).closest(L.data)[0];if(M){H.push({elem:M,fn:L})}}});H.sort(function(L,K){return p.data(L.elem,"closest")-p.data(K.elem,"closest")});p.each(H,function(){if(this.fn.call(this.elem,J,this.fn.data)===false){return(I=false)}});return I}function j(H,G){return["live",H,G.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 y=false;function D(){if(y){return}y=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(G){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(H,G){p.fn[G]=function(I){return I?this.bind(G,I):this.trigger(G)}});p(m).bind("unload",function(){for(var G in p.cache){if(G!=1&&p.cache[G].handle){p.event.remove(p.cache[G].handle.elem)}}});(function(){p.support={};var H=document.documentElement,I=document.createElement("script"),M=document.createElement("div"),L="script"+(new Date).getTime();M.style.display="none";M.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 J=M.getElementsByTagName("*"),G=M.getElementsByTagName("a")[0];if(!J||!J.length||!G){return}p.support={leadingWhitespace:M.firstChild.nodeType==3,tbody:!M.getElementsByTagName("tbody").length,objectAll:!!M.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!M.getElementsByTagName("link").length,style:/red/.test(G.getAttribute("style")),hrefNormalized:G.getAttribute("href")==="/a",opacity:G.style.opacity==="0.5",cssFloat:!!G.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};I.type="text/javascript";try{I.appendChild(document.createTextNode("window."+L+"=1;"))}catch(K){}H.insertBefore(I,H.firstChild);if(m[L]){p.support.scriptEval=true;delete m[L]}H.removeChild(I);if(M.attachEvent&&M.fireEvent){M.attachEvent("onclick",function(){p.support.noCloneEvent=false;M.detachEvent("onclick",arguments.callee)});M.cloneNode(true).fireEvent("onclick")}p(function(){var N=document.createElement("div");N.style.width=N.style.paddingLeft="1px";document.body.appendChild(N);p.boxModel=p.support.boxModel=N.offsetWidth===2;document.body.removeChild(N).style.display="none"})})();var x=p.support.cssFloat?"cssFloat":"styleFloat";p.props={"for":"htmlFor","class":"className","float":x,cssFloat:x,styleFloat:x,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};p.fn.extend({_load:p.fn.load,load:function(I,L,M){if(typeof I!=="string"){return this._load(I)}var K=I.indexOf(" ");if(K>=0){var G=I.slice(K,I.length);I=I.slice(0,K)}var J="GET";if(L){if(p.isFunction(L)){M=L;L=null}else{if(typeof L==="object"){L=p.param(L);J="POST"}}}var H=this;p.ajax({url:I,type:J,dataType:"html",data:L,complete:function(O,N){if(N=="success"||N=="notmodified"){H.html(G?p("<div/>").append(O.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(G):O.responseText)}if(M){H.each(M,[O.responseText,N,O])}}});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(G,H){var I=p(this).val();return I==null?null:p.isArray(I)?p.map(I,function(K,J){return{name:H.name,value:K}}):{name:H.name,value:I}}).get()}});p.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(G,H){p.fn[H]=function(I){return this.bind(H,I)}});var s=e();p.extend({get:function(G,I,J,H){if(p.isFunction(I)){J=I;I=null}return p.ajax({type:"GET",url:G,data:I,success:J,dataType:H})},getScript:function(G,H){return p.get(G,null,H,"script")},getJSON:function(G,H,I){return p.get(G,H,I,"json")},post:function(G,I,J,H){if(p.isFunction(I)){J=I;I={}}return p.ajax({type:"POST",url:G,data:I,success:J,dataType:H})},ajaxSetup:function(G){p.extend(p.ajaxSettings,G)},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(O){O=p.extend(true,O,p.extend(true,{},p.ajaxSettings,O));var Y,H=/=\?(&|$)/g,T,X,I=O.type.toUpperCase();if(O.data&&O.processData&&typeof O.data!=="string"){O.data=p.param(O.data)}if(O.dataType=="jsonp"){if(I=="GET"){if(!O.url.match(H)){O.url+=(O.url.match(/\?/)?"&":"?")+(O.jsonp||"callback")+"=?"}}else{if(!O.data||!O.data.match(H)){O.data=(O.data?O.data+"&":"")+(O.jsonp||"callback")+"=?"}}O.dataType="json"}if(O.dataType=="json"&&(O.data&&O.data.match(H)||O.url.match(H))){Y="jsonp"+s++;if(O.data){O.data=(O.data+"").replace(H,"="+Y+"$1")}O.url=O.url.replace(H,"="+Y+"$1");O.dataType="script";m[Y]=function(Z){X=Z;K();N();m[Y]=g;try{delete m[Y]}catch(aa){}if(J){J.removeChild(V)}}}if(O.dataType=="script"&&O.cache==null){O.cache=false}if(O.cache===false&&I=="GET"){var G=e();var W=O.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+G+"$2");O.url=W+((W==O.url)?(O.url.match(/\?/)?"&":"?")+"_="+G:"")}if(O.data&&I=="GET"){O.url+=(O.url.match(/\?/)?"&":"?")+O.data;O.data=null}if(O.global&&!p.active++){p.event.trigger("ajaxStart")}var S=/^(\w+:)?\/\/([^\/?#]+)/.exec(O.url);if(O.dataType=="script"&&I=="GET"&&S&&(S[1]&&S[1]!=location.protocol||S[2]!=location.host)){var J=document.getElementsByTagName("head")[0];var V=document.createElement("script");V.src=O.url;if(O.scriptCharset){V.charset=O.scriptCharset}if(!Y){var Q=false;V.onload=V.onreadystatechange=function(){if(!Q&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){Q=true;K();N();V.onload=V.onreadystatechange=null;J.removeChild(V)}}}J.appendChild(V);return g}var M=false;var L=O.xhr();if(O.username){L.open(I,O.url,O.async,O.username,O.password)}else{L.open(I,O.url,O.async)}try{if(O.data){L.setRequestHeader("Content-Type",O.contentType)}if(O.ifModified){L.setRequestHeader("If-Modified-Since",p.lastModified[O.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}L.setRequestHeader("X-Requested-With","XMLHttpRequest");L.setRequestHeader("Accept",O.dataType&&O.accepts[O.dataType]?O.accepts[O.dataType]+", */*":O.accepts._default)}catch(U){}if(O.beforeSend&&O.beforeSend(L,O)===false){if(O.global&&!--p.active){p.event.trigger("ajaxStop")}L.abort();return false}if(O.global){p.event.trigger("ajaxSend",[L,O])}var P=function(Z){if(L.readyState==0){if(R){clearInterval(R);R=null;if(O.global&&!--p.active){p.event.trigger("ajaxStop")}}}else{if(!M&&L&&(L.readyState==4||Z=="timeout")){M=true;if(R){clearInterval(R);R=null}T=Z=="timeout"?"timeout":!p.httpSuccess(L)?"error":O.ifModified&&p.httpNotModified(L,O.url)?"notmodified":"success";if(T=="success"){try{X=p.httpData(L,O.dataType,O)}catch(ab){T="parsererror"}}if(T=="success"){var aa;try{aa=L.getResponseHeader("Last-Modified")}catch(ab){}if(O.ifModified&&aa){p.lastModified[O.url]=aa}if(!Y){K()}}else{p.handleError(O,L,T)}N();if(Z){L.abort()}if(O.async){L=null}}}};if(O.async){var R=setInterval(P,13);if(O.timeout>0){setTimeout(function(){if(L&&!M){P("timeout")}},O.timeout)}}try{L.send(O.data)}catch(U){p.handleError(O,L,null,U)}if(!O.async){P()}function K(){if(O.success){O.success(X,T)}if(O.global){p.event.trigger("ajaxSuccess",[L,O])}}function N(){if(O.complete){O.complete(L,T)}if(O.global){p.event.trigger("ajaxComplete",[L,O])}if(O.global&&!--p.active){p.event.trigger("ajaxStop")}}return L},handleError:function(H,J,G,I){if(H.error){H.error(J,G,I)}if(H.global){p.event.trigger("ajaxError",[J,H,I])}},active:0,httpSuccess:function(H){try{return !H.status&&location.protocol=="file:"||(H.status>=200&&H.status<300)||H.status==304||H.status==1223}catch(G){}return false},httpNotModified:function(I,G){try{var J=I.getResponseHeader("Last-Modified");return I.status==304||J==p.lastModified[G]}catch(H){}return false},httpData:function(L,J,I){var H=L.getResponseHeader("content-type"),G=J=="xml"||!J&&H&&H.indexOf("xml")>=0,K=G?L.responseXML:L.responseText;if(G&&K.documentElement.tagName=="parsererror"){throw"parsererror"}if(I&&I.dataFilter){K=I.dataFilter(K,J)}if(typeof K==="string"){if(J=="script"){p.globalEval(K)}if(J=="json"){K=m["eval"]("("+K+")")}}return K},param:function(G){var I=[];function J(K,L){I[I.length]=encodeURIComponent(K)+"="+encodeURIComponent(L)}if(p.isArray(G)||G.jquery){p.each(G,function(){J(this.name,this.value)})}else{for(var H in G){if(p.isArray(G[H])){p.each(G[H],function(){J(H,this)})}else{J(H,p.isFunction(G[H])?G[H]():G[H])}}}return I.join("&").replace(/%20/g,"+")}});var n={},o,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function u(H,G){var I={};p.each(d.concat.apply([],d.slice(0,G)),function(){I[this]=H});return I}p.fn.extend({show:function(L,N){if(L){return this.animate(u("show",3),L,N)}else{for(var J=0,H=this.length;J<H;J++){var G=p.data(this[J],"olddisplay");this[J].style.display=G||"";if(p.css(this[J],"display")==="none"){var I=this[J].tagName,M;if(n[I]){M=n[I]}else{var K=p("<"+I+" />").appendTo("body");M=K.css("display");if(M==="none"){M="block"}K.remove();n[I]=M}p.data(this[J],"olddisplay",M)}}for(var J=0,H=this.length;J<H;J++){this[J].style.display=p.data(this[J],"olddisplay")||""}return this}},hide:function(J,K){if(J){return this.animate(u("hide",3),J,K)}else{for(var I=0,H=this.length;I<H;I++){var G=p.data(this[I],"olddisplay");if(!G&&G!=="none"){p.data(this[I],"olddisplay",p.css(this[I],"display"))}}for(var I=0,H=this.length;I<H;I++){this[I].style.display="none"}return this}},_toggle:p.fn.toggle,toggle:function(I,H){var G=typeof I==="boolean";return p.isFunction(I)&&p.isFunction(H)?this._toggle.apply(this,arguments):I==null||G?this.each(function(){var J=G?I:p(this).is(":hidden");p(this)[J?"show":"hide"]()}):this.animate(u("toggle",3),I,H)},fadeTo:function(G,I,H){return this.animate({opacity:I},G,H)},animate:function(K,H,J,I){var G=p.speed(H,J,I);return this[G.queue===false?"each":"queue"](function(){var M=p.extend({},G),O,N=this.nodeType==1&&p(this).is(":hidden"),L=this;for(O in K){if(K[O]=="hide"&&N||K[O]=="show"&&!N){return M.complete.call(this)}if((O=="height"||O=="width")&&this.style){M.display=p.css(this,"display");M.overflow=this.style.overflow}}if(M.overflow!=null){this.style.overflow="hidden"}M.curAnim=p.extend({},K);p.each(K,function(Q,U){var T=new p.fx(L,M,Q);if(/toggle|show|hide/.test(U)){T[U=="toggle"?N?"show":"hide":U](K)}else{var S=U.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),V=T.cur(true)||0;if(S){var P=parseFloat(S[2]),R=S[3]||"px";if(R!="px"){L.style[Q]=(P||1)+R;V=((P||1)/T.cur(true))*V;L.style[Q]=V+R}if(S[1]){P=((S[1]=="-="?-1:1)*P)+V}T.custom(V,P,R)}else{T.custom(V,U,"")}}});return true})},stop:function(H,G){var I=p.timers;if(H){this.queue([])}this.each(function(){for(var J=I.length-1;J>=0;J--){if(I[J].elem==this){if(G){I[J](true)}I.splice(J,1)}}});if(!G){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(G,H){p.fn[G]=function(I,J){return this.animate(H,I,J)}});p.extend({speed:function(I,J,H){var G=typeof I==="object"?I:{complete:H||!H&&J||p.isFunction(I)&&I,duration:I,easing:H&&J||J&&!p.isFunction(J)&&J};G.duration=p.fx.off?0:typeof G.duration==="number"?G.duration:p.fx.speeds[G.duration]||p.fx.speeds._default;G.old=G.complete;G.complete=function(){if(G.queue!==false){p(this).dequeue()}if(p.isFunction(G.old)){G.old.call(this)}};return G},easing:{linear:function(I,J,G,H){return G+H*I},swing:function(I,J,G,H){return((-Math.cos(I*Math.PI)/2)+0.5)*H+G}},timers:[],fx:function(H,G,I){this.options=G;this.elem=H;this.prop=I;if(!G.orig){G.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(H){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var G=parseFloat(p.css(this.elem,this.prop,H));return G&&G>-10000?G:parseFloat(p.curCSS(this.elem,this.prop))||0},custom:function(K,J,I){this.startTime=e();this.start=K;this.end=J;this.unit=I||this.unit||"px";this.now=this.start;this.pos=this.state=0;var G=this;function H(L){return G.step(L)}H.elem=this.elem;if(H()&&p.timers.push(H)&&!o){o=setInterval(function(){var M=p.timers;for(var L=0;L<M.length;L++){if(!M[L]()){M.splice(L--,1)}}if(!M.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(J){var I=e();if(J||I>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var G=true;for(var H in this.options.curAnim){if(this.options.curAnim[H]!==true){G=false}}if(G){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 K in this.options.curAnim){p.attr(this.elem.style,K,this.options.orig[K])}}this.options.complete.call(this.elem)}return false}else{var L=I-this.startTime;this.state=L/this.options.duration;this.pos=p.easing[this.options.easing||(p.easing.swing?"swing":"linear")](this.state,L,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(G){p.attr(G.elem.style,"opacity",G.now)},_default:function(G){if(G.elem.style&&G.elem.style[G.prop]!=null){G.elem.style[G.prop]=G.now+G.unit}else{G.elem[G.prop]=G.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 I=this[0].getBoundingClientRect(),L=this[0].ownerDocument,H=L.body,G=L.documentElement,N=G.clientTop||H.clientTop||0,M=G.clientLeft||H.clientLeft||0,K=I.top+(self.pageYOffset||p.boxModel&&G.scrollTop||H.scrollTop)-N,J=I.left+(self.pageXOffset||p.boxModel&&G.scrollLeft||H.scrollLeft)-M;return{top:K,left:J}}}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 L=this[0],I=L.offsetParent,H=L,Q=L.ownerDocument,O,J=Q.documentElement,M=Q.body,N=Q.defaultView,G=N.getComputedStyle(L,null),P=L.offsetTop,K=L.offsetLeft;while((L=L.parentNode)&&L!==M&&L!==J){O=N.getComputedStyle(L,null);P-=L.scrollTop,K-=L.scrollLeft;if(L===I){P+=L.offsetTop,K+=L.offsetLeft;if(p.offset.doesNotAddBorder&&!(p.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(L.tagName))){P+=parseInt(O.borderTopWidth,10)||0,K+=parseInt(O.borderLeftWidth,10)||0}H=I,I=L.offsetParent}if(p.offset.subtractsBorderForOverflowNotVisible&&O.overflow!=="visible"){P+=parseInt(O.borderTopWidth,10)||0,K+=parseInt(O.borderLeftWidth,10)||0}G=O}if(G.position==="relative"||G.position==="static"){P+=M.offsetTop,K+=M.offsetLeft}if(G.position==="fixed"){P+=Math.max(J.scrollTop,M.scrollTop),K+=Math.max(J.scrollLeft,M.scrollLeft)}return{top:P,left:K}}}p.offset={initialize:function(){if(this.initialized){return}var N=document.body,H=document.createElement("div"),J,I,P,K,O,G,L=N.style.marginTop,M='<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>';O={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(G in O){H.style[G]=O[G]}H.innerHTML=M;N.insertBefore(H,N.firstChild);J=H.firstChild,I=J.firstChild,K=J.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(I.offsetTop!==5);this.doesAddBorderForTableAndCells=(K.offsetTop===5);J.style.overflow="hidden",J.style.position="relative";this.subtractsBorderForOverflowNotVisible=(I.offsetTop===-5);N.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(N.offsetTop===0);N.style.marginTop=L;N.removeChild(H);this.initialized=true},bodyOffset:function(G){p.offset.initialized||p.offset.initialize();var I=G.offsetTop,H=G.offsetLeft;if(p.offset.doesNotIncludeMarginInBodyOffset){I+=parseInt(p.curCSS(G,"marginTop",true),10)||0,H+=parseInt(p.curCSS(G,"marginLeft",true),10)||0}return{top:I,left:H}}};p.fn.extend({position:function(){var K=0,J=0,H;if(this[0]){var I=this.offsetParent(),L=this.offset(),G=/^body|html$/i.test(I[0].tagName)?{top:0,left:0}:I.offset();L.top-=k(this,"marginTop");L.left-=k(this,"marginLeft");G.top+=k(I,"borderTopWidth");G.left+=k(I,"borderLeftWidth");H={top:L.top-G.top,left:L.left-G.left}}return H},offsetParent:function(){var G=this[0].offsetParent||document.body;while(G&&(!/^body|html$/i.test(G.tagName)&&p.css(G,"position")=="static")){G=G.offsetParent}return p(G)}});p.each(["Left","Top"],function(H,G){var I="scroll"+G;p.fn[I]=function(J){if(!this[0]){return null}return J!==g?this.each(function(){this==m||this==document?m.scrollTo(!H?J:p(m).scrollLeft(),H?J:p(m).scrollTop()):this[I]=J}):this[0]==m||this[0]==document?self[H?"pageYOffset":"pageXOffset"]||p.boxModel&&document.documentElement[I]||document.body[I]:this[0][I]}});p.each(["Height","Width"],function(K,I){var G=K?"Left":"Top",J=K?"Right":"Bottom",H=I.toLowerCase();p.fn["inner"+I]=function(){return this[0]?p.css(this[0],H,false,"padding"):null};p.fn["outer"+I]=function(M){return this[0]?p.css(this[0],H,false,M?"margin":"border"):null};var L=I.toLowerCase();p.fn[L]=function(M){return this[0]==m?document.compatMode=="CSS1Compat"&&document.documentElement["client"+I]||document.body["client"+I]:this[0]==document?Math.max(document.documentElement["client"+I],document.body["scroll"+I],document.documentElement["scroll"+I],document.body["offset"+I],document.documentElement["offset"+I]):M===g?(this.length?p.css(this[0],L):null):this.css(L,typeof M==="string"?M:M+"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"];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").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",Serdes.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=$("#"+d+" .member_first_name_field").val()||"";var j=$("#"+d+" .member_last_name_field").val()||"";var f=$("#"+d+" .member_email_field").val()||"";var a=$("#"+d+" .member_url_field").val()||"";var g=false;e=e.replace(/^\s*|\s*$/,"");j=j.replace(/^\s*|\s*$/,"");f=f.replace(/^\s*|\s*$/,"");a=a.replace(/^\s*|\s*$/,"");if(!SP.validate(e,"member_name",true,false)||!SP.validate(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 fbConnected=false;SP.globals.fbConnected=false;var onConnected=function(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});FB.Connect.logout(onNotConnected)}else{fbConnected=true;SP.set("fbConnected",true);$("#fb_info").html('You are logged in as: <fb:name uid="loggedinuser" useyou="false" ></fb:name>&nbsp;<fb:profile-pic uid="loggedinuser" linked="false" width="16" height="16" ></fb:profile-pic><img src="'+Serdes.make_static_url("/images/superpet/facebook/connect_light_small_short.gif")+'">');FB.XFBML.Host.parseDomTree();if(EPISODES.available){window.postMessage("EPISODES:measure:spp_fbconnect","*")}SP.log.jsonp_log_impression("fbconnect_user_impression",{context_info:a});if(spp.on_fb_connect){spp.on_fb_connect()}}};var onNotConnected=function(){fbConnected=false;$("#fb_info").html("");if(spp_profile.invite_page){window.location="/spp/profile/myprofile"}};var logout=function(a){if(fbConnected){FB.Connect.logout(function(){window.location.href=a});$("#invite_fb_link:visible").fadeOut("fast");return false}return true};var requestFBConnection=function(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(!fbConnected){$.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").section_click(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+"fakevalue="+(Math.ceil(Math.random()*100000000))+a+"&"+$.param(g);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";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={};(function(){var a={};SP.getLoadFuncs=function(){return a};SP.addLoadFunc=function(b,c){a[b]=c};SP.removeLoadFunc=function(b){delete a[b]};SP.globals.loadFuncs_run_once=false;SP.loadFuncs=function(){for(var b in a){a[b]()}SP.set("loadFuncs_run_once",true)}})();SP.get=function(b,a){var c={pet_coins:null,pet_gold:null};if(SP.assert){SP.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){if(SP.assert){SP.assert(false,"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}else{SP.globals[b]={};SP.globals[b][c]=e}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._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()}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]},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=Serdes.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(){}};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.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,c){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}SP.ebp({fb:function(){select_tab(b,c)},os:function(){slideTabsSelect(b,c)},spp:function(){select_tab(b,c)}})},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")()!="0"},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(){var a=$(DIV()).append("Want to grow your own plants and items?").append(BR()).append("Hurry and get to level 3 to access the Garden!").css("margin","0px 10px");return SP.ebp({fb:function(){if(!SP.gardening.user_is_allowed_gardening()){SP.util.alert(a,"SPP Garden");return false}else{SP.fbp("select_tab")("home",{section:"garden"})}},os:function(){if(!SP.gardening.user_is_allowed_gardening()){SP.util.alert(a,"SPP Garden");return false}else{SP.fbp("select_tab")("home",{section:"garden"})}},spp:function(){if(!SP.gardening.user_is_allowed_gardening()&&SP.get("viewer_is_owner")){SP.util.alert(a,"SPP Garden");return false}if(spp_profile.viewer_is_owner&&SP.get("petsection",null)){document.location.hash="app_top";SP.get("petsection").section_click("garden")}else{document.location=spp_profile.gardening_url}}})}};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(a){return(a.substring(0,7)=="http://")?a:Serdes.make_static_url(a)},make_img:function(b,c){if(!c){c=b;b={}}var d=(c.substring(0,7)=="http://")?c:Serdes.make_static_url(c);var a=IMG({src:d});if(typeof(b)=="string"){$(a).attr("style",b)}else{$(a).css(b)}return a},$make_img:function(b,a){return $(SP.util.make_img(b,a))},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){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:Serdes.make_static_url("/images/superpet/"+(j?"infoheaderlong_left.gif":"infoheader_left.gif"))})}else{h=IMG({src:Serdes.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:Serdes.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:Serdes.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:Serdes.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(e,g,m,f,k,j,c){var d="auto";if(k===undefined){k=true}if(c===undefined){c=true}if(typeof(e)=="string"){var a=$(DIV()).text(e);if(e.length<25){a.css("width",180)}e=a}else{if(jQuery.browser.msie&&$(e).css("width")){d=SP.util.parseInt($(e).css("width"));if(!d){d="auto"}else{if(SP.spp){d+=40}}}}var l=IMG({src:Serdes.make_static_url("/images/superpet/okay.gif")});if(typeof(k)=="string"){l=SP.util.make_button(k)}var a=$(CENTER({style:"margin:8px; padding-left: 0px; padding-right: 0px; margin-left:0px; margin-top:0px; margin-right:0px;"})).append(e);if(k){a.append(DIV({style:"height:8px;"}));a.append(l)}var h=function(){var n=true;if(m){n=m()!==false}if(n){b.fadeOut()}};if(j){a.append(DIV({style:""}));a.append(A({href:"#",onclick:function(){b.fadeOut();return false}},"Cancel"));$(l).bind("mousedown",h)}else{if(c){a.css("cursor","pointer");a.bind("mousedown",h)}else{$(l).bind("mousedown",h)}}$(a).css({"font-size":"12pt","font-weight":"bold","line-height":"145%"});$(l).css("cursor","pointer");var b=new SP.controls.jqPopup(d,"auto",g,a,{closable:c},false);b.fadeIn(f);return b},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)},okonly:function(a,b,d,c){return SP.util.alert(a,b,d,c,true,false,false)},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(d,e,f,c){f=f||"auto";var a=$(DIV()).css({height:46,width:194,"font-size":"0.9em","font-weight":"bold",cursor:"pointer","text-align":"center","background-image":SP.util.bg_image("/images/superpet/button_lg.gif"),"background-repeat":"no-repeat"}).append($(DIV()).css({padding:"13px 16px","font-size":"1.4em"}).html(d));if(c){var b=SP.get("button_funcs").length;SP.get("button_funcs").push(e);a.attr("onclickhack","SP.globals.button_funcs["+b+"]()")}else{if(e){a.click(e)}}return a},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){b.jsonp=1;return jQuery.ajax({url:a,dataType:"jsonp",data:b,success:function(d){if(c){c(d,0)}},error:function(d){if(c){c(d,1)}}})},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(){setTimeout(function(){SP.events.triggerHandler("flash_is_ready")},500)},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,Serdes.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(a,b,e,d){if(SP.os){return false}if(SP.fb){scrollToAnchor("app_top")}var d=d||{};var c=d.target?[d.target]:[];FB.Connect.showFeedDialog(a,b,c,"",null,FB.RequireConnect.require,e,d.prompt,d.message)}};SP.events=$(DIV());(function(){var a=!SP.get("site_isLive",false);var b=function(){var d={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}}};var c=function(){var j=Array.prototype.slice.call(arguments);var l=0;for(var k=0,m=j.length;k<m;k++){l+=(1<<d[j[k]].bit)}return l};var f={log:c("firebug","chromium","safari","ie8"),debug:c("firebug","chromium","safari"),info:c("firebug","chromium","safari","ie8"),warn:c("firebug","chromium","safari","ie8"),error:c("firebug","chromium","safari","ie8"),assert:c("firebug","chromium","safari","ie8"),dir:c("firebug","chromium","safari"),dirxml:c("firebug","chromium","safari"),trace:c("firebug","chromium","safari"),group:c("firebug","chromium","safari"),groupEnd:c("firebug","chromium","safari"),time:c("firebug","chromium","safari"),timeEnd:c("firebug","chromium","safari"),count:c("firebug","chromium","safari")};var e=function(k){for(var l in d){if(d.hasOwnProperty(l)){var j=d[l];if(j.detect()&&(f[k]&(1<<j.bit))){return true}}}return false};var g=function(j){return function(){if(a&&window.console&&e(j)){if(!jQuery.browser.msie){window.console[j].apply(window.console,arguments)}else{window.console[j](Array.prototype.join.call(arguments,", "))}}}};for(var h in f){if(f.hasOwnProperty(h)){this[h]=g(h)}}this.turnOff=function(){a=false};this.turnOn=function(){a=true}};SuperPet.console=new b()})();SP.assert=function(a,b){SP.console.assert.apply(SP.console,arguments)};if(SP.fb||SP.spp||SP.petsqa){slide.console=SP.console}SP.get_pending_notifications=function(){rc=[];var a=SP.get("daily_login_bonus",0);if(a){if(a==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.log={jsonp_log:function(a,e,d,f){var c=SP.fbp("source")();if(!c||!a){slide.console.log("jsonp log called without a proper source or event_code");return}var d=d||{};var b={uid:SP.fbp("logging_id")()||0,event_code:a||0,foreign_id:e||0,flags:d.flags||0,context_info:d.context_info||0,context_info2:d.context_info2||0,ext_id:d.ext_id||0,source:c,session_key:d.session_key||0};SP.util.cross_ajax_call(document.location.protocol+"//"+logging_domain+"/log/sse/pt",b,f);return false},jsonp_log_click:function(b,a,c){return SP.log.jsonp_log("std_link_click",b,a,c)},jsonp_log_button_click:function(b,a,c){return SP.log.jsonp_log("button_click",b,a,c)},jsonp_log_impression:function(b,a,c){return SP.log.jsonp_log("std_impression",b,a,c)}};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"};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");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.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;SuperPet.constants.spp_base_domain="curly.superpokepets.com";SuperPet.constants.spp_cookie_domain="curly.superpokepets.com";SuperPet.constants.spp_forum_url="http://curly.superpokepets.com/spp/forum";SuperPet.constants.spp_secure_url="http://secure.curly.superpokepets.com";SuperPet.constants.spp_ajax_base_url="/spp/profile/";SuperPet.constants.spp_uploader_url="http://www.curly.slide.com/spp_uploader";SuperPet.Activity={};SuperPet.Activity.Flags={};SuperPet.Activity.Flags.free_gold_already_claimed=1;SuperPet.Activity.Flags.free_gold_cc_already_used=3;SuperPet.Activity.Flags.free_gold_cc_verification_failed=2;SuperPet.Activity.Flags.free_gold_email_already_used=5;SuperPet.Activity.Flags.free_gold_no_payment_info=4;SuperPet.Activity.Flags.memberform_source_arcade=39;SuperPet.Activity.Flags.memberform_source_clubs=34;SuperPet.Activity.Flags.memberform_source_create_post=7;SuperPet.Activity.Flags.memberform_source_create_topic=6;SuperPet.Activity.Flags.memberform_source_customize_tab=3;SuperPet.Activity.Flags.memberform_source_edit_wishlist=22;SuperPet.Activity.Flags.memberform_source_find_friend_tab=24;SuperPet.Activity.Flags.memberform_source_flag_post=17;SuperPet.Activity.Flags.memberform_source_free_gold_promo=36;SuperPet.Activity.Flags.memberform_source_friends_tab=2;SuperPet.Activity.Flags.memberform_source_generic_profile=37;SuperPet.Activity.Flags.memberform_source_inbox_tab=5;SuperPet.Activity.Flags.memberform_source_minipet_click=12;SuperPet.Activity.Flags.memberform_source_my_club=33;SuperPet.Activity.Flags.memberform_source_new_topic=14;SuperPet.Activity.Flags.memberform_source_none=0;SuperPet.Activity.Flags.memberform_source_payment_removal=35;SuperPet.Activity.Flags.memberform_source_pet_create=13;SuperPet.Activity.Flags.memberform_source_petshop_checkout=21;SuperPet.Activity.Flags.memberform_source_petshop_tab=4;SuperPet.Activity.Flags.memberform_source_profile_block_user=27;SuperPet.Activity.Flags.memberform_source_profile_change_photo=18;SuperPet.Activity.Flags.memberform_source_profile_personalize_url=19;SuperPet.Activity.Flags.memberform_source_profile_tab=1;SuperPet.Activity.Flags.memberform_source_profile_validate_email=20;SuperPet.Activity.Flags.memberform_source_quick_compliment=26;SuperPet.Activity.Flags.memberform_source_quick_reply=8;SuperPet.Activity.Flags.memberform_source_quote_post=15;SuperPet.Activity.Flags.memberform_source_reply_post=16;SuperPet.Activity.Flags.memberform_source_request_friend=10;SuperPet.Activity.Flags.memberform_source_scrapbook=38;SuperPet.Activity.Flags.memberform_source_scrapbook_tab=23;SuperPet.Activity.Flags.memberform_source_send_gift=11;SuperPet.Activity.Flags.memberform_source_send_message=9;SuperPet.Activity.Flags.memberform_source_slidecom_review=32;SuperPet.Activity.Flags.memberform_source_topic_reply=25;SuperPet.constants.cross_platform_calls={};SuperPet.constants.cross_platform_calls.accept_login_bonus=1;SuperPet.constants.cross_platform_calls.checkout=1;SuperPet.constants.cross_platform_calls.complete_member_form=1;SuperPet.constants.cross_platform_calls.get_balances=1;SuperPet.constants.cross_platform_calls.get_recycle_price=1;SuperPet.constants.cross_platform_calls.initiate_spa_treatment=1;SuperPet.constants.cross_platform_calls.load_petshop_cart=1;SuperPet.constants.cross_platform_calls.one_click_gold=1;SuperPet.constants.cross_platform_calls.recycle_item=1;SuperPet.constants.cross_platform_calls.reset_spa_friend=1;SuperPet.constants.cross_platform_calls.save_petshop_cart=1;SuperPet.constants.cross_platform_calls.update_one_click=1;SuperPet.constants.cross_platform_calls.use_daily_login_spin=1;SuperPet.constants.cross_platform_calls.verify_coupon_code=1;