/* start ../vendors/jquery-1.3.2.min.js */
/*
 * 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 l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
/*
 * 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 R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.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(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.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(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.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(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.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 H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.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(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<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>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
/* end ../vendors/jquery-1.3.2.min.js */

/* start ../vendors/jquery-ui-1.7.1.custom.min.js */
/*
 * jQuery UI 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI
 */
jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.1",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m<n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&16:k!==j&&k.contains(j)},hasScroll:function(m,k){if(c(m).css("overflow")=="hidden"){return false}var j=(k&&k=="left")?"scrollLeft":"scrollTop",l=false;if(m[j]>0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},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(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.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 j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=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{j=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"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].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(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.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(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/*
 * jQuery UI Draggable 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Draggables
 *
 * Depends:
 *	ui.core.js
 */
(function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(b);if(!this.handle){return false}return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt)}if(c.containment){this._setContainment()}this._trigger("start",b);this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!d){var c=this._uiHash();this._trigger("drag",b,c);this.position=c.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(c){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,c)}if(this.dropped){d=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d))){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){b._trigger("stop",c);b._clear()})}else{this._trigger("stop",c);this._clear()}return false},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target){c=true}});return c},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper=="clone"?this.element.clone():this.element);if(!b.parents("body").length){b.appendTo((d.appendTo=="parent"?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&&!(/(fixed|absolute)/).test(b.css("position"))){b.css("position","absolute")}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&&e.containment.constructor!=Array){var c=a(e.containment)[0];if(!c){return}var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(b,c,d){d=d||this._uiHash();a.ui.plugin.call(this,b,[c,d]);if(b=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(b){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));a.extend(a.ui.draggable,{version:"1.7.1",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});a.ui.plugin.add("draggable","connectToSortable",{start:function(c,e){var d=a(this).data("draggable"),f=d.options,b=a.extend({},e,{item:d.element});d.sortables=[];a(f.connectToSortable).each(function(){var g=a.data(this,"sortable");if(g&&!g.options.disabled){d.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",c,b)}})},stop:function(c,e){var d=a(this).data("draggable"),b=a.extend({},e,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;if(d.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,b)}})},drag:function(c,f){var e=a(this).data("draggable"),b=this;var d=function(i){var n=this.offset.click.top,m=this.offset.click.left;var g=this.positionAbs.top,k=this.positionAbs.left;var j=i.height,l=i.width;var p=i.top,h=i.left;return a.ui.isOver(g+n,k+m,p,h,j,l)};a.each(e.sortables,function(g){this.instance.positionAbs=e.positionAbs;this.instance.helperProportions=e.helperProportions;this.instance.offset.click=e.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(b).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return f.helper[0]};c.target=this.instance.currentItem[0];this.instance._mouseCapture(c,true);this.instance._mouseStart(c,true,true);this.instance.offset.click.top=e.offset.click.top;this.instance.offset.click.left=e.offset.click.left;this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top;e._trigger("toSortable",c);e.dropped=this.instance.element;e.currentItem=e.element;this.instance.fromOutside=e}if(this.instance.currentItem){this.instance._mouseDrag(c)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",c,this.instance._uiHash(this.instance));this.instance._mouseStop(c,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}e._trigger("fromSortable",c);e.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(c,d){var b=a("body"),e=a(this).data("draggable").options;if(b.css("cursor")){e._cursor=b.css("cursor")}b.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._cursor){a("body").css("cursor",d._cursor)}}});a.ui.plugin.add("draggable","iframeFix",{start:function(b,c){var d=a(this).data("draggable").options;a(d.iframeFix===true?"iframe":d.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(b,c){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("opacity")){e._opacity=b.css("opacity")}b.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._opacity){a(c.helper).css("opacity",d._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(c,d){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(d,e){var c=a(this).data("draggable"),f=c.options,b=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!f.axis||f.axis!="x"){if((c.overflowOffset.top+c.scrollParent[0].offsetHeight)-d.pageY<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop+f.scrollSpeed}else{if(d.pageY-c.overflowOffset.top<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop-f.scrollSpeed}}}if(!f.axis||f.axis!="y"){if((c.overflowOffset.left+c.scrollParent[0].offsetWidth)-d.pageX<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft+f.scrollSpeed}else{if(d.pageX-c.overflowOffset.left<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft-f.scrollSpeed}}}}else{if(!f.axis||f.axis!="x"){if(d.pageY-a(document).scrollTop()<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-f.scrollSpeed)}else{if(a(window).height()-(d.pageY-a(document).scrollTop())<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+f.scrollSpeed)}}}if(!f.axis||f.axis!="y"){if(d.pageX-a(document).scrollLeft()<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-f.scrollSpeed)}else{if(a(window).width()-(d.pageX-a(document).scrollLeft())<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+f.scrollSpeed)}}}}if(b!==false&&a.ui.ddmanager&&!f.dropBehaviour){a.ui.ddmanager.prepareOffsets(c,d)}}});a.ui.plugin.add("draggable","snap",{start:function(c,d){var b=a(this).data("draggable"),e=b.options;b.snapElements=[];a(e.snap.constructor!=String?(e.snap.items||":data(draggable)"):e.snap).each(function(){var g=a(this);var f=g.offset();if(this!=b.element[0]){b.snapElements.push({item:this,width:g.outerWidth(),height:g.outerHeight(),top:f.top,left:f.left})}})},drag:function(u,p){var g=a(this).data("draggable"),q=g.options;var y=q.snapTolerance;var x=p.offset.left,w=x+g.helperProportions.width,f=p.offset.top,e=f+g.helperProportions.height;for(var v=g.snapElements.length-1;v>=0;v--){var s=g.snapElements[v].left,n=s+g.snapElements[v].width,m=g.snapElements[v].top,A=m+g.snapElements[v].height;if(!((s-y<x&&x<n+y&&m-y<f&&f<A+y)||(s-y<x&&x<n+y&&m-y<e&&e<A+y)||(s-y<w&&w<n+y&&m-y<f&&f<A+y)||(s-y<w&&w<n+y&&m-y<e&&e<A+y))){if(g.snapElements[v].snapping){(g.options.snap.release&&g.options.snap.release.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=false;continue}if(q.snapMode!="inner"){var c=Math.abs(m-e)<=y;var z=Math.abs(A-f)<=y;var j=Math.abs(s-w)<=y;var k=Math.abs(n-x)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m-g.helperProportions.height,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s-g.helperProportions.width}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n}).left-g.margins.left}}var h=(c||z||j||k);if(q.snapMode!="outer"){var c=Math.abs(m-f)<=y;var z=Math.abs(A-e)<=y;var j=Math.abs(s-x)<=y;var k=Math.abs(n-w)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A-g.helperProportions.height,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n-g.helperProportions.width}).left-g.margins.left}}if(!g.snapElements[v].snapping&&(c||z||j||k||h)){(g.options.snap.snap&&g.options.snap.snap.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=(c||z||j||k||h)}}});a.ui.plugin.add("draggable","stack",{start:function(b,c){var e=a(this).data("draggable").options;var d=a.makeArray(a(e.stack.group)).sort(function(g,f){return(parseInt(a(g).css("zIndex"),10)||e.stack.min)-(parseInt(a(f).css("zIndex"),10)||e.stack.min)});a(d).each(function(f){this.style.zIndex=e.stack.min+f});this[0].style.zIndex=e.stack.min+d.length}});a.ui.plugin.add("draggable","zIndex",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("zIndex")){e._zIndex=b.css("zIndex")}b.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._zIndex){a(c.helper).css("zIndex",d._zIndex)}}})})(jQuery);;/*
 * jQuery UI Droppable 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Droppables
 *
 * Depends:
 *	ui.core.js
 *	ui.draggable.js
 */
(function(a){a.widget("ui.droppable",{_init:function(){var c=this.options,b=c.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&a.isFunction(this.options.accept)?this.options.accept:function(e){return e.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[this.options.scope]=a.ui.ddmanager.droppables[this.options.scope]||[];a.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&&this.element.addClass("ui-droppable"))},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c<b.length;c++){if(b[c]==this){b.splice(c,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_setData:function(b,c){if(b=="accept"){this.options.accept=c&&a.isFunction(c)?c:function(e){return e.is(c)}}else{a.widget.prototype._setData.apply(this,arguments)}},_activate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(b&&this._trigger("activate",c,this.ui(b)))},_deactivate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(b&&this._trigger("deactivate",c,this.ui(b)))},_over:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger("over",c,this.ui(b))}},_out:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("out",c,this.ui(b))}},_drop:function(c,d){var b=d||a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return false}var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var f=a.data(this,"droppable");if(f.options.greedy&&a.ui.intersect(b,a.extend(f,{offset:f.element.offset()}),f.options.tolerance)){e=true;return false}});if(e){return false}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("drop",c,this.ui(b));return this.element}return false},ui:function(b){return{draggable:(b.currentItem||b.element),helper:b.helper,position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs}}});a.extend(a.ui.droppable,{version:"1.7.1",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});a.ui.intersect=function(q,j,o){if(!j.offset){return false}var e=(q.positionAbs||q.position.absolute).left,d=e+q.helperProportions.width,n=(q.positionAbs||q.position.absolute).top,m=n+q.helperProportions.height;var g=j.offset.left,c=g+j.proportions.width,p=j.offset.top,k=p+j.proportions.height;switch(o){case"fit":return(g<e&&d<c&&p<n&&m<k);break;case"intersect":return(g<e+(q.helperProportions.width/2)&&d-(q.helperProportions.width/2)<c&&p<n+(q.helperProportions.height/2)&&m-(q.helperProportions.height/2)<k);break;case"pointer":var h=((q.positionAbs||q.position.absolute).left+(q.clickOffset||q.offset.click).left),i=((q.positionAbs||q.position.absolute).top+(q.clickOffset||q.offset.click).top),f=a.ui.isOver(i,h,p,g,j.proportions.height,j.proportions.width);return f;break;case"touch":return((n>=p&&n<=k)||(m>=p&&m<=k)||(n<p&&m>k))&&((e>=g&&e<=c)||(d>=g&&d<=c)||(e<g&&d>c));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,g){var b=a.ui.ddmanager.droppables[e.options.scope];var f=g?g.type:null;var h=(e.currentItem||e.element).find(":data(droppable)").andSelf();droppablesLoop:for(var d=0;d<b.length;d++){if(b[d].options.disabled||(e&&!b[d].options.accept.call(b[d].element[0],(e.currentItem||e.element)))){continue}for(var c=0;c<h.length;c++){if(h[c]==b[d].element[0]){b[d].proportions.height=0;continue droppablesLoop}}b[d].visible=b[d].element.css("display")!="none";if(!b[d].visible){continue}b[d].offset=b[d].element.offset();b[d].proportions={width:b[d].element[0].offsetWidth,height:b[d].element[0].offsetHeight};if(f=="mousedown"){b[d]._activate.call(b[d],g)}}},drop:function(b,c){var d=false;a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(!this.options){return}if(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)){d=this._drop.call(this,c)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element[0],(b.currentItem||b.element))){this.isout=1;this.isover=0;this._deactivate.call(this,c)}});return d},drag:function(b,c){if(b.options.refreshPositions){a.ui.ddmanager.prepareOffsets(b,c)}a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var e=a.ui.intersect(b,this,this.options.tolerance);var g=!e&&this.isover==1?"isout":(e&&this.isover==0?"isover":null);if(!g){return}var f;if(this.options.greedy){var d=this.element.parents(":data(droppable):eq(0)");if(d.length){f=a.data(d[0],"droppable");f.greedyChild=(g=="isover"?1:0)}}if(f&&g=="isover"){f.isover=0;f.isout=1;f._out.call(f,c)}this[g]=1;this[g=="isout"?"isover":"isout"]=0;this[g=="isover"?"_over":"_out"].call(this,c);if(f&&g=="isout"){f.isout=0;f.isover=1;f._over.call(f,c)}})}}})(jQuery);;/*
 * jQuery UI Resizable 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Resizables
 *
 * Depends:
 *	ui.core.js
 */
(function(c){c.widget("ui.resizable",c.extend({},c.ui.mouse,{_init:function(){var e=this,j=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(j.aspectRatio),aspectRatio:j.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:j.helper||j.ghost||j.animate?j.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&c.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=j.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var k=this.handles.split(",");this.handles={};for(var f=0;f<k.length;f++){var h=c.trim(k[f]),d="ui-resizable-"+h;var g=c('<div class="ui-resizable-handle '+d+'"></div>');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if("se"==h){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[h]=".ui-resizable-"+h;this.element.append(g)}}this._renderAxis=function(p){p=p||this.element;for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=c(this.handles[m],this.element),o=0;o=/sw|ne|nw|se|n|s/.test(m)?n.outerHeight():n.outerWidth();var l=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join("");p.css(l,o);this._proportionallyResize()}if(!c(this.handles[m]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=i&&i[1]?i[1]:"se"}});if(j.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.parent().append(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement)},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return this.options.disabled||!!f},_mouseStart:function(f){var i=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){d.css({position:"absolute",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var j=b(this.helper.css("left")),g=b(this.helper.css("top"));if(i.containment){j+=c(i.containment).scrollLeft()||0;g+=c(i.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:j,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof i.aspectRatio=="number")?i.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",h=="auto"?this.axis+"-resize":h);d.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,l={},p=this,i=this.originalMousePosition,m=this.axis;var q=(d.pageX-i.left)||0,n=(d.pageY-i.top)||0;var h=this._change[m];if(!h){return false}var k=h.apply(this,[d,q,n]),j=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){k=this._updateRatio(k,d)}k=this._respectSize(k,d);this._propagate("resize",d);g.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(k);this._trigger("resize",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,l=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],"left")?0:l.sizeDiff.height,j=d?0:l.sizeDiff.width;var m={width:(l.size.width-j),height:(l.size.height-e)},i=(parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left))||null,k=(parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(m,{top:k,left:i}))}l.helper.height(l.size.height);l.helper.width(l.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,i=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d=="sw"){g.left=i.left+(e.width-g.width);g.top=null}if(d=="nw"){g.top=i.top+(e.height-g.height);g.left=i.left+(e.width-g.width)}return g},_respectSize:function(k,f){var i=this.helper,h=this.options,q=this._aspectRatio||f.shiftKey,p=this.axis,s=a(k.width)&&h.maxWidth&&(h.maxWidth<k.width),l=a(k.height)&&h.maxHeight&&(h.maxHeight<k.height),g=a(k.width)&&h.minWidth&&(h.minWidth>k.width),r=a(k.height)&&h.minHeight&&(h.minHeight>k.height);if(g){k.width=h.minWidth}if(r){k.height=h.minHeight}if(s){k.width=h.maxWidth}if(l){k.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height;var j=/sw|nw|w/.test(p),d=/nw|ne|n/.test(p);if(g&&j){k.left=e-h.minWidth}if(s&&j){k.left=e-h.maxWidth}if(r&&d){k.top=n-h.minHeight}if(l&&d){k.top=n-h.maxHeight}var m=!k.width&&!k.height;if(m&&!k.left&&k.top){k.top=null}else{if(m&&!k.top&&k.left){k.left=null}}return k},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e<this._proportionallyResizeElements.length;e++){var g=this._proportionallyResizeElements[e];if(!this.borderDif){var d=[g.css("borderTopWidth"),g.css("borderRightWidth"),g.css("borderBottomWidth"),g.css("borderLeftWidth")],h=[g.css("paddingTop"),g.css("paddingRight"),g.css("paddingBottom"),g.css("paddingLeft")];this.borderDif=c.map(d,function(k,m){var l=parseInt(k,10)||0,n=parseInt(h[m],10)||0;return l+n})}if(c.browser.msie&&!(!(c(f).is(":hidden")||c(f).parents(":hidden").length))){continue}g.css({height:(f.height()-this.borderDif[0]-this.borderDif[2])||0,width:(f.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var e=this.element,h=this.options;this.elementOffset=e.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++h.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));c.extend(c.ui.resizable,{version:"1.7.1",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),g=d.options;_store=function(h){c(h).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{c.each(g.alsoResize,function(h,i){_store(h)})}}else{_store(g.alsoResize)}},resize:function(f,h){var e=c(this).data("resizable"),i=e.options,g=e.originalSize,k=e.originalPosition;var j={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-k.top)||0,left:(e.position.left-k.left)||0},d=function(l,m){c(l).each(function(){var p=c(this),q=c(this).data("resizable-alsoresize"),o={},n=m&&m.length?m:["width","height","top","left"];c.each(n||["width","height","top","left"],function(r,t){var s=(q[t]||0)+(j[t]||0);if(s&&s>=0){o[t]=s||null}});if(/relative/.test(p.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;p.css({position:"absolute",top:"auto",left:"auto"})}p.css(o)})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(l,m){d(l,m)})}else{d(i.alsoResize)}},stop:function(e,f){var d=c(this).data("resizable");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}c(this).removeData("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(h,m){var n=c(this).data("resizable"),i=n.options;var g=n._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:n.sizeDiff.height,k=d?0:n.sizeDiff.width;var f={width:(n.size.width-k),height:(n.size.height-e)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,l=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;n.element.animate(c.extend(f,l&&j?{top:l,left:j}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var o={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}n._updateCache(o);n._propagate("resize",h)}})}});c.ui.plugin.add("resizable","containment",{start:function(e,q){var s=c(this).data("resizable"),i=s.options,k=s.element;var f=i.containment,j=(f instanceof c)?f.get(0):(/parent/.test(f))?k.parent().get(0):f;if(!j){return}s.containerElement=c(j);if(/document/.test(f)||f==document){s.containerOffset={left:0,top:0};s.containerPosition={left:0,top:0};s.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(j),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(m.css("padding"+o))});s.containerOffset=m.offset();s.containerPosition=m.position();s.containerSize={height:(m.innerHeight()-h[3]),width:(m.innerWidth()-h[1])};var n=s.containerOffset,d=s.containerSize.height,l=s.containerSize.width,g=(c.ui.hasScroll(j,"left")?j.scrollWidth:l),r=(c.ui.hasScroll(j)?j.scrollHeight:d);s.parentData={element:j,left:n.left,top:n.top,width:g,height:r}}},resize:function(f,p){var s=c(this).data("resizable"),h=s.options,e=s.containerSize,n=s.containerOffset,l=s.size,m=s.position,q=s._aspectRatio||f.shiftKey,d={top:0,left:0},g=s.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=n}if(m.left<(s._helper?n.left:0)){s.size.width=s.size.width+(s._helper?(s.position.left-n.left):(s.position.left-d.left));if(q){s.size.height=s.size.width/h.aspectRatio}s.position.left=h.helper?n.left:0}if(m.top<(s._helper?n.top:0)){s.size.height=s.size.height+(s._helper?(s.position.top-n.top):s.position.top);if(q){s.size.width=s.size.height*h.aspectRatio}s.position.top=s._helper?n.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;var k=Math.abs((s._helper?s.offset.left-d.left:(s.offset.left-d.left))+s.sizeDiff.width),r=Math.abs((s._helper?s.offset.top-d.top:(s.offset.top-n.top))+s.sizeDiff.height);var j=s.containerElement.get(0)==s.element.parent().get(0),i=/relative|absolute/.test(s.containerElement.css("position"));if(j&&i){k-=s.parentData.left}if(k+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-k;if(q){s.size.height=s.size.width/s.aspectRatio}}if(r+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-r;if(q){s.size.width=s.size.height*s.aspectRatio}}},stop:function(e,m){var p=c(this).data("resizable"),f=p.options,k=p.position,l=p.containerOffset,d=p.containerPosition,g=p.containerElement;var i=c(p.helper),q=i.offset(),n=i.outerWidth()-p.sizeDiff.width,j=i.outerHeight()-p.sizeDiff.height;if(p._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}if(p._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}}});c.ui.plugin.add("resizable","ghost",{start:function(f,g){var d=c(this).data("resizable"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(d,l){var n=c(this).data("resizable"),g=n.options,j=n.size,h=n.originalSize,i=n.originalPosition,m=n.axis,k=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;var f=Math.round((j.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((j.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e}else{if(/^(ne)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e}else{if(/^(sw)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.left=i.left-f}else{n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e;n.position.left=i.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);;/*
 * jQuery UI Selectable 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Selectables
 *
 * Depends:
 *	ui.core.js
 */
(function(a){a.widget("ui.selectable",a.extend({},a.ui.mouse,{_init:function(){var b=this;this.element.addClass("ui-selectable");this.dragged=false;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]);c.each(function(){var d=a(this);var e=d.offset();a.data(this,"selectable-item",{element:this,$element:d,left:e.left,top:e.top,right:e.left+d.outerWidth(),bottom:e.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=c.addClass("ui-selectee");this._mouseInit();this.helper=a(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy()},_mouseStart:function(d){var b=this;this.opos=[d.pageX,d.pageY];if(this.options.disabled){return}var c=this.options;this.selectees=a(c.filter,this.element[0]);this._trigger("start",d);a(c.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:d.clientX,top:d.clientY,width:0,height:0});if(c.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var e=a.data(this,"selectable-item");e.startselected=true;if(!d.metaKey){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;b._trigger("unselecting",d,{unselecting:e.element})}});a(d.target).parents().andSelf().each(function(){var e=a.data(this,"selectable-item");if(e){e.$element.removeClass("ui-unselecting").addClass("ui-selecting");e.unselecting=false;e.selecting=true;e.selected=true;b._trigger("selecting",d,{selecting:e.element});return false}})},_mouseDrag:function(i){var c=this;this.dragged=true;if(this.options.disabled){return}var e=this.options;var d=this.opos[0],h=this.opos[1],b=i.pageX,g=i.pageY;if(d>b){var f=b;b=d;d=f}if(h>g){var f=g;g=h;h=f}this.helper.css({left:d,top:h,width:b-d,height:g-h});this.selectees.each(function(){var j=a.data(this,"selectable-item");if(!j||j.element==c.element[0]){return}var k=false;if(e.tolerance=="touch"){k=(!(j.left>b||j.right<d||j.top>g||j.bottom<h))}else{if(e.tolerance=="fit"){k=(j.left>d&&j.right<b&&j.top>h&&j.bottom<g)}}if(k){if(j.selected){j.$element.removeClass("ui-selected");j.selected=false}if(j.unselecting){j.$element.removeClass("ui-unselecting");j.unselecting=false}if(!j.selecting){j.$element.addClass("ui-selecting");j.selecting=true;c._trigger("selecting",i,{selecting:j.element})}}else{if(j.selecting){if(i.metaKey&&j.startselected){j.$element.removeClass("ui-selecting");j.selecting=false;j.$element.addClass("ui-selected");j.selected=true}else{j.$element.removeClass("ui-selecting");j.selecting=false;if(j.startselected){j.$element.addClass("ui-unselecting");j.unselecting=true}c._trigger("unselecting",i,{unselecting:j.element})}}if(j.selected){if(!i.metaKey&&!j.startselected){j.$element.removeClass("ui-selected");j.selected=false;j.$element.addClass("ui-unselecting");j.unselecting=true;c._trigger("unselecting",i,{unselecting:j.element})}}}});return false},_mouseStop:function(d){var b=this;this.dragged=false;var c=this.options;a(".ui-unselecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");e.$element.removeClass("ui-unselecting");e.unselecting=false;e.startselected=false;b._trigger("unselected",d,{unselected:e.element})});a(".ui-selecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");e.$element.removeClass("ui-selecting").addClass("ui-selected");e.selecting=false;e.selected=true;e.startselected=true;b._trigger("selected",d,{selected:e.element})});this._trigger("stop",d);this.helper.remove();return false}}));a.extend(a.ui.selectable,{version:"1.7.1",defaults:{appendTo:"body",autoRefresh:true,cancel:":input,option",delay:0,distance:0,filter:"*",tolerance:"touch"}})})(jQuery);;/*
 * jQuery UI Sortable 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Sortables
 *
 * Depends:
 *	ui.core.js
 */
(function(a){a.widget("ui.sortable",a.extend({},a.ui.mouse,{_init:function(){var b=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--){this.items[b].item.removeData("sortable-item")}},_mouseCapture:function(e,f){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(e);var d=null,c=this,b=a(e.target).parents().each(function(){if(a.data(this,"sortable-item")==c){d=a(this);return false}});if(a.data(e.target,"sortable-item")==c){d=a(e.target)}if(!d){return false}if(this.options.handle&&!f){var g=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==e.target){g=true}});if(!g){return false}}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(e,f,b){var g=this.options,c=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(e);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;if(g.cursorAt){this._adjustOffsetFromHelper(g.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(g.containment){this._setContainment()}if(g.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",g.cursor)}if(g.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",g.opacity)}if(g.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",g.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",e,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!b){for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("activate",e,c._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,e)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(e);return true},_mouseDrag:function(f){this.position=this._generatePosition(f);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var g=this.options,b=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-f.pageY<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop+g.scrollSpeed}else{if(f.pageY-this.overflowOffset.top<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop-g.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-f.pageX<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(f.pageX-this.overflowOffset.left<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft-g.scrollSpeed}}}else{if(f.pageY-a(document).scrollTop()<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed)}else{if(a(window).height()-(f.pageY-a(document).scrollTop())<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)}}if(f.pageX-a(document).scrollLeft()<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed)}else{if(a(window).width()-(f.pageX-a(document).scrollLeft())<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed)}}}if(b!==false&&a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,f)}}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d],c=e.item[0],h=this._intersectsWithPointer(e);if(!h){continue}if(c!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=c&&!a.ui.contains(this.placeholder[0],c)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],c):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(e)){this._rearrange(f,e)}else{break}this._trigger("change",f,this._uiHash());break}}this._contactContainers(f);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,f)}this._trigger("sort",f,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,d){if(!c){return}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,c)}if(this.options.revert){var b=this;var e=b.placeholder.offset();b.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-b.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-b.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){b._clear(c)})}else{this._clear(c,d)}return false},cancel:function(){var b=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,b._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,b._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};a(b).each(function(){var e=(a(d.item||this).attr(d.attribute||"id")||"").match(d.expression||(/(.+)[-=_](.+)/));if(e){c.push((d.key||e[1]+"[]")+"="+(d.key&&d.expression?e[1]:e[2]))}});return c.join("&")},toArray:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};b.each(function(){c.push(a(d.item||this).attr(d.attribute||"id")||"")});return c},_intersectsWith:function(m){var e=this.positionAbs.left,d=e+this.helperProportions.width,k=this.positionAbs.top,j=k+this.helperProportions.height;var f=m.left,c=f+m.width,n=m.top,i=n+m.height;var o=this.offset.click.top,h=this.offset.click.left;var g=(k+o)>n&&(k+o)<i&&(e+h)>f&&(e+h)<c;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>m[this.floating?"width":"height"])){return g}else{return(f<e+(this.helperProportions.width/2)&&d-(this.helperProportions.width/2)<c&&n<k+(this.helperProportions.height/2)&&j-(this.helperProportions.height/2)<i)}},_intersectsWithPointer:function(d){var e=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,d.top,d.height),c=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,d.left,d.width),g=e&&c,b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(!g){return false}return this.floating?(((f&&f=="right")||b=="down")?2:1):(b&&(b=="down"?2:1))},_intersectsWithSides:function(e){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+(e.height/2),e.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+(e.width/2),e.width),b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(this.floating&&f){return((f=="right"&&d)||(f=="left"&&!d))}else{return b&&((b=="down"&&c)||(b=="up"&&!c))}},_getDragVerticalDirection:function(){var b=this.positionAbs.top-this.lastPositionAbs.top;return b!=0&&(b>0?"down":"up")},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&&(b>0?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions()},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(b){var l=this;var g=[];var e=[];var h=this._connectWith();if(h&&b){for(var d=h.length-1;d>=0;d--){var k=a(h[d]);for(var c=k.length-1;c>=0;c--){var f=a.data(k[c],"sortable");if(f&&f!=this&&!f.options.disabled){e.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper"),f])}}}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var d=e.length-1;d>=0;d--){e[d][0].each(function(){g.push(this)})}return a(g)},_removeCurrentsFromItems:function(){var d=this.currentItem.find(":data(sortable-item)");for(var c=0;c<this.items.length;c++){for(var b=0;b<d.length;b++){if(d[b]==this.items[c].item[0]){this.items.splice(c,1)}}}},_refreshItems:function(b){this.items=[];this.containers=[this];var h=this.items;var p=this;var f=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]];var l=this._connectWith();if(l){for(var e=l.length-1;e>=0;e--){var m=a(l[e]);for(var d=m.length-1;d>=0;d--){var g=a.data(m[d],"sortable");if(g&&g!=this&&!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element[0],b,{item:this.currentItem}):a(g.options.items,g.element),g]);this.containers.push(g)}}}}for(var e=f.length-1;e>=0;e--){var k=f[e][1];var c=f[e][0];for(var d=0,n=c.length;d<n;d++){var o=a(c[d]);o.data("sortable-item",k);h.push({item:o,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d];if(e.instance!=this.currentContainer&&this.currentContainer&&e.item[0]!=this.currentItem[0]){continue}var c=this.options.toleranceElement?a(this.options.toleranceElement,e.item):e.item;if(!b){e.width=c.outerWidth();e.height=c.outerHeight()}var f=c.offset();e.left=f.left;e.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var d=this.containers.length-1;d>=0;d--){var f=this.containers[d].element.offset();this.containers[d].containerCache.left=f.left;this.containers[d].containerCache.top=f.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}},_createPlaceholder:function(d){var b=d||this,e=b.options;if(!e.placeholder||e.placeholder.constructor==String){var c=e.placeholder;e.placeholder={element:function(){var f=a(document.createElement(b.currentItem[0].nodeName)).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!c){f.style.visibility="hidden"}return f},update:function(f,g){if(c&&!e.forcePlaceholderSize){return}if(!g.height()){g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10))}if(!g.width()){g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=a(e.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);e.placeholder.update(b,b.placeholder)},_contactContainers:function(d){for(var c=this.containers.length-1;c>=0;c--){if(this._intersectsWith(this.containers[c].containerCache)){if(!this.containers[c].containerCache.over){if(this.currentContainer!=this.containers[c]){var h=10000;var g=null;var e=this.positionAbs[this.containers[c].floating?"left":"top"];for(var b=this.items.length-1;b>=0;b--){if(!a.ui.contains(this.containers[c].element[0],this.items[b].item[0])){continue}var f=this.items[b][this.containers[c].floating?"left":"top"];if(Math.abs(f-e)<h){h=Math.abs(f-e);g=this.items[b]}}if(!g&&!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[c];g?this._rearrange(d,g,null,true):this._rearrange(d,null,this.containers[c].element,true);this._trigger("change",d,this._uiHash());this.containers[c]._trigger("change",d,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[c]._trigger("over",d,this._uiHash(this));this.containers[c].containerCache.over=1}}else{if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",d,this._uiHash(this));this.containers[c].containerCache.over=0}}}},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c,this.currentItem])):(d.helper=="clone"?this.currentItem.clone():this.currentItem);if(!b.parents("body").length){a(d.appendTo!="parent"?d.appendTo:this.currentItem[0].parentNode)[0].appendChild(b[0])}if(b[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(b[0].style.width==""||d.forceHelperSize){b.width(this.currentItem.width())}if(b[0].style.height==""||d.forceHelperSize){b.height(this.currentItem.height())}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.currentItem.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)){var c=a(e.containment)[0];var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_rearrange:function(g,f,c,e){c?c[0].appendChild(this.placeholder[0]):f.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?f.item[0]:f.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var d=this,b=this.counter;window.setTimeout(function(){if(b==d.counter){d.refreshPositions(!e)}},0)},_clear:function(d,e){this.reverting=false;var f=[],b=this;if(!this._noFinalSort&&this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var c in this._storedCSS){if(this._storedCSS[c]=="auto"||this._storedCSS[c]=="static"){this._storedCSS[c]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!e){f.push(function(g){this._trigger("receive",g,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!e){f.push(function(g){this._trigger("update",g,this._uiHash())})}if(!a.ui.contains(this.element[0],this.currentItem[0])){if(!e){f.push(function(g){this._trigger("remove",g,this._uiHash())})}for(var c=this.containers.length-1;c>=0;c--){if(a.ui.contains(this.containers[c].element[0],this.currentItem[0])&&!e){f.push((function(g){return function(h){g._trigger("receive",h,this._uiHash(this))}}).call(this,this.containers[c]));f.push((function(g){return function(h){g._trigger("update",h,this._uiHash(this))}}).call(this,this.containers[c]))}}}for(var c=this.containers.length-1;c>=0;c--){if(!e){f.push((function(g){return function(h){g._trigger("deactivate",h,this._uiHash(this))}}).call(this,this.containers[c]))}if(this.containers[c].containerCache.over){f.push((function(g){return function(h){g._trigger("out",h,this._uiHash(this))}}).call(this,this.containers[c]));this.containers[c].containerCache.over=0}}if(this._storedCursor){a("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!e){this._trigger("beforeStop",d,this._uiHash());for(var c=0;c<f.length;c++){f[c].call(this,d)}this._trigger("stop",d,this._uiHash())}return false}if(!e){this._trigger("beforeStop",d,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!e){for(var c=0;c<f.length;c++){f[c].call(this,d)}this._trigger("stop",d,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(a.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(c){var b=c||this;return{helper:b.helper,placeholder:b.placeholder||a([]),position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs,item:b.currentItem,sender:c?c.element:null}}}));a.extend(a.ui.sortable,{getter:"serialize toArray",version:"1.7.1",eventPrefix:"sort",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectWith:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}})})(jQuery);;/*
 * jQuery UI Accordion 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Accordion
 *
 * Depends:
 *	ui.core.js
 */
(function(a){a.widget("ui.accordion",{_init:function(){var d=this.options,b=this;this.running=0;if(d.collapsible==a.ui.accordion.defaults.collapsible&&d.alwaysOpen!=a.ui.accordion.defaults.alwaysOpen){d.collapsible=!d.alwaysOpen}if(d.navigation){var c=this.element.find("a").filter(d.navigationFilter);if(c.length){if(c.filter(d.header).length){this.active=c}else{this.active=c.parent().parent().prev();c.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(d.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){a(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||d.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");a("<span/>").addClass("ui-icon "+d.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(d.icons.header).toggleClass(d.icons.headerSelected);if(a.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(e){return b._keydown(e)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!a.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(d.event){this.headers.bind((d.event)+".accordion",function(e){return b._clickHandler.call(b,e,this)})}},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(c.autoHeight||c.fillHeight){b.css("height","")}},_setData:function(b,c){if(b=="alwaysOpen"){b="collapsible";c=!c}a.widget.prototype._setData.apply(this,arguments)},_keydown:function(e){var g=this.options,f=a.ui.keyCode;if(g.disabled||e.altKey||e.ctrlKey){return}var d=this.headers.length;var b=this.headers.index(e.target);var c=false;switch(e.keyCode){case f.RIGHT:case f.DOWN:c=this.headers[(b+1)%d];break;case f.LEFT:case f.UP:c=this.headers[(b-1+d)%d];break;case f.SPACE:case f.ENTER:return this._clickHandler({target:e.target},e.target)}if(c){a(e.target).attr("tabIndex","-1");a(c).attr("tabIndex","0");c.focus();return false}return true},resize:function(){var e=this.options,d;if(e.fillSpace){if(a.browser.msie){var b=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}d=this.element.parent().height();if(a.browser.msie){this.element.parent().css("overflow",b)}this.headers.each(function(){d-=a(this).outerHeight()});var c=0;this.headers.next().each(function(){c=Math.max(c,a(this).innerHeight()-a(this).height())}).height(Math.max(0,d-c)).css("overflow","auto")}else{if(e.autoHeight){d=0;this.headers.next().each(function(){d=Math.max(d,a(this).outerHeight())}).height(d)}}},activate:function(b){var c=this._findActive(b)[0];this._clickHandler({target:c},c)},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,f){var d=this.options;if(d.disabled){return false}if(!b.target&&d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var h=this.active.next(),e={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:h},c=(this.active=a([]));this._toggle(c,h,e);return false}var g=a(b.currentTarget||f);var i=g[0]==this.active[0];if(this.running||(!d.collapsible&&i)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!i){g.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);g.next().addClass("ui-accordion-content-active")}var c=g.next(),h=this.active.next(),e={options:d,newHeader:i&&d.collapsible?a([]):g,oldHeader:this.active,newContent:i&&d.collapsible?a([]):c.find("> *"),oldContent:h.find("> *")},j=this.headers.index(this.active[0])>this.headers.index(g[0]);this.active=i?a([]):g;this._toggle(c,h,e,i,j);return false},_toggle:function(b,i,g,j,k){var d=this.options,m=this;this.toShow=b;this.toHide=i;this.data=g;var c=function(){if(!m){return}return m._completed.apply(m,arguments)};this._trigger("changestart",null,this.data);this.running=i.size()===0?b.size():i.size();if(d.animated){var f={};if(d.collapsible&&j){f={toShow:a([]),toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}else{f={toShow:b,toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}if(!d.proxied){d.proxied=d.animated}if(!d.proxiedDuration){d.proxiedDuration=d.duration}d.animated=a.isFunction(d.proxied)?d.proxied(f):d.proxied;d.duration=a.isFunction(d.proxiedDuration)?d.proxiedDuration(f):d.proxiedDuration;var l=a.ui.accordion.animations,e=d.duration,h=d.animated;if(!l[h]){l[h]=function(n){this.slide(n,{easing:h,duration:e||700})}}l[h](f)}else{if(d.collapsible&&j){b.toggle()}else{i.hide();b.show()}c(true)}i.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();b.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(b){var c=this.options;this.running=b?0:--this.running;if(this.running){return}if(c.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});a.extend(a.ui.accordion,{version:"1.7.1",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(j,h){j=a.extend({easing:"swing",duration:300},j,h);if(!j.toHide.size()){j.toShow.animate({height:"show"},j);return}if(!j.toShow.size()){j.toHide.animate({height:"hide"},j);return}var c=j.toShow.css("overflow"),g,d={},f={},e=["height","paddingTop","paddingBottom"],b;var i=j.toShow;b=i[0].style.width;i.width(parseInt(i.parent().width(),10)-parseInt(i.css("paddingLeft"),10)-parseInt(i.css("paddingRight"),10)-(parseInt(i.css("borderLeftWidth"),10)||0)-(parseInt(i.css("borderRightWidth"),10)||0));a.each(e,function(k,m){f[m]="hide";var l=(""+a.css(j.toShow[0],m)).match(/^([\d+-.]+)(.*)$/);d[m]={value:l[1],unit:l[2]||"px"}});j.toShow.css({height:0,overflow:"hidden"}).show();j.toHide.filter(":hidden").each(j.complete).end().filter(":visible").animate(f,{step:function(k,l){if(l.prop=="height"){g=(l.now-l.start)/(l.end-l.start)}j.toShow[0].style[l.prop]=(g*d[l.prop].value)+d[l.prop].unit},duration:j.duration,easing:j.easing,complete:function(){if(!j.autoHeight){j.toShow.css("height","")}j.toShow.css("width",b);j.toShow.css({overflow:c});j.complete()}})},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200})},easeslide:function(b){this.slide(b,{easing:"easeinout",duration:700})}}})})(jQuery);;/*
 * jQuery UI Dialog 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Dialog
 *
 * Depends:
 *	ui.core.js
 *	ui.draggable.js
 *	ui.resizable.js
 */
(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 l=this,m=this.options,j=m.title||this.originalTitle||"&nbsp;",e=c.ui.dialog.getTitleId(this.element),k=(this.uiDialog=c("<div/>")).appendTo(document.body).hide().addClass(a+m.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:m.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){(m.closeOnEscape&&n.keyCode&&n.keyCode==c.ui.keyCode.ESCAPE&&l.close(n))}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(n){l.moveToTop(false,n)}),g=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k),f=(this.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),i=c('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){i.addClass("ui-state-hover")},function(){i.removeClass("ui-state-hover")}).focus(function(){i.addClass("ui-state-focus")}).blur(function(){i.removeClass("ui-state-focus")}).mousedown(function(n){n.stopPropagation()}).click(function(n){l.close(n);return false}).appendTo(f),h=(this.uiDialogTitlebarCloseText=c("<span/>")).addClass("ui-icon ui-icon-closethick").text(m.closeText).appendTo(i),d=c("<span/>").addClass("ui-dialog-title").attr("id",e).html(j).prependTo(f);f.find("*").add(f).disableSelection();(m.draggable&&c.fn.draggable&&this._makeDraggable());(m.resizable&&c.fn.resizable&&this._makeResizable());this._createButtons(m.buttons);this._isOpen=false;(m.bgiframe&&c.fn.bgiframe&&k.bgiframe());(m.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),i=g.filter(":first")[0],f=g.filter(":last")[0];if(h.target==f&&!h.shiftKey){setTimeout(function(){i.focus()},1)}else{if(h.target==i&&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,i){c('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(h).click(function(){i.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(i){var e=c(window),f=c(document),g=f.scrollTop(),d=f.scrollLeft(),h=g;if(c.inArray(i,["center","top","right","bottom","left"])>=0){i=[i=="right"||i=="left"?i:"center",i=="top"||i=="bottom"?i:"middle"]}if(i.constructor!=Array){i=["center","middle"]}if(i[0].constructor==Number){d+=i[0]}else{switch(i[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(i[1].constructor==Number){g+=i[1]}else{switch(i[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,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);;/*
 * jQuery UI Slider 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Slider
 *
 * Depends:
 *	ui.core.js
 */
(function(a){a.widget("ui.slider",a.extend({},a.ui.mouse,{_init:function(){var b=this,c=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=a([]);if(c.range){if(c.range===true){this.range=a("<div></div>");if(!c.values){c.values=[this._valueMin(),this._valueMin()]}if(c.values.length&&c.values.length!=2){c.values=[c.values[0],c.values[0]]}}else{this.range=a("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(c.range=="min"||c.range=="max"){this.range.addClass("ui-slider-range-"+c.range)}this.range.addClass("ui-widget-header")}if(a(".ui-slider-handle",this.element).length==0){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(c.values&&c.values.length){while(a(".ui-slider-handle",this.element).length<c.values.length){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(d){d.preventDefault()}).hover(function(){a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(d){a(this).data("index.ui-slider-handle",d)});this.handles.keydown(function(i){var f=true;var e=a(this).data("index.ui-slider-handle");if(b.options.disabled){return}switch(i.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:f=false;if(!b._keySliding){b._keySliding=true;a(this).addClass("ui-state-active");b._start(i,e)}break}var g,d,h=b._step();if(b.options.values&&b.options.values.length){g=d=b.values(e)}else{g=d=b.value()}switch(i.keyCode){case a.ui.keyCode.HOME:d=b._valueMin();break;case a.ui.keyCode.END:d=b._valueMax();break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g==b._valueMax()){return}d=g+h;break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g==b._valueMin()){return}d=g-h;break}b._slide(i,e,d);return f}).keyup(function(e){var d=a(this).data("index.ui-slider-handle");if(b._keySliding){b._stop(e,d);b._change(e,d);b._keySliding=false;a(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(d){var e=this.options;if(e.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var h={x:d.pageX,y:d.pageY};var j=this._normValueFromMouse(h);var c=this._valueMax()-this._valueMin()+1,f;var k=this,i;this.handles.each(function(l){var m=Math.abs(j-k.values(l));if(c>m){c=m;f=a(this);i=l}});if(e.range==true&&this.values(1)==e.min){f=a(this.handles[++i])}this._start(d,i);k._handleIndex=i;f.addClass("ui-state-active").focus();var g=f.offset();var b=!a(d.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=b?{left:0,top:0}:{left:d.pageX-g.left-(f.width()/2),top:d.pageY-g.top-(f.height()/2)-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};j=this._normValueFromMouse(h);this._slide(d,i,j);return true},_mouseStart:function(b){return true},_mouseDrag:function(d){var b={x:d.pageX,y:d.pageY};var c=this._normValueFromMouse(b);this._slide(d,this._handleIndex,c);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(d){var c,h;if("horizontal"==this.orientation){c=this.elementSize.width;h=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{c=this.elementSize.height;h=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var f=(h/c);if(f>1){f=1}if(f<0){f=0}if("vertical"==this.orientation){f=1-f}var e=this._valueMax()-this._valueMin(),i=f*e,b=i%this.options.step,g=this._valueMin()+i-b;if(b>(this.options.step/2)){g+=this.options.step}return parseFloat(g.toFixed(5))},_start:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("start",d,b)},_slide:function(f,e,d){var g=this.handles[e];if(this.options.values&&this.options.values.length){var b=this.values(e?0:1);if((e==0&&d>=b)||(e==1&&d<=b)){d=b}if(d!=this.values(e)){var c=this.values();c[e]=d;var h=this._trigger("slide",f,{handle:this.handles[e],value:d,values:c});var b=this.values(e?0:1);if(h!==false){this.values(e,d,(f.type=="mousedown"&&this.options.animate),true)}}}else{if(d!=this.value()){var h=this._trigger("slide",f,{handle:this.handles[e],value:d});if(h!==false){this._setData("value",d,(f.type=="mousedown"&&this.options.animate))}}}},_stop:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("stop",d,b)},_change:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("change",d,b)},value:function(b){if(arguments.length){this._setData("value",b);this._change(null,0)}return this._value()},values:function(b,e,c,d){if(arguments.length>1){this.options.values[b]=e;this._refreshValue(c);if(!d){this._change(null,b)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(b)}else{return this.value()}}else{return this._values()}},_setData:function(b,d,c){a.widget.prototype._setData.apply(this,arguments);switch(b){case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(c);break;case"value":this._refreshValue(c);break}},_step:function(){var b=this.options.step;return b},_value:function(){var b=this.options.value;if(b<this._valueMin()){b=this._valueMin()}if(b>this._valueMax()){b=this._valueMax()}return b},_values:function(b){if(arguments.length){var c=this.options.values[b];if(c<this._valueMin()){c=this._valueMin()}if(c>this._valueMax()){c=this._valueMax()}return c}else{return this.options.values}},_valueMin:function(){var b=this.options.min;return b},_valueMax:function(){var b=this.options.max;return b},_refreshValue:function(c){var f=this.options.range,d=this.options,l=this;if(this.options.values&&this.options.values.length){var i,h;this.handles.each(function(p,n){var o=(l.values(p)-l._valueMin())/(l._valueMax()-l._valueMin())*100;var m={};m[l.orientation=="horizontal"?"left":"bottom"]=o+"%";a(this).stop(1,1)[c?"animate":"css"](m,d.animate);if(l.options.range===true){if(l.orientation=="horizontal"){(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({left:o+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({width:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}else{(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({bottom:(o)+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({height:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}}lastValPercent=o})}else{var j=this.value(),g=this._valueMin(),k=this._valueMax(),e=k!=g?(j-g)/(k-g)*100:0;var b={};b[l.orientation=="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[c?"animate":"css"](b,d.animate);(f=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[c?"animate":"css"]({width:e+"%"},d.animate);(f=="max")&&(this.orientation=="horizontal")&&this.range[c?"animate":"css"]({width:(100-e)+"%"},{queue:false,duration:d.animate});(f=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[c?"animate":"css"]({height:e+"%"},d.animate);(f=="max")&&(this.orientation=="vertical")&&this.range[c?"animate":"css"]({height:(100-e)+"%"},{queue:false,duration:d.animate})}}}));a.extend(a.ui.slider,{getter:"value values",version:"1.7.1",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery);;/*
 * jQuery UI Tabs 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Tabs
 *
 * Depends:
 *	ui.core.js
 */
(function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return}this.select(c)}else{this.options[b]=c;if(b=="deselectable"){this.options.collapsible=c}this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(c,b){return{tab:c,panel:b,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(n){this.list=this.element.children("ul:first");this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var p=this,d=this.options;var c=/^#.+/;this.anchors.each(function(r,o){var q=a(o).attr("href");var s=q.split("#")[0],u;if(s&&(s===location.toString().split("#")[0]||(u=a("base")[0])&&s===u.href)){q=o.hash;o.href=q}if(c.test(q)){p.panels=p.panels.add(p._sanitizeSelector(q))}else{if(q!="#"){a.data(o,"href.tabs",q);a.data(o,"load.tabs",q.replace(/#.*$/,""));var w=p._tabId(o);o.href="#"+w;var v=a("#"+w);if(!v.length){v=a(d.panelTemplate).attr("id",w).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(p.panels[r-1]||p.list);v.data("destroy.tabs",true)}p.panels=p.panels.add(v)}else{d.disabled.push(r)}}});if(n){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(d.selected===undefined){if(location.hash){this.anchors.each(function(q,o){if(o.hash==location.hash){d.selected=q;return false}})}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(p._cookie(),10)}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}d.selected=d.selected||0}else{if(d.selected===null){d.selected=-1}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(q,o){return p.lis.index(q)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");p.element.queue("tabs",function(){p._trigger("show",null,p._ui(p.anchors[d.selected],p.panels[d.selected]))});this.load(d.selected)}a(window).bind("unload",function(){p.lis.add(p.anchors).unbind(".tabs");p.lis=p.anchors=p.panels=null})}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie)}for(var g=0,m;(m=this.lis[g]);g++){a(m)[a.inArray(g,d.disabled)!=-1&&!a(m).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(d.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var j=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){f("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1]}else{b=h=d.fx}}function e(i,o){i.css({display:""});if(a.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var k=h?function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(h,h.duration||"normal",function(){e(o,h);p._trigger("show",null,p._ui(i,o[0]))})}:function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");p._trigger("show",null,p._ui(i,o[0]))};var l=b?function(o,i){i.animate(b,b.duration||"normal",function(){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");e(i,b);p.element.dequeue("tabs")})}:function(o,i,q){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");p.element.dequeue("tabs")};this.anchors.bind(d.event+".tabs",function(){var o=this,r=a(this).closest("li"),i=p.panels.filter(":not(.ui-tabs-hide)"),q=a(p._sanitizeSelector(this.hash));if((r.hasClass("ui-tabs-selected")&&!d.collapsible)||r.hasClass("ui-state-disabled")||r.hasClass("ui-state-processing")||p._trigger("select",null,p._ui(this,q[0]))===false){this.blur();return false}d.selected=p.anchors.index(this);p.abort();if(d.collapsible){if(r.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){l(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this));this.blur();return false}}}if(d.cookie){p._cookie(d.selected,d.cookie)}if(q.length){if(i.length){p.element.queue("tabs",function(){l(o,i)})}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(b.cookie){this._cookie(null,b.cookie)}},add:function(e,d,c){if(c===undefined){c=this.anchors.length}var b=this,g=this.options,i=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",i)[0]);i.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true)}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){i.appendTo(this.list);f.appendTo(this.list[0].parentNode)}else{i.insertBefore(this.lis[c]);f.insertBefore(this.panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this._tabify();if(this.anchors.length==1){i.addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]))},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1<this.anchors.length?1:-1))}d.disabled=a.map(a.grep(d.disabled,function(g,f){return g!=b}),function(g,f){return g>=b?--g:g});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],c[0]))},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(e,d){return e!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))}else{if(b===null){b=-1}}if(b==-1&&this.options.collapsible){b=this.options.selected}this.anchors.eq(b).trigger(this.options.event+".tabs")},load:function(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(i,h){a(c._sanitizeSelector(b.hash)).html(i);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(i,h)}catch(j){}c.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.7.1",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var i=g.selected;b.select(++i<b.anchors.length?i:0)},d);if(h){h.stopPropagation()}});var e=b._unrotate||(b._unrotate=!f?function(h){if(h.clientX){b.rotate(null)}}:function(h){t=g.selected;c()});if(d){this.element.bind("tabsshow",c);this.anchors.bind(g.event+".tabs",e);c()}else{clearTimeout(b.rotation);this.element.unbind("tabsshow",c);this.anchors.unbind(g.event+".tabs",e);delete this._rotate;delete this._unrotate}}})})(jQuery);;/*
 * jQuery UI Datepicker 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Datepicker
 *
 * Depends:
 *	ui.core.js
 */
(function($){$.extend($.ui,{datepicker:{version:"1.7.1"}});var PROP_NAME="datepicker";function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dateFormat:"mm/dd/yy",firstDay:0,isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:"-10:+10",showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){input[isRTL?"before":"after"]('<span class="'+this._appendClass+'">'+appendText+"</span>")}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.trigger.remove();$target.siblings("."+this._appendClass).remove().end().removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}var inst=this._getInst(target);if(inst){if(this._curInst==inst){this._hideDatepicker(null)}extendRemove(inst.settings,settings);var date=new Date();extendRemove(inst,{rangeStart:null,endDay:null,endMonth:null,endYear:null,selectedDay:date.getDate(),selectedMonth:date.getMonth(),selectedYear:date.getFullYear(),currentDay:date.getDate(),currentMonth:date.getMonth(),currentYear:date.getFullYear(),drawMonth:date.getMonth(),drawYear:date.getFullYear()});this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){var inst=this._getInst(target);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:var sel=$("td."+$.datepicker._dayOverClass+", td."+$.datepicker._currentClass,inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"))}return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate)}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){return 1}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){lookAhead(match);var origSize=(match=="@"?14:(match=="y"?4:(match=="o"?3:2)));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length)}var name="";var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1}}size--}throw"Unknown name at position "+iInit};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":var doy=date.getDate();for(var m=date.getMonth()-1;m>=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst){var dateFormat=this._get(inst,"dateFormat");var dates=inst.input?inst.input.val():null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);date=defaultDate}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,"defaultDate"),new Date());var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#'+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group ui-datepicker-group-';switch(col){case 0:calender+="first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+="last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+="middle";cornerClass="";break}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span> "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'M');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?"&#xa0;":"")}if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-year" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?"&#xa0;":"")+monthHtml}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.1";window.DP_jQuery=$})(jQuery);;/*
 * jQuery UI Progressbar 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Progressbar
 *
 * Depends:
 *   ui.core.js
 */
(function(a){a.widget("ui.progressbar",{_init:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=a('<div class="ui-progressbar-value ui-widget-header ui-corner-left"></div>').appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow").removeData("progressbar").unbind(".progressbar");this.valueDiv.remove();a.widget.prototype.destroy.apply(this,arguments)},value:function(b){arguments.length&&this._setData("value",b);return this._value()},_setData:function(b,c){switch(b){case"value":this.options.value=c;this._refreshValue();this._trigger("change",null,{});break}a.widget.prototype._setData.apply(this,arguments)},_value:function(){var b=this.options.value;if(b<this._valueMin()){b=this._valueMin()}if(b>this._valueMax()){b=this._valueMax()}return b},_valueMin:function(){var b=0;return b},_valueMax:function(){var b=100;return b},_refreshValue:function(){var b=this.value();this.valueDiv[b==this._valueMax()?"addClass":"removeClass"]("ui-corner-right");this.valueDiv.width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.7.1",defaults:{value:0}})})(jQuery);;/*
 * jQuery UI Effects 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/
 */
jQuery.effects||(function(d){d.effects={version:"1.7.1",save:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.data("ec.storage."+h[f],g[0].style[h[f]])}}},restore:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.css(h[f],g.data("ec.storage."+h[f]))}}},setMode:function(f,g){if(g=="toggle"){g=f.is(":hidden")?"show":"hide"}return g},getBaseline:function(g,h){var i,f;switch(g[0]){case"top":i=0;break;case"middle":i=0.5;break;case"bottom":i=1;break;default:i=g[0]/h.height}switch(g[1]){case"left":f=0;break;case"center":f=0.5;break;case"right":f=1;break;default:f=g[1]/h.width}return{x:f,y:i}},createWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent()}var g={width:f.outerWidth(true),height:f.outerHeight(true),"float":f.css("float")};f.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var j=f.parent();if(f.css("position")=="static"){j.css({position:"relative"});f.css({position:"relative"})}else{var i=f.css("top");if(isNaN(parseInt(i,10))){i="auto"}var h=f.css("left");if(isNaN(parseInt(h,10))){h="auto"}j.css({position:f.css("position"),top:i,left:h,zIndex:f.css("z-index")}).show();f.css({position:"relative",top:0,left:0})}j.css(g);return j},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)}return f},setTransition:function(g,i,f,h){h=h||{};d.each(i,function(k,j){unit=g.cssUnit(j);if(unit[0]>0){h[j]=unit[0]*f+unit[1]}});return h},animateClass:function(h,i,k,j){var f=(typeof k=="function"?k:(j?j:null));var g=(typeof k=="string"?k:null);return this.each(function(){var q={};var o=d(this);var p=o.attr("style")||"";if(typeof p=="object"){p=p.cssText}if(h.toggle){o.hasClass(h.toggle)?h.remove=h.toggle:h.add=h.toggle}var l=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.addClass(h.add)}if(h.remove){o.removeClass(h.remove)}var m=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.removeClass(h.add)}if(h.remove){o.addClass(h.remove)}for(var r in m){if(typeof m[r]!="function"&&m[r]&&r.indexOf("Moz")==-1&&r.indexOf("length")==-1&&m[r]!=l[r]&&(r.match(/color/i)||(!r.match(/color/i)&&!isNaN(parseInt(m[r],10))))&&(l.position!="static"||(l.position=="static"&&!r.match(/left|top|bottom|right/)))){q[r]=m[r]}}o.animate(q,i,g,function(){if(typeof d(this).attr("style")=="object"){d(this).attr("style")["cssText"]="";d(this).attr("style")["cssText"]=p}else{d(this).attr("style",p)}if(h.add){d(this).addClass(h.add)}if(h.remove){d(this).removeClass(h.remove)}if(f){f.apply(this,arguments)}})})}};function c(g,f){var i=g[1]&&g[1].constructor==Object?g[1]:{};if(f){i.mode=f}var h=g[1]&&g[1].constructor!=Object?g[1]:(i.duration?i.duration:g[2]);h=d.fx.off?0:typeof h==="number"?h:d.fx.speeds[h]||d.fx.speeds._default;var j=i.callback||(d.isFunction(g[1])&&g[1])||(d.isFunction(g[2])&&g[2])||(d.isFunction(g[3])&&g[3]);return[g[0],i,h,j]}d.fn.extend({_show:d.fn.show,_hide:d.fn.hide,__toggle:d.fn.toggle,_addClass:d.fn.addClass,_removeClass:d.fn.removeClass,_toggleClass:d.fn.toggleClass,effect:function(g,f,h,i){return d.effects[g]?d.effects[g].call(this,{method:g,options:f||{},duration:h,callback:i}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(arguments[0].constructor==Function)){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"toggle"))}},addClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{add:g},f,i,h]):this._addClass(g)},removeClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{remove:g},f,i,h]):this._removeClass(g)},toggleClass:function(g,f,i,h){return((typeof f!=="boolean")&&f)?d.effects.animateClass.apply(this,[{toggle:g},f,i,h]):this._toggleClass(g,f)},morph:function(f,h,g,j,i){return d.effects.animateClass.apply(this,[{add:h,remove:f},g,j,i])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(f){var g=this.css(f),h=[];d.each(["em","px","%","pt"],function(j,k){if(g.indexOf(k)>0){h=[parseFloat(g),k]}});return h}});d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,f){d.fx.step[f]=function(h){if(h.state==0){h.start=e(h.elem,f);h.end=b(h.end)}h.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((h.pos*(h.end[0]-h.start[0]))+h.start[0],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[1]-h.start[1]))+h.start[1],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[2]-h.start[2]))+h.start[2],10),255),0)].join(",")+")"}});function b(g){var f;if(g&&g.constructor==Array&&g.length==3){return g}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(f=/rgba\(0, 0, 0, 0\)/.exec(g)){return a.transparent}return a[d.trim(g).toLowerCase()]}function e(h,f){var g;do{g=d.curCSS(h,f);if(g!=""&&g!="transparent"||d.nodeName(h,"body")){break}f="backgroundColor"}while(h=h.parentNode);return b(g)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(g,h,f,j,i){return d.easing[d.easing.def](g,h,f,j,i)},easeInQuad:function(g,h,f,j,i){return j*(h/=i)*h+f},easeOutQuad:function(g,h,f,j,i){return -j*(h/=i)*(h-2)+f},easeInOutQuad:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h+f}return -j/2*((--h)*(h-2)-1)+f},easeInCubic:function(g,h,f,j,i){return j*(h/=i)*h*h+f},easeOutCubic:function(g,h,f,j,i){return j*((h=h/i-1)*h*h+1)+f},easeInOutCubic:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h+f}return j/2*((h-=2)*h*h+2)+f},easeInQuart:function(g,h,f,j,i){return j*(h/=i)*h*h*h+f},easeOutQuart:function(g,h,f,j,i){return -j*((h=h/i-1)*h*h*h-1)+f},easeInOutQuart:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h+f}return -j/2*((h-=2)*h*h*h-2)+f},easeInQuint:function(g,h,f,j,i){return j*(h/=i)*h*h*h*h+f},easeOutQuint:function(g,h,f,j,i){return j*((h=h/i-1)*h*h*h*h+1)+f},easeInOutQuint:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h*h+f}return j/2*((h-=2)*h*h*h*h+2)+f},easeInSine:function(g,h,f,j,i){return -j*Math.cos(h/i*(Math.PI/2))+j+f},easeOutSine:function(g,h,f,j,i){return j*Math.sin(h/i*(Math.PI/2))+f},easeInOutSine:function(g,h,f,j,i){return -j/2*(Math.cos(Math.PI*h/i)-1)+f},easeInExpo:function(g,h,f,j,i){return(h==0)?f:j*Math.pow(2,10*(h/i-1))+f},easeOutExpo:function(g,h,f,j,i){return(h==i)?f+j:j*(-Math.pow(2,-10*h/i)+1)+f},easeInOutExpo:function(g,h,f,j,i){if(h==0){return f}if(h==i){return f+j}if((h/=i/2)<1){return j/2*Math.pow(2,10*(h-1))+f}return j/2*(-Math.pow(2,-10*--h)+2)+f},easeInCirc:function(g,h,f,j,i){return -j*(Math.sqrt(1-(h/=i)*h)-1)+f},easeOutCirc:function(g,h,f,j,i){return j*Math.sqrt(1-(h=h/i-1)*h)+f},easeInOutCirc:function(g,h,f,j,i){if((h/=i/2)<1){return -j/2*(Math.sqrt(1-h*h)-1)+f}return j/2*(Math.sqrt(1-(h-=2)*h)+1)+f},easeInElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return -(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f},easeOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return h*Math.pow(2,-10*i)*Math.sin((i*l-j)*(2*Math.PI)/k)+m+f},easeInOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l/2)==2){return f+m}if(!k){k=l*(0.3*1.5)}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}if(i<1){return -0.5*(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f}return h*Math.pow(2,-10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k)*0.5+m+f},easeInBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*(h/=j)*h*((i+1)*h-i)+f},easeOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*((h=h/j-1)*h*((i+1)*h+i)+1)+f},easeInOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}if((h/=j/2)<1){return k/2*(h*h*(((i*=(1.525))+1)*h-i))+f}return k/2*((h-=2)*h*(((i*=(1.525))+1)*h+i)+2)+f},easeInBounce:function(g,h,f,j,i){return j-d.easing.easeOutBounce(g,i-h,0,j,i)+f},easeOutBounce:function(g,h,f,j,i){if((h/=i)<(1/2.75)){return j*(7.5625*h*h)+f}else{if(h<(2/2.75)){return j*(7.5625*(h-=(1.5/2.75))*h+0.75)+f}else{if(h<(2.5/2.75)){return j*(7.5625*(h-=(2.25/2.75))*h+0.9375)+f}else{return j*(7.5625*(h-=(2.625/2.75))*h+0.984375)+f}}}},easeInOutBounce:function(g,h,f,j,i){if(h<i/2){return d.easing.easeInBounce(g,h*2,0,j,i)*0.5+f}return d.easing.easeOutBounce(g,h*2-i,0,j,i)*0.5+j*0.5+f}})})(jQuery);;/*
 * jQuery UI Effects Blind 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/Blind
 *
 * Depends:
 *	effects.core.js
 */
(function(a){a.effects.blind=function(b){return this.queue(function(){var d=a(this),c=["position","top","left"];var h=a.effects.setMode(d,b.options.mode||"hide");var g=b.options.direction||"vertical";a.effects.save(d,c);d.show();var j=a.effects.createWrapper(d).css({overflow:"hidden"});var e=(g=="vertical")?"height":"width";var i=(g=="vertical")?j.height():j.width();if(h=="show"){j.css(e,0)}var f={};f[e]=h=="show"?i:0;j.animate(f,b.duration,b.options.easing,function(){if(h=="hide"){d.hide()}a.effects.restore(d,c);a.effects.removeWrapper(d);if(b.callback){b.callback.apply(d[0],arguments)}d.dequeue()})})}})(jQuery);;/*
 * jQuery UI Effects Bounce 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/Bounce
 *
 * Depends:
 *	effects.core.js
 */
(function(a){a.effects.bounce=function(b){return this.queue(function(){var e=a(this),l=["position","top","left"];var k=a.effects.setMode(e,b.options.mode||"effect");var n=b.options.direction||"up";var c=b.options.distance||20;var d=b.options.times||5;var g=b.duration||250;if(/show|hide/.test(k)){l.push("opacity")}a.effects.save(e,l);e.show();a.effects.createWrapper(e);var f=(n=="up"||n=="down")?"top":"left";var p=(n=="up"||n=="left")?"pos":"neg";var c=b.options.distance||(f=="top"?e.outerHeight({margin:true})/3:e.outerWidth({margin:true})/3);if(k=="show"){e.css("opacity",0).css(f,p=="pos"?-c:c)}if(k=="hide"){c=c/(d*2)}if(k!="hide"){d--}if(k=="show"){var h={opacity:1};h[f]=(p=="pos"?"+=":"-=")+c;e.animate(h,g/2,b.options.easing);c=c/2;d--}for(var j=0;j<d;j++){var o={},m={};o[f]=(p=="pos"?"-=":"+=")+c;m[f]=(p=="pos"?"+=":"-=")+c;e.animate(o,g/2,b.options.easing).animate(m,g/2,b.options.easing);c=(k=="hide")?c*2:c/2}if(k=="hide"){var h={opacity:0};h[f]=(p=="pos"?"-=":"+=")+c;e.animate(h,g/2,b.options.easing,function(){e.hide();a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}})}else{var o={},m={};o[f]=(p=="pos"?"-=":"+=")+c;m[f]=(p=="pos"?"+=":"-=")+c;e.animate(o,g/2,b.options.easing).animate(m,g/2,b.options.easing,function(){a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}})}e.queue("fx",function(){e.dequeue()});e.dequeue()})}})(jQuery);;/*
 * jQuery UI Effects Clip 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/Clip
 *
 * Depends:
 *	effects.core.js
 */
(function(a){a.effects.clip=function(b){return this.queue(function(){var f=a(this),j=["position","top","left","height","width"];var i=a.effects.setMode(f,b.options.mode||"hide");var k=b.options.direction||"vertical";a.effects.save(f,j);f.show();var c=a.effects.createWrapper(f).css({overflow:"hidden"});var e=f[0].tagName=="IMG"?c:f;var g={size:(k=="vertical")?"height":"width",position:(k=="vertical")?"top":"left"};var d=(k=="vertical")?e.height():e.width();if(i=="show"){e.css(g.size,0);e.css(g.position,d/2)}var h={};h[g.size]=i=="show"?d:0;h[g.position]=i=="show"?0:d/2;e.animate(h,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){f.hide()}a.effects.restore(f,j);a.effects.removeWrapper(f);if(b.callback){b.callback.apply(f[0],arguments)}f.dequeue()}})})}})(jQuery);;/*
 * jQuery UI Effects Drop 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/Drop
 *
 * Depends:
 *	effects.core.js
 */
(function(a){a.effects.drop=function(b){return this.queue(function(){var e=a(this),d=["position","top","left","opacity"];var i=a.effects.setMode(e,b.options.mode||"hide");var h=b.options.direction||"left";a.effects.save(e,d);e.show();a.effects.createWrapper(e);var f=(h=="up"||h=="down")?"top":"left";var c=(h=="up"||h=="left")?"pos":"neg";var j=b.options.distance||(f=="top"?e.outerHeight({margin:true})/2:e.outerWidth({margin:true})/2);if(i=="show"){e.css("opacity",0).css(f,c=="pos"?-j:j)}var g={opacity:i=="show"?1:0};g[f]=(i=="show"?(c=="pos"?"+=":"-="):(c=="pos"?"-=":"+="))+j;e.animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){e.hide()}a.effects.restore(e,d);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/*
 * jQuery UI Effects Explode 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/Explode
 *
 * Depends:
 *	effects.core.js
 */
(function(a){a.effects.explode=function(b){return this.queue(function(){var k=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;var e=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;b.options.mode=b.options.mode=="toggle"?(a(this).is(":visible")?"hide":"show"):b.options.mode;var h=a(this).show().css("visibility","hidden");var l=h.offset();l.top-=parseInt(h.css("marginTop"),10)||0;l.left-=parseInt(h.css("marginLeft"),10)||0;var g=h.outerWidth(true);var c=h.outerHeight(true);for(var f=0;f<k;f++){for(var d=0;d<e;d++){h.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-d*(g/e),top:-f*(c/k)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/e,height:c/k,left:l.left+d*(g/e)+(b.options.mode=="show"?(d-Math.floor(e/2))*(g/e):0),top:l.top+f*(c/k)+(b.options.mode=="show"?(f-Math.floor(k/2))*(c/k):0),opacity:b.options.mode=="show"?0:1}).animate({left:l.left+d*(g/e)+(b.options.mode=="show"?0:(d-Math.floor(e/2))*(g/e)),top:l.top+f*(c/k)+(b.options.mode=="show"?0:(f-Math.floor(k/2))*(c/k)),opacity:b.options.mode=="show"?1:0},b.duration||500)}}setTimeout(function(){b.options.mode=="show"?h.css({visibility:"visible"}):h.css({visibility:"visible"}).hide();if(b.callback){b.callback.apply(h[0])}h.dequeue();a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);;/*
 * jQuery UI Effects Fold 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/Fold
 *
 * Depends:
 *	effects.core.js
 */
(function(a){a.effects.fold=function(b){return this.queue(function(){var e=a(this),k=["position","top","left"];var h=a.effects.setMode(e,b.options.mode||"hide");var o=b.options.size||15;var n=!(!b.options.horizFirst);var g=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(e,k);e.show();var d=a.effects.createWrapper(e).css({overflow:"hidden"});var i=((h=="show")!=n);var f=i?["width","height"]:["height","width"];var c=i?[d.width(),d.height()]:[d.height(),d.width()];var j=/([0-9]+)%/.exec(o);if(j){o=parseInt(j[1],10)/100*c[h=="hide"?0:1]}if(h=="show"){d.css(n?{height:0,width:o}:{height:o,width:0})}var m={},l={};m[f[0]]=h=="show"?c[0]:o;l[f[1]]=h=="show"?c[1]:0;d.animate(m,g,b.options.easing).animate(l,g,b.options.easing,function(){if(h=="hide"){e.hide()}a.effects.restore(e,k);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(e[0],arguments)}e.dequeue()})})}})(jQuery);;/*
 * jQuery UI Effects Highlight 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/Highlight
 *
 * Depends:
 *	effects.core.js
 */
(function(a){a.effects.highlight=function(b){return this.queue(function(){var e=a(this),d=["backgroundImage","backgroundColor","opacity"];var h=a.effects.setMode(e,b.options.mode||"show");var c=b.options.color||"#ffff99";var g=e.css("backgroundColor");a.effects.save(e,d);e.show();e.css({backgroundImage:"none",backgroundColor:c});var f={backgroundColor:g};if(h=="hide"){f.opacity=0}e.animate(f,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(h=="hide"){e.hide()}a.effects.restore(e,d);if(h=="show"&&a.browser.msie){this.style.removeAttribute("filter")}if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/*
 * jQuery UI Effects Pulsate 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/Pulsate
 *
 * Depends:
 *	effects.core.js
 */
(function(a){a.effects.pulsate=function(b){return this.queue(function(){var d=a(this);var g=a.effects.setMode(d,b.options.mode||"show");var f=b.options.times||5;var e=b.duration?b.duration/2:a.fx.speeds._default/2;if(g=="hide"){f--}if(d.is(":hidden")){d.css("opacity",0);d.show();d.animate({opacity:1},e,b.options.easing);f=f-2}for(var c=0;c<f;c++){d.animate({opacity:0},e,b.options.easing).animate({opacity:1},e,b.options.easing)}if(g=="hide"){d.animate({opacity:0},e,b.options.easing,function(){d.hide();if(b.callback){b.callback.apply(this,arguments)}})}else{d.animate({opacity:0},e,b.options.easing).animate({opacity:1},e,b.options.easing,function(){if(b.callback){b.callback.apply(this,arguments)}})}d.queue("fx",function(){d.dequeue()});d.dequeue()})}})(jQuery);;/*
 * jQuery UI Effects Scale 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/Scale
 *
 * Depends:
 *	effects.core.js
 */
(function(a){a.effects.puff=function(b){return this.queue(function(){var f=a(this);var c=a.extend(true,{},b.options);var h=a.effects.setMode(f,b.options.mode||"hide");var g=parseInt(b.options.percent,10)||150;c.fade=true;var e={height:f.height(),width:f.width()};var d=g/100;f.from=(h=="hide")?e:{height:e.height*d,width:e.width*d};c.from=f.from;c.percent=(h=="hide")?g:100;c.mode=h;f.effect("scale",c,b.duration,b.callback);f.dequeue()})};a.effects.scale=function(b){return this.queue(function(){var g=a(this);var d=a.extend(true,{},b.options);var j=a.effects.setMode(g,b.options.mode||"effect");var h=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:(j=="hide"?0:100));var i=b.options.direction||"both";var c=b.options.origin;if(j!="effect"){d.origin=c||["middle","center"];d.restore=true}var f={height:g.height(),width:g.width()};g.from=b.options.from||(j=="show"?{height:0,width:0}:f);var e={y:i!="horizontal"?(h/100):1,x:i!="vertical"?(h/100):1};g.to={height:f.height*e.y,width:f.width*e.x};if(b.options.fade){if(j=="show"){g.from.opacity=0;g.to.opacity=1}if(j=="hide"){g.from.opacity=1;g.to.opacity=0}}d.from=g.from;d.to=g.to;d.mode=j;g.effect("size",d,b.duration,b.callback);g.dequeue()})};a.effects.size=function(b){return this.queue(function(){var c=a(this),n=["position","top","left","width","height","overflow","opacity"];var m=["position","top","left","overflow","opacity"];var j=["width","height","overflow"];var p=["fontSize"];var k=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var f=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var g=a.effects.setMode(c,b.options.mode||"effect");var i=b.options.restore||false;var e=b.options.scale||"both";var o=b.options.origin;var d={height:c.height(),width:c.width()};c.from=b.options.from||d;c.to=b.options.to||d;if(o){var h=a.effects.getBaseline(o,d);c.from.top=(d.height-c.from.height)*h.y;c.from.left=(d.width-c.from.width)*h.x;c.to.top=(d.height-c.to.height)*h.y;c.to.left=(d.width-c.to.width)*h.x}var l={from:{y:c.from.height/d.height,x:c.from.width/d.width},to:{y:c.to.height/d.height,x:c.to.width/d.width}};if(e=="box"||e=="both"){if(l.from.y!=l.to.y){n=n.concat(k);c.from=a.effects.setTransition(c,k,l.from.y,c.from);c.to=a.effects.setTransition(c,k,l.to.y,c.to)}if(l.from.x!=l.to.x){n=n.concat(f);c.from=a.effects.setTransition(c,f,l.from.x,c.from);c.to=a.effects.setTransition(c,f,l.to.x,c.to)}}if(e=="content"||e=="both"){if(l.from.y!=l.to.y){n=n.concat(p);c.from=a.effects.setTransition(c,p,l.from.y,c.from);c.to=a.effects.setTransition(c,p,l.to.y,c.to)}}a.effects.save(c,i?n:m);c.show();a.effects.createWrapper(c);c.css("overflow","hidden").css(c.from);if(e=="content"||e=="both"){k=k.concat(["marginTop","marginBottom"]).concat(p);f=f.concat(["marginLeft","marginRight"]);j=n.concat(k).concat(f);c.find("*[width]").each(function(){child=a(this);if(i){a.effects.save(child,j)}var q={height:child.height(),width:child.width()};child.from={height:q.height*l.from.y,width:q.width*l.from.x};child.to={height:q.height*l.to.y,width:q.width*l.to.x};if(l.from.y!=l.to.y){child.from=a.effects.setTransition(child,k,l.from.y,child.from);child.to=a.effects.setTransition(child,k,l.to.y,child.to)}if(l.from.x!=l.to.x){child.from=a.effects.setTransition(child,f,l.from.x,child.from);child.to=a.effects.setTransition(child,f,l.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){if(i){a.effects.restore(child,j)}})})}c.animate(c.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(g=="hide"){c.hide()}a.effects.restore(c,i?n:m);a.effects.removeWrapper(c);if(b.callback){b.callback.apply(this,arguments)}c.dequeue()}})})}})(jQuery);;/*
 * jQuery UI Effects Shake 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/Shake
 *
 * Depends:
 *	effects.core.js
 */
(function(a){a.effects.shake=function(b){return this.queue(function(){var e=a(this),l=["position","top","left"];var k=a.effects.setMode(e,b.options.mode||"effect");var n=b.options.direction||"left";var c=b.options.distance||20;var d=b.options.times||3;var g=b.duration||b.options.duration||140;a.effects.save(e,l);e.show();a.effects.createWrapper(e);var f=(n=="up"||n=="down")?"top":"left";var p=(n=="up"||n=="left")?"pos":"neg";var h={},o={},m={};h[f]=(p=="pos"?"-=":"+=")+c;o[f]=(p=="pos"?"+=":"-=")+c*2;m[f]=(p=="pos"?"-=":"+=")+c*2;e.animate(h,g,b.options.easing);for(var j=1;j<d;j++){e.animate(o,g,b.options.easing).animate(m,g,b.options.easing)}e.animate(o,g,b.options.easing).animate(h,g/2,b.options.easing,function(){a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}});e.queue("fx",function(){e.dequeue()});e.dequeue()})}})(jQuery);;/*
 * jQuery UI Effects Slide 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/Slide
 *
 * Depends:
 *	effects.core.js
 */
(function(a){a.effects.slide=function(b){return this.queue(function(){var e=a(this),d=["position","top","left"];var i=a.effects.setMode(e,b.options.mode||"show");var h=b.options.direction||"left";a.effects.save(e,d);e.show();a.effects.createWrapper(e).css({overflow:"hidden"});var f=(h=="up"||h=="down")?"top":"left";var c=(h=="up"||h=="left")?"pos":"neg";var j=b.options.distance||(f=="top"?e.outerHeight({margin:true}):e.outerWidth({margin:true}));if(i=="show"){e.css(f,c=="pos"?-j:j)}var g={};g[f]=(i=="show"?(c=="pos"?"+=":"-="):(c=="pos"?"-=":"+="))+j;e.animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){e.hide()}a.effects.restore(e,d);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/*
 * jQuery UI Effects Transfer 1.7.1
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Effects/Transfer
 *
 * Depends:
 *	effects.core.js
 */
(function(a){a.effects.transfer=function(b){return this.queue(function(){var f=a(this),h=a(b.options.to),e=h.offset(),g={top:e.top,left:e.left,height:h.innerHeight(),width:h.innerWidth()},d=f.offset(),c=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top:d.top,left:d.left,height:f.innerHeight(),width:f.innerWidth(),position:"absolute"}).animate(g,b.duration,b.options.easing,function(){c.remove();(b.callback&&b.callback.apply(f[0],arguments));f.dequeue()})})}})(jQuery);;
/* end ../vendors/jquery-ui-1.7.1.custom.min.js */

/* start ../include/js/mootools12-min.js */
var MooTools={version:"1.2.0",build:""};var Native=function(e){e=e||{};var i=e.afterImplement||function(){};var h=e.generics;h=(h!==false);var g=e.legacy;var j=e.initialize;var c=e.protect;var d=e.name;var b=j||g;b.constructor=Native;b.$family={name:"native"};if(g&&j){b.prototype=g.prototype}b.prototype.constructor=b;if(d){var a=d.toLowerCase();b.prototype.$family={name:a};Native.typize(b,a)}var f=function(n,l,m,k){if(!c||k||!n.prototype[l]){n.prototype[l]=m}if(h){Native.genericize(n,l,c)}i.call(n,l,m);return n};b.implement=function(k,l,m){if(typeof k=="string"){return f(this,k,l,m)}for(var n in k){f(this,n,k[n],l)}return this};b.alias=function(n,l,m){if(typeof n=="string"){n=this.prototype[n];if(n){f(this,l,n,m)}}else{for(var k in n){this.alias(k,n[k],l)}}return this};return b};Native.implement=function(b,c){for(var d=0,a=b.length;d<a;d++){b[d].implement(c)}};Native.genericize=function(c,b,a){if((!a||!c[b])&&typeof c.prototype[b]=="function"){c[b]=function(){var d=Array.prototype.slice.call(arguments);return c.prototype[b].apply(d.shift(),d)}}};Native.typize=function(a,b){if(!a.type){a.type=function(c){return($type(c)===b)}}};Native.alias=function(c,f,a,b){for(var d=0,e=c.length;d<e;d++){c[d].alias(f,a,b)}};(function(b){for(var a in b){Native.typize(b[a],a)}})({"boolean":Boolean,"native":Native,object:Object});(function(b){for(var a in b){new Native({name:a,initialize:b[a],protect:true})}})({String:String,Function:Function,Number:Number,Array:Array,RegExp:RegExp,Date:Date});(function(c,a){for(var b=a.length;b--;b){Native.genericize(c,a[b],true)}return arguments.callee})(Array,["pop","push","reverse","shift","sort","splice","unshift","concat","join","slice","toString","valueOf","indexOf","lastIndexOf"])(String,["charAt","charCodeAt","concat","indexOf","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","valueOf"]);function $chk(a){return !!(a||a===0)}function $clear(a){clearTimeout(a);clearInterval(a);return null}function $defined(a){return(a!=undefined)}function $empty(){}function $arguments(a){return function(){return arguments[a]}}function $lambda(a){return(typeof a=="function")?a:function(){return a}}function $extend(b,a){for(var c in (a||{})){b[c]=a[c]}return b}function $unlink(d){var e;switch($type(d)){case"object":e={};for(var b in d){e[b]=$unlink(d[b])}break;case"hash":e=$unlink(d.getClean());break;case"array":e=[];for(var c=0,a=d.length;c<a;c++){e[c]=$unlink(d[c])}break;default:return d}return e}function $merge(){var d={};for(var e=0,a=arguments.length;e<a;e++){var g=arguments[e];if($type(g)!="object"){continue}for(var f in g){var b=g[f],c=d[f];d[f]=(c&&$type(b)=="object"&&$type(c)=="object")?$merge(c,b):$unlink(b)}}return d}function $pick(){for(var b=0,a=arguments.length;b<a;b++){if(arguments[b]!=undefined){return arguments[b]}}return null}function $random(b,a){return Math.floor(Math.random()*(a-b+1)+b)}function $splat(b){var a=$type(b);return(a)?((a!="array"&&a!="arguments")?[b]:b):[]}var $time=Date.now||function(){return new Date().getTime()};function $try(){for(var c=0,a=arguments.length;c<a;c++){try{return arguments[c]()}catch(b){}}return null}function $type(a){if(a==undefined){return false}if(a.$family){return(a.$family.name=="number"&&!isFinite(a))?false:a.$family.name}if(a.nodeName){switch(a.nodeType){case 1:return"element";case 3:return(/\S/).test(a.nodeValue)?"textnode":"whitespace"}}else{if(typeof a.length=="number"){if(a.callee){return"arguments"}else{if(a.item){return"collection"}}}}return typeof a}var Hash=new Native({name:"Hash",initialize:function(a){if($type(a)=="hash"){a=$unlink(a.getClean())}for(var b in a){this[b]=a[b]}return this}});Hash.implement({getLength:function(){var b=0;for(var a in this){if(this.hasOwnProperty(a)){b++}}return b},forEach:function(c,b){for(var a in this){if(this.hasOwnProperty(a)){c.call(b,this[a],a,this)}}},getClean:function(){var b={};for(var a in this){if(this.hasOwnProperty(a)){b[a]=this[a]}}return b}});Hash.alias("forEach","each");function $H(a){return new Hash(a)}Array.implement({forEach:function(c,b){for(var d=0,a=this.length;d<a;d++){c.call(b,this[d],d,this)}}});Array.alias("forEach","each");function $A(c){if(c.item){var b=[];for(var d=0,a=c.length;d<a;d++){b[d]=c[d]}return b}return Array.prototype.slice.call(c)}function $each(c,d,b){var a=$type(c);((a=="arguments"||a=="collection"||a=="array")?Array:Hash).each(c,d,b)}var Browser=new Hash({Engine:{name:"unknown",version:""},Platform:{name:(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase()},Features:{xpath:!!(document.evaluate),air:!!(window.runtime)},Plugins:{}});if(window.opera){Browser.Engine={name:"presto",version:(document.getElementsByClassName)?950:925}}else{if(window.ActiveXObject){Browser.Engine={name:"trident",version:(window.XMLHttpRequest)?5:4}}else{if(!navigator.taintEnabled){Browser.Engine={name:"webkit",version:(Browser.Features.xpath)?420:419}}else{if(document.getBoxObjectFor!=null){Browser.Engine={name:"gecko",version:(document.getElementsByClassName)?19:18}}}}}Browser.Engine[Browser.Engine.name]=Browser.Engine[Browser.Engine.name+Browser.Engine.version]=true;if(window.orientation!=undefined){Browser.Platform.name="ipod"}Browser.Platform[Browser.Platform.name]=true;Browser.Request=function(){return $try(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("MSXML2.XMLHTTP")})};Browser.Features.xhr=!!(Browser.Request());Browser.Plugins.Flash=(function(){var a=($try(function(){return navigator.plugins["Shockwave Flash"].description},function(){return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")})||"0 r0").match(/\d+/g);return{version:parseInt(a[0]||0+"."+a[1]||0),build:parseInt(a[2]||0)}})();function $exec(b){if(!b){return b}if(window.execScript){window.execScript(b)}else{var a=document.createElement("script");a.setAttribute("type","text/javascript");a.text=b;document.head.appendChild(a);document.head.removeChild(a)}return b}Native.UID=1;var $uid=(Browser.Engine.trident)?function(a){return(a.uid||(a.uid=[Native.UID++]))[0]}:function(a){return a.uid||(a.uid=Native.UID++)};var Window=new Native({name:"Window",legacy:(Browser.Engine.trident)?null:window.Window,initialize:function(a){$uid(a);if(!a.Element){a.Element=$empty;if(Browser.Engine.webkit){a.document.createElement("iframe")}a.Element.prototype=(Browser.Engine.webkit)?window["[[DOMElement.prototype]]"]:{}}return $extend(a,Window.Prototype)},afterImplement:function(b,a){window[b]=Window.Prototype[b]=a}});Window.Prototype={$family:{name:"window"}};new Window(window);var Document=new Native({name:"Document",legacy:(Browser.Engine.trident)?null:window.Document,initialize:function(a){$uid(a);a.head=a.getElementsByTagName("head")[0];a.html=a.getElementsByTagName("html")[0];a.window=a.defaultView||a.parentWindow;if(Browser.Engine.trident4){$try(function(){a.execCommand("BackgroundImageCache",false,true)})}return $extend(a,Document.Prototype)},afterImplement:function(b,a){document[b]=Document.Prototype[b]=a}});Document.Prototype={$family:{name:"document"}};new Document(document);Array.implement({every:function(c,b){for(var d=0,a=this.length;d<a;d++){if(!c.call(b,this[d],d,this)){return false}}return true},filter:function(c,b){var d=[];for(var e=0,a=this.length;e<a;e++){if(c.call(b,this[e],e,this)){d.push(this[e])}}return d},clean:function(){return this.filter($defined)},indexOf:function(c,b){var a=this.length;for(var d=(b<0)?Math.max(0,a+b):b||0;d<a;d++){if(this[d]===c){return d}}return -1},map:function(c,b){var d=[];for(var e=0,a=this.length;e<a;e++){d[e]=c.call(b,this[e],e,this)}return d},some:function(c,b){for(var d=0,a=this.length;d<a;d++){if(c.call(b,this[d],d,this)){return true}}return false},associate:function(c){var b={},d=Math.min(this.length,c.length);for(var a=0;a<d;a++){b[c[a]]=this[a]}return b},link:function(d){var a={};for(var b=0,e=this.length;b<e;b++){for(var c in d){if(d[c](this[b])){a[c]=this[b];delete d[c];break}}}return a},contains:function(a,b){return this.indexOf(a,b)!=-1},extend:function(b){for(var c=0,a=b.length;c<a;c++){this.push(b[c])}return this},getLast:function(){return(this.length)?this[this.length-1]:null},getRandom:function(){return(this.length)?this[$random(0,this.length-1)]:null},include:function(a){if(!this.contains(a)){this.push(a)}return this},combine:function(b){for(var c=0,a=b.length;c<a;c++){this.include(b[c])}return this},erase:function(b){for(var a=this.length;a--;a){if(this[a]===b){this.splice(a,1)}}return this},empty:function(){this.length=0;return this},flatten:function(){var b=[];for(var d=0,a=this.length;d<a;d++){var c=$type(this[d]);if(!c){continue}b=b.concat((c=="array"||c=="collection"||c=="arguments")?Array.flatten(this[d]):this[d])}return b},hexToRgb:function(b){if(this.length!=3){return null}var a=this.map(function(c){if(c.length==1){c+=c}return c.toInt(16)});return(b)?a:"rgb("+a+")"},rgbToHex:function(b){if(this.length<3){return null}if(this.length==4&&this[3]==0&&!b){return"transparent"}var d=[];for(var a=0;a<3;a++){var c=(this[a]-0).toString(16);d.push((c.length==1)?"0"+c:c)}return(b)?d:"#"+d.join("")}});Function.implement({extend:function(a){for(var b in a){this[b]=a[b]}return this},create:function(b){var a=this;b=b||{};return function(d){var e=b.arguments;e=(e!=undefined)?$splat(e):Array.slice(arguments,(b.event)?1:0);if(b.event){e=[d||window.event].extend(e)}var c=function(){return a.apply(b.bind||null,e)};if(b.delay){return setTimeout(c,b.delay)}if(b.periodical){return setInterval(c,b.periodical)}if(b.attempt){return $try(c)}return c()}},pass:function(a,b){return this.create({arguments:a,bind:b})},attempt:function(a,b){return this.create({arguments:a,bind:b,attempt:true})()},bind:function(b,a){return this.create({bind:b,arguments:a})},bindWithEvent:function(b,a){return this.create({bind:b,event:true,arguments:a})},delay:function(c,b,a){return this.create({delay:c,bind:b,arguments:a})()},periodical:function(a,b,c){return this.create({periodical:a,bind:b,arguments:c})()},run:function(a,b){return this.apply(b,$splat(a))}});Number.implement({limit:function(b,a){return Math.min(a,Math.max(b,this))},round:function(a){a=Math.pow(10,a||0);return Math.round(this*a)/a},times:function(c,b){for(var a=0;a<this;a++){c.call(b,a,this)}},toFloat:function(){return parseFloat(this)},toInt:function(a){return parseInt(this,a||10)}});Number.alias("times","each");(function(b){var a={};b.each(function(c){if(!Number[c]){a[c]=function(){return Math[c].apply(null,[this].concat($A(arguments)))}}});Number.implement(a)})(["abs","acos","asin","atan","atan2","ceil","cos","exp","floor","log","max","min","pow","sin","sqrt","tan"]);String.implement({test:function(a,b){return((typeof a=="string")?new RegExp(a,b):a).test(this)},contains:function(a,b){return(b)?(b+this+b).indexOf(b+a+b)>-1:this.indexOf(a)>-1},trim:function(){return this.replace(/^\s+|\s+$/g,"")},clean:function(){return this.replace(/\s+/g," ").trim()},camelCase:function(){return this.replace(/-\D/g,function(a){return a.charAt(1).toUpperCase()})},hyphenate:function(){return this.replace(/[A-Z]/g,function(a){return("-"+a.charAt(0).toLowerCase())})},capitalize:function(){return this.replace(/\b[a-z]/g,function(a){return a.toUpperCase()})},escapeRegExp:function(){return this.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},toInt:function(a){return parseInt(this,a||10)},toFloat:function(){return parseFloat(this)},hexToRgb:function(b){var a=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return(a)?a.slice(1).hexToRgb(b):null},rgbToHex:function(b){var a=this.match(/\d{1,3}/g);return(a)?a.rgbToHex(b):null},stripScripts:function(c){var a="";var b=this.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi,function(){a+=arguments[1]+"\n";return""});if(c===true){$exec(a)}else{if($type(c)=="function"){c(a,b)}}return b},substitute:function(a,b){return this.replace(b||(/\\?\{([^}]+)\}/g),function(c,d){if(c.charAt(0)=="\\"){return c.slice(1)}return(a[d]!=undefined)?a[d]:""})}});Hash.implement({has:Object.prototype.hasOwnProperty,keyOf:function(b){for(var a in this){if(this.hasOwnProperty(a)&&this[a]===b){return a}}return null},hasValue:function(a){return(Hash.keyOf(this,a)!==null)},extend:function(a){Hash.each(a,function(b,c){Hash.set(this,c,b)},this);return this},combine:function(a){Hash.each(a,function(b,c){Hash.include(this,c,b)},this);return this},erase:function(a){if(this.hasOwnProperty(a)){delete this[a]}return this},get:function(a){return(this.hasOwnProperty(a))?this[a]:null},set:function(a,b){if(!this[a]||this.hasOwnProperty(a)){this[a]=b}return this},empty:function(){Hash.each(this,function(b,a){delete this[a]},this);return this},include:function(c,b){var a=this[c];if(a==undefined){this[c]=b}return this},map:function(c,b){var a=new Hash;Hash.each(this,function(d,e){a.set(e,c.call(b,d,e,this))},this);return a},filter:function(c,b){var a=new Hash;Hash.each(this,function(d,e){if(c.call(b,d,e,this)){a.set(e,d)}},this);return a},every:function(c,b){for(var a in this){if(this.hasOwnProperty(a)&&!c.call(b,this[a],a)){return false}}return true},some:function(c,b){for(var a in this){if(this.hasOwnProperty(a)&&c.call(b,this[a],a)){return true}}return false},getKeys:function(){var a=[];Hash.each(this,function(b,c){a.push(c)});return a},getValues:function(){var a=[];Hash.each(this,function(b){a.push(b)});return a},toQueryString:function(a){var b=[];Hash.each(this,function(c,d){if(a){d=a+"["+d+"]"}var e;switch($type(c)){case"object":e=Hash.toQueryString(c,d);break;case"array":var f={};c.each(function(g,h){f[h]=g});e=Hash.toQueryString(f,d);break;default:e=d+"="+encodeURIComponent(c)}if(c!=undefined){b.push(e)}});return b.join("&")}});Hash.alias({keyOf:"indexOf",hasValue:"contains"});var Event=new Native({name:"Event",initialize:function(d,l){l=l||window;var g=l.document;d=d||l.event;if(d.$extended){return d}this.$extended=true;var h=d.type;var k=d.target||d.srcElement;while(k&&k.nodeType==3){k=k.parentNode}if(h.test(/key/)){var c=d.which||d.keyCode;var e=Event.Keys.keyOf(c);if(h=="keydown"){var a=c-111;if(a>0&&a<13){e="f"+a}}e=e||String.fromCharCode(c).toLowerCase()}else{if(h.match(/(click|mouse|menu)/i)){g=(!g.compatMode||g.compatMode=="CSS1Compat")?g.html:g.body;var i={x:d.pageX||d.clientX+g.scrollLeft,y:d.pageY||d.clientY+g.scrollTop};var b={x:(d.pageX)?d.pageX-l.pageXOffset:d.clientX,y:(d.pageY)?d.pageY-l.pageYOffset:d.clientY};if(h.match(/DOMMouseScroll|mousewheel/)){var j=(d.wheelDelta)?d.wheelDelta/120:-(d.detail||0)/3}var m=(d.which==3)||(d.button==2);var f=null;if(h.match(/over|out/)){switch(h){case"mouseover":f=d.relatedTarget||d.fromElement;break;case"mouseout":f=d.relatedTarget||d.toElement}if(!(function(){while(f&&f.nodeType==3){f=f.parentNode}return true}).create({attempt:Browser.Engine.gecko})()){f=false}}}}return $extend(this,{event:d,type:h,page:i,client:b,rightClick:m,wheel:j,relatedTarget:f,target:k,code:c,key:e,shift:d.shiftKey,control:d.ctrlKey,alt:d.altKey,meta:d.metaKey})}});Event.Keys=new Hash({enter:13,up:38,down:40,left:37,right:39,esc:27,space:32,backspace:8,tab:9,"delete":46});Event.implement({stop:function(){return this.stopPropagation().preventDefault()},stopPropagation:function(){if(this.event.stopPropagation){this.event.stopPropagation()}else{this.event.cancelBubble=true}return this},preventDefault:function(){if(this.event.preventDefault){this.event.preventDefault()}else{this.event.returnValue=false}return this}});var Class=new Native({name:"Class",initialize:function(b){b=b||{};var a=function(d){for(var e in this){this[e]=$unlink(this[e])}for(var c in Class.Mutators){if(!this[c]){continue}Class.Mutators[c](this,this[c]);delete this[c]}this.constructor=a;if(d===$empty){return this}var f=(this.initialize)?this.initialize.apply(this,arguments):this;if(this.options&&this.options.initialize){this.options.initialize.call(this)}return f};$extend(a,this);a.constructor=Class;a.prototype=b;return a}});Class.implement({implement:function(){Class.Mutators.Implements(this.prototype,Array.slice(arguments));return this}});Class.Mutators={Implements:function(a,b){$splat(b).each(function(c){$extend(a,($type(c)=="class")?new c($empty):c)})},Extends:function(self,klass){var instance=new klass($empty);delete instance.parent;delete instance.parentOf;for(var key in instance){var current=self[key],previous=instance[key];if(current==undefined){self[key]=previous;continue}var ctype=$type(current),ptype=$type(previous);if(ctype!=ptype){continue}switch(ctype){case"function":if(!arguments.callee.caller){self[key]=eval("("+String(current).replace(/\bthis\.parent\(\s*(\))?/g,function(full,close){return"arguments.callee._parent_.call(this"+(close||", ")})+")")}self[key]._parent_=previous;break;case"object":self[key]=$merge(previous,current)}}self.parent=function(){return arguments.callee.caller._parent_.apply(this,arguments)};self.parentOf=function(descendant){return descendant._parent_.apply(this,Array.slice(arguments,1))}}};var Chain=new Class({chain:function(){this.$chain=(this.$chain||[]).extend(arguments);return this},callChain:function(){return(this.$chain&&this.$chain.length)?this.$chain.shift().apply(this,arguments):false},clearChain:function(){if(this.$chain){this.$chain.empty()}return this}});var Events=new Class({addEvent:function(b,c,a){b=Events.removeOn(b);if(c!=$empty){this.$events=this.$events||{};this.$events[b]=this.$events[b]||[];this.$events[b].include(c);if(a){c.internal=true}}return this},addEvents:function(a){for(var b in a){this.addEvent(b,a[b])}return this},fireEvent:function(b,c,a){b=Events.removeOn(b);if(!this.$events||!this.$events[b]){return this}this.$events[b].each(function(d){d.create({bind:this,delay:a,"arguments":c})()},this);return this},removeEvent:function(b,a){b=Events.removeOn(b);if(!this.$events||!this.$events[b]){return this}if(!a.internal){this.$events[b].erase(a)}return this},removeEvents:function(c){for(var b in this.$events){if(c&&c!=b){continue}var d=this.$events[b];for(var a=d.length;a--;a){this.removeEvent(b,d[a])}}return this}});Events.removeOn=function(a){return a.replace(/^on([A-Z])/,function(c,b){return b.toLowerCase()})};var Options=new Class({setOptions:function(){this.options=$merge.run([this.options].extend(arguments));if(!this.addEvent){return this}for(var a in this.options){if($type(this.options[a])!="function"||!(/^on[A-Z]/).test(a)){continue}this.addEvent(a,this.options[a]);delete this.options[a]}return this}});Document.implement({newElement:function(a,b){if(Browser.Engine.trident&&b){["name","type","checked"].each(function(c){if(!b[c]){return}a+=" "+c+'="'+b[c]+'"';if(c!="checked"){delete b[c]}});a="<"+a+">"}return $.element(this.createElement(a)).set(b)},newTextNode:function(a){return this.createTextNode(a)},getDocument:function(){return this},getWindow:function(){return this.defaultView||this.parentWindow},purge:function(){var b=this.getElementsByTagName("*");for(var c=0,a=b.length;c<a;c++){Browser.freeMem(b[c])}}});var Element=new Native({name:"Element",legacy:window.Element,initialize:function(a,c){var b=Element.Constructors.get(a);if(b){return b(c)}if(typeof a=="string"){return document.newElement(a,c)}return $(a).set(c)},afterImplement:function(a,b){if(!Array[a]){Elements.implement(a,Elements.multi(a))}Element.Prototype[a]=b}});Element.Prototype={$family:{name:"element"}};Element.Constructors=new Hash;var IFrame=new Native({name:"IFrame",generics:false,initialize:function(){var b=Array.link(arguments,{properties:Object.type,iframe:$defined});var d=b.properties||{};var e=$(b.iframe)||false;var c=d.onload||$empty;delete d.onload;d.id=d.name=$pick(d.id,d.name,e.id,e.name,"IFrame_"+$time());e=new Element(e||"iframe",d);var a=function(){var h=$try(function(){return e.contentWindow.location.host});if(h&&h==window.location.host){var f=new Window(e.contentWindow);var g=new Document(e.contentWindow.document);$extend(f.Element.prototype,Element.Prototype)}c.call(e.contentWindow,e.contentWindow.document)};(!window.frames[d.id])?e.addListener("load",a):a();return e}});var Elements=new Native({initialize:function(c,g){g=$extend({ddup:true,cash:true},g);c=c||[];if(g.ddup||g.cash){var b={},d=[];for(var f=0,a=c.length;f<a;f++){var e=$.element(c[f],!g.cash);if(g.ddup){if(b[e.uid]){continue}b[e.uid]=true}d.push(e)}c=d}return(g.cash)?$extend(c,this):c}});Elements.implement({filter:function(a,b){if(!a){return this}return new Elements(Array.filter(this,(typeof a=="string")?function(c){return c.match(a)}:a,b))}});Elements.multi=function(a){return function(){var f=[];var b=true;for(var d=0,e=this.length;d<e;d++){var c=this[d][a].apply(this[d],arguments);f.push(c);if(b){b=($type(c)=="element")}}return(b)?new Elements(f):f}};Window.implement({$:function(c,b){if(c&&c.$family&&c.uid){return c}var a=$type(c);return($[a])?$[a](c,b,this.document):null},$$:function(a){if(arguments.length==1&&typeof a=="string"){return this.document.getElements(a)}var b=[];var e=Array.flatten(arguments);for(var d=0,f=e.length;d<f;d++){var c=e[d];switch($type(c)){case"element":c=[c];break;case"string":c=this.document.getElements(c,true);break;default:c=false}if(c){b.extend(c)}}return new Elements(b)},getDocument:function(){return this.document},getWindow:function(){return this}});$.string=function(b,c,a){b=a.getElementById(b);return(b)?$.element(b,c):null};$.element=function(a,b){$uid(a);if(!b&&!a.$family&&!(/^object|embed$/i).test(a.tagName)){var d=Element.Prototype;for(var c in d){a[c]=d[c]}}return a};$.object=function(c,b,a){if(c.toElement){return $.element(c.toElement(a),b)}return null};$.textnode=$.whitespace=$.window=$.document=$arguments(0);Native.implement([Element,Document],{getElement:function(a,b){return $(this.getElements(a,true)[0]||null,b)},getElements:function(a,b){a=a.split(",");var c=[];var d=(a.length>1);a.each(function(f){var e=this.getElementsByTagName(f.trim());(d)?c.extend(e):c=e},this);return new Elements(c,{ddup:d,cash:!b})}});Element.Storage={get:function(a){return(this[a]||(this[a]={}))}};Element.Inserters=new Hash({before:function(b,a){if(a.parentNode){a.parentNode.insertBefore(b,a)}},after:function(c,a){if(!a.parentNode){return}var b=a.nextSibling;(b)?a.parentNode.insertBefore(c,b):a.parentNode.appendChild(c)},bottom:function(b,a){a.appendChild(b)},top:function(c,a){var b=a.firstChild;(b)?a.insertBefore(c,b):a.appendChild(c)}});Element.Inserters.inside=Element.Inserters.bottom;Element.Inserters.each(function(b,c){var a=c.capitalize();Element.implement("inject"+a,function(d){b(this,$(d,true));return this});Element.implement("grab"+a,function(d){b($(d,true),this);return this})});Element.implement({getDocument:function(){return this.ownerDocument},getWindow:function(){return this.ownerDocument.getWindow()},getElementById:function(b,c){var d=this.ownerDocument.getElementById(b);if(!d){return null}for(var a=d.parentNode;a!=this;a=a.parentNode){if(!a){return null}}return $.element(d,c)},set:function(b,d){switch($type(b)){case"object":for(var c in b){this.set(c,b[c])}break;case"string":var a=Element.Properties.get(b);(a&&a.set)?a.set.apply(this,Array.slice(arguments,1)):this.setProperty(b,d)}return this},get:function(b){var a=Element.Properties.get(b);return(a&&a.get)?a.get.apply(this,Array.slice(arguments,1)):this.getProperty(b)},erase:function(b){var a=Element.Properties.get(b);(a&&a.erase)?a.erase.apply(this,Array.slice(arguments,1)):this.removeProperty(b);return this},match:function(a){return(!a||Element.get(this,"tag")==a)},inject:function(b,a){Element.Inserters.get(a||"bottom")(this,$(b,true));return this},wraps:function(b,a){b=$(b,true);return this.replaces(b).grab(b,a)},grab:function(b,a){Element.Inserters.get(a||"bottom")($(b,true),this);return this},appendText:function(b,a){return this.grab(this.getDocument().newTextNode(b),a)},adopt:function(){Array.flatten(arguments).each(function(a){a=$(a,true);if(a){this.appendChild(a)}},this);return this},dispose:function(){return(this.parentNode)?this.parentNode.removeChild(this):this},clone:function(a,b){switch($type(this)){case"element":var i={};for(var j=0,l=this.attributes.length;j<l;j++){var c=this.attributes[j],e=c.nodeName.toLowerCase();if(Browser.Engine.trident&&(/input/i).test(this.tagName)&&(/width|height/).test(e)){continue}var f=(e=="style"&&this.style)?this.style.cssText:c.nodeValue;if(!$chk(f)||e=="uid"||(e=="id"&&!b)){continue}if(f!="inherit"&&["string","number"].contains($type(f))){i[e]=f}}var g=new Element(this.nodeName.toLowerCase(),i);if(a!==false){for(var h=0,k=this.childNodes.length;h<k;h++){var d=Element.clone(this.childNodes[h],true,b);if(d){g.grab(d)}}}return g;case"textnode":return document.newTextNode(this.nodeValue)}return null},replaces:function(a){a=$(a,true);a.parentNode.replaceChild(this,a);return this},hasClass:function(a){return this.className.contains(a," ")},addClass:function(a){if(!this.hasClass(a)){this.className=(this.className+" "+a).clean()}return this},removeClass:function(a){this.className=this.className.replace(new RegExp("(^|\\s)"+a+"(?:\\s|$)"),"$1").clean();return this},toggleClass:function(a){return this.hasClass(a)?this.removeClass(a):this.addClass(a)},getComputedStyle:function(b){if(this.currentStyle){return this.currentStyle[b.camelCase()]}var a=this.getWindow().getComputedStyle(this,null);return(a)?a.getPropertyValue([b.hyphenate()]):null},empty:function(){$A(this.childNodes).each(function(a){Browser.freeMem(a);Element.empty(a);Element.dispose(a)},this);return this},destroy:function(){Browser.freeMem(this.empty().dispose());return null},getSelected:function(){return new Elements($A(this.options).filter(function(a){return a.selected}))},toQueryString:function(){var a=[];this.getElements("input, select, textarea").each(function(c){if(!c.name||c.disabled){return}var b=(c.tagName.toLowerCase()=="select")?Element.getSelected(c).map(function(d){return d.value}):((c.type=="radio"||c.type=="checkbox")&&!c.checked)?null:c.value;$splat(b).each(function(d){if(d){a.push(c.name+"="+encodeURIComponent(d))}})});return a.join("&")},getProperty:function(c){var d=Element.Attributes,a=d.Props[c];var b=(a)?this[a]:this.getAttribute(c,2);return(d.Bools[c])?!!b:(a)?b:b||null},getProperties:function(){var a=$A(arguments);return a.map(function(b){return this.getProperty(b)},this).associate(a)},setProperty:function(c,b){var d=Element.Attributes,e=d.Props[c],a=$defined(b);if(e&&d.Bools[c]){b=(b||!a)?true:false}else{if(!a){return this.removeProperty(c)}}(e)?this[e]=b:this.setAttribute(c,b);return this},setProperties:function(a){for(var b in a){this.setProperty(b,a[b])}return this},removeProperty:function(b){var c=Element.Attributes,d=c.Props[b],a=(d&&c.Bools[b]);(d)?this[d]=(a)?false:"":this.removeAttribute(b);return this},removeProperties:function(){Array.each(arguments,this.removeProperty,this);return this}});(function(){var a=function(g,i,b,h,e,c){var f=g[b||i];var d=[];while(f){if(f.nodeType==1&&(!h||Element.match(f,h))){d.push(f);if(!e){break}}f=f[i]}return(e)?new Elements(d,{ddup:false,cash:!c}):$(d[0],c)};Element.implement({getPrevious:function(c,b){return a(this,"previousSibling",null,c,false,b)},getAllPrevious:function(c,b){return a(this,"previousSibling",null,c,true,b)},getNext:function(c,b){return a(this,"nextSibling",null,c,false,b)},getAllNext:function(c,b){return a(this,"nextSibling",null,c,true,b)},getFirst:function(c,b){return a(this,"nextSibling","firstChild",c,false,b)},getLast:function(c,b){return a(this,"previousSibling","lastChild",c,false,b)},getParent:function(c,b){return a(this,"parentNode",null,c,false,b)},getParents:function(c,b){return a(this,"parentNode",null,c,true,b)},getChildren:function(c,b){return a(this,"nextSibling","firstChild",c,true,b)},hasChild:function(b){b=$(b,true);return(!!b&&$A(this.getElementsByTagName(b.tagName)).contains(b))}})})();Element.Properties=new Hash;Element.Properties.style={set:function(a){this.style.cssText=a},get:function(){return this.style.cssText},erase:function(){this.style.cssText=""}};Element.Properties.tag={get:function(){return this.tagName.toLowerCase()}};Element.Properties.href={get:function(){return(!this.href)?null:this.href.replace(new RegExp("^"+document.location.protocol+"//"+document.location.host),"")}};Element.Properties.html={set:function(){return this.innerHTML=Array.flatten(arguments).join("")}};Native.implement([Element,Window,Document],{addListener:function(b,a){if(this.addEventListener){this.addEventListener(b,a,false)}else{this.attachEvent("on"+b,a)}return this},removeListener:function(b,a){if(this.removeEventListener){this.removeEventListener(b,a,false)}else{this.detachEvent("on"+b,a)}return this},retrieve:function(d,a){var b=Element.Storage.get(this.uid);var c=b[d];if($defined(a)&&!$defined(c)){c=b[d]=a}return $pick(c)},store:function(c,a){var b=Element.Storage.get(this.uid);b[c]=a;return this},eliminate:function(a){var b=Element.Storage.get(this.uid);delete b[a];return this}});Element.Attributes=new Hash({Props:{html:"innerHTML","class":"className","for":"htmlFor",text:(Browser.Engine.trident)?"innerText":"textContent"},Bools:["compact","nowrap","ismap","declare","noshade","checked","disabled","readonly","multiple","selected","noresize","defer"],Camels:["value","accessKey","cellPadding","cellSpacing","colSpan","frameBorder","maxLength","readOnly","rowSpan","tabIndex","useMap"]});Browser.freeMem=function(a){if(!a){return}if(Browser.Engine.trident&&(/object/i).test(a.tagName)){for(var b in a){if(typeof a[b]=="function"){a[b]=$empty}}Element.dispose(a)}if(a.uid&&a.removeEvents){a.removeEvents()}};(function(c){var b=c.Bools,a=c.Camels;c.Bools=b=b.associate(b);Hash.extend(Hash.combine(c.Props,b),a.associate(a.map(function(d){return d.toLowerCase()})));c.erase("Camels")})(Element.Attributes);window.addListener("unload",function(){window.removeListener("unload",arguments.callee);document.purge();if(Browser.Engine.trident){CollectGarbage()}});Element.Properties.events={set:function(a){this.addEvents(a)}};Native.implement([Element,Window,Document],{addEvent:function(i,g){var f=this.retrieve("events",{});f[i]=f[i]||{keys:[],values:[]};if(f[i].keys.contains(g)){return this}f[i].keys.push(g);var h=i,d=Element.Events.get(i),b=g,e=this;if(d){if(d.onAdd){d.onAdd.call(this,g)}if(d.condition){b=function(j){if(d.condition.call(this,j)){return g.call(this,j)}return false}}h=d.base||h}var a=function(){return g.call(e)};var c=Element.NativeEvents[h]||0;if(c){if(c==2){a=function(j){j=new Event(j,e.getWindow());if(b.call(e,j)===false){j.stop()}}}this.addListener(h,a)}f[i].values.push(a);return this},removeEvent:function(e,f){var g=this.retrieve("events");if(!g||!g[e]){return this}var b=g[e].keys.indexOf(f);if(b==-1){return this}var a=g[e].keys.splice(b,1)[0];var c=g[e].values.splice(b,1)[0];var d=Element.Events.get(e);if(d){if(d.onRemove){d.onRemove.call(this,f)}e=d.base||e}return(Element.NativeEvents[e])?this.removeListener(e,c):this},addEvents:function(a){for(var b in a){this.addEvent(b,a[b])}return this},removeEvents:function(c){var a=this.retrieve("events");if(!a){return this}if(!c){for(var b in a){this.removeEvents(b)}a=null}else{if(a[c]){while(a[c].keys[0]){this.removeEvent(c,a[c].keys[0])}a[c]=null}}return this},fireEvent:function(b,d,a){var c=this.retrieve("events");if(!c||!c[b]){return this}c[b].keys.each(function(e){e.create({bind:this,delay:a,"arguments":d})()},this);return this},cloneEvents:function(b,a){b=$(b);var c=b.retrieve("events");if(!c){return this}if(!a){for(var d in c){this.cloneEvents(b,d)}}else{if(c[a]){c[a].keys.each(function(e){this.addEvent(a,e)},this)}}return this}});Element.NativeEvents={click:2,dblclick:2,mouseup:2,mousedown:2,contextmenu:2,mousewheel:2,DOMMouseScroll:2,mouseover:2,mouseout:2,mousemove:2,selectstart:2,selectend:2,keydown:2,keypress:2,keyup:2,focus:2,blur:2,change:2,reset:2,select:2,submit:2,load:1,unload:1,beforeunload:2,resize:1,move:1,DOMContentLoaded:1,readystatechange:1,error:1,abort:1,scroll:1};(function(){var a=function(c){var b=c.relatedTarget;if(b==undefined){return true}if(b===false){return false}return($type(this)!="document"&&b!=this&&b.prefix!="xul"&&!this.hasChild(b))};Element.Events=new Hash({mouseenter:{base:"mouseover",condition:a},mouseleave:{base:"mouseout",condition:a},mousewheel:{base:(Browser.Engine.gecko)?"DOMMouseScroll":"mousewheel"}})})();Element.Properties.styles={set:function(a){this.setStyles(a)}};Element.Properties.opacity={set:function(a,b){if(!b){if(a==0){if(this.style.visibility!="hidden"){this.style.visibility="hidden"}}else{if(this.style.visibility!="visible"){this.style.visibility="visible"}}}if(!this.currentStyle||!this.currentStyle.hasLayout){this.style.zoom=1}if(Browser.Engine.trident){this.style.filter=(a==1)?"":"alpha(opacity="+a*100+")"}this.style.opacity=a;this.store("opacity",a)},get:function(){return this.retrieve("opacity",1)}};Element.implement({setOpacity:function(a){return this.set("opacity",a,true)},getOpacity:function(){return this.get("opacity")},setStyle:function(c,a){switch(c){case"opacity":return this.set("opacity",parseFloat(a));case"float":c=(Browser.Engine.trident)?"styleFloat":"cssFloat"}c=c.camelCase();if($type(a)!="string"){var b=(Element.Styles.get(c)||"@").split(" ");a=$splat(a).map(function(d,e){if(!b[e]){return""}return($type(d)=="number")?b[e].replace("@",Math.round(d)):d}).join(" ")}else{if(a==String(Number(a))){a=Math.round(a)}}this.style[c]=a;return this},getStyle:function(b){switch(b){case"opacity":return this.get("opacity");case"float":b=(Browser.Engine.trident)?"styleFloat":"cssFloat"}b=b.camelCase();var a=this.style[b];if(!$chk(a)){a=[];for(var c in Element.ShortStyles){if(b!=c){continue}for(var d in Element.ShortStyles[c]){a.push(this.getStyle(d))}return a.join(" ")}a=this.getComputedStyle(b)}if(a){a=String(a);var f=a.match(/rgba?\([\d\s,]+\)/);if(f){a=a.replace(f[0],f[0].rgbToHex())}}if(Browser.Engine.presto||(Browser.Engine.trident&&!$chk(parseInt(a)))){if(b.test(/^(height|width)$/)){var g=(b=="width")?["left","right"]:["top","bottom"],e=0;g.each(function(h){e+=this.getStyle("border-"+h+"-width").toInt()+this.getStyle("padding-"+h).toInt()},this);return this["offset"+b.capitalize()]-e+"px"}if(Browser.Engine.presto&&String(a).test("px")){return a}if(b.test(/(border(.+)Width|margin|padding)/)){return"0px"}}return a},setStyles:function(b){for(var a in b){this.setStyle(a,b[a])}return this},getStyles:function(){var a={};Array.each(arguments,function(b){a[b]=this.getStyle(b)},this);return a}});Element.Styles=new Hash({left:"@px",top:"@px",bottom:"@px",right:"@px",width:"@px",height:"@px",maxWidth:"@px",maxHeight:"@px",minWidth:"@px",minHeight:"@px",backgroundColor:"rgb(@, @, @)",backgroundPosition:"@px @px",color:"rgb(@, @, @)",fontSize:"@px",letterSpacing:"@px",lineHeight:"@px",clip:"rect(@px @px @px @px)",margin:"@px @px @px @px",padding:"@px @px @px @px",border:"@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)",borderWidth:"@px @px @px @px",borderStyle:"@ @ @ @",borderColor:"rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)",zIndex:"@",zoom:"@",fontWeight:"@",textIndent:"@px",opacity:"@"});Element.ShortStyles={margin:{},padding:{},border:{},borderWidth:{},borderStyle:{},borderColor:{}};["Top","Right","Bottom","Left"].each(function(b){var c=Element.ShortStyles;var g=Element.Styles;["margin","padding"].each(function(i){var h=i+b;c[i][h]=g[h]="@px"});var d="border"+b;c.border[d]=g[d]="@px @ rgb(@, @, @)";var e=d+"Width",a=d+"Style",f=d+"Color";c[d]={};c.borderWidth[e]=c[d][e]=g[e]="@px";c.borderStyle[a]=c[d][a]=g[a]="@";c.borderColor[f]=c[d][f]=g[f]="rgb(@, @, @)"});(function(){Element.implement({scrollTo:function(i,h){if(g(this)){this.getWindow().scrollTo(i,h)}else{this.scrollLeft=i;this.scrollTop=h}return this},getSize:function(){if(g(this)){return this.getWindow().getSize()}return{x:this.offsetWidth,y:this.offsetHeight}},getScrollSize:function(){if(g(this)){return this.getWindow().getScrollSize()}return{x:this.scrollWidth,y:this.scrollHeight}},getScroll:function(){if(g(this)){return this.getWindow().getScroll()}return{x:this.scrollLeft,y:this.scrollTop}},getScrolls:function(){var h=this,i={x:0,y:0};while(h&&!g(h)){i.x+=h.scrollLeft;i.y+=h.scrollTop;h=h.parentNode}return i},getOffsetParent:function(){var h=this;if(g(h)){return null}if(!Browser.Engine.trident){return h.offsetParent}while((h=h.parentNode)&&!g(h)){if(e(h,"position")!="static"){return h}}return null},getOffsets:function(){var i=this,j={x:0,y:0};if(g(this)){return j}while(i&&!g(i)){j.x+=i.offsetLeft;j.y+=i.offsetTop;if(Browser.Engine.gecko){if(!c(i)){j.x+=f(i);j.y+=b(i)}var h=i.parentNode;if(h&&e(h,"overflow")!="visible"){j.x+=f(h);j.y+=b(h)}}else{if(i!=this&&(Browser.Engine.trident||Browser.Engine.webkit)){j.x+=f(i);j.y+=b(i)}}i=i.offsetParent;if(Browser.Engine.trident){while(i&&!i.currentStyle.hasLayout){i=i.offsetParent}}}if(Browser.Engine.gecko&&!c(this)){j.x-=f(this);j.y-=b(this)}return j},getPosition:function(i){if(g(this)){return{x:0,y:0}}var h=this.getOffsets(),k=this.getScrolls();var l={x:h.x-k.x,y:h.y-k.y};var j=(i&&(i=$(i)))?i.getPosition():{x:0,y:0};return{x:l.x-j.x,y:l.y-j.y}},getCoordinates:function(i){if(g(this)){return this.getWindow().getCoordinates()}var k=this.getPosition(i),j=this.getSize();var h={left:k.x,top:k.y,width:j.x,height:j.y};h.right=h.left+h.width;h.bottom=h.top+h.height;return h},computePosition:function(h){return{left:h.x-d(this,"margin-left"),top:h.y-d(this,"margin-top")}},position:function(h){return this.setStyles(this.computePosition(h))}});Native.implement([Document,Window],{getSize:function(){var h=this.getWindow();if(Browser.Engine.presto||Browser.Engine.webkit){return{x:h.innerWidth,y:h.innerHeight}}var i=a(this);return{x:i.clientWidth,y:i.clientHeight}},getScroll:function(){var h=this.getWindow();var i=a(this);return{x:h.pageXOffset||i.scrollLeft,y:h.pageYOffset||i.scrollTop}},getScrollSize:function(){var h=a(this);var i=this.getSize();return{x:Math.max(h.scrollWidth,i.x),y:Math.max(h.scrollHeight,i.y)}},getPosition:function(){return{x:0,y:0}},getCoordinates:function(){var h=this.getSize();return{top:0,left:0,bottom:h.y,right:h.x,height:h.y,width:h.x}}});var e=Element.getComputedStyle;function d(i,h){return e(i,h).toInt()||0}function c(h){return e(h,"-moz-box-sizing")=="border-box"}function b(h){return d(h,"border-top-width")}function f(h){return d(h,"border-left-width")}function g(h){return(/^(?:body|html)$/i).test(h.tagName)}function a(i){var h=i.getDocument();return(!h.compatMode||h.compatMode=="CSS1Compat")?h.html:h.body}})();Native.implement([Window,Document,Element],{getHeight:function(){return this.getSize().y},getWidth:function(){return this.getSize().x},getScrollTop:function(){return this.getScroll().y},getScrollLeft:function(){return this.getScroll().x},getScrollHeight:function(){return this.getScrollSize().y},getScrollWidth:function(){return this.getScrollSize().x},getTop:function(){return this.getPosition().y},getLeft:function(){return this.getPosition().x}});Native.implement([Document,Element],{getElements:function(b,c){b=b.split(",");var g,e={};for(var f=0,h=b.length;f<h;f++){var a=b[f],d=Selectors.Utils.search(this,a,e);if(f!=0&&d.item){d=$A(d)}g=(f==0)?d:(g.item)?$A(g).concat(d):g.concat(d)}return new Elements(g,{ddup:(b.length>1),cash:!c})}});Element.implement({match:function(e){if(!e){return true}var c=Selectors.Utils.parseTagAndID(e);var a=c[0],b=c[1];if(!Selectors.Filters.byID(this,b)||!Selectors.Filters.byTag(this,a)){return false}var d=Selectors.Utils.parseSelector(e);return(d)?Selectors.Utils.filter(this,d,{}):true}});var Selectors={Cache:{nth:{},parsed:{}}};Selectors.RegExps={id:(/#([\w-]+)/),tag:(/^(\w+|\*)/),quick:(/^(\w+|\*)$/),splitter:(/\s*([+>~\s])\s*([a-zA-Z#.*:\[])/g),combined:(/\.([\w-]+)|\[(\w+)(?:([!*^$~|]?=)["']?(.*?)["']?)?\]|:([\w-]+)(?:\(["']?(.*?)?["']?\)|$)/g)};Selectors.Utils={chk:function(c,b){if(!b){return true}var a=$uid(c);if(!b[a]){return b[a]=true}return false},parseNthArgument:function(b){if(Selectors.Cache.nth[b]){return Selectors.Cache.nth[b]}var e=b.match(/^([+-]?\d*)?([a-z]+)?([+-]?\d*)?$/);if(!e){return false}var c=parseInt(e[1]);var f=(c||c===0)?c:1;var d=e[2]||false;var a=parseInt(e[3])||0;if(f!=0){a--;while(a<1){a+=f}while(a>=f){a-=f}}else{f=a;d="index"}switch(d){case"n":e={a:f,b:a,special:"n"};break;case"odd":e={a:2,b:0,special:"n"};break;case"even":e={a:2,b:1,special:"n"};break;case"first":e={a:0,special:"index"};break;case"last":e={special:"last-child"};break;case"only":e={special:"only-child"};break;default:e={a:(f-1),special:"index"}}return Selectors.Cache.nth[b]=e},parseSelector:function(j){if(Selectors.Cache.parsed[j]){return Selectors.Cache.parsed[j]}var a,g={classes:[],pseudos:[],attributes:[]};while((a=Selectors.RegExps.combined.exec(j))){var f=a[1],h=a[2],i=a[3],c=a[4],b=a[5],e=a[6];if(f){g.classes.push(f)}else{if(b){var d=Selectors.Pseudo.get(b);if(d){g.pseudos.push({parser:d,argument:e})}else{g.attributes.push({name:b,operator:"=",value:e})}}else{if(h){g.attributes.push({name:h,operator:i,value:c})}}}}if(!g.classes.length){delete g.classes}if(!g.attributes.length){delete g.attributes}if(!g.pseudos.length){delete g.pseudos}if(!g.classes&&!g.attributes&&!g.pseudos){g=null}return Selectors.Cache.parsed[j]=g},parseTagAndID:function(c){var a=c.match(Selectors.RegExps.tag);var b=c.match(Selectors.RegExps.id);return[(a)?a[1]:"*",(b)?b[1]:false]},filter:function(c,f,d){var e;if(f.classes){for(e=f.classes.length;e--;e){var b=f.classes[e];if(!Selectors.Filters.byClass(c,b)){return false}}}if(f.attributes){for(e=f.attributes.length;e--;e){var g=f.attributes[e];if(!Selectors.Filters.byAttribute(c,g.name,g.operator,g.value)){return false}}}if(f.pseudos){for(e=f.pseudos.length;e--;e){var a=f.pseudos[e];if(!Selectors.Filters.byPseudo(c,a.parser,a.argument,d)){return false}}}return true},getByTagAndID:function(d,a,b){if(b){var c=(d.getElementById)?d.getElementById(b,true):Element.getElementById(d,b,true);return(c&&Selectors.Filters.byTag(c,a))?[c]:[]}else{return d.getElementsByTagName(a)}},search:function(n,o,i){var v=[];var u=o.trim().replace(Selectors.RegExps.splitter,function(x,y,z){v.push(y);return":)"+z}).split(":)");var m,r,s,b;for(var c=0,g=u.length;c<g;c++){var d=u[c];if(c==0&&Selectors.RegExps.quick.test(d)){m=n.getElementsByTagName(d);continue}var w=v[c-1];var l=Selectors.Utils.parseTagAndID(d);var a=l[0],k=l[1];if(c==0){m=Selectors.Utils.getByTagAndID(n,a,k)}else{var t={},p=[];for(var e=0,f=m.length;e<f;e++){p=Selectors.Getters[w](p,m[e],a,k,t)}m=p}var q=Selectors.Utils.parseSelector(d);if(q){s=[];for(var h=0,j=m.length;h<j;h++){b=m[h];if(Selectors.Utils.filter(b,q,i)){s.push(b)}}m=s}}return m}};Selectors.Getters={" ":function(f,g,e,d,i){var a=Selectors.Utils.getByTagAndID(g,e,d);for(var b=0,c=a.length;b<c;b++){var h=a[b];if(Selectors.Utils.chk(h,i)){f.push(h)}}return f},">":function(f,g,e,d,h){var b=Selectors.Utils.getByTagAndID(g,e,d);for(var i=0,a=b.length;i<a;i++){var c=b[i];if(c.parentNode==g&&Selectors.Utils.chk(c,h)){f.push(c)}}return f},"+":function(d,e,a,b,c){while((e=e.nextSibling)){if(e.nodeType==1){if(Selectors.Utils.chk(e,c)&&Selectors.Filters.byTag(e,a)&&Selectors.Filters.byID(e,b)){d.push(e)}break}}return d},"~":function(d,e,a,b,c){while((e=e.nextSibling)){if(e.nodeType==1){if(!Selectors.Utils.chk(e,c)){break}if(Selectors.Filters.byTag(e,a)&&Selectors.Filters.byID(e,b)){d.push(e)}}}return d}};Selectors.Filters={byTag:function(b,a){return(a=="*"||(b.tagName&&b.tagName.toLowerCase()==a))},byID:function(a,b){return(!b||(a.id&&a.id==b))},byClass:function(b,a){return(b.className&&b.className.contains(a," "))},byPseudo:function(a,b,c,d){return b.call(a,c,d)},byAttribute:function(d,c,e,b){var a=Element.prototype.getProperty.call(d,c);if(!a){return false}if(!e||b==undefined){return true}switch(e){case"=":return(a==b);case"*=":return(a.contains(b));case"^=":return(a.substr(0,b.length)==b);case"$=":return(a.substr(a.length-b.length)==b);case"!=":return(a!=b);case"~=":return a.contains(b," ");case"|=":return a.contains(b,"-")}return false}};Selectors.Pseudo=new Hash({empty:function(){return !(this.innerText||this.textContent||"").length},not:function(a){return !Element.match(this,a)},contains:function(a){return(this.innerText||this.textContent||"").contains(a)},"first-child":function(){return Selectors.Pseudo.index.call(this,0)},"last-child":function(){var a=this;while((a=a.nextSibling)){if(a.nodeType==1){return false}}return true},"only-child":function(){var b=this;while((b=b.previousSibling)){if(b.nodeType==1){return false}}var a=this;while((a=a.nextSibling)){if(a.nodeType==1){return false}}return true},"nth-child":function(b,d){b=(b==undefined)?"n":b;var f=Selectors.Utils.parseNthArgument(b);if(f.special!="n"){return Selectors.Pseudo[f.special].call(this,f.a,d)}var c=0;d.positions=d.positions||{};var e=$uid(this);if(!d.positions[e]){var g=this;while((g=g.previousSibling)){if(g.nodeType!=1){continue}c++;var a=d.positions[$uid(g)];if(a!=undefined){c=a+c;break}}d.positions[e]=c}return(d.positions[e]%f.a==f.b)},index:function(a){var c=this,b=0;while((c=c.previousSibling)){if(c.nodeType==1&&++b>a){return false}}return(b==a)},even:function(b,a){return Selectors.Pseudo["nth-child"].call(this,"2n+1",a)},odd:function(b,a){return Selectors.Pseudo["nth-child"].call(this,"2n",a)}});Element.Events.domready={onAdd:function(a){if(Browser.loaded){a.call(this)}}};(function(){var b=function(){if(Browser.loaded){return}Browser.loaded=true;window.fireEvent("domready");document.fireEvent("domready")};switch(Browser.Engine.name){case"webkit":(function(){(["loaded","complete"].contains(document.readyState))?b():arguments.callee.delay(50)})();break;case"trident":var a=document.createElement("div");(function(){($try(function(){a.doScroll("left");return $(a).inject(document.body).set("html","temp").dispose()}))?b():arguments.callee.delay(50)})();break;default:window.addEvent("load",b);document.addEvent("DOMContentLoaded",b)}})();var JSON=new Hash({encode:function(b){switch($type(b)){case"string":return'"'+b.replace(/[\x00-\x1f\\"]/g,JSON.$replaceChars)+'"';case"array":return"["+String(b.map(JSON.encode).filter($defined))+"]";case"object":case"hash":var a=[];Hash.each(b,function(c,d){var e=JSON.encode(c);if(e){a.push(JSON.encode(d)+":"+e)}});return"{"+a+"}";case"number":case"boolean":return String(b);case false:return"null"}return null},$specialChars:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},$replaceChars:function(a){return JSON.$specialChars[a]||"\\u00"+Math.floor(a.charCodeAt()/16).toString(16)+(a.charCodeAt()%16).toString(16)},decode:function(string,secure){if($type(string)!="string"||!string.length){return null}if(secure&&!(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(string.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""))){return null}return eval("("+string+")")}});Native.implement([Hash,Array,String,Number],{toJSON:function(){return JSON.encode(this)}});var Cookie=new Class({Implements:Options,options:{path:false,domain:false,duration:false,secure:false,document:document},initialize:function(b,a){this.key=b;this.setOptions(a)},write:function(b){b=encodeURIComponent(b);if(this.options.domain){b+="; domain="+this.options.domain}if(this.options.path){b+="; path="+this.options.path}if(this.options.duration){var a=new Date();a.setTime(a.getTime()+this.options.duration*24*60*60*1000);b+="; expires="+a.toGMTString()}if(this.options.secure){b+="; secure"}this.options.document.cookie=this.key+"="+b;return this},read:function(){var a=this.options.document.cookie.match("(?:^|;)\\s*"+this.key.escapeRegExp()+"=([^;]*)");return(a)?decodeURIComponent(a[1]):null},dispose:function(){new Cookie(this.key,$merge(this.options,{duration:-1})).write("");return this}});Cookie.write=function(c,b,a){return new Cookie(c,a).write(b)};Cookie.read=function(a){return new Cookie(a).read()};Cookie.dispose=function(b,a){return new Cookie(b,a).dispose()};var Swiff=new Class({Implements:[Options],options:{id:null,height:1,width:1,container:null,properties:{},params:{quality:"high",allowScriptAccess:"always",wMode:"transparent",swLiveConnect:true},callBacks:{},vars:{}},toElement:function(){return this.object},initialize:function(f,e){this.instance="Swiff_"+$time();this.setOptions(e);e=this.options;var c=this.id=e.id||this.instance;var d=$(e.container);Swiff.CallBacks[this.instance]={};var m=e.params,k=e.vars,l=e.callBacks;var j=$extend({height:e.height,width:e.width},e.properties);var g=this;for(var a in l){Swiff.CallBacks[this.instance][a]=(function(n){return function(){return n.apply(g.object,arguments)}})(l[a]);k[a]="Swiff.CallBacks."+this.instance+"."+a}m.flashVars=Hash.toQueryString(k);if(Browser.Engine.trident){j.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";m.movie=f}else{j.type="application/x-shockwave-flash";j.data=f}var h='<object id="'+c+'"';for(var i in j){h+=" "+i+'="'+j[i]+'"'}h+=">";for(var b in m){if(m[b]){h+='<param name="'+b+'" value="'+m[b]+'" />'}}h+="</object>";this.object=((d)?d.empty():new Element("div")).set("html",h).firstChild},replaces:function(a){a=$(a,true);a.parentNode.replaceChild(this.toElement(),a);return this},inject:function(a){$(a,true).appendChild(this.toElement());return this},remote:function(){return Swiff.remote.apply(Swiff,[this.toElement()].extend(arguments))}});Swiff.CallBacks={};Swiff.remote=function(obj,fn){var rs=obj.CallFunction('<invoke name="'+fn+'" returntype="javascript">'+__flash__argumentsToXML(arguments,2)+"</invoke>");return eval(rs)};var Fx=new Class({Implements:[Chain,Events,Options],options:{fps:50,unit:false,duration:500,link:"ignore",transition:function(a){return -(Math.cos(Math.PI*a)-1)/2}},initialize:function(a){this.subject=this.subject||this;this.setOptions(a);this.options.duration=Fx.Durations[this.options.duration]||this.options.duration.toInt();var b=this.options.wait;if(b===false){this.options.link="cancel"}},step:function(){var a=$time();if(a<this.time+this.options.duration){var b=this.options.transition((a-this.time)/this.options.duration);this.set(this.compute(this.from,this.to,b))}else{this.set(this.compute(this.from,this.to,1));this.complete()}},set:function(a){return a},compute:function(b,c,a){return Fx.compute(b,c,a)},check:function(a){if(!this.timer){return true}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(a.bind(this,Array.slice(arguments,1)));return false}return false},start:function(b,a){if(!this.check(arguments.callee,b,a)){return this}this.from=b;this.to=a;this.time=0;this.startTimer();this.onStart();return this},complete:function(){if(this.stopTimer()){this.onComplete()}return this},cancel:function(){if(this.stopTimer()){this.onCancel()}return this},onStart:function(){this.fireEvent("start",this.subject)},onComplete:function(){this.fireEvent("complete",this.subject);if(!this.callChain()){this.fireEvent("chainComplete",this.subject)}},onCancel:function(){this.fireEvent("cancel",this.subject).clearChain()},pause:function(){this.stopTimer();return this},resume:function(){this.startTimer();return this},stopTimer:function(){if(!this.timer){return false}this.time=$time()-this.time;this.timer=$clear(this.timer);return true},startTimer:function(){if(this.timer){return false}this.time=$time()-this.time;this.timer=this.step.periodical(Math.round(1000/this.options.fps),this);return true}});Fx.compute=function(b,c,a){return(c-b)*a+b};Fx.Durations={"short":250,normal:500,"long":1000};Fx.CSS=new Class({Extends:Fx,prepare:function(c,b,e){e=$splat(e);var d=e[1];if(!$chk(d)){e[1]=e[0];e[0]=c.getStyle(b)}var a=e.map(this.parse);return{from:a[0],to:a[1]}},parse:function(a){a=$lambda(a)();a=(typeof a=="string")?a.split(" "):$splat(a);return a.map(function(b){b=String(b);var c=false;Fx.CSS.Parsers.each(function(d,e){if(c){return}var f=d.parse(b);if($chk(f)){c={value:f,parser:d}}});c=c||{value:b,parser:Fx.CSS.Parsers.String};return c})},compute:function(b,c,d){var a=[];(Math.min(b.length,c.length)).times(function(e){a.push({value:b[e].parser.compute(b[e].value,c[e].value,d),parser:b[e].parser})});a.$family={name:"fx:css:value"};return a},serve:function(b,c){if($type(b)!="fx:css:value"){b=this.parse(b)}var a=[];b.each(function(d){a=a.concat(d.parser.serve(d.value,c))});return a},render:function(a,b,c,d){a.setStyle(b,this.serve(c,d))},search:function(a){if(Fx.CSS.Cache[a]){return Fx.CSS.Cache[a]}var b={};Array.each(document.styleSheets,function(d,e){var f=d.href;if(f&&f.contains("://")&&!f.contains(document.domain)){return}var c=d.rules||d.cssRules;Array.each(c,function(g,i){if(!g.style){return}var h=(g.selectorText)?g.selectorText.replace(/^\w+/,function(j){return j.toLowerCase()}):null;if(!h||!h.test("^"+a+"$")){return}Element.Styles.each(function(j,k){if(!g.style[k]||Element.ShortStyles[k]){return}j=String(g.style[k]);b[k]=(j.test(/^rgb/))?j.rgbToHex():j})})});return Fx.CSS.Cache[a]=b}});Fx.CSS.Cache={};Fx.CSS.Parsers=new Hash({Color:{parse:function(a){if(a.match(/^#[0-9a-f]{3,6}$/i)){return a.hexToRgb(true)}return((a=a.match(/(\d+),\s*(\d+),\s*(\d+)/)))?[a[1],a[2],a[3]]:false},compute:function(b,c,a){return b.map(function(d,e){return Math.round(Fx.compute(b[e],c[e],a))})},serve:function(a){return a.map(Number)}},Number:{parse:parseFloat,compute:Fx.compute,serve:function(b,a){return(a)?b+a:b}},String:{parse:$lambda(false),compute:$arguments(1),serve:$arguments(0)}});Fx.Tween=new Class({Extends:Fx.CSS,initialize:function(b,a){this.element=this.subject=$(b);this.parent(a)},set:function(b,a){if(arguments.length==1){a=b;b=this.property||this.options.property}this.render(this.element,b,a,this.options.unit);return this},start:function(d,b,c){if(!this.check(arguments.callee,d,b,c)){return this}var e=Array.flatten(arguments);this.property=this.options.property||e.shift();var a=this.prepare(this.element,this.property,e);return this.parent(a.from,a.to)}});Element.Properties.tween={set:function(a){var b=this.retrieve("tween");if(b){b.cancel()}return this.eliminate("tween").store("tween:options",$extend({link:"cancel"},a))},get:function(a){if(a||!this.retrieve("tween")){if(a||!this.retrieve("tween:options")){this.set("tween",a)}this.store("tween",new Fx.Tween(this,this.retrieve("tween:options")))}return this.retrieve("tween")}};Element.implement({tween:function(a,b,c){this.get("tween").start(arguments);return this},fade:function(d){var b=this.get("tween"),c="opacity",a;d=$pick(d,"toggle");switch(d){case"in":b.start(c,1);break;case"out":b.start(c,0);break;case"show":b.set(c,1);break;case"hide":b.set(c,0);break;case"toggle":var e=this.retrieve("fade:flag",this.get("opacity")==1);b.start(c,(e)?0:1);this.store("fade:flag",!e);a=true;break;default:b.start(c,arguments)}if(!a){this.eliminate("fade:flag")}return this},highlight:function(b,a){if(!a){a=this.retrieve("highlight:original",this.getStyle("background-color"));a=(a=="transparent")?"#fff":a}var c=this.get("tween");c.start("background-color",b||"#ffff88",a).chain(function(){this.setStyle("background-color",this.retrieve("highlight:original"));c.callChain()}.bind(this));return this}});Fx.Morph=new Class({Extends:Fx.CSS,initialize:function(b,a){this.element=this.subject=$(b);this.parent(a)},set:function(a){if(typeof a=="string"){a=this.search(a)}for(var b in a){this.render(this.element,b,a[b],this.options.unit)}return this},compute:function(b,c,d){var a={};for(var e in b){a[e]=this.parent(b[e],c[e],d)}return a},start:function(e){if(!this.check(arguments.callee,e)){return this}if(typeof e=="string"){e=this.search(e)}var b={},c={};for(var d in e){var a=this.prepare(this.element,d,e[d]);b[d]=a.from;c[d]=a.to}return this.parent(b,c)}});Element.Properties.morph={set:function(a){var b=this.retrieve("morph");if(b){b.cancel()}return this.eliminate("morph").store("morph:options",$extend({link:"cancel"},a))},get:function(a){if(a||!this.retrieve("morph")){if(a||!this.retrieve("morph:options")){this.set("morph",a)}this.store("morph",new Fx.Morph(this,this.retrieve("morph:options")))}return this.retrieve("morph")}};Element.implement({morph:function(a){this.get("morph").start(a);return this}});(function(){var a=Fx.prototype.initialize;Fx.prototype.initialize=function(d){a.call(this,d);var c=this.options.transition;if(typeof c=="string"&&(c=c.split(":"))){var b=Fx.Transitions;b=b[c[0]]||b[c[0].capitalize()];if(c[1]){b=b["ease"+c[1].capitalize()+(c[2]?c[2].capitalize():"")]}this.options.transition=b}}})();Fx.Transition=function(b,a){a=$splat(a);return $extend(b,{easeIn:function(c){return b(c,a)},easeOut:function(c){return 1-b(1-c,a)},easeInOut:function(c){return(c<=0.5)?b(2*c,a)/2:(2-b(2*(1-c),a))/2}})};Fx.Transitions=new Hash({linear:$arguments(0)});Fx.Transitions.extend=function(a){for(var b in a){Fx.Transitions[b]=new Fx.Transition(a[b])}};Fx.Transitions.extend({Pow:function(b,a){return Math.pow(b,a[0]||6)},Expo:function(a){return Math.pow(2,8*(a-1))},Circ:function(a){return 1-Math.sin(Math.acos(a))},Sine:function(a){return 1-Math.sin((1-a)*Math.PI/2)},Back:function(b,a){a=a[0]||1.618;return Math.pow(b,2)*((a+1)*b-a)},Bounce:function(b){var c;for(var d=0,a=1;1;d+=a,a/=2){if(b>=(7-4*d)/11){c=-Math.pow((11-6*d-11*b)/4,2)+a*a;break}}return c},Elastic:function(b,a){return Math.pow(2,10*--b)*Math.cos(20*b*Math.PI*(a[0]||1)/3)}});["Quad","Cubic","Quart","Quint"].each(function(b,a){Fx.Transitions[b]=new Fx.Transition(function(c){return Math.pow(c,[a+2])})});var Request=new Class({Implements:[Chain,Events,Options],options:{url:"",data:"",headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:true,format:false,method:"post",link:"ignore",isSuccess:null,emulation:true,urlEncoded:true,encoding:"utf-8",evalScripts:false,evalResponse:false},initialize:function(a){this.xhr=new Browser.Request();this.setOptions(a);this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.headers=new Hash(this.options.headers)},onStateChange:function(){if(this.xhr.readyState!=4||!this.running){return}this.running=false;this.status=0;$try(function(){this.status=this.xhr.status}.bind(this));if(this.options.isSuccess.call(this,this.status)){this.response={text:this.xhr.responseText,xml:this.xhr.responseXML};this.success(this.response.text,this.response.xml)}else{this.response={text:null,xml:null};this.failure()}this.xhr.onreadystatechange=$empty},isSuccess:function(){return((this.status>=200)&&(this.status<300))},processScripts:function(a){if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader("Content-type"))){return $exec(a)}return a.stripScripts(this.options.evalScripts)},success:function(b,a){this.onSuccess(this.processScripts(b),a)},onSuccess:function(){this.fireEvent("complete",arguments).fireEvent("success",arguments).callChain()},failure:function(){this.onFailure()},onFailure:function(){this.fireEvent("complete").fireEvent("failure",this.xhr)},setHeader:function(a,b){this.headers.set(a,b);return this},getHeader:function(a){return $try(function(){return this.xhr.getResponseHeader(a)}.bind(this))},check:function(a){if(!this.running){return true}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(a.bind(this,Array.slice(arguments,1)));return false}return false},send:function(e){if(!this.check(arguments.callee,e)){return this}this.running=true;var g=$type(e);if(g=="string"||g=="element"){e={data:e}}var a=this.options;e=$extend({data:a.data,url:a.url,method:a.method},e);var i=e.data,c=e.url,d=e.method;switch($type(i)){case"element":i=$(i).toQueryString();break;case"object":case"hash":i=Hash.toQueryString(i)}if(this.options.format){var f="format="+this.options.format;i=(i)?f+"&"+i:f}if(this.options.emulation&&["put","delete"].contains(d)){var h="_method="+d;i=(i)?h+"&"+i:h;d="post"}if(this.options.urlEncoded&&d=="post"){var b=(this.options.encoding)?"; charset="+this.options.encoding:"";this.headers.set("Content-type","application/x-www-form-urlencoded"+b)}if(i&&d=="get"){c=c+(c.contains("?")?"&":"?")+i;i=null}this.xhr.open(d.toUpperCase(),c,this.options.async);this.xhr.onreadystatechange=this.onStateChange.bind(this);this.headers.each(function(j,k){if(!$try(function(){this.xhr.setRequestHeader(k,j);return true}.bind(this))){this.fireEvent("exception",[k,j])}},this);this.fireEvent("request");this.xhr.send(i);if(!this.options.async){this.onStateChange()}return this},cancel:function(){if(!this.running){return this}this.running=false;this.xhr.abort();this.xhr.onreadystatechange=$empty;this.xhr=new Browser.Request();this.fireEvent("cancel");return this}});(function(){var a={};["get","post","put","delete","GET","POST","PUT","DELETE"].each(function(b){a[b]=function(){var c=Array.link(arguments,{url:String.type,data:$defined});return this.send($extend(c,{method:b.toLowerCase()}))}});Request.implement(a)})();Element.Properties.send={set:function(a){var b=this.retrieve("send");if(b){b.cancel()}return this.eliminate("send").store("send:options",$extend({data:this,link:"cancel",method:this.get("method")||"post",url:this.get("action")},a))},get:function(a){if(a||!this.retrieve("send")){if(a||!this.retrieve("send:options")){this.set("send",a)}this.store("send",new Request(this.retrieve("send:options")))}return this.retrieve("send")}};Element.implement({send:function(a){var b=this.get("send");b.send({data:this,url:a||b.options.url});return this}});Request.HTML=new Class({Extends:Request,options:{update:false,evalScripts:true,filter:false},processHTML:function(b){var c=b.match(/<body[^>]*>([\s\S]*?)<\/body>/i);b=(c)?c[1]:b;var a=new Element("div");return $try(function(){var h="<root>"+b+"</root>",e;if(Browser.Engine.trident){e=new ActiveXObject("Microsoft.XMLDOM");e.async=false;e.loadXML(h)}else{e=new DOMParser().parseFromString(h,"text/xml")}h=e.getElementsByTagName("root")[0];for(var f=0,g=h.childNodes.length;f<g;f++){var d=Element.clone(h.childNodes[f],true,true);if(d){a.grab(d)}}return a})||a.set("html",b)},success:function(b){var c=this.options,d=this.response;d.html=b.stripScripts(function(e){d.javascript=e});var a=this.processHTML(d.html);d.tree=a.childNodes;d.elements=a.getElements("*");if(c.filter){d.tree=d.elements.filter(c.filter)}if(c.update){$(c.update).empty().adopt(d.tree)}if(c.evalScripts){$exec(d.javascript)}this.onSuccess(d.tree,d.elements,d.html,d.javascript)}});Element.Properties.load={set:function(a){var b=this.retrieve("load");if(b){send.cancel()}return this.eliminate("load").store("load:options",$extend({data:this,link:"cancel",update:this,method:"get"},a))},get:function(a){if(a||!this.retrieve("load")){if(a||!this.retrieve("load:options")){this.set("load",a)}this.store("load",new Request.HTML(this.retrieve("load:options")))}return this.retrieve("load")}};Element.implement({load:function(){this.get("load").send(Array.link(arguments,{data:Object.type,url:String.type}));return this}});Request.JSON=new Class({Extends:Request,options:{secure:true},initialize:function(a){this.parent(a);this.headers.extend({Accept:"application/json","X-Request":"JSON"})},success:function(a){this.response.json=JSON.decode(a,this.options.secure);this.onSuccess(this.response.json,a)}});Fx.Slide=new Class({Extends:Fx,options:{mode:"vertical"},initialize:function(c,a){this.addEvent("complete",function(){this.open=(this.wrapper["offset"+this.layout.capitalize()]!=0);if(this.open&&Browser.Engine.webkit419){this.element.dispose().inject(this.wrapper)}},true);this.element=this.subject=$(c);this.parent(a);var b=this.element.retrieve("wrapper");this.wrapper=b||new Element("div",{styles:$extend(this.element.getStyles("margin","position"),{overflow:"hidden"})}).wraps(this.element);this.element.store("wrapper",this.wrapper).setStyle("margin",0);this.now=[];this.open=true},vertical:function(){this.margin="margin-top";this.layout="height";this.offset=this.element.offsetHeight},horizontal:function(){this.margin="margin-left";this.layout="width";this.offset=this.element.offsetWidth},set:function(a){this.element.setStyle(this.margin,a[0]);this.wrapper.setStyle(this.layout,a[1]);return this},compute:function(b,c,d){var e=[];var a=2;a.times(function(f){e[f]=Fx.compute(b[f],c[f],d)});return e},start:function(g,d){if(!this.check(arguments.callee,g,d)){return this}this[d||this.options.mode]();var e=this.element.getStyle(this.margin).toInt();var f=this.wrapper.getStyle(this.layout).toInt();var a=[[e,f],[0,this.offset]];var b=[[e,f],[-this.offset,0]];var c;switch(g){case"in":c=a;break;case"out":c=b;break;case"toggle":c=(this.wrapper["offset"+this.layout.capitalize()]==0)?a:b}return this.parent(c[0],c[1])},slideIn:function(a){return this.start("in",a)},slideOut:function(a){return this.start("out",a)},hide:function(a){this[a||this.options.mode]();this.open=false;return this.set([-this.offset,0])},show:function(a){this[a||this.options.mode]();this.open=true;return this.set([0,this.offset])},toggle:function(a){return this.start("toggle",a)}});Element.Properties.slide={set:function(b){var a=this.retrieve("slide");if(a){a.cancel()}return this.eliminate("slide").store("slide:options",$extend({link:"cancel"},b))},get:function(a){if(a||!this.retrieve("slide")){if(a||!this.retrieve("slide:options")){this.set("slide",a)}this.store("slide",new Fx.Slide(this,this.retrieve("slide:options")))}return this.retrieve("slide")}};Element.implement({slide:function(c,b){c=c||"toggle";var e=this.get("slide"),a;switch(c){case"hide":e.hide(b);break;case"show":e.show(b);break;case"toggle":var d=this.retrieve("slide:flag",e.open);e[(d)?"slideOut":"slideIn"](b);this.store("slide:flag",!d);a=true;break;default:e.start(c,b)}if(!a){this.eliminate("slide:flag")}return this}});Fx.Scroll=new Class({Extends:Fx,options:{offset:{x:0,y:0},wheelStops:true},initialize:function(d,a){this.element=this.subject=$(d);this.parent(a);var b=this.cancel.bind(this,false);if($type(this.element)!="element"){this.element=$(this.element.getDocument().body)}var c=this.element;if(this.options.wheelStops){this.addEvent("start",function(){c.addEvent("mousewheel",b)},true);this.addEvent("complete",function(){c.removeEvent("mousewheel",b)},true)}},set:function(){var a=Array.flatten(arguments);this.element.scrollTo(a[0],a[1])},compute:function(b,c,d){var e=[];var a=2;a.times(function(f){e.push(Fx.compute(b[f],c[f],d))});return e},start:function(g,b){if(!this.check(arguments.callee,g,b)){return this}var e=this.element.getSize(),d=this.element.getScrollSize();var h=this.element.getScroll(),f={x:g,y:b};for(var c in f){var a=d[c]-e[c];if($chk(f[c])){f[c]=($type(f[c])=="number")?f[c].limit(0,a):a}else{f[c]=h[c]}f[c]+=this.options.offset[c]}return this.parent([h.x,h.y],[f.x,f.y])},toTop:function(){return this.start(false,0)},toLeft:function(){return this.start(0,false)},toRight:function(){return this.start("right",false)},toBottom:function(){return this.start(false,"bottom")},toElement:function(b){var a=$(b).getPosition(this.element);return this.start(a.x,a.y)}});Fx.Elements=new Class({Extends:Fx.CSS,initialize:function(b,a){this.elements=this.subject=$$(b);this.parent(a)},compute:function(g,f,e){var b={};for(var a in g){var d=g[a],i=f[a],h=b[a]={};for(var c in d){h[c]=this.parent(d[c],i[c],e)}}return b},set:function(d){for(var c in d){var a=d[c];for(var b in a){this.render(this.elements[c],b,a[b],this.options.unit)}}return this},start:function(b){if(!this.check(arguments.callee,b)){return this}var f={},e={};for(var a in b){var h=b[a],d=f[a]={},g=e[a]={};for(var c in h){var i=this.prepare(this.elements[a],c,h[c]);d[c]=i.from;g[c]=i.to}}return this.parent(f,e)}});var Drag=new Class({Implements:[Events,Options],options:{snap:6,unit:"px",grid:false,style:true,limit:false,handle:false,invert:false,preventDefault:false,modifiers:{x:"left",y:"top"}},initialize:function(){var b=Array.link(arguments,{options:Object.type,element:$defined});this.element=$(b.element);this.document=this.element.getDocument();this.setOptions(b.options||{});var a=$type(this.options.handle);this.handles=(a=="array"||a=="collection")?$$(this.options.handle):$(this.options.handle)||this.element;this.mouse={now:{},pos:{}};this.value={start:{},now:{}};this.selection=(Browser.Engine.trident)?"selectstart":"mousedown";this.bound={start:this.start.bind(this),check:this.check.bind(this),drag:this.drag.bind(this),stop:this.stop.bind(this),cancel:this.cancel.bind(this),eventStop:$lambda(false)};this.attach()},attach:function(){this.handles.addEvent("mousedown",this.bound.start);return this},detach:function(){this.handles.removeEvent("mousedown",this.bound.start);return this},start:function(c){if(this.options.preventDefault){c.preventDefault()}this.fireEvent("beforeStart",this.element);this.mouse.start=c.page;var a=this.options.limit;this.limit={x:[],y:[]};for(var b in this.options.modifiers){if(!this.options.modifiers[b]){continue}if(this.options.style){this.value.now[b]=this.element.getStyle(this.options.modifiers[b]).toInt()}else{this.value.now[b]=this.element[this.options.modifiers[b]]}if(this.options.invert){this.value.now[b]*=-1}this.mouse.pos[b]=c.page[b]-this.value.now[b];if(a&&a[b]){for(var d=2;d--;d){if($chk(a[b][d])){this.limit[b][d]=$lambda(a[b][d])()}}}}if($type(this.options.grid)=="number"){this.options.grid={x:this.options.grid,y:this.options.grid}}this.document.addEvents({mousemove:this.bound.check,mouseup:this.bound.cancel});this.document.addEvent(this.selection,this.bound.eventStop)},check:function(a){if(this.options.preventDefault){a.preventDefault()}var b=Math.round(Math.sqrt(Math.pow(a.page.x-this.mouse.start.x,2)+Math.pow(a.page.y-this.mouse.start.y,2)));if(b>this.options.snap){this.cancel();this.document.addEvents({mousemove:this.bound.drag,mouseup:this.bound.stop});this.fireEvent("start",this.element).fireEvent("snap",this.element)}},drag:function(a){if(this.options.preventDefault){a.preventDefault()}this.mouse.now=a.page;for(var b in this.options.modifiers){if(!this.options.modifiers[b]){continue}this.value.now[b]=this.mouse.now[b]-this.mouse.pos[b];if(this.options.invert){this.value.now[b]*=-1}if(this.options.limit&&this.limit[b]){if($chk(this.limit[b][1])&&(this.value.now[b]>this.limit[b][1])){this.value.now[b]=this.limit[b][1]}else{if($chk(this.limit[b][0])&&(this.value.now[b]<this.limit[b][0])){this.value.now[b]=this.limit[b][0]}}}if(this.options.grid[b]){this.value.now[b]-=(this.value.now[b]%this.options.grid[b])}if(this.options.style){this.element.setStyle(this.options.modifiers[b],this.value.now[b]+this.options.unit)}else{this.element[this.options.modifiers[b]]=this.value.now[b]}}this.fireEvent("drag",this.element)},cancel:function(a){this.document.removeEvent("mousemove",this.bound.check);this.document.removeEvent("mouseup",this.bound.cancel);if(a){this.document.removeEvent(this.selection,this.bound.eventStop);this.fireEvent("cancel",this.element)}},stop:function(a){this.document.removeEvent(this.selection,this.bound.eventStop);this.document.removeEvent("mousemove",this.bound.drag);this.document.removeEvent("mouseup",this.bound.stop);if(a){this.fireEvent("complete",this.element)}}});Element.implement({makeResizable:function(a){return new Drag(this,$merge({modifiers:{x:"width",y:"height"}},a))}});Drag.Move=new Class({Extends:Drag,options:{droppables:[],container:false},initialize:function(c,d){this.parent(c,d);this.droppables=$$(this.options.droppables);this.container=$(this.options.container);if(this.container&&$type(this.container)!="element"){this.container=$(this.container.getDocument().body)}c=this.element;var b=c.getStyle("position");var a=(b!="static")?b:"absolute";if(c.getStyle("left")=="auto"||c.getStyle("top")=="auto"){c.position(c.getPosition(c.offsetParent))}c.setStyle("position",a);this.addEvent("start",function(){this.checkDroppables()},true)},start:function(c){if(this.container){var a=this.element,e=this.container,j=e.getCoordinates(a.offsetParent),i={},d={};["top","right","bottom","left"].each(function(k){i[k]=e.getStyle("padding-"+k).toInt();d[k]=a.getStyle("margin-"+k).toInt()},this);var b=a.offsetWidth+d.left+d.right,f=a.offsetHeight+d.top+d.bottom;var g=[j.left+i.left,j.right-i.right-b];var h=[j.top+i.top,j.bottom-i.bottom-f];this.options.limit={x:g,y:h}}this.parent(c)},checkAgainst:function(b){b=b.getCoordinates();var a=this.mouse.now;return(a.x>b.left&&a.x<b.right&&a.y<b.bottom&&a.y>b.top)},checkDroppables:function(){var a=this.droppables.filter(this.checkAgainst,this).getLast();if(this.overed!=a){if(this.overed){this.fireEvent("leave",[this.element,this.overed])}if(a){this.overed=a;this.fireEvent("enter",[this.element,a])}else{this.overed=null}}},drag:function(a){this.parent(a);if(this.droppables.length){this.checkDroppables()}},stop:function(a){this.checkDroppables();this.fireEvent("drop",[this.element,this.overed]);this.overed=null;return this.parent(a)}});Element.implement({makeDraggable:function(a){return new Drag.Move(this,a)}});Hash.Cookie=new Class({Extends:Cookie,options:{autoSave:true},initialize:function(b,a){this.parent(b,a);this.load()},save:function(){var a=JSON.encode(this.hash);if(!a||a.length>4096){return false}if(a=="{}"){this.dispose()}else{this.write(a)}return true},load:function(){this.hash=new Hash(JSON.decode(this.read(),true));return this}});Hash.Cookie.implement((function(){var a={};Hash.each(Hash.prototype,function(b,c){a[c]=function(){var d=b.apply(this.hash,arguments);if(this.options.autoSave){this.save()}return d}});return a})());var Color=new Native({initialize:function(c,b){if(arguments.length>=3){b="rgb";c=Array.slice(arguments,0,3)}else{if(typeof c=="string"){if(c.match(/rgb/)){c=c.rgbToHex().hexToRgb(true)}else{if(c.match(/hsb/)){c=c.hsbToRgb()}else{c=c.hexToRgb(true)}}}}b=b||"rgb";switch(b){case"hsb":var a=c;c=c.hsbToRgb();c.hsb=a;break;case"hex":c=c.hexToRgb(true);break}c.rgb=c.slice(0,3);c.hsb=c.hsb||c.rgbToHsb();c.hex=c.rgbToHex();return $extend(c,this)}});Color.implement({mix:function(){var a=Array.slice(arguments);var b=($type(a.getLast())=="number")?a.pop():50;var c=this.slice();a.each(function(e){e=new Color(e);for(var d=0;d<3;d++){c[d]=Math.round((c[d]/100*(100-b))+(e[d]/100*b))}});return new Color(c,"rgb")},invert:function(){return new Color(this.map(function(a){return 255-a}))},setHue:function(a){return new Color([a,this.hsb[1],this.hsb[2]],"hsb")},setSaturation:function(a){return new Color([this.hsb[0],a,this.hsb[2]],"hsb")},setBrightness:function(a){return new Color([this.hsb[0],this.hsb[1],a],"hsb")}});function $RGB(b,c,a){return new Color([b,c,a],"rgb")}function $HSB(b,c,a){return new Color([b,c,a],"hsb")}function $HEX(a){return new Color(a,"hex")}Array.implement({rgbToHsb:function(){var c=this[0],b=this[1],g=this[2];var j,k,i;var h=Math.max(c,b,g),l=Math.min(c,b,g);var f=h-l;i=h/255;k=(h!=0)?f/h:0;if(k==0){j=0}else{var a=(h-c)/f;var d=(h-b)/f;var e=(h-g)/f;if(c==h){j=e-d}else{if(b==h){j=2+a-e}else{j=4+d-a}}j/=6;if(j<0){j++}}return[Math.round(j*360),Math.round(k*100),Math.round(i*100)]},hsbToRgb:function(){var e=Math.round(this[2]/100*255);if(this[1]==0){return[e,e,e]}else{var a=this[0]%360;var c=a%60;var b=Math.round((this[2]*(100-this[1]))/10000*255);var d=Math.round((this[2]*(6000-this[1]*c))/600000*255);var f=Math.round((this[2]*(6000-this[1]*(60-c)))/600000*255);switch(Math.floor(a/60)){case 0:return[e,f,b];case 1:return[d,e,b];case 2:return[b,e,f];case 3:return[b,d,e];case 4:return[f,b,e];case 5:return[e,b,d]}}return false}});String.implement({rgbToHsb:function(){var a=this.match(/\d{1,3}/g);return(a)?hsb.rgbToHsb():null},hsbToRgb:function(){var a=this.match(/\d{1,3}/g);return(a)?a.hsbToRgb():null}});var Group=new Class({initialize:function(){this.instances=Array.flatten(arguments);this.events={};this.checker={}},addEvent:function(b,a){this.checker[b]=this.checker[b]||{};this.events[b]=this.events[b]||[];if(this.events[b].contains(a)){return false}else{this.events[b].push(a)}this.instances.each(function(d,c){d.addEvent(b,this.check.bind(this,[b,d,c]))},this);return this},check:function(c,a,d){this.checker[c][d]=true;var b=this.instances.every(function(e,f){return this.checker[c][f]||false},this);if(!b){return}this.checker[c]={};this.events[c].each(function(e){e.call(this,this.instances,a)},this)}});var Asset=new Hash({javascript:function(c,e){e=$extend({onload:$empty,document:document,check:$lambda(true)},e);var g=new Element("script",{src:c,type:"text/javascript"});var d=e.onload.bind(g),a=e.check,b=e.document;delete e.onload;delete e.check;delete e.document;g.addEvents({load:d,readystatechange:function(){if(["loaded","complete"].contains(this.readyState)){d()}}}).setProperties(e);if(Browser.Engine.webkit419){var f=(function(){if(!$try(a)){return}$clear(f);d()}).periodical(50)}return g.inject(b.head)},css:function(b,a){return new Element("link",$merge({rel:"stylesheet",media:"screen",type:"text/css",href:b},a)).inject(document.head)},image:function(c,d){d=$merge({onload:$empty,onabort:$empty,onerror:$empty},d);var b=new Image();var a=$(b)||new Element("img");["load","abort","error"].each(function(g){var f="on"+g;var e=d[f];delete d[f];b[f]=function(){if(!b){return}if(!a.parentNode){a.width=b.width;a.height=b.height}b=b.onload=b.onabort=b.onerror=null;e.delay(1,a,a);a.fireEvent(g,a,1)}});b.src=a.src=c;if(b&&b.complete){b.onload.delay(1)}return a.setProperties(d)},images:function(b,c){c=$merge({onComplete:$empty,onProgress:$empty},c);if(!b.push){b=[b]}var a=[];var d=0;b.each(function(e){var f=new Asset.image(e,{onload:function(){c.onProgress.call(this,d,b.indexOf(e));d++;if(d==b.length){c.onComplete()}}});a.push(f)});return new Elements(a)}});var Sortables=new Class({Implements:[Events,Options],options:{snap:4,opacity:1,clone:false,revert:false,handle:false,constrain:false},initialize:function(a,b){this.setOptions(b);this.elements=[];this.lists=[];this.idle=true;this.addLists($$($(a)||a));if(!this.options.clone){this.options.revert=false}if(this.options.revert){this.effect=new Fx.Morph(null,$merge({duration:250,link:"cancel"},this.options.revert))}},attach:function(){this.addLists(this.lists);return this},detach:function(){this.lists=this.removeLists(this.lists);return this},addItems:function(){Array.flatten(arguments).each(function(a){this.elements.push(a);var b=a.retrieve("sortables:start",this.start.bindWithEvent(this,a));(this.options.handle?a.getElement(this.options.handle)||a:a).addEvent("mousedown",b)},this);return this},addLists:function(){Array.flatten(arguments).each(function(a){this.lists.push(a);this.addItems(a.getChildren())},this);return this},removeItems:function(){var a=[];Array.flatten(arguments).each(function(c){a.push(c);this.elements.erase(c);var b=c.retrieve("sortables:start");(this.options.handle?c.getElement(this.options.handle)||c:c).removeEvent("mousedown",b)},this);return $$(a)},removeLists:function(){var a=[];Array.flatten(arguments).each(function(b){a.push(b);this.lists.erase(b);this.removeItems(b.getChildren())},this);return $$(a)},getClone:function(b,a){if(!this.options.clone){return new Element("div").inject(document.body)}if($type(this.options.clone)=="function"){return this.options.clone.call(this,b,a,this.list)}return a.clone(true).setStyles({margin:"0px",position:"absolute",visibility:"hidden",width:a.getStyle("width")}).inject(this.list).position(a.getPosition(a.getOffsetParent()))},getDroppables:function(){var a=this.list.getChildren();if(!this.options.constrain){a=this.lists.concat(a).erase(this.list)}return a.erase(this.clone).erase(this.element)},insert:function(b,c){var a="inside";if(this.lists.contains(c)){this.list=c;this.drag.droppables=this.getDroppables()}else{a=this.element.getAllPrevious().contains(c)?"before":"after"}this.element.inject(c,a);this.fireEvent("sort",[this.element,this.clone])},start:function(b,a){if(!this.idle){return}this.idle=false;this.element=a;this.opacity=a.get("opacity");this.list=a.getParent();this.clone=this.getClone(b,a);this.drag=new Drag.Move(this.clone,{snap:this.options.snap,container:this.options.constrain&&this.element.getParent(),droppables:this.getDroppables(),onSnap:function(){b.stop();this.clone.setStyle("visibility","visible");this.element.set("opacity",this.options.opacity||0);this.fireEvent("start",[this.element,this.clone])}.bind(this),onEnter:this.insert.bind(this),onCancel:this.reset.bind(this),onComplete:this.end.bind(this)});this.clone.inject(this.element,"before");this.drag.start(b)},end:function(){this.drag.detach();this.element.set("opacity",this.opacity);if(this.effect){var a=this.element.getStyles("width","height");var b=this.clone.computePosition(this.element.getPosition(this.clone.offsetParent));this.effect.element=this.clone;this.effect.start({top:b.top,left:b.left,width:a.width,height:a.height,opacity:0.25}).chain(this.reset.bind(this))}else{this.reset()}},reset:function(){this.idle=true;this.clone.destroy();this.fireEvent("complete",this.element)},serialize:function(){var b=Array.link(arguments,{modifier:Function.type,index:$defined});var c=this.lists.map(function(d){return d.getChildren().map(b.modifier||function(e){return e.get("id")},this)},this);var a=b.index;if(this.lists.length==1){a=0}return $chk(a)&&a>=0&&a<this.lists.length?c[a]:c}});var Tips=new Class({Implements:[Events,Options],options:{onShow:function(a){a.setStyle("visibility","visible")},onHide:function(a){a.setStyle("visibility","hidden")},showDelay:100,hideDelay:100,className:null,offsets:{x:16,y:16},fixed:false},initialize:function(){var b=Array.link(arguments,{options:Object.type,elements:$defined});this.setOptions(b.options||null);this.tip=new Element("div").inject(document.body);if(this.options.className){this.tip.addClass(this.options.className)}var c=new Element("div",{"class":"tip-top"}).inject(this.tip);this.container=new Element("div",{"class":"tip"}).inject(this.tip);var a=new Element("div",{"class":"tip-bottom"}).inject(this.tip);this.tip.setStyles({position:"absolute",top:0,left:0,visibility:"hidden"});if(b.elements){this.attach(b.elements)}},attach:function(a){$$(a).each(function(e){var b=e.retrieve("tip:title",e.get("title"));var c=e.retrieve("tip:text",e.get("rel")||e.get("href"));var d=e.retrieve("tip:enter",this.elementEnter.bindWithEvent(this,e));var f=e.retrieve("tip:leave",this.elementLeave.bindWithEvent(this,e));e.addEvents({mouseenter:d,mouseleave:f});if(!this.options.fixed){var g=e.retrieve("tip:move",this.elementMove.bindWithEvent(this,e));e.addEvent("mousemove",g)}e.store("tip:native",e.get("title"));e.erase("title")},this);return this},detach:function(a){$$(a).each(function(b){b.removeEvent("mouseenter",b.retrieve("tip:enter")||$empty);b.removeEvent("mouseleave",b.retrieve("tip:leave")||$empty);b.removeEvent("mousemove",b.retrieve("tip:move")||$empty);b.eliminate("tip:enter").eliminate("tip:leave").eliminate("tip:move");var c=b.retrieve("tip:native");if(c){b.set("title",c)}});return this},elementEnter:function(d,a){$A(this.container.childNodes).each(Element.dispose);var b=a.retrieve("tip:title");if(b){this.titleElement=new Element("div",{"class":"tip-title"}).inject(this.container);this.fill(this.titleElement,b)}var c=a.retrieve("tip:text");if(c){this.textElement=new Element("div",{"class":"tip-text"}).inject(this.container);this.fill(this.textElement,c)}this.timer=$clear(this.timer);this.timer=this.show.delay(this.options.showDelay,this);this.position((!this.options.fixed)?d:{page:a.getPosition()})},elementLeave:function(a){$clear(this.timer);this.timer=this.hide.delay(this.options.hideDelay,this)},elementMove:function(a){this.position(a)},position:function(e){var g=window.getSize(),a=window.getScroll();var d={x:this.tip.offsetWidth,y:this.tip.offsetHeight};var f={x:"left",y:"top"};for(var c in f){var b=e.page[c]+this.options.offsets[c];if((b+d[c]-a[c])>g[c]){b=e.page[c]-this.options.offsets[c]-d[c]}this.tip.setStyle(f[c],b)}},fill:function(a,b){(typeof b=="string")?a.set("html",b):a.adopt(b)},show:function(){this.fireEvent("show",this.tip)},hide:function(){this.fireEvent("hide",this.tip)}});var SmoothScroll=new Class({Extends:Fx.Scroll,initialize:function(e,d){d=d||document;var b=d.getDocument(),c=d.getWindow();this.parent(b,e);this.links=(this.options.links)?$$(this.options.links):$$(b.links);var a=c.location.href.match(/^[^#]*/)[0]+"#";this.links.each(function(f){if(f.href.indexOf(a)!=0){return}var g=f.href.substr(a.length);if(g&&$(g)){this.useLink(f,g)}},this);if(!Browser.Engine.webkit419){this.addEvent("complete",function(){c.location.hash=this.anchor},true)}},useLink:function(b,a){b.addEvent("click",function(c){this.anchor=a;this.toElement(a);c.stop()}.bind(this))}});var Slider=new Class({Implements:[Events,Options],options:{onTick:function(a){if(this.options.snap){a=this.toPosition(this.step)}this.knob.setStyle(this.property,a)},snap:false,offset:0,range:false,wheel:false,steps:100,mode:"horizontal"},initialize:function(c,a,d){this.setOptions(d);this.element=$(c);this.knob=$(a);this.previousChange=this.previousEnd=this.step=-1;this.element.addEvent("mousedown",this.clickedElement.bind(this));if(this.options.wheel){this.element.addEvent("mousewheel",this.scrolledElement.bindWithEvent(this))}var b,f={},e={x:false,y:false};switch(this.options.mode){case"vertical":this.axis="y";this.property="top";b="offsetHeight";break;case"horizontal":this.axis="x";this.property="left";b="offsetWidth"}this.half=this.knob[b]/2;this.full=this.element[b]-this.knob[b]+(this.options.offset*2);this.min=$chk(this.options.range[0])?this.options.range[0]:0;this.max=$chk(this.options.range[1])?this.options.range[1]:this.options.steps;this.range=this.max-this.min;this.steps=this.options.steps||this.full;this.stepSize=Math.abs(this.range)/this.steps;this.stepWidth=this.stepSize*this.full/Math.abs(this.range);this.knob.setStyle("position","relative").setStyle(this.property,-this.options.offset);e[this.axis]=this.property;f[this.axis]=[-this.options.offset,this.full-this.options.offset];this.drag=new Drag(this.knob,{snap:0,limit:f,modifiers:e,onDrag:this.draggedKnob.bind(this),onStart:this.draggedKnob.bind(this),onComplete:function(){this.draggedKnob();this.end()}.bind(this)});if(this.options.snap){this.drag.options.grid=Math.ceil(this.stepWidth);this.drag.options.limit[this.axis][1]=this.full}},set:function(a){if(!((this.range>0)^(a<this.min))){a=this.min}if(!((this.range>0)^(a>this.max))){a=this.max}this.step=Math.round(a);this.checkStep();this.end();this.fireEvent("tick",this.toPosition(this.step));return this},clickedElement:function(b){var c=this.range<0?-1:1;var a=b.page[this.axis]-this.element.getPosition()[this.axis]-this.half;a=a.limit(-this.options.offset,this.full-this.options.offset);this.step=Math.round(this.min+c*this.toStep(a));this.checkStep();this.end();this.fireEvent("tick",a)},scrolledElement:function(a){var b=(this.options.mode=="horizontal")?(a.wheel<0):(a.wheel>0);this.set(b?this.step-this.stepSize:this.step+this.stepSize);a.stop()},draggedKnob:function(){var b=this.range<0?-1:1;var a=this.drag.value.now[this.axis];a=a.limit(-this.options.offset,this.full-this.options.offset);this.step=Math.round(this.min+b*this.toStep(a));this.checkStep()},checkStep:function(){if(this.previousChange!=this.step){this.previousChange=this.step;this.fireEvent("change",this.step)}},end:function(){if(this.previousEnd!==this.step){this.previousEnd=this.step;this.fireEvent("complete",this.step+"")}},toStep:function(a){var b=(a+this.options.offset)*this.stepSize/this.full*this.steps;return this.options.steps?Math.round(b-=b%this.stepSize):b},toPosition:function(a){return(this.full*Math.abs(this.min-a))/(this.steps*this.stepSize)-this.options.offset}});var Scroller=new Class({Implements:[Events,Options],options:{area:20,velocity:1,onChange:function(a,b){this.element.scrollTo(a,b)}},initialize:function(b,a){this.setOptions(a);this.element=$(b);this.listener=($type(this.element)!="element")?$(this.element.getDocument().body):this.element;this.timer=null;this.coord=this.getCoords.bind(this)},start:function(){this.listener.addEvent("mousemove",this.coord)},stop:function(){this.listener.removeEvent("mousemove",this.coord);this.timer=$clear(this.timer)},getCoords:function(a){this.page=(this.listener.get("tag")=="body")?a.client:a.page;if(!this.timer){this.timer=this.scroll.periodical(50,this)}},scroll:function(){var e=this.element.getSize(),a=this.element.getScroll(),b=this.element.getPosition(),c={x:0,y:0};for(var d in this.page){if(this.page[d]<(this.options.area+b[d])&&a[d]!=0){c[d]=(this.page[d]-this.options.area-b[d])*this.options.velocity}else{if(this.page[d]+this.options.area>(e[d]+b[d])&&e[d]+e[d]!=a[d]){c[d]=(this.page[d]-e[d]+this.options.area-b[d])*this.options.velocity}}}if(c.y||c.x){this.fireEvent("change",[a.x+c.x,a.y+c.y])}}});var Accordion=new Class({Extends:Fx.Elements,options:{display:0,show:false,height:true,width:false,opacity:true,fixedHeight:false,fixedWidth:false,wait:false,alwaysHide:false},initialize:function(){var b=Array.link(arguments,{container:Element.type,options:Object.type,togglers:$defined,elements:$defined});this.parent(b.elements,b.options);this.togglers=$$(b.togglers);this.container=$(b.container);this.previous=-1;if(this.options.alwaysHide){this.options.wait=true}if($chk(this.options.show)){this.options.display=false;this.previous=this.options.show}if(this.options.start){this.options.display=false;this.options.show=false}this.effects={};if(this.options.opacity){this.effects.opacity="fullOpacity"}if(this.options.width){this.effects.width=this.options.fixedWidth?"fullWidth":"offsetWidth"}if(this.options.height){this.effects.height=this.options.fixedHeight?"fullHeight":"scrollHeight"}for(var c=0,a=this.togglers.length;c<a;c++){this.addSection(this.togglers[c],this.elements[c])}this.elements.each(function(e,f){if(this.options.show===f){this.fireEvent("active",[this.togglers[f],e])}else{for(var d in this.effects){e.setStyle(d,0)}}},this);if($chk(this.options.display)){this.display(this.options.display)}},addSection:function(d,f,b){d=$(d);f=$(f);var c=this.togglers.contains(d);var g=this.togglers.length;this.togglers.include(d);this.elements.include(f);if(g&&(!c||b)){b=$pick(b,g-1);d.inject(this.togglers[b],"before");f.inject(d,"after")}else{if(this.container&&!c){d.inject(this.container);f.inject(this.container)}}var a=this.togglers.indexOf(d);d.addEvent("click",this.display.bind(this,a));if(this.options.height){f.setStyles({"padding-top":0,"border-top":"none","padding-bottom":0,"border-bottom":"none"})}if(this.options.width){f.setStyles({"padding-left":0,"border-left":"none","padding-right":0,"border-right":"none"})}f.fullOpacity=1;if(this.options.fixedWidth){f.fullWidth=this.options.fixedWidth}if(this.options.fixedHeight){f.fullHeight=this.options.fixedHeight}f.setStyle("overflow","hidden");if(!c){for(var e in this.effects){f.setStyle(e,0)}}return this},display:function(a){a=($type(a)=="element")?this.elements.indexOf(a):a;if((this.timer&&this.options.wait)||(a===this.previous&&!this.options.alwaysHide)){return this}this.previous=a;var b={};this.elements.each(function(d,e){b[e]={};var f=(e!=a)||(this.options.alwaysHide&&(d.offsetHeight>0));this.fireEvent(f?"background":"active",[this.togglers[e],d]);for(var c in this.effects){b[e][c]=f?0:d[this.effects[c]]}},this);return this.start(b)}});
/* end ../include/js/mootools12-min.js */

/* start ../vendors/jquery.metadata.js */
/*
 * Metadata - jQuery plugin for parsing metadata from elements
 *
 * Copyright (c) 2006 John Resig, Yehuda Katz, Jï¿½Ã¶rn Zaefferer, Paul McLanahan
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *
 * Revision: $Id: jquery.metadata.js 3640 2007-10-11 18:34:38Z pmclanahan $
 *
 */

/**
 * Sets the type of metadata to use. Metadata is encoded in JSON, and each property
 * in the JSON will become a property of the element itself.
 *
 * There are four supported types of metadata storage:
 *
 *   attr:  Inside an attribute. The name parameter indicates *which* attribute.
 *          
 *   class: Inside the class attribute, wrapped in curly braces: { }
 *   
 *   elem:  Inside a child element (e.g. a script tag). The
 *          name parameter indicates *which* element.
 *   html5: Values are stored in data-* attributes.
 *          
 * The metadata for an element is loaded the first time the element is accessed via jQuery.
 *
 * As a result, you can define the metadata type, use $(expr) to load the metadata into the elements
 * matched by expr, then redefine the metadata type and run another $(expr) for other elements.
 * 
 * @name $.metadata.setType
 *
 * @example <p id="one" class="some_class {item_id: 1, item_label: 'Label'}">This is a p</p>
 * @before $.metadata.setType("class")
 * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
 * @desc Reads metadata from the class attribute
 * 
 * @example <p id="one" class="some_class" data="{item_id: 1, item_label: 'Label'}">This is a p</p>
 * @before $.metadata.setType("attr", "data")
 * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
 * @desc Reads metadata from a "data" attribute
 * 
 * @example <p id="one" class="some_class"><script>{item_id: 1, item_label: 'Label'}</script>This is a p</p>
 * @before $.metadata.setType("elem", "script")
 * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
 * @desc Reads metadata from a nested script element
 * 
 * @example <p id="one" class="some_class" data-item_id="1" data-item_label="Label">This is a p</p>
 * @before $.metadata.setType("html5")
 * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
 * @desc Reads metadata from a series of data-* attributes
 *
 * @param String type The encoding type
 * @param String name The name of the attribute to be used to get metadata (optional)
 * @cat Plugins/Metadata
 * @descr Sets the type of encoding to be used when loading metadata for the first time
 * @type undefined
 * @see metadata()
 */

(function($) {

$.extend({
  metadata : {
    defaults : {
      type: 'class',
      name: 'metadata',
      cre: /({.*})/,
      single: 'metadata'
    },
    setType: function( type, name ){
      this.defaults.type = type;
      this.defaults.name = name;
    },
    get: function( elem, opts ){
      var settings = $.extend({},this.defaults,opts);
      // check for empty string in single property
      if ( !settings.single.length ) settings.single = 'metadata';
      
      var data = $.data(elem, settings.single);
      // returned cached data if it already exists
      if ( data ) return data;
      
      data = "{}";
      
      var getData = function(data) {
        if(typeof data != "string") return data;
        
        if( data.indexOf('{') < 0 ) {
          data = eval("(" + data + ")");
        }
      }
      
      var getObject = function(data) {
        if(typeof data != "string") return data;
        
        data = eval("(" + data + ")");
        return data;
      }
      
      if ( settings.type == "html5" ) {
        var object = {};
        $( elem.attributes ).each(function() {
          var name = this.nodeName;
          if(name.match(/^data-/)) name = name.replace(/^data-/, '');
          else return true;
          object[name] = getObject(this.nodeValue);
        });
      } else {
        if ( settings.type == "class" ) {
          var m = settings.cre.exec( elem.className );
          if ( m )
            data = m[1];
        } else if ( settings.type == "elem" ) {
          if( !elem.getElementsByTagName ) return;
          var e = elem.getElementsByTagName(settings.name);
          if ( e.length )
            data = $.trim(e[0].innerHTML);
        } else if ( elem.getAttribute != undefined ) {
          var attr = elem.getAttribute( settings.name );
          if ( attr )
            data = attr;
        }
        object = getObject(data.indexOf("{") < 0 ? "{" + data + "}" : data);
      }
      
      $.data( elem, settings.single, object );
      return object;
    }
  }
});

/**
 * Returns the metadata object for the first member of the jQuery object.
 *
 * @name metadata
 * @descr Returns element's metadata object
 * @param Object opts An object contianing settings to override the defaults
 * @type jQuery
 * @cat Plugins/Metadata
 */
$.fn.metadata = function( opts ){
  return $.metadata.get( this[0], opts );
};

})(jQuery);
/* end ../vendors/jquery.metadata.js */

/* start ../vendors/jquery.query.js */
/**
 * jQuery.query - Query String Modification and Creation for jQuery
 * Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com)
 * Licensed under the WTFPL (http://sam.zoy.org/wtfpl/).
 * Date: 2009/06/14
 *
 * @author Blair Mitchelmore
 * @version 2.1.5
 *
 **/
new function(settings) { 
  // Various Settings
  var $separator = settings.separator || '&';
  var $spaces = settings.spaces === false ? false : true;
  var $suffix = settings.suffix === false ? '' : '[]';
  var $prefix = settings.prefix === false ? false : true;
  var $hash = $prefix ? settings.hash === true ? "#" : "?" : "";
  var $numbers = settings.numbers === false ? false : true;
  
  jQuery.query = new function() {
    var is = function(o, t) {
      return o != undefined && o !== null && (!!t ? o.constructor == t : true);
    };
    var parse = function(path) {
      var m, rx = /\[([^[]*)\]/g, match = /^(\S+?)(\[\S*\])?$/.exec(path), base = match[1], tokens = [];
      while (m = rx.exec(match[2])) tokens.push(m[1]);
      return [base, tokens];
    };
    var set = function(target, tokens, value) {
      var o, token = tokens.shift();
      if (typeof target != 'object') target = null;
      if (token === "") {
        if (!target) target = [];
        if (is(target, Array)) {
          target.push(tokens.length == 0 ? value : set(null, tokens.slice(0), value));
        } else if (is(target, Object)) {
          var i = 0;
          while (target[i++] != null);
          target[--i] = tokens.length == 0 ? value : set(target[i], tokens.slice(0), value);
        } else {
          target = [];
          target.push(tokens.length == 0 ? value : set(null, tokens.slice(0), value));
        }
      } else if (token && token.match(/^\s*[0-9]+\s*$/)) {
        var index = parseInt(token, 10);
        if (!target) target = [];
        target[index] = tokens.length == 0 ? value : set(target[index], tokens.slice(0), value);
      } else if (token) {
        var index = token.replace(/^\s*|\s*$/g, "");
        if (!target) target = {};
        if (is(target, Array)) {
          var temp = {};
          for (var i = 0; i < target.length; ++i) {
            temp[i] = target[i];
          }
          target = temp;
        }
        target[index] = tokens.length == 0 ? value : set(target[index], tokens.slice(0), value);
      } else {
        return value;
      }
      return target;
    };
    
    var queryObject = function(a) {
      var self = this;
      self.keys = {};
      
      if (a.queryObject) {
        jQuery.each(a.get(), function(key, val) {
          self.SET(key, val);
        });
      } else {
        jQuery.each(arguments, function() {
          var q = "" + this;
          q = q.replace(/^[?#]/,''); // remove any leading ? || #
          q = q.replace(/[;&]$/,''); // remove any trailing & || ;
          if ($spaces) q = q.replace(/[+]/g,' '); // replace +'s with spaces
          
          jQuery.each(q.split(/[&;]/), function(){
            var key = decodeURIComponent(this.split('=')[0]);
            var val = decodeURIComponent(this.split('=')[1]);
            
            if (!key) return;
            
            if ($numbers) {
              if (/^[+-]?[0-9]+\.[0-9]*$/.test(val)) // simple float regex
                val = parseFloat(val);
              else if (/^[+-]?[0-9]+$/.test(val)) // simple int regex
                val = parseInt(val, 10);
            }
            
            val = (!val && val !== 0) ? true : val;
            
            if (val !== false && val !== true && typeof val != 'number')
              val = val;
            
            self.SET(key, val);
          });
        });
      }
      return self;
    };
    
    queryObject.prototype = {
      queryObject: true,
      has: function(key, type) {
        var value = this.get(key);
        return is(value, type);
      },
      GET: function(key) {
        if (!is(key)) return this.keys;
        var parsed = parse(key), base = parsed[0], tokens = parsed[1];
        var target = this.keys[base];
        while (target != null && tokens.length != 0) {
          target = target[tokens.shift()];
        }
        return typeof target == 'number' ? target : target || "";
      },
      get: function(key) {
        var target = this.GET(key);
        if (is(target, Object))
          return jQuery.extend(true, {}, target);
        else if (is(target, Array))
          return target.slice(0);
        return target;
      },
      SET: function(key, val) {
        var value = !is(val) ? null : val;
        var parsed = parse(key), base = parsed[0], tokens = parsed[1];
        var target = this.keys[base];
        this.keys[base] = set(target, tokens.slice(0), value);
        return this;
      },
      set: function(key, val) {
        return this.copy().SET(key, val);
      },
      REMOVE: function(key) {
        return this.SET(key, null).COMPACT();
      },
      remove: function(key) {
        return this.copy().REMOVE(key);
      },
      EMPTY: function() {
        var self = this;
        jQuery.each(self.keys, function(key, value) {
          delete self.keys[key];
        });
        return self;
      },
      load: function(url) {
        var hash = url.replace(/^.*?[#](.+?)(?:\?.+)?$/, "$1");
        var search = url.replace(/^.*?[?](.+?)(?:#.+)?$/, "$1");
        return new queryObject(url.length == search.length ? '' : search, url.length == hash.length ? '' : hash);
      },
      empty: function() {
        return this.copy().EMPTY();
      },
      copy: function() {
        return new queryObject(this);
      },
      COMPACT: function() {
        function build(orig) {
          var obj = typeof orig == "object" ? is(orig, Array) ? [] : {} : orig;
          if (typeof orig == 'object') {
            function add(o, key, value) {
              if (is(o, Array))
                o.push(value);
              else
                o[key] = value;
            }
            jQuery.each(orig, function(key, value) {
              if (!is(value)) return true;
              add(obj, key, build(value));
            });
          }
          return obj;
        }
        this.keys = build(this.keys);
        return this;
      },
      compact: function() {
        return this.copy().COMPACT();
      },
      toString: function() {
        var i = 0, queryString = [], chunks = [], self = this;
        var addFields = function(arr, key, value) {
          if (!is(value) || value === false) return;
          var o = [encodeURIComponent(key)];
          if (value !== true) {
            o.push("=");
            o.push(encodeURIComponent(value));
          }
          arr.push(o.join(""));
        };
        var build = function(obj, base) {
          var newKey = function(key) {
            return !base || base == "" ? [key].join("") : [base, "[", key, "]"].join("");
          };
          jQuery.each(obj, function(key, value) {
            if (typeof value == 'object') 
              build(value, newKey(key));
            else
              addFields(chunks, newKey(key), value);
          });
        };
        
        build(this.keys);
        
        if (chunks.length > 0) queryString.push($hash);
        queryString.push(chunks.join($separator));
        
        return queryString.join("");
      }
    };
    
    return new queryObject(location.search, location.hash);
  };
}(jQuery.query || {}); // Pass in jQuery.query as settings object

/* end ../vendors/jquery.query.js */

/* start ../vendors/jquery.validate.js */
/*
 * jQuery validation plug-in 1.5.1
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
 * http://docs.jquery.com/Plugins/Validation
 *
 * Copyright (c) 2006 - 2008 J?rn Zaefferer
 *
 * $Id: jquery.validate.js 6110 2009-01-13 22:21:29Z joern.zaefferer $
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */

(function($) {

$.extend($.fn, {
	// http://docs.jquery.com/Plugins/Validation/validate
	validate: function( options ) {
		
		// if nothing is selected, return nothing; can't chain anyway
		if (!this.length) {
			options && options.debug && window.console && console.warn( "nothing selected, can't validate, returning nothing" );
			return;
		}
		
		// check if a validator for this form was already created
		var validator = $.data(this[0], 'validator');
		if ( validator ) {
			return validator;
		}
		
		validator = new $.validator( options, this[0] );
		$.data(this[0], 'validator', validator); 
		
		if ( validator.settings.onsubmit ) {
		
			// allow suppresing validation by adding a cancel class to the submit button
			this.find("input, button").filter(".cancel").click(function() {
				validator.cancelSubmit = true;
			});
		
			// validate the form on submit
			this.submit( function( event ) {
				if ( validator.settings.debug )
					// prevent form submit to be able to see console output
					event.preventDefault();
					
				function handle() {
					if ( validator.settings.submitHandler ) {
						validator.settings.submitHandler.call( validator, validator.currentForm );
						return false;
					}
					return true;
				}
					
				// prevent submit for invalid forms or custom submit handlers
				if ( validator.cancelSubmit ) {
					validator.cancelSubmit = false;
					return handle();
				}
				if ( validator.form() ) {
					if ( validator.pendingRequest ) {
						validator.formSubmitted = true;
						return false;
					}
					return handle();
				} else {
					validator.focusInvalid();
					return false;
				}
			});
		}
		
		return validator;
	},
	// http://docs.jquery.com/Plugins/Validation/valid
	valid: function() {
        if ( $(this[0]).is('form')) {
            return this.validate().form();
        } else {
            var valid = false;
            var validator = $(this[0].form).validate();
            this.each(function() {
				valid |= validator.element(this);
            });
            return valid;
        }
    },
	// attributes: space seperated list of attributes to retrieve and remove
	removeAttrs: function(attributes) {
		var result = {},
			$element = this;
		$.each(attributes.split(/\s/), function(index, value) {
			result[value] = $element.attr(value);
			$element.removeAttr(value);
		});
		return result;
	},
	// http://docs.jquery.com/Plugins/Validation/rules
	rules: function(command, argument) {
		var element = this[0];
		
		if (command) {
			var settings = $.data(element.form, 'validator').settings;
			var staticRules = settings.rules;
			var existingRules = $.validator.staticRules(element);
			switch(command) {
			case "add":
				$.extend(existingRules, $.validator.normalizeRule(argument));
				staticRules[element.name] = existingRules;
				if (argument.messages)
					settings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );
				break;
			case "remove":
				if (!argument) {
					delete staticRules[element.name];
					return existingRules;
				}
				var filtered = {};
				$.each(argument.split(/\s/), function(index, method) {
					filtered[method] = existingRules[method];
					delete existingRules[method];
				});
				return filtered;
			}
		}
		
		var data = $.validator.normalizeRules(
		$.extend(
			{},
			$.validator.metadataRules(element),
			$.validator.classRules(element),
			$.validator.attributeRules(element),
			$.validator.staticRules(element)
		), element);
		
		// make sure required is at front
		if (data.required) {
			var param = data.required;
			delete data.required;
			data = $.extend({required: param}, data);
		}
		
		return data;
	}
});

// Custom selectors
$.extend($.expr[":"], {
	// http://docs.jquery.com/Plugins/Validation/blank
	blank: function(a) {return !$.trim(a.value);},
	// http://docs.jquery.com/Plugins/Validation/filled
	filled: function(a) {return !!$.trim(a.value);},
	// http://docs.jquery.com/Plugins/Validation/unchecked
	unchecked: function(a) {return !a.checked;}
});


$.format = function(source, params) {
	if ( arguments.length == 1 ) 
		return function() {
			var args = $.makeArray(arguments);
			args.unshift(source);
			return $.format.apply( this, args );
		};
	if ( arguments.length > 2 && params.constructor != Array  ) {
		params = $.makeArray(arguments).slice(1);
	}
	if ( params.constructor != Array ) {
		params = [ params ];
	}
	$.each(params, function(i, n) {
		source = source.replace(new RegExp("\\{" + i + "\\}", "g"), n);
	});
	return source;
};

// constructor for validator
$.validator = function( options, form ) {
	this.settings = $.extend( {}, $.validator.defaults, options );
	this.currentForm = form;
	this.init();
};

$.extend($.validator, {

	defaults: {
		messages: {},
		groups: {},
		rules: {},
		errorClass: "error",
		errorElement: "label",
		focusInvalid: true,
		errorContainer: $( [] ),
		errorLabelContainer: $( [] ),
		onsubmit: true,
		ignore: [],
		ignoreTitle: false,
		onfocusin: function(element) {
			this.lastActive = element;
				
			// hide error label and remove error class on focus if enabled
			if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
				this.settings.unhighlight && this.settings.unhighlight.call( this, element, this.settings.errorClass );
				this.errorsFor(element).hide();
			}
		},
		onfocusout: function(element) {
			if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {
				this.element(element);
			}
		},
		onkeyup: function(element) {
			if ( element.name in this.submitted || element == this.lastElement ) {
				this.element(element);
			}
		},
		onclick: function(element) {
			if ( element.name in this.submitted )
				this.element(element);
		},
		highlight: function( element, errorClass ) {
			$( element ).addClass( errorClass );
		},
		unhighlight: function( element, errorClass ) {
			$( element ).removeClass( errorClass );
		}
	},

	// http://docs.jquery.com/Plugins/Validation/Validator/setDefaults
	setDefaults: function(settings) {
		$.extend( $.validator.defaults, settings );
	},

	messages: {
		required: "This field is required.",
		remote: "Please fix this field.",
		email: "Please enter a valid email address.",
		fileName: "Please enter a valid file name.<br> Following characters are not allowed: \\ \/ \: \* \? \" \< \> \| \& \% ",
		folderPath: "Please enter a valid file name.<br> Following characters are not allowed: \\ \/ \: \* \? \" \< \> \| \& \% ",
		url: "Please enter a valid URL.",
		date: "Please enter a valid date.",
		dateISO: "Please enter a valid date (ISO).",
		dateDE: "Bitte geben Sie ein gÙltiges Datum ein.",
		number: "Please enter a valid number.",
		numberDE: "Bitte geben Sie eine Nummer ein.",
		digits: "Please enter only digits",
		creditcard: "Please enter a valid credit card number.",
		equalTo: "Please enter the same value again.",
		accept: "Please enter a value with a valid extension.",
		maxlength: $.format("Please enter no more than {0} characters."),
		minlength: $.format("Please enter at least {0} characters."),
		rangelength: $.format("Please enter a value between {0} and {1} characters long."),
		range: $.format("Please enter a value between {0} and {1}."),
		max: $.format("Please enter a value less than or equal to {0}."),
		min: $.format("Please enter a value greater than or equal to {0}.")
	},
	
	autoCreateRanges: false,
	
	prototype: {
		
		init: function() {
			this.labelContainer = $(this.settings.errorLabelContainer);
			this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);
			this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );
			this.submitted = {};
			this.valueCache = {};
			this.pendingRequest = 0;
			this.pending = {};
			this.invalid = {};
			this.reset();
			
			var groups = (this.groups = {});
			$.each(this.settings.groups, function(key, value) {
				$.each(value.split(/\s/), function(index, name) {
					groups[name] = key;
				});
			});
			var rules = this.settings.rules;
			$.each(rules, function(key, value) {
				rules[key] = $.validator.normalizeRule(value);
			});
			
			function delegate(event) {
				var validator = $.data(this[0].form, "validator");
				validator.settings["on" + event.type] && validator.settings["on" + event.type].call(validator, this[0] );
			}
			$(this.currentForm)
				.delegate("focusin focusout keyup", ":text, :password, :file, select, textarea", delegate)
				.delegate("click", ":radio, :checkbox", delegate);

			if (this.settings.invalidHandler)
				$(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);
		},

		// http://docs.jquery.com/Plugins/Validation/Validator/form
		form: function() {
			this.checkForm();
			$.extend(this.submitted, this.errorMap);
			this.invalid = $.extend({}, this.errorMap);
			if (!this.valid())
				$(this.currentForm).triggerHandler("invalid-form", [this]);
			this.showErrors();
			return this.valid();
		},
		
		checkForm: function() {
			this.prepareForm();
			for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {
				this.check( elements[i] );
			}
			return this.valid(); 
		},
		
		// http://docs.jquery.com/Plugins/Validation/Validator/element
		element: function( element ) {
			element = this.clean( element );
			this.lastElement = element;
			this.prepareElement( element );
			this.currentElements = $(element);
			var result = this.check( element );
			if ( result ) {
				delete this.invalid[element.name];
			} else {
				this.invalid[element.name] = true;
			}
			if ( !this.numberOfInvalids() ) {
				// Hide error containers on last error
				this.toHide = this.toHide.add( this.containers );
			}
			this.showErrors();
			return result;
		},

		// http://docs.jquery.com/Plugins/Validation/Validator/showErrors
		showErrors: function(errors) {
			if(errors) {
				// add items to error list and map
				$.extend( this.errorMap, errors );
				this.errorList = [];
				for ( var name in errors ) {
					this.errorList.push({
						message: errors[name],
						element: this.findByName(name)[0]
					});
				}
				// remove items from success list
				this.successList = $.grep( this.successList, function(element) {
					return !(element.name in errors);
				});
			}
			this.settings.showErrors
				? this.settings.showErrors.call( this, this.errorMap, this.errorList )
				: this.defaultShowErrors();
		},
		
		// http://docs.jquery.com/Plugins/Validation/Validator/resetForm
		resetForm: function() {
			if ( $.fn.resetForm )
				$( this.currentForm ).resetForm();
			this.submitted = {};
			this.prepareForm();
			this.hideErrors();
			this.elements().removeClass( this.settings.errorClass );
		},
		
		numberOfInvalids: function() {
			return this.objectLength(this.invalid);
		},
		
		objectLength: function( obj ) {
			var count = 0;
			for ( var i in obj )
				count++;
			return count;
		},
		
		hideErrors: function() {
			this.addWrapper( this.toHide ).hide();
		},
		
		valid: function() {
			return this.size() == 0;
		},
		
		size: function() {
			return this.errorList.length;
		},
		
		focusInvalid: function() {
			if( this.settings.focusInvalid ) {
				try {
					$(this.findLastActive() || this.errorList.length && this.errorList[0].element || []).filter(":visible").focus();
				} catch(e) {
					// ignore IE throwing errors when focusing hidden elements
				}
			}
		},
		
		findLastActive: function() {
			var lastActive = this.lastActive;
			return lastActive && $.grep(this.errorList, function(n) {
				return n.element.name == lastActive.name;
			}).length == 1 && lastActive;
		},
		
		elements: function() {
			var validator = this,
				rulesCache = {};
			
			// select all valid inputs inside the form (no submit or reset buttons)
			// workaround $Query([]).add until http://dev.jquery.com/ticket/2114 is solved
			return $([]).add(this.currentForm.elements)
			.filter(":input")
			.not(":submit, :reset, :image, [disabled]")
			.not( this.settings.ignore )
			.filter(function() {
				!this.name && validator.settings.debug && window.console && console.error( "%o has no name assigned", this);
			
				// select only the first element for each name, and only those with rules specified
				if ( this.name in rulesCache || !validator.objectLength($(this).rules()) )
					return false;
				
				rulesCache[this.name] = true;
				return true;
			});
		},
		
		clean: function( selector ) {
			return $( selector )[0];
		},
		
		errors: function() {
			return $( this.settings.errorElement + "." + this.settings.errorClass, this.errorContext );
		},
		
		reset: function() {
			this.successList = [];
			this.errorList = [];
			this.errorMap = {};
			this.toShow = $([]);
			this.toHide = $([]);
			this.formSubmitted = false;
			this.currentElements = $([]);
		},
		
		prepareForm: function() {
			this.reset();
			this.toHide = this.errors().add( this.containers );
		},
		
		prepareElement: function( element ) {
			this.reset();
			this.toHide = this.errorsFor(element);
		},
	
		check: function( element ) {
			element = this.clean( element );
			
			// if radio/checkbox, validate first element in group instead
			if (this.checkable(element)) {
				element = this.findByName( element.name )[0];
			}
			
			var rules = $(element).rules();
			var dependencyMismatch = false;
			for( method in rules ) {
				var rule = { method: method, parameters: rules[method] };
				try {
					var result = $.validator.methods[method].call( this, element.value, element, rule.parameters );
					
					// if a method indicates that the field is optional and therefore valid,
					// don't mark it as valid when there are no other rules
					if ( result == "dependency-mismatch" ) {
						dependencyMismatch = true;
						continue;
					}
					dependencyMismatch = false;
					
					if ( result == "pending" ) {
						this.toHide = this.toHide.not( this.errorsFor(element) );
						return;
					}
					
					if( !result ) {
						this.formatAndAdd( element, rule );
						return false;
					}
				} catch(e) {
					this.settings.debug && window.console && console.log("exception occured when checking element " + element.id
						 + ", check the '" + rule.method + "' method");
					throw e;
				}
			}
			if (dependencyMismatch)
				return;
			if ( this.objectLength(rules) )
				this.successList.push(element);
			return true;
		},
		
		// return the custom message for the given element and validation method
		// specified in the element's "messages" metadata
		customMetaMessage: function(element, method) {
			if (!$.metadata)
				return;
			
			var meta = this.settings.meta
				? $(element).metadata()[this.settings.meta]
				: $(element).metadata();
			
			return meta && meta.messages && meta.messages[method];
		},
		
		// return the custom message for the given element name and validation method
		customMessage: function( name, method ) {
			var m = this.settings.messages[name];
			return m && (m.constructor == String
				? m
				: m[method]);
		},
		
		// return the first defined argument, allowing empty strings
		findDefined: function() {
			for(var i = 0; i < arguments.length; i++) {
				if (arguments[i] !== undefined)
					return arguments[i];
			}
			return undefined;
		},
		
		defaultMessage: function( element, method) {
			return this.findDefined(
				this.customMessage( element.name, method ),
				this.customMetaMessage( element, method ),
				// title is never undefined, so handle empty string as undefined
				!this.settings.ignoreTitle && element.title || undefined,
				$.validator.messages[method],
				"<strong>Warning: No message defined for " + element.name + "</strong>"
			);
		},
		
		formatAndAdd: function( element, rule ) {
			var message = this.defaultMessage( element, rule.method );
			if ( typeof message == "function" ) 
				message = message.call(this, rule.parameters, element);
			this.errorList.push({
				message: message,
				element: element
			});
			this.errorMap[element.name] = message;
			this.submitted[element.name] = message;
		},
		
		addWrapper: function(toToggle) {
			if ( this.settings.wrapper )
				toToggle = toToggle.add( toToggle.parents( this.settings.wrapper ) );
			return toToggle;
		},
		
		defaultShowErrors: function() {
			for ( var i = 0; this.errorList[i]; i++ ) {
				var error = this.errorList[i];
				this.settings.highlight && this.settings.highlight.call( this, error.element, this.settings.errorClass );
				this.showLabel( error.element, error.message );
			}
			if( this.errorList.length ) {
				this.toShow = this.toShow.add( this.containers );
			}
			if (this.settings.success) {
				for ( var i = 0; this.successList[i]; i++ ) {
					this.showLabel( this.successList[i] );
				}
			}
			if (this.settings.unhighlight) {
				for ( var i = 0, elements = this.validElements(); elements[i]; i++ ) {
					this.settings.unhighlight.call( this, elements[i], this.settings.errorClass );
				}
			}
			this.toHide = this.toHide.not( this.toShow );
			this.hideErrors();
			this.addWrapper( this.toShow ).show();
		},
		
		validElements: function() {
			return this.currentElements.not(this.invalidElements());
		},
		
		invalidElements: function() {
			return $(this.errorList).map(function() {
				return this.element;
			});
		},
		
		showLabel: function(element, message) {
			var label = this.errorsFor( element );
			if ( label.length ) {
				// refresh error/success class
				label.removeClass().addClass( this.settings.errorClass );
			
				// check if we have a generated label, replace the message then
				label.attr("generated") && label.html(message);
			} else {
				// create label
				label = $("<" + this.settings.errorElement + "/>")
					.attr({"for":  this.idOrName(element), generated: true})
					.addClass(this.settings.errorClass)
					.html(message || "");
				if ( this.settings.wrapper ) {
					// make sure the element is visible, even in IE
					// actually showing the wrapped element is handled elsewhere
					label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();
				}
				if ( !this.labelContainer.append(label).length )
					this.settings.errorPlacement
						? this.settings.errorPlacement(label, $(element) )
						: label.insertAfter(element);
			}
			if ( !message && this.settings.success ) {
				label.text("");
				typeof this.settings.success == "string"
					? label.addClass( this.settings.success )
					: this.settings.success( label );
			}
			this.toShow = this.toShow.add(label);
		},
		
		errorsFor: function(element) {
			return this.errors().filter("[for='" + this.idOrName(element) + "']");
		},
		
		idOrName: function(element) {
			return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);
		},

		checkable: function( element ) {
			return /radio|checkbox/i.test(element.type);
		},
		
		findByName: function( name ) {
			// select by name and filter by form for performance over form.find("[name=...]")
			var form = this.currentForm;
			return $(document.getElementsByName(name)).map(function(index, element) {
				return element.form == form && element.name == name && element  || null;
			});
		},
		
		getLength: function(value, element) {
			switch( element.nodeName.toLowerCase() ) {
			case 'select':
				return $("option:selected", element).length;
			case 'input':
				if( this.checkable( element) )
					return this.findByName(element.name).filter(':checked').length;
			}
			return value.length;
		},
	
		depend: function(param, element) {
			return this.dependTypes[typeof param]
				? this.dependTypes[typeof param](param, element)
				: true;
		},
	
		dependTypes: {
			"boolean": function(param, element) {
				return param;
			},
			"string": function(param, element) {
				return !!$(param, element.form).length;
			},
			"function": function(param, element) {
				return param(element);
			}
		},
		
		optional: function(element) {
			return !$.validator.methods.required.call(this, $.trim(element.value), element) && "dependency-mismatch";
		},
		
		startRequest: function(element) {
			if (!this.pending[element.name]) {
				this.pendingRequest++;
				this.pending[element.name] = true;
			}
		},
		
		stopRequest: function(element, valid) {
			this.pendingRequest--;
			// sometimes synchronization fails, make sure pendingRequest is never < 0
			if (this.pendingRequest < 0)
				this.pendingRequest = 0;
			delete this.pending[element.name];
			if ( valid && this.pendingRequest == 0 && this.formSubmitted && this.form() ) {
				$(this.currentForm).submit();
			} else if (!valid && this.pendingRequest == 0 && this.formSubmitted) {
				$(this.currentForm).triggerHandler("invalid-form", [this]);
			}
		},
		
		previousValue: function(element) {
			return $.data(element, "previousValue") || $.data(element, "previousValue", previous = {
				old: null,
				valid: true,
				message: this.defaultMessage( element, "remote" )
			});
		}
		
	},
	
	classRuleSettings: {
		required: {required: true},
		email: {email: true},
		fileName: {fileName: true},
		folderPath: {folderPath: true},
		url: {url: true},
		date: {date: true},
		dateISO: {dateISO: true},
		dateDE: {dateDE: true},
		number: {number: true},
		numberDE: {numberDE: true},
		digits: {digits: true},
		creditcard: {creditcard: true}
	},
	
	addClassRules: function(className, rules) {
		className.constructor == String ?
			this.classRuleSettings[className] = rules :
			$.extend(this.classRuleSettings, className);
	},
	
	classRules: function(element) {
		var rules = {};
		var classes = $(element).attr('class');
		classes && $.each(classes.split(' '), function() {
			if (this in $.validator.classRuleSettings) {
				$.extend(rules, $.validator.classRuleSettings[this]);
			}
		});
		return rules;
	},
	
	attributeRules: function(element) {
		var rules = {};
		var $element = $(element);
		
		for (method in $.validator.methods) {
			var value = $element.attr(method);
			if (value) {
				rules[method] = value;
			}
		}
		
		// maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs
		if (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) {
			delete rules.maxlength;
		}
		
		return rules;
	},
	
	metadataRules: function(element) {
		if (!$.metadata) return {};
		
		var meta = $.data(element.form, 'validator').settings.meta;
		return meta ?
			$(element).metadata()[meta] :
			$(element).metadata();
	},
	
	staticRules: function(element) {
		var rules = {};
		var validator = $.data(element.form, 'validator');
		if (validator.settings.rules) {
			rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};
		}
		return rules;
	},
	
	normalizeRules: function(rules, element) {
		// handle dependency check
		$.each(rules, function(prop, val) {
			// ignore rule when param is explicitly false, eg. required:false
			if (val === false) {
				delete rules[prop];
				return;
			}
			if (val.param || val.depends) {
				var keepRule = true;
				switch (typeof val.depends) {
					case "string":
						keepRule = !!$(val.depends, element.form).length;
						break;
					case "function":
						keepRule = val.depends.call(element, element);
						break;
				}
				if (keepRule) {
					rules[prop] = val.param !== undefined ? val.param : true;
				} else {
					delete rules[prop];
				}
			}
		});
		
		// evaluate parameters
		$.each(rules, function(rule, parameter) {
			rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;
		});
		
		// clean number parameters
		$.each(['minlength', 'maxlength', 'min', 'max'], function() {
			if (rules[this]) {
				rules[this] = Number(rules[this]);
			}
		});
		$.each(['rangelength', 'range'], function() {
			if (rules[this]) {
				rules[this] = [Number(rules[this][0]), Number(rules[this][1])];
			}
		});
		
		if ($.validator.autoCreateRanges) {
			// auto-create ranges
			if (rules.min && rules.max) {
				rules.range = [rules.min, rules.max];
				delete rules.min;
				delete rules.max;
			}
			if (rules.minlength && rules.maxlength) {
				rules.rangelength = [rules.minlength, rules.maxlength];
				delete rules.minlength;
				delete rules.maxlength;
			}
		}
		
		// To support custom messages in metadata ignore rule methods titled "messages"
		if (rules.messages) {
			delete rules.messages
		}
		
		return rules;
	},
	
	// Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}
	normalizeRule: function(data) {
		if( typeof data == "string" ) {
			var transformed = {};
			$.each(data.split(/\s/), function() {
				transformed[this] = true;
			});
			data = transformed;
		}
		return data;
	},
	
	// http://docs.jquery.com/Plugins/Validation/Validator/addMethod
	addMethod: function(name, method, message) {
		$.validator.methods[name] = method;
		$.validator.messages[name] = message;
		if (method.length < 3) {
			$.validator.addClassRules(name, $.validator.normalizeRule(name));
		}
	},

	methods: {

		// http://docs.jquery.com/Plugins/Validation/Methods/required
		required: function(value, element, param) {
			// check if dependency is met
			if ( !this.depend(param, element) )
				return "dependency-mismatch";
			switch( element.nodeName.toLowerCase() ) {
			case 'select':
				var options = $("option:selected", element);
				return options.length > 0 && ( element.type == "select-multiple" || ($.browser.msie && !(options[0].attributes['value'].specified) ? options[0].text : options[0].value).length > 0);
			case 'input':
				if ( this.checkable(element) )
					return this.getLength(value, element) > 0;
			default:
				return $.trim(value).length > 0;
			}
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/remote
		remote: function(value, element, param) {
			if ( this.optional(element) )
				return "dependency-mismatch";
			
			var previous = this.previousValue(element);
			
			if (!this.settings.messages[element.name] )
				this.settings.messages[element.name] = {};
			this.settings.messages[element.name].remote = typeof previous.message == "function" ? previous.message(value) : previous.message;
			
			param = typeof param == "string" && {url:param} || param; 
			
			if ( previous.old !== value ) {
				previous.old = value;
				var validator = this;
				this.startRequest(element);
				var data = {};
				data[element.name] = value;
				$.ajax($.extend(true, {
					url: param,
					mode: "abort",
					port: "validate" + element.name,
					dataType: "json",
					data: data,
					success: function(response) {
						if ( response ) {
							var submitted = validator.formSubmitted;
							validator.prepareElement(element);
							validator.formSubmitted = submitted;
							validator.successList.push(element);
							validator.showErrors();
						} else {
							var errors = {};
							errors[element.name] =  response || validator.defaultMessage( element, "remote" );
							validator.showErrors(errors);
						}
						previous.valid = response;
						validator.stopRequest(element, response);
					}
				}, param));
				return "pending";
			} else if( this.pending[element.name] ) {
				return "pending";
			}
			return previous.valid;
		},

		// http://docs.jquery.com/Plugins/Validation/Methods/minlength
		minlength: function(value, element, param) {
			return this.optional(element) || this.getLength($.trim(value), element) >= param;
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/maxlength
		maxlength: function(value, element, param) {
			return this.optional(element) || this.getLength($.trim(value), element) <= param;
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/rangelength
		rangelength: function(value, element, param) {
			var length = this.getLength($.trim(value), element);
			return this.optional(element) || ( length >= param[0] && length <= param[1] );
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/min
		min: function( value, element, param ) {
			return this.optional(element) || value >= param;
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/max
		max: function( value, element, param ) {
			return this.optional(element) || value <= param;
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/range
		range: function( value, element, param ) {
			return this.optional(element) || ( value >= param[0] && value <= param[1] );
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/email
		email: function(value, element) {
			// contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
			return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);
		},
	
		// http://docs.jquery.com/Plugins/Validation/Methods/url
		url: function(value, element) {
			// contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/
			return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
		},
        
		// CUSTOM by Sinan Yasar | www.sinanyasar.com
		fileName: function(value, element) {
			return this.optional(element) || /^[^\\\/\:\*\?\"\<\>\|\&\%]+$/.test(value);
		},
		
		// CUSTOM by Sinan Yasar | www.sinanyasar.com
		folderPath: function(value, element) {
			return this.optional(element) || /^[^\\\:\*\?\"\<\>\|\&\%]+$/.test(value);
		},
		// http://docs.jquery.com/Plugins/Validation/Methods/date
		date: function(value, element) {
			return this.optional(element) || !/Invalid|NaN/.test(new Date(value));
		},
	
		// http://docs.jquery.com/Plugins/Validation/Methods/dateISO
		dateISO: function(value, element) {
			return this.optional(element) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);
		},
	
		// http://docs.jquery.com/Plugins/Validation/Methods/dateDE
		dateDE: function(value, element) {
			return this.optional(element) || /^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value);
		},
	
		// http://docs.jquery.com/Plugins/Validation/Methods/number
		number: function(value, element) {
			return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);
		},
	
		// http://docs.jquery.com/Plugins/Validation/Methods/numberDE
		numberDE: function(value, element) {
			return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value);
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/digits
		digits: function(value, element) {
			return this.optional(element) || /^\d+$/.test(value);
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/creditcard
		// based on http://en.wikipedia.org/wiki/Luhn
		creditcard: function(value, element) {
			if ( this.optional(element) )
				return "dependency-mismatch";
			// accept only digits and dashes
			if (/[^0-9-]+/.test(value))
				return false;
			var nCheck = 0,
				nDigit = 0,
				bEven = false;

			value = value.replace(/\D/g, "");

			for (n = value.length - 1; n >= 0; n--) {
				var cDigit = value.charAt(n);
				var nDigit = parseInt(cDigit, 10);
				if (bEven) {
					if ((nDigit *= 2) > 9)
						nDigit -= 9;
				}
				nCheck += nDigit;
				bEven = !bEven;
			}

			return (nCheck % 10) == 0;
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/accept
		accept: function(value, element, param) {
			param = typeof param == "string" ? param : "png|jpe?g|gif";
			return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i")); 
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/equalTo
		equalTo: function(value, element, param) {
			return value == $(param).val();
		}
		
	}
	
});

})(jQuery);

// ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort() 
;(function($) {
	var ajax = $.ajax;
	var pendingRequests = {};
	$.ajax = function(settings) {
		// create settings for compatibility with ajaxSetup
		settings = $.extend(settings, $.extend({}, $.ajaxSettings, settings));
		var port = settings.port;
		if (settings.mode == "abort") {
			if ( pendingRequests[port] ) {
				pendingRequests[port].abort();
			}
			return (pendingRequests[port] = ajax.apply(this, arguments));
		}
		return ajax.apply(this, arguments);
	};
})(jQuery);

// provides cross-browser focusin and focusout events
// IE has native support, in other browsers, use event caputuring (neither bubbles)

// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target 

// provides triggerEvent(type: String, target: Element) to trigger delegated events
;(function($) {
	$.each({
		focus: 'focusin',
		blur: 'focusout'	
	}, function( original, fix ){
		$.event.special[fix] = {
			setup:function() {
				if ( $.browser.msie ) return false;
				this.addEventListener( original, $.event.special[fix].handler, true );
			},
			teardown:function() {
				if ( $.browser.msie ) return false;
				this.removeEventListener( original,
				$.event.special[fix].handler, true );
			},
			handler: function(e) {
				arguments[0] = $.event.fix(e);
				arguments[0].type = fix;
				return $.event.handle.apply(this, arguments);
			}
		};
	});
	$.extend($.fn, {
		delegate: function(type, delegate, handler) {
			return this.bind(type, function(event) {
				var target = $(event.target);
				if (target.is(delegate)) {
					return handler.apply(target, arguments);
				}
			});
		},
		triggerEvent: function(type, target) {
			return this.triggerHandler(type, [$.event.fix({ type: type, target: target })]);
		}
	})
})(jQuery);

/* end ../vendors/jquery.validate.js */

/* start ../vendors/jquery.clearform.js */
(function($) {
$.fn.clearForm = function() {
  return this.each(function() {
 var type = this.type, tag = this.tagName.toLowerCase();
 if (tag == 'form')
   return $(':input',this).clearForm();
 if (type == 'text' || type == 'password' || tag == 'textarea')
   this.value = '';
 else if (type == 'checkbox' || type == 'radio')
   this.checked = false;
 else if (tag == 'select')
   this.selectedIndex = -1;
  });
};
})(jQuery);
/* end ../vendors/jquery.clearform.js */

/* start ../vendors/jquery.colorPicker.js */
/**
 * Really Simple Color Picker in jQuery
 * 
 * Copyright (c) 2008 Lakshan Perera (www.laktek.com)
 * Licensed under the MIT (MIT-LICENSE.txt)  licenses.
 * 
 */

(function($){
  $.fn.colorPicker = function(){    
    if(this.length > 0) buildSelector();
    return this.each(function(i) { buildPicker(this)}); 
  };
  
  var selectorOwner;
  var selectorShowing = false;
  
  buildPicker = function(element){
    //build color picker
    control = $("<div class='color_picker'>&nbsp;</div>")
    control.css('background-color', $(element).val());
    
    //bind click event to color picker
    control.bind("click", toggleSelector);
    
    //add the color picker section
    $(element).after(control);
    
    //hide the input box
    $(element).hide();
  };
  
  buildSelector = function(){
    selector = $("<div id='color_selector'></div>");

     //add color pallete
     $.each($.fn.colorPicker.defaultColors, function(i){
      swatch = $("<div class='color_swatch'>&nbsp;</div>")
      swatch.css("background-color", "#" + this);
      swatch.bind("click", function(e){ changeColor($(this).css("background-color")); return false; });
      swatch.bind("mouseover", function(e){ 
        $(this).css("border-color", "#598FEF"); 
        $("input#color_value").val(toHex($(this).css("background-color")));    
        }); 
      swatch.bind("mouseout", function(e){ 
        $(this).css("border-color", "#000");
        $("input#color_value").val(toHex($(selectorOwner).css("background-color")));
        });
      
     swatch.appendTo(selector);
     });
  
     //add HEX value field
     hex_field = $("<label for='color_value'>Hex</label><input type='text' size='8' id='color_value'/>");
     hex_field.bind("keydown", function(event){
      if(event.keyCode == 13) {changeColor($(this).val());}
      if(event.keyCode == 27) {toggleSelector()}
     });
     
     $("<div id='color_custom'></div>").append(hex_field).appendTo(selector);

     $("body").append(selector); 
     selector.hide();

  };
  
  checkMouse = function(event){
    //check the click was on selector itself or on selectorOwner
    var selector = "div#color_selector";
    var selectorParent = $(event.target).parents(selector).length;
    if(event.target == $(selector)[0] || event.target == selectorOwner || selectorParent > 0) return
    
    hideSelector();   
  }
  
  hideSelector = function(){
    var selector = $("div#color_selector");
    
    $(document).unbind("mousedown", checkMouse);
    selector.hide();
    selectorShowing = false
  }
  
  showSelector = function(){
    var selector = $("div#color_selector");
    
    //alert($(selectorOwner).offset().top);
    
    selector.css({
      top: $(selectorOwner).offset().top + ($(selectorOwner).outerHeight()),
      left: $(selectorOwner).offset().left
    }); 
    hexColor = $(selectorOwner).prev("input").val();
    $("input#color_value").val(hexColor);
    selector.show();
    
    //bind close event handler
    $(document).bind("mousedown", checkMouse);
    selectorShowing = true 
   }
  
  toggleSelector = function(event){
    selectorOwner = this; 
    selectorShowing ? hideSelector() : showSelector();
  }
  
  changeColor = function(value){
    if(selectedValue = toHex(value)){
      $(selectorOwner).css("background-color", selectedValue);
      $(selectorOwner).prev("input").val(selectedValue).change();
    
      //close the selector
      hideSelector();    
    }
  };
  
  //converts RGB string to HEX - inspired by http://code.google.com/p/jquery-color-utils
  toHex = function(color){
    //valid HEX code is entered
    if(color.match(/[0-9a-fA-F]{3}$/) || color.match(/[0-9a-fA-F]{6}$/)){
      color = (color.charAt(0) == "#") ? color : ("#" + color);
    }
    //rgb color value is entered (by selecting a swatch)
    else if(color.match(/^rgb\(([0-9]|[1-9][0-9]|[1][0-9]{2}|[2][0-4][0-9]|[2][5][0-5]),[ ]{0,1}([0-9]|[1-9][0-9]|[1][0-9]{2}|[2][0-4][0-9]|[2][5][0-5]),[ ]{0,1}([0-9]|[1-9][0-9]|[1][0-9]{2}|[2][0-4][0-9]|[2][5][0-5])\)$/)){
      var c = ([parseInt(RegExp.$1),parseInt(RegExp.$2),parseInt(RegExp.$3)]);
      
      var pad = function(str){
            if(str.length < 2){
              for(var i = 0,len = 2 - str.length ; i<len ; i++){
                str = '0'+str;
              }
            }
            return str;
      }

      if(c.length == 3){
        var r = pad(c[0].toString(16)),g = pad(c[1].toString(16)),b= pad(c[2].toString(16));
        color = '#' + r + g + b;
      }
    }
    else color = false;
    
    return color
  }

  
  //public methods
  $.fn.colorPicker.addColors = function(colorArray){
    $.fn.colorPicker.defaultColors = $.fn.colorPicker.defaultColors.concat(colorArray);
  };
  
  $.fn.colorPicker.defaultColors = 
	[ '000000', '993300','333300', '000080', '333399', '333333', '800000', 'FF6600', '808000', '008000', '008080', '0000FF', '666699', '808080', 'FF0000', 'FF9900', '99CC00', '339966', '33CCCC', '3366FF', '800080', '999999', 'FF00FF', 'FFCC00', 'FFFF00', '00FF00', '00FFFF', '00CCFF', '993366', 'C0C0C0', 'FF99CC', 'FFCC99', 'FFFF99' , 'CCFFFF', '99CCFF', 'FFFFFF'];
  
})(jQuery);



/* end ../vendors/jquery.colorPicker.js */

/* start ../vendors/cufon-yui.js */
/*
 * Copyright (c) 2009 Simo Kinnunen.
 * Licensed under the MIT license.
 *
 * @version 1.09
 */
var Cufon=(function(){var m=function(){return m.replace.apply(null,arguments)};var x=m.DOM={ready:(function(){var C=false,E={loaded:1,complete:1};var B=[],D=function(){if(C){return}C=true;for(var F;F=B.shift();F()){}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",D,false);window.addEventListener("pageshow",D,false)}if(!window.opera&&document.readyState){(function(){E[document.readyState]?D():setTimeout(arguments.callee,10)})()}if(document.readyState&&document.createStyleSheet){(function(){try{document.body.doScroll("left");D()}catch(F){setTimeout(arguments.callee,1)}})()}q(window,"load",D);return function(F){if(!arguments.length){D()}else{C?F():B.push(F)}}})(),root:function(){return document.documentElement||document.body}};var n=m.CSS={Size:function(C,B){this.value=parseFloat(C);this.unit=String(C).match(/[a-z%]*$/)[0]||"px";this.convert=function(D){return D/B*this.value};this.convertFrom=function(D){return D/this.value*B};this.toString=function(){return this.value+this.unit}},addClass:function(C,B){var D=C.className;C.className=D+(D&&" ")+B;return C},color:j(function(C){var B={};B.color=C.replace(/^rgba\((.*?),\s*([\d.]+)\)/,function(E,D,F){B.opacity=parseFloat(F);return"rgb("+D+")"});return B}),fontStretch:j(function(B){if(typeof B=="number"){return B}if(/%$/.test(B)){return parseFloat(B)/100}return{"ultra-condensed":0.5,"extra-condensed":0.625,condensed:0.75,"semi-condensed":0.875,"semi-expanded":1.125,expanded:1.25,"extra-expanded":1.5,"ultra-expanded":2}[B]||1}),getStyle:function(C){var B=document.defaultView;if(B&&B.getComputedStyle){return new a(B.getComputedStyle(C,null))}if(C.currentStyle){return new a(C.currentStyle)}return new a(C.style)},gradient:j(function(F){var G={id:F,type:F.match(/^-([a-z]+)-gradient\(/)[1],stops:[]},C=F.substr(F.indexOf("(")).match(/([\d.]+=)?(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)/ig);for(var E=0,B=C.length,D;E<B;++E){D=C[E].split("=",2).reverse();G.stops.push([D[1]||E/(B-1),D[0]])}return G}),quotedList:j(function(E){var D=[],C=/\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g,B;while(B=C.exec(E)){D.push(B[3]||B[1])}return D}),recognizesMedia:j(function(G){var E=document.createElement("style"),D,C,B;E.type="text/css";E.media=G;try{E.appendChild(document.createTextNode("/**/"))}catch(F){}C=g("head")[0];C.insertBefore(E,C.firstChild);D=(E.sheet||E.styleSheet);B=D&&!D.disabled;C.removeChild(E);return B}),removeClass:function(D,C){var B=RegExp("(?:^|\\s+)"+C+"(?=\\s|$)","g");D.className=D.className.replace(B,"");return D},supports:function(D,C){var B=document.createElement("span").style;if(B[D]===undefined){return false}B[D]=C;return B[D]===C},textAlign:function(E,D,B,C){if(D.get("textAlign")=="right"){if(B>0){E=" "+E}}else{if(B<C-1){E+=" "}}return E},textShadow:j(function(F){if(F=="none"){return null}var E=[],G={},B,C=0;var D=/(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig;while(B=D.exec(F)){if(B[0]==","){E.push(G);G={};C=0}else{if(B[1]){G.color=B[1]}else{G[["offX","offY","blur"][C++]]=B[2]}}}E.push(G);return E}),textTransform:(function(){var B={uppercase:function(C){return C.toUpperCase()},lowercase:function(C){return C.toLowerCase()},capitalize:function(C){return C.replace(/\b./g,function(D){return D.toUpperCase()})}};return function(E,D){var C=B[D.get("textTransform")];return C?C(E):E}})(),whiteSpace:(function(){var D={inline:1,"inline-block":1,"run-in":1};var C=/^\s+/,B=/\s+$/;return function(H,F,G,E){if(E){if(E.nodeName.toLowerCase()=="br"){H=H.replace(C,"")}}if(D[F.get("display")]){return H}if(!G.previousSibling){H=H.replace(C,"")}if(!G.nextSibling){H=H.replace(B,"")}return H}})()};n.ready=(function(){var B=!n.recognizesMedia("all"),E=false;var D=[],H=function(){B=true;for(var K;K=D.shift();K()){}};var I=g("link"),J=g("style");function C(K){return K.disabled||G(K.sheet,K.media||"screen")}function G(M,P){if(!n.recognizesMedia(P||"all")){return true}if(!M||M.disabled){return false}try{var Q=M.cssRules,O;if(Q){search:for(var L=0,K=Q.length;O=Q[L],L<K;++L){switch(O.type){case 2:break;case 3:if(!G(O.styleSheet,O.media.mediaText)){return false}break;default:break search}}}}catch(N){}return true}function F(){if(document.createStyleSheet){return true}var L,K;for(K=0;L=I[K];++K){if(L.rel.toLowerCase()=="stylesheet"&&!C(L)){return false}}for(K=0;L=J[K];++K){if(!C(L)){return false}}return true}x.ready(function(){if(!E){E=n.getStyle(document.body).isUsable()}if(B||(E&&F())){H()}else{setTimeout(arguments.callee,10)}});return function(K){if(B){K()}else{D.push(K)}}})();function s(D){var C=this.face=D.face,B={"\u0020":1,"\u00a0":1,"\u3000":1};this.glyphs=D.glyphs;this.w=D.w;this.baseSize=parseInt(C["units-per-em"],10);this.family=C["font-family"].toLowerCase();this.weight=C["font-weight"];this.style=C["font-style"]||"normal";this.viewBox=(function(){var F=C.bbox.split(/\s+/);var E={minX:parseInt(F[0],10),minY:parseInt(F[1],10),maxX:parseInt(F[2],10),maxY:parseInt(F[3],10)};E.width=E.maxX-E.minX;E.height=E.maxY-E.minY;E.toString=function(){return[this.minX,this.minY,this.width,this.height].join(" ")};return E})();this.ascent=-parseInt(C.ascent,10);this.descent=-parseInt(C.descent,10);this.height=-this.ascent+this.descent;this.spacing=function(L,N,E){var O=this.glyphs,M,K,G,P=[],F=0,J=-1,I=-1,H;while(H=L[++J]){M=O[H]||this.missingGlyph;if(!M){continue}if(K){F-=G=K[H]||0;P[I]-=G}F+=P[++I]=~~(M.w||this.w)+N+(B[H]?E:0);K=M.k}P.total=F;return P}}function f(){var C={},B={oblique:"italic",italic:"oblique"};this.add=function(D){(C[D.style]||(C[D.style]={}))[D.weight]=D};this.get=function(H,I){var G=C[H]||C[B[H]]||C.normal||C.italic||C.oblique;if(!G){return null}I={normal:400,bold:700}[I]||parseInt(I,10);if(G[I]){return G[I]}var E={1:1,99:0}[I%100],K=[],F,D;if(E===undefined){E=I>400}if(I==500){I=400}for(var J in G){if(!k(G,J)){continue}J=parseInt(J,10);if(!F||J<F){F=J}if(!D||J>D){D=J}K.push(J)}if(I<F){I=F}if(I>D){I=D}K.sort(function(M,L){return(E?(M>=I&&L>=I)?M<L:M>L:(M<=I&&L<=I)?M>L:M<L)?-1:1});return G[K[0]]}}function r(){function D(F,G){if(F.contains){return F.contains(G)}return F.compareDocumentPosition(G)&16}function B(G){var F=G.relatedTarget;if(!F||D(this,F)){return}C(this,G.type=="mouseover")}function E(F){C(this,F.type=="mouseenter")}function C(F,G){setTimeout(function(){var H=d.get(F).options;m.replace(F,G?h(H,H.hover):H,true)},10)}this.attach=function(F){if(F.onmouseenter===undefined){q(F,"mouseover",B);q(F,"mouseout",B)}else{q(F,"mouseenter",E);q(F,"mouseleave",E)}}}function u(){var C=[],D={};function B(H){var E=[],G;for(var F=0;G=H[F];++F){E[F]=C[D[G]]}return E}this.add=function(F,E){D[F]=C.push(E)-1};this.repeat=function(){var E=arguments.length?B(arguments):C,F;for(var G=0;F=E[G++];){m.replace(F[0],F[1],true)}}}function A(){var D={},B=0;function C(E){return E.cufid||(E.cufid=++B)}this.get=function(E){var F=C(E);return D[F]||(D[F]={})}}function a(B){var D={},C={};this.extend=function(E){for(var F in E){if(k(E,F)){D[F]=E[F]}}return this};this.get=function(E){return D[E]!=undefined?D[E]:B[E]};this.getSize=function(F,E){return C[F]||(C[F]=new n.Size(this.get(F),E))};this.isUsable=function(){return !!B}}function q(C,B,D){if(C.addEventListener){C.addEventListener(B,D,false)}else{if(C.attachEvent){C.attachEvent("on"+B,function(){return D.call(C,window.event)})}}}function v(C,B){var D=d.get(C);if(D.options){return C}if(B.hover&&B.hoverables[C.nodeName.toLowerCase()]){b.attach(C)}D.options=B;return C}function j(B){var C={};return function(D){if(!k(C,D)){C[D]=B.apply(null,arguments)}return C[D]}}function c(F,E){var B=n.quotedList(E.get("fontFamily").toLowerCase()),D;for(var C=0;D=B[C];++C){if(i[D]){return i[D].get(E.get("fontStyle"),E.get("fontWeight"))}}return null}function g(B){return document.getElementsByTagName(B)}function k(C,B){return C.hasOwnProperty(B)}function h(){var C={},B,F;for(var E=0,D=arguments.length;B=arguments[E],E<D;++E){for(F in B){if(k(B,F)){C[F]=B[F]}}}return C}function o(E,M,C,N,F,D){var K=document.createDocumentFragment(),H;if(M===""){return K}var L=N.separate;var I=M.split(p[L]),B=(L=="words");if(B&&t){if(/^\s/.test(M)){I.unshift("")}if(/\s$/.test(M)){I.push("")}}for(var J=0,G=I.length;J<G;++J){H=z[N.engine](E,B?n.textAlign(I[J],C,J,G):I[J],C,N,F,D,J<G-1);if(H){K.appendChild(H)}}return K}function l(D,M){var C=D.nodeName.toLowerCase();if(M.ignore[C]){return}var E=!M.textless[C];var B=n.getStyle(v(D,M)).extend(M);var F=c(D,B),G,K,I,H,L,J;if(!F){return}for(G=D.firstChild;G;G=I){K=G.nodeType;I=G.nextSibling;if(E&&K==3){if(H){H.appendData(G.data);D.removeChild(G)}else{H=G}if(I){continue}}if(H){D.replaceChild(o(F,n.whiteSpace(H.data,B,H,J),B,M,G,D),H);H=null}if(K==1){if(G.firstChild){if(G.nodeName.toLowerCase()=="cufon"){z[M.engine](F,null,B,M,G,D)}else{arguments.callee(G,M)}}J=G}}}var t=" ".split(/\s+/).length==0;var d=new A();var b=new r();var y=new u();var e=false;var z={},i={},w={autoDetect:false,engine:null,forceHitArea:false,hover:false,hoverables:{a:true},ignore:{applet:1,canvas:1,col:1,colgroup:1,head:1,iframe:1,map:1,optgroup:1,option:1,script:1,select:1,style:1,textarea:1,title:1,pre:1},printable:true,selector:(window.Sizzle||(window.jQuery&&function(B){return jQuery(B)})||(window.dojo&&dojo.query)||(window.Ext&&Ext.query)||(window.YAHOO&&YAHOO.util&&YAHOO.util.Selector&&YAHOO.util.Selector.query)||(window.$$&&function(B){return $$(B)})||(window.$&&function(B){return $(B)})||(document.querySelectorAll&&function(B){return document.querySelectorAll(B)})||g),separate:"words",textless:{dl:1,html:1,ol:1,table:1,tbody:1,thead:1,tfoot:1,tr:1,ul:1},textShadow:"none"};var p={words:/\s/.test("\u00a0")?/[^\S\u00a0]+/:/\s+/,characters:"",none:/^/};m.now=function(){x.ready();return m};m.refresh=function(){y.repeat.apply(y,arguments);return m};m.registerEngine=function(C,B){if(!B){return m}z[C]=B;return m.set("engine",C)};m.registerFont=function(D){if(!D){return m}var B=new s(D),C=B.family;if(!i[C]){i[C]=new f()}i[C].add(B);return m.set("fontFamily",'"'+C+'"')};m.replace=function(D,C,B){C=h(w,C);if(!C.engine){return m}if(!e){n.addClass(x.root(),"cufon-active cufon-loading");n.ready(function(){n.addClass(n.removeClass(x.root(),"cufon-loading"),"cufon-ready")});e=true}if(C.hover){C.forceHitArea=true}if(C.autoDetect){delete C.fontFamily}if(typeof C.textShadow=="string"){C.textShadow=n.textShadow(C.textShadow)}if(typeof C.color=="string"&&/^-/.test(C.color)){C.textGradient=n.gradient(C.color)}else{delete C.textGradient}if(!B){y.add(D,arguments)}if(D.nodeType||typeof D=="string"){D=[D]}n.ready(function(){for(var F=0,E=D.length;F<E;++F){var G=D[F];if(typeof G=="string"){m.replace(C.selector(G),C,true)}else{l(G,C)}}});return m};m.set=function(B,C){w[B]=C;return m};return m})();Cufon.registerEngine("canvas",(function(){var b=document.createElement("canvas");if(!b||!b.getContext||!b.getContext.apply){return}b=null;var a=Cufon.CSS.supports("display","inline-block");var e=!a&&(document.compatMode=="BackCompat"||/frameset|transitional/i.test(document.doctype.publicId));var f=document.createElement("style");f.type="text/css";f.appendChild(document.createTextNode(("cufon{text-indent:0;}@media screen,projection{cufon{display:inline;display:inline-block;position:relative;vertical-align:middle;"+(e?"":"font-size:1px;line-height:1px;")+"}cufon cufontext{display:-moz-inline-box;display:inline-block;width:0;height:0;overflow:hidden;text-indent:-10000in;}"+(a?"cufon canvas{position:relative;}":"cufon canvas{position:absolute;}")+"}@media print{cufon{padding:0;}cufon canvas{display:none;}}").replace(/;/g,"!important;")));document.getElementsByTagName("head")[0].appendChild(f);function d(p,h){var n=0,m=0;var g=[],o=/([mrvxe])([^a-z]*)/g,k;generate:for(var j=0;k=o.exec(p);++j){var l=k[2].split(",");switch(k[1]){case"v":g[j]={m:"bezierCurveTo",a:[n+~~l[0],m+~~l[1],n+~~l[2],m+~~l[3],n+=~~l[4],m+=~~l[5]]};break;case"r":g[j]={m:"lineTo",a:[n+=~~l[0],m+=~~l[1]]};break;case"m":g[j]={m:"moveTo",a:[n=~~l[0],m=~~l[1]]};break;case"x":g[j]={m:"closePath"};break;case"e":break generate}h[g[j].m].apply(h,g[j].a)}return g}function c(m,k){for(var j=0,h=m.length;j<h;++j){var g=m[j];k[g.m].apply(k,g.a)}}return function(V,w,P,t,C,W){var k=(w===null);if(k){w=C.getAttribute("alt")}var A=V.viewBox;var m=P.getSize("fontSize",V.baseSize);var B=0,O=0,N=0,u=0;var z=t.textShadow,L=[];if(z){for(var U=z.length;U--;){var F=z[U];var K=m.convertFrom(parseFloat(F.offX));var I=m.convertFrom(parseFloat(F.offY));L[U]=[K,I];if(I<B){B=I}if(K>O){O=K}if(I>N){N=I}if(K<u){u=K}}}var Z=Cufon.CSS.textTransform(w,P).split("");var E=V.spacing(Z,~~m.convertFrom(parseFloat(P.get("letterSpacing"))||0),~~m.convertFrom(parseFloat(P.get("wordSpacing"))||0));if(!E.length){return null}var h=E.total;O+=A.width-E[E.length-1];u+=A.minX;var s,n;if(k){s=C;n=C.firstChild}else{s=document.createElement("cufon");s.className="cufon cufon-canvas";s.setAttribute("alt",w);n=document.createElement("canvas");s.appendChild(n);if(t.printable){var S=document.createElement("cufontext");S.appendChild(document.createTextNode(w));s.appendChild(S)}}var aa=s.style;var H=n.style;var j=m.convert(A.height);var Y=Math.ceil(j);var M=Y/j;var G=M*Cufon.CSS.fontStretch(P.get("fontStretch"));var J=h*G;var Q=Math.ceil(m.convert(J+O-u));var o=Math.ceil(m.convert(A.height-B+N));n.width=Q;n.height=o;H.width=Q+"px";H.height=o+"px";B+=A.minY;H.top=Math.round(m.convert(B-V.ascent))+"px";H.left=Math.round(m.convert(u))+"px";var r=Math.max(Math.ceil(m.convert(J)),0)+"px";if(a){aa.width=r;aa.height=m.convert(V.height)+"px"}else{aa.paddingLeft=r;aa.paddingBottom=(m.convert(V.height)-1)+"px"}var X=n.getContext("2d"),D=j/A.height;X.scale(D,D*M);X.translate(-u,-B);X.save();function T(){var x=V.glyphs,ab,l=-1,g=-1,y;X.scale(G,1);while(y=Z[++l]){var ab=x[Z[l]]||V.missingGlyph;if(!ab){continue}if(ab.d){X.beginPath();if(ab.code){c(ab.code,X)}else{ab.code=d("m"+ab.d,X)}X.fill()}X.translate(E[++g],0)}X.restore()}if(z){for(var U=z.length;U--;){var F=z[U];X.save();X.fillStyle=F.color;X.translate.apply(X,L[U]);T()}}var q=t.textGradient;if(q){var v=q.stops,p=X.createLinearGradient(0,A.minY,0,A.maxY);for(var U=0,R=v.length;U<R;++U){p.addColorStop.apply(p,v[U])}X.fillStyle=p}else{X.fillStyle=P.get("color")}T();return s}})());Cufon.registerEngine("vml",(function(){var e=document.namespaces;if(!e){return}e.add("cvml","urn:schemas-microsoft-com:vml");e=null;var b=document.createElement("cvml:shape");b.style.behavior="url(#default#VML)";if(!b.coordsize){return}b=null;var h=(document.documentMode||0)<8;document.write(('<style type="text/css">cufoncanvas{text-indent:0;}@media screen{cvml\\:shape,cvml\\:rect,cvml\\:fill,cvml\\:shadow{behavior:url(#default#VML);display:block;antialias:true;position:absolute;}cufoncanvas{position:absolute;text-align:left;}cufon{display:inline-block;position:relative;vertical-align:'+(h?"middle":"text-bottom")+";}cufon cufontext{position:absolute;left:-10000in;font-size:1px;}a cufon{cursor:pointer}}@media print{cufon cufoncanvas{display:none;}}</style>").replace(/;/g,"!important;"));function c(i,j){return a(i,/(?:em|ex|%)$|^[a-z-]+$/i.test(j)?"1em":j)}function a(l,m){if(m==="0"){return 0}if(/px$/i.test(m)){return parseFloat(m)}var k=l.style.left,j=l.runtimeStyle.left;l.runtimeStyle.left=l.currentStyle.left;l.style.left=m.replace("%","em");var i=l.style.pixelLeft;l.style.left=k;l.runtimeStyle.left=j;return i}function f(l,k,j,n){var i="computed"+n,m=k[i];if(isNaN(m)){m=k.get(n);k[i]=m=(m=="normal")?0:~~j.convertFrom(a(l,m))}return m}var g={};function d(p){var q=p.id;if(!g[q]){var n=p.stops,o=document.createElement("cvml:fill"),i=[];o.type="gradient";o.angle=180;o.focus="0";o.method="sigma";o.color=n[0][1];for(var m=1,l=n.length-1;m<l;++m){i.push(n[m][0]*100+"% "+n[m][1])}o.colors=i.join(",");o.color2=n[l][1];g[q]=o}return g[q]}return function(ac,G,Y,C,K,ad,W){var n=(G===null);if(n){G=K.alt}var I=ac.viewBox;var p=Y.computedFontSize||(Y.computedFontSize=new Cufon.CSS.Size(c(ad,Y.get("fontSize"))+"px",ac.baseSize));var y,q;if(n){y=K;q=K.firstChild}else{y=document.createElement("cufon");y.className="cufon cufon-vml";y.alt=G;q=document.createElement("cufoncanvas");y.appendChild(q);if(C.printable){var Z=document.createElement("cufontext");Z.appendChild(document.createTextNode(G));y.appendChild(Z)}if(!W){y.appendChild(document.createElement("cvml:shape"))}}var ai=y.style;var R=q.style;var l=p.convert(I.height),af=Math.ceil(l);var V=af/l;var P=V*Cufon.CSS.fontStretch(Y.get("fontStretch"));var U=I.minX,T=I.minY;R.height=af;R.top=Math.round(p.convert(T-ac.ascent));R.left=Math.round(p.convert(U));ai.height=p.convert(ac.height)+"px";var F=Y.get("color");var ag=Cufon.CSS.textTransform(G,Y).split("");var L=ac.spacing(ag,f(ad,Y,p,"letterSpacing"),f(ad,Y,p,"wordSpacing"));if(!L.length){return null}var k=L.total;var x=-U+k+(I.width-L[L.length-1]);var ah=p.convert(x*P),X=Math.round(ah);var O=x+","+I.height,m;var J="r"+O+"ns";var u=C.textGradient&&d(C.textGradient);var o=ac.glyphs,S=0;var H=C.textShadow;var ab=-1,aa=0,w;while(w=ag[++ab]){var D=o[ag[ab]]||ac.missingGlyph,v;if(!D){continue}if(n){v=q.childNodes[aa];while(v.firstChild){v.removeChild(v.firstChild)}}else{v=document.createElement("cvml:shape");q.appendChild(v)}v.stroked="f";v.coordsize=O;v.coordorigin=m=(U-S)+","+T;v.path=(D.d?"m"+D.d+"xe":"")+"m"+m+J;v.fillcolor=F;if(u){v.appendChild(u.cloneNode(false))}var ae=v.style;ae.width=X;ae.height=af;if(H){var s=H[0],r=H[1];var B=Cufon.CSS.color(s.color),z;var N=document.createElement("cvml:shadow");N.on="t";N.color=B.color;N.offset=s.offX+","+s.offY;if(r){z=Cufon.CSS.color(r.color);N.type="double";N.color2=z.color;N.offset2=r.offX+","+r.offY}N.opacity=B.opacity||(z&&z.opacity)||1;v.appendChild(N)}S+=L[aa++]}var M=v.nextSibling,t,A;if(C.forceHitArea){if(!M){M=document.createElement("cvml:rect");M.stroked="f";M.className="cufon-vml-cover";t=document.createElement("cvml:fill");t.opacity=0;M.appendChild(t);q.appendChild(M)}A=M.style;A.width=X;A.height=af}else{if(M){q.removeChild(M)}}ai.width=Math.max(Math.ceil(p.convert(k*P)),0);if(h){var Q=Y.computedYAdjust;if(Q===undefined){var E=Y.get("lineHeight");if(E=="normal"){E="1em"}else{if(!isNaN(E)){E+="em"}}Y.computedYAdjust=Q=0.5*(a(ad,E)-parseFloat(ai.height))}if(Q){ai.marginTop=Math.ceil(Q)+"px";ai.marginBottom=Q+"px"}}return y}})());
/* end ../vendors/cufon-yui.js */

/* start ../vendors/Bryant_Medium_Condensed.font.js */
/*!
 * The following copyright notice may not be removed under any circumstances.
 * 
 * Copyright:
 * Copyright (c) 2008 by Process Type Foundry. All rights reserved.
 * 
 * Trademark:
 * Bryant is a trademark of Process Type Foundry.
 * 
 * Full name:
 * Bryant-MediumCondensed
 * 
 * Description:
 * Copyright (c) 2008 by Process Type Foundry. All rights reserved.
 * 
 * Manufacturer:
 * Process Type Foundry
 * 
 * Designer:
 * Eric Olson
 * 
 * Vendor URL:
 * http://www.processtypefoundry.com
 * 
 * License information:
 * http://www.processtypefoundry.com/help/ptflicense.html
 */
Cufon.registerFont({"w":90,"face":{"font-family":"Bryant Medium Condensed","font-weight":500,"font-stretch":"normal","units-per-em":"360","panose-1":"2 11 8 6 4 0 0 2 0 3","ascent":"270","descent":"-90","x-height":"4","cap-height":"3","bbox":"-13 -309.049 297.137 71","underline-thickness":"7.2","underline-position":"-40.68","stemh":"27","stemv":"32","unicode-range":"U+0020-U+00FF"},"glyphs":{" ":{"w":91,"k":{"\u00ff":5,"\u00fd":5,"\u00dd":11,"\u00c6":7,"\u00c5":7,"\u00c4":7,"\u00c3":7,"\u00c2":7,"\u00c1":7,"\u00c0":7,"y":5,"w":4,"Y":11,"W":9,"T":18,"A":7,"v":4,"V":13,"7":7}},"!":{"d":"55,-69v-2,12,-14,9,-15,0v-7,-47,-9,-102,-8,-158v0,-9,6,-16,16,-16v10,0,15,7,15,16v1,56,-1,111,-8,158xm27,-18v0,-11,10,-20,21,-20v11,0,20,9,20,20v0,11,-9,21,-20,21v-11,0,-21,-10,-21,-21","w":95},"\"":{"d":"35,-148v-26,-6,-13,-54,-13,-81v0,-8,5,-14,13,-14v27,0,14,54,14,81v0,8,-6,14,-14,14xm98,-148v-26,-6,-13,-54,-13,-81v0,-8,5,-14,13,-14v27,0,14,54,14,81v0,8,-6,14,-14,14","w":133},"#":{"d":"224,-166v0,18,-25,12,-42,13r-6,63v15,2,39,-6,39,11v0,17,-26,11,-42,12r-6,56v-1,8,-4,14,-14,14v-25,-6,-3,-48,-5,-70r-67,0r-6,57v-1,8,-5,13,-14,13v-25,-6,-4,-47,-6,-70v-15,-1,-38,5,-39,-10v0,-19,25,-12,42,-13r6,-63v-16,-1,-39,5,-39,-12v-1,-17,26,-11,42,-12r6,-53v1,-9,5,-13,14,-13v24,6,3,44,6,66r66,0v7,-22,-4,-62,20,-66v24,6,3,45,6,66v15,2,39,-6,39,11xm90,-153r-7,63r67,0r7,-63r-67,0","w":237,"k":{";":4,":":4,"9":-5,"7":-5,"4":-5,"1":-5}},"$":{"d":"158,-192v-28,-15,-102,-31,-102,12v0,22,12,29,49,46v45,20,69,32,69,69v0,33,-24,55,-63,60v-1,18,6,44,-13,44v-19,0,-12,-26,-13,-44v-25,-4,-63,-15,-63,-38v0,-8,5,-12,11,-12v24,4,35,23,66,23v30,0,44,-13,44,-31v0,-21,-13,-29,-53,-46v-50,-21,-65,-40,-65,-71v0,-31,24,-51,63,-55v1,-18,-6,-44,13,-44v19,0,11,27,13,45v22,2,54,11,56,29v0,7,-3,13,-12,13","w":194,"k":{"4":-5,"1":-5,")":1}},"%":{"d":"225,-232v-43,82,-97,153,-143,231v-4,8,-23,6,-22,-6v43,-82,96,-152,142,-231v6,-10,24,-7,23,6xm75,-127v-34,0,-55,-27,-55,-58v0,-31,21,-59,55,-59v34,0,54,28,54,59v0,31,-20,58,-54,58xm75,-150v18,0,28,-15,28,-35v0,-20,-10,-36,-28,-36v-18,0,-29,16,-29,36v0,20,11,35,29,35xm210,4v-34,0,-55,-27,-55,-58v0,-31,21,-59,55,-59v34,0,55,28,55,59v0,31,-21,58,-55,58xm210,-19v18,0,28,-15,28,-35v0,-20,-10,-36,-28,-36v-18,0,-29,16,-29,36v0,20,11,35,29,35","w":282,"k":{"4":-5}},"&":{"d":"244,-17v-12,34,-68,24,-83,-6v-38,46,-139,31,-139,-35v0,-37,27,-59,60,-77v-36,-40,-33,-108,30,-109v29,0,49,18,49,49v0,26,-18,50,-42,67r45,65v14,-15,10,-42,32,-49v8,0,13,5,13,13v-5,22,-15,36,-29,57v12,22,32,27,53,15v6,0,11,4,11,10xm111,-221v-37,2,-23,57,-5,74v16,-12,27,-32,27,-48v0,-15,-7,-26,-22,-26xm95,-114v-23,14,-43,29,-43,55v-1,47,70,47,93,15","w":249},"'":{"d":"35,-148v-26,-6,-13,-54,-13,-81v0,-8,5,-14,13,-14v27,0,14,54,14,81v0,8,-6,14,-14,14","w":70},"(":{"d":"59,-97v0,53,20,96,41,145v1,14,-21,16,-28,6v-60,-96,-59,-206,0,-302v7,-11,29,-9,28,6v-20,49,-41,92,-41,145","w":114,"k":{"\u00ff":-9,"\u00fd":-9,"\u00fc":1,"\u00fb":1,"\u00fa":1,"\u00f9":1,"\u00f8":2,"\u00f6":2,"\u00f5":2,"\u00f4":2,"\u00f3":2,"\u00f2":2,"\u00eb":2,"\u00ea":2,"\u00e9":2,"\u00e8":2,"\u00e7":2,"\u00e6":2,"\u00e5":2,"\u00e4":2,"\u00e3":2,"\u00e2":2,"\u00e1":2,"\u00e0":2,"\u00dd":-4,"\u00d8":8,"\u00d6":8,"\u00d5":8,"\u00d4":8,"\u00d3":8,"\u00d2":8,"\u00c7":8,"\u00c6":7,"\u00c5":7,"\u00c4":7,"\u00c3":7,"\u00c2":7,"\u00c1":7,"\u00c0":7,"y":-9,"u":1,"q":2,"o":2,"g":2,"e":2,"d":2,"c":2,"a":2,"Y":-4,"W":-4,"T":-4,"Q":8,"O":8,"J":9,"G":8,"C":8,"A":7,";":2,":":2,".":2,",":2,"j":-18,"V":-4,"9":-1,"8":2,"7":-6,"4":4,"3":-3,"2":-2,"1":-11}},")":{"d":"14,48v54,-91,55,-199,0,-290v-1,-15,21,-17,28,-6v59,96,59,206,0,302v-6,10,-29,8,-28,-6","w":114},"*":{"d":"44,-243v13,6,15,22,24,32v9,-10,11,-26,25,-32v20,8,-7,28,-11,39v14,2,40,-7,40,8v0,15,-26,6,-40,8v4,11,30,31,11,39v-14,-4,-16,-22,-25,-32v-8,10,-20,46,-33,24v4,-12,13,-20,19,-31v-14,-2,-40,7,-40,-8v0,-15,26,-6,40,-8v-4,-12,-31,-31,-10,-39","w":136,"k":{"\u00bb":9,"\u00ab":14,";":25,":":25,".":40,",":40}},"+":{"d":"181,-116v-3,23,-43,9,-66,13v-3,25,11,65,-15,68v-25,-3,-10,-44,-14,-68v-23,-3,-63,10,-66,-13v3,-24,43,-9,66,-13v4,-24,-11,-68,14,-68v26,0,12,44,15,68v23,4,63,-11,66,13","w":200},",":{"d":"30,60v-35,-6,5,-44,-2,-66v0,-16,-3,-35,14,-35v15,0,15,15,14,30v-1,22,-2,64,-26,71","w":80,"k":{"x":4,"v":25,"X":4,"V":43,"@":11,"9":6,"8":2,"7":7,"6":2,"4":16,"2":-5,"1":14,"0":4,"*":31,")":2,"d":2,"g":2,"q":2,"e":2,"\u00e8":2,"\u00e9":2,"\u00ea":2,"\u00eb":2,"o":2,"\u00f2":2,"\u00f3":2,"\u00f4":2,"\u00f5":2,"\u00f6":2,"\u00f8":2,"t":7,"u":4,"\u00f9":4,"\u00fa":4,"\u00fb":4,"\u00fc":4,"w":22,"y":13,"\u00fd":13,"\u00ff":13,"C":10,"G":10,"\u00c7":10,"O":10,"Q":10,"\u00d2":10,"\u00d3":10,"\u00d4":10,"\u00d5":10,"\u00d6":10,"\u00d8":10,"T":41,"U":9,"\u00d9":9,"\u00da":9,"\u00db":9,"\u00dc":9,"W":38,"Y":43,"\u00dd":43,"\u00ab":5,"c":2,"\u00e7":2,"f":4,"A":-2,"\u00c0":-2,"\u00c1":-2,"\u00c2":-2,"\u00c3":-2,"\u00c4":-2,"\u00c5":-2,"\u00c6":-2,"\u00bb":2,"J":-4}},"-":{"d":"34,-77v-8,0,-14,-5,-14,-14v0,-9,6,-14,14,-14r77,0v8,0,15,5,15,14v0,9,-7,14,-15,14r-77,0","w":145,"k":{"x":4,"v":-2,"X":16,"V":18,"9":11,"7":13,"5":5,"4":-5,"3":11,"1":16,"d":-1,"g":-1,"q":-1,"e":-1,"\u00e8":-1,"\u00e9":-1,"\u00ea":-1,"\u00eb":-1,"o":-2,"\u00f2":-2,"\u00f3":-2,"\u00f4":-2,"\u00f5":-2,"\u00f6":-2,"\u00f8":-2,"t":2,"w":-2,"y":-2,"\u00fd":-2,"\u00ff":-2,"C":-1,"G":-1,"\u00c7":-1,"S":4,"T":31,"W":16,"Y":23,"\u00dd":23,"c":-1,"\u00e7":-1,"f":5,"s":1,"A":7,"\u00c0":7,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c4":7,"\u00c5":7,"\u00c6":7,"J":7,"Z":13,"z":5}},".":{"d":"24,-18v0,-11,10,-20,21,-20v11,0,21,9,21,20v0,11,-10,21,-21,21v-11,0,-21,-10,-21,-21","k":{"x":4,"v":25,"X":4,"V":43,"@":11,"9":6,"8":2,"7":7,"6":2,"4":16,"2":-5,"1":14,"0":4,"*":31,")":2,"d":2,"g":2,"q":2,"e":2,"\u00e8":2,"\u00e9":2,"\u00ea":2,"\u00eb":2,"o":2,"\u00f2":2,"\u00f3":2,"\u00f4":2,"\u00f5":2,"\u00f6":2,"\u00f8":2,"t":7,"u":4,"\u00f9":4,"\u00fa":4,"\u00fb":4,"\u00fc":4,"w":22,"y":13,"\u00fd":13,"\u00ff":13,"C":10,"G":10,"\u00c7":10,"O":10,"Q":10,"\u00d2":10,"\u00d3":10,"\u00d4":10,"\u00d5":10,"\u00d6":10,"\u00d8":10,"T":41,"U":9,"\u00d9":9,"\u00da":9,"\u00db":9,"\u00dc":9,"W":38,"Y":43,"\u00dd":43,"\u00ab":5,"c":2,"\u00e7":2,"f":4,"A":-2,"\u00c0":-2,"\u00c1":-2,"\u00c2":-2,"\u00c3":-2,"\u00c4":-2,"\u00c5":-2,"\u00c6":-2,"\u00bb":2,"J":-4}},"\/":{"d":"131,-242r-81,278v-2,6,-5,11,-14,11v-10,0,-16,-9,-13,-19r81,-273v2,-7,6,-11,14,-11v9,0,13,6,13,14","w":153,"k":{"\u00fc":4,"\u00fb":4,"\u00fa":4,"\u00f9":4,"\u00f8":13,"\u00f6":13,"\u00f5":13,"\u00f4":13,"\u00f3":13,"\u00f2":13,"\u00f1":5,"\u00eb":13,"\u00ea":13,"\u00e9":13,"\u00e8":13,"\u00e7":13,"\u00e6":11,"\u00e5":11,"\u00e4":11,"\u00e3":11,"\u00e2":11,"\u00e1":11,"\u00e0":11,"\u00dd":-5,"\u00d8":4,"\u00d6":4,"\u00d5":4,"\u00d4":4,"\u00d3":4,"\u00d2":4,"\u00c7":4,"\u00c6":16,"\u00c5":16,"\u00c4":16,"\u00c3":16,"\u00c2":16,"\u00c1":16,"\u00c0":16,"z":4,"u":4,"t":-2,"s":7,"r":5,"q":13,"p":5,"o":13,"n":5,"m":5,"g":13,"e":13,"d":13,"c":13,"a":11,"Y":-5,"T":-5,"Q":4,"O":4,"J":18,"G":4,"C":4,"A":16,"x":4,"V":-2,"8":5,"7":-9,"6":9,"4":14,"1":-5,"0":4}},"0":{"d":"107,-244v59,0,90,56,90,124v0,68,-31,124,-90,124v-59,0,-89,-56,-89,-124v0,-68,30,-124,89,-124xm165,-120v0,-54,-19,-96,-58,-96v-39,0,-57,42,-57,96v0,54,18,96,57,96v39,0,58,-42,58,-96","w":214,"k":{".":4,",":4,"\\":4,"7":6,"\/":3}},"1":{"d":"77,3v-9,0,-16,-7,-16,-16r0,-195v-19,2,-58,26,-58,-3v0,-8,4,-11,10,-13r64,-19v9,0,16,5,16,16r0,214v0,9,-6,16,-16,16","w":123},"2":{"d":"171,-181v14,63,-135,91,-120,153r108,0v8,0,14,6,14,14v0,8,-6,14,-14,14r-126,0v-12,0,-14,-11,-14,-24v0,-49,24,-70,66,-96v35,-22,55,-36,55,-61v0,-23,-18,-35,-45,-35v-24,0,-38,12,-60,20v-9,0,-14,-6,-14,-13v7,-27,49,-35,76,-35v45,0,74,22,74,63","w":187,"k":{"-":7,"\\":-2,"9":-2,"7":-3,"6":2,"4":9,"1":-3}},"3":{"d":"26,-214v0,-26,38,-29,66,-30v80,-5,93,92,31,116v27,5,50,25,50,61v0,77,-139,97,-161,31v0,-8,5,-14,13,-14v23,9,34,27,65,27v31,0,51,-16,51,-44v1,-36,-32,-48,-75,-45v-8,0,-14,-7,-14,-15v0,-14,14,-15,29,-14v60,5,69,-76,9,-76v-19,0,-33,15,-51,15v-8,0,-13,-5,-13,-12","w":191,"k":{".":4,",":4,"9":1,"7":1,"\/":5}},"4":{"d":"197,-77v0,19,-25,13,-43,14v-3,25,11,66,-16,66v-26,0,-11,-42,-15,-66r-105,0v-11,1,-17,-14,-10,-23r117,-150v7,-13,30,-7,29,8r0,138v17,1,44,-5,43,13xm123,-190r-77,100r77,0r0,-100","w":201,"k":{"\u00ab":-5,".":5,"-":-3,",":5,"9":3,"7":2,"2":-5,"1":1,"\/":-4}},"5":{"d":"100,-122v-22,0,-36,14,-56,21v-11,0,-16,-8,-15,-15r13,-110v1,-8,7,-14,15,-14r96,0v8,0,14,7,14,15v0,8,-6,14,-14,14r-84,0r-8,75v47,-35,119,-2,119,63v0,41,-31,77,-84,77v-34,-1,-67,-13,-77,-41v0,-7,5,-12,14,-12v23,9,37,27,64,27v34,0,52,-24,52,-50v0,-31,-19,-50,-49,-50","w":195,"k":{"\u00ab":-4,".":2,",":2,"9":3,"7":1,"4":-2,"\/":5}},"6":{"d":"21,-84v0,-90,45,-143,113,-160v19,5,14,22,-4,27v-39,21,-68,54,-76,99v33,-52,131,-26,131,46v0,39,-30,76,-81,76v-54,0,-83,-37,-83,-88xm105,-120v-30,0,-50,20,-50,48v0,28,18,50,49,50v31,0,50,-22,50,-49v0,-29,-18,-49,-49,-49","w":198,"k":{"\u00ab":-2,"\\":4,"9":4,"7":2,"4":-4,"1":2,"\/":2}},"7":{"d":"164,-217v-45,60,-79,115,-79,204v0,8,-6,16,-16,16v-11,0,-16,-8,-15,-18v0,-82,31,-144,71,-197r-106,0v-8,0,-14,-6,-14,-14v0,-8,6,-14,14,-14r133,0v13,-1,19,14,12,23","w":170,"k":{"\u00bb":16,"\u00ab":22,";":27,":":27,".":34,"-":27,",":34,"}":-7,"]":-7,"\\":-4,"@":4,"?":-7,"8":6,"7":-4,"6":15,"5":2,"4":20,"3":2,"2":3,"1":-11,"0":9,"\/":16,")":-7}},"8":{"d":"104,4v-98,0,-109,-114,-36,-134v-62,-31,-37,-114,36,-114v73,0,98,83,36,114v27,8,48,30,48,63v0,39,-28,71,-84,71xm104,-22v33,0,53,-19,53,-45v0,-29,-22,-48,-53,-48v-31,0,-53,19,-53,48v0,26,20,45,53,45xm104,-140v23,0,40,-18,40,-40v0,-22,-14,-39,-40,-39v-26,0,-40,17,-40,39v0,22,17,40,40,40","w":208,"k":{"\u00bb":2,".":2,",":2,"\\":4,"9":4,"7":2,"5":1,"1":3,"\/":6,")":2}},"9":{"d":"179,-156v0,89,-46,142,-113,160v-19,-2,-16,-23,3,-27v39,-21,68,-54,76,-99v-33,52,-131,26,-131,-46v0,-43,31,-76,81,-76v54,0,84,37,84,88xm94,-120v30,0,50,-20,50,-48v0,-28,-18,-49,-49,-49v-31,0,-50,21,-50,48v0,29,18,49,49,49","w":198,"k":{"\u00bb":2,"\u00ab":3,";":7,":":7,".":18,"-":3,",":18,"\\":4,"9":2,"8":5,"7":9,"6":12,"5":4,"4":7,"3":2,"2":2,"1":1,"0":2,"\/":17,")":2}},":":{"d":"22,-18v0,-11,9,-20,20,-20v11,0,21,9,21,20v0,11,-10,21,-21,21v-11,0,-20,-10,-20,-21xm22,-113v0,-11,9,-21,20,-21v11,0,21,10,21,21v0,11,-10,20,-21,20v-11,0,-20,-9,-20,-20","w":84,"k":{"v":3,"V":23,"9":4,"7":5,"1":5,"*":11,")":2,"w":4,"O":2,"Q":2,"\u00d2":2,"\u00d3":2,"\u00d4":2,"\u00d5":2,"\u00d6":2,"\u00d8":2,"T":36,"U":3,"\u00d9":3,"\u00da":3,"\u00db":3,"\u00dc":3,"W":22,"Y":29,"\u00dd":29,"\u00bb":2}},";":{"d":"22,-113v0,-11,9,-21,20,-21v11,0,21,10,21,21v0,11,-10,20,-21,20v-11,0,-20,-9,-20,-20xm30,60v-34,-6,4,-44,-3,-66v0,-17,-2,-35,15,-35v15,0,16,14,15,30v-1,22,-3,63,-27,71","w":86,"k":{"v":3,"V":23,"9":4,"7":5,"1":5,"*":11,")":2,"w":4,"O":2,"Q":2,"\u00d2":2,"\u00d3":2,"\u00d4":2,"\u00d5":2,"\u00d6":2,"\u00d8":2,"T":36,"U":3,"\u00d9":3,"\u00da":3,"\u00db":3,"\u00dc":3,"W":22,"Y":29,"\u00dd":29,"\u00bb":2}},"<":{"d":"146,-197v9,-6,22,3,21,11v0,6,-3,9,-9,12r-106,58r106,57v14,5,11,24,-5,25v-47,-20,-86,-48,-131,-70v-10,-5,-11,-19,0,-24","w":188},"=":{"d":"146,-134r-110,0v-7,0,-13,-5,-13,-12v0,-7,6,-13,13,-13r110,0v7,0,13,6,13,13v0,7,-6,12,-13,12xm146,-74r-110,0v-7,0,-13,-6,-13,-13v0,-7,6,-12,13,-12r110,0v7,0,13,5,13,12v0,7,-6,13,-13,13","w":182},">":{"d":"22,-186v0,-9,11,-17,20,-11r124,69v10,5,11,19,0,24r-131,70v-15,0,-17,-19,-5,-25r106,-57r-106,-58v-6,-3,-8,-6,-8,-12","w":188},"?":{"d":"148,-191v10,39,-72,64,-59,114v0,9,-7,16,-16,16v-13,0,-18,-12,-16,-27v-9,-46,61,-68,59,-102v-3,-41,-68,-24,-90,-9v-8,0,-13,-6,-13,-14v21,-47,142,-42,135,22xm53,-18v0,-11,10,-20,21,-20v11,0,20,9,20,20v0,11,-9,21,-20,21v-11,0,-21,-10,-21,-21","w":162},"@":{"d":"150,-17v30,0,55,-9,83,-20v12,-1,13,17,3,20v-24,13,-55,21,-86,21v-86,0,-132,-57,-132,-127v0,-72,41,-121,108,-121v50,0,77,26,77,74r0,95v0,7,-5,12,-12,12v-10,0,-13,-9,-12,-20v-27,43,-88,15,-88,-40v0,-55,59,-82,88,-42v2,-40,-16,-58,-54,-58v-54,0,-83,43,-83,100v0,62,37,106,108,106xm147,-163v-19,0,-32,14,-32,40v0,26,13,40,32,40v19,0,32,-17,32,-40v0,-23,-13,-40,-32,-40","w":252,"k":{"\u00dd":4,"\u00bb":-9,"\u00ab":-5,"Y":4,"T":6,".":-5,",":-5,"X":-2,"V":4,")":1}},"A":{"d":"122,-231r82,219v2,16,-27,21,-30,5r-19,-49r-97,0v-11,19,-8,53,-33,59v-12,0,-18,-11,-14,-21r80,-213v3,-15,25,-15,31,0xm144,-85r-37,-107r-38,107r75,0","w":213,"k":{"\u00ae":14,"}":4,"x":-3,"v":8,"]":9,"\\":13,"V":22,"@":7,"?":8,"\/":-2,"*":32,")":7}},"B":{"d":"191,-67v0,36,-26,67,-81,67v-29,0,-83,13,-83,-17r0,-207v3,-29,52,-13,80,-16v75,-8,93,90,36,115v29,6,48,23,48,58xm145,-175v0,-42,-46,-35,-86,-35r0,72v41,2,86,2,86,-37xm158,-69v0,-46,-54,-39,-99,-39r0,78v45,1,99,6,99,-39","w":205,"k":{"\u00ff":1,"\u00fd":1,"\u00fc":1,"\u00fb":1,"\u00fa":1,"\u00f9":1,"\u00dd":7,"\u00dc":1,"\u00db":1,"\u00da":1,"\u00d9":1,"\u00c6":1,"\u00c5":1,"\u00c4":1,"\u00c3":1,"\u00c2":1,"\u00c1":1,"\u00c0":1,"y":1,"u":1,"Y":7,"W":5,"U":1,"T":9,"A":1,".":4,"-":-1,",":4,"v":1,"]":2,"X":1,"V":5,"\/":3,")":2}},"C":{"d":"195,-45v-11,31,-40,49,-78,49v-62,0,-101,-51,-101,-124v0,-73,39,-124,101,-124v39,1,67,18,78,49v0,8,-6,15,-15,15v-21,-8,-32,-35,-62,-35v-42,0,-69,37,-69,95v0,58,27,95,69,95v30,0,40,-26,62,-34v9,0,15,6,15,14","w":207,"k":{"\u00ae":-13,"}":-7,"v":1,"]":-9,"\\":-3,"?":-4,"\/":-2,"*":-5,")":-2,"d":1,"g":1,"q":1,"e":1,"\u00e8":1,"\u00e9":1,"\u00ea":1,"\u00eb":1,"o":1,"\u00f2":1,"\u00f3":1,"\u00f4":1,"\u00f5":1,"\u00f6":1,"\u00f8":1,"u":1,"\u00f9":1,"\u00fa":1,"\u00fb":1,"\u00fc":1,"w":1,"C":1,"G":1,"\u00c7":1,"O":1,"Q":1,"\u00d2":1,"\u00d3":1,"\u00d4":1,"\u00d5":1,"\u00d6":1,"\u00d8":1,"\u00ab":-2,"-":2,"c":1,"\u00e7":1,":":-5,";":-5,"A":1,"\u00c0":1,"\u00c1":1,"\u00c2":1,"\u00c3":1,"\u00c4":1,"\u00c5":1,"\u00c6":1,"\u00bb":-4}},"D":{"d":"201,-120v1,92,-56,120,-157,120v-9,0,-17,-8,-17,-17r0,-206v2,-27,44,-17,70,-17v68,0,104,49,104,120xm169,-120v0,-63,-37,-100,-110,-90r0,180v73,9,110,-27,110,-90","w":216,"k":{"v":-1,"\\":3,"X":4,"V":3,"?":4,"\/":7,"*":4,")":4,"t":-4,"w":-3,"y":-1,"\u00fd":-1,"\u00ff":-1,"T":10,"W":2,"Y":5,"\u00dd":5,",":8,".":8,"f":-4,"A":9,"\u00c0":9,"\u00c1":9,"\u00c2":9,"\u00c3":9,"\u00c4":9,"\u00c5":9,"\u00c6":9,"J":3,"Z":6}},"E":{"d":"59,-210r0,73v27,4,72,-12,76,15v-4,25,-50,10,-76,14r0,78r102,0v8,0,15,6,15,15v0,8,-7,15,-15,15r-117,0v-10,0,-17,-7,-17,-16r0,-208v0,-9,8,-16,17,-16r114,0v8,0,15,7,15,15v0,9,-7,15,-15,15r-99,0","w":185,"k":{"}":-7,"v":6,"]":-7,"\\":-2,"X":-1,"*":-4,")":-4,"d":5,"g":5,"q":5,"e":5,"\u00e8":5,"\u00e9":5,"\u00ea":5,"\u00eb":5,"o":5,"\u00f2":5,"\u00f3":5,"\u00f4":5,"\u00f5":5,"\u00f6":5,"\u00f8":5,"t":1,"u":5,"\u00f9":5,"\u00fa":5,"\u00fb":5,"\u00fc":5,"w":4,"y":6,"\u00fd":6,"\u00ff":6,"C":9,"G":9,"\u00c7":9,"O":9,"Q":9,"\u00d2":9,"\u00d3":9,"\u00d4":9,"\u00d5":9,"\u00d6":9,"\u00d8":9,"\u00ab":4,"-":17,"c":5,"\u00e7":5,"f":2,"s":3,":":-2,";":-2,"\u00bb":-5,"J":4,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1,"m":1,"n":1,"p":1,"r":1,"\u00f1":1}},"F":{"d":"59,-108r0,95v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-211v0,-9,8,-16,17,-16r114,0v8,0,16,7,16,15v0,9,-8,15,-16,15r-99,0r0,73v26,4,72,-12,76,15v-4,26,-50,10,-76,14","w":177,"k":{"\u00ff":11,"\u00fd":11,"\u00fc":14,"\u00fb":14,"\u00fa":14,"\u00f9":14,"\u00f8":22,"\u00f6":22,"\u00f5":22,"\u00f4":22,"\u00f3":22,"\u00f2":22,"\u00f1":13,"\u00eb":22,"\u00ea":22,"\u00e9":22,"\u00e8":22,"\u00e7":22,"\u00e6":16,"\u00e5":16,"\u00e4":16,"\u00e3":16,"\u00e2":16,"\u00e1":16,"\u00e0":16,"\u00dd":-4,"\u00d8":11,"\u00d6":11,"\u00d5":11,"\u00d4":11,"\u00d3":11,"\u00d2":11,"\u00c7":11,"\u00c6":28,"\u00c5":28,"\u00c4":28,"\u00c3":28,"\u00c2":28,"\u00c1":28,"\u00c0":28,"\u00bb":11,"\u00ab":13,"z":12,"y":11,"w":9,"u":14,"t":3,"s":16,"r":13,"q":22,"p":13,"o":22,"n":13,"m":13,"g":22,"f":3,"e":22,"d":22,"c":22,"a":16,"Y":-4,"W":-4,"S":2,"Q":11,"O":11,"J":43,"G":11,"C":11,"A":28,";":18,":":18,".":41,"-":20,",":41,"\u00ae":-5,"}":-7,"x":14,"v":9,"]":-9,"\\":-4,"V":-4,"@":5,"?":-5,"\/":25,"*":-9,")":-6}},"G":{"d":"177,-185v-21,-8,-33,-30,-60,-30v-40,0,-68,37,-68,95v0,82,64,120,122,80r0,-51v-22,-2,-56,8,-56,-15v0,-25,47,-10,71,-14v30,3,11,56,16,84v0,5,-1,8,-4,11v-22,19,-45,29,-80,29v-63,0,-102,-49,-102,-124v0,-75,43,-124,101,-124v34,0,65,15,75,44v0,8,-5,15,-15,15","w":223,"k":{"x":-4,"T":5,"Y":3,"\u00dd":3,",":2,".":2,"-":-5}},"H":{"d":"59,-109r0,96v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-213v0,-9,7,-17,16,-17v9,0,16,8,16,17r0,88r105,0r0,-88v0,-9,7,-17,16,-17v9,0,17,8,17,17r0,213v0,9,-8,16,-17,16v-9,0,-16,-7,-16,-16r0,-96r-105,0","w":223},"I":{"d":"61,-226r0,213v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-213v0,-9,7,-17,16,-17v9,0,16,8,16,17"},"J":{"d":"159,-226v-7,98,32,229,-76,230v-41,0,-74,-29,-74,-63v-1,-16,28,-20,29,-2v6,21,16,37,45,37v33,0,44,-22,44,-54r0,-148v0,-9,7,-17,16,-17v9,0,16,7,16,17","w":184,"k":{"\/":2,",":5,".":5,"A":4,"\u00c0":4,"\u00c1":4,"\u00c2":4,"\u00c3":4,"\u00c4":4,"\u00c5":4,"\u00c6":4}},"K":{"d":"27,-226v0,-9,7,-17,16,-17v9,0,16,8,16,17r0,110r98,-121v8,-12,28,-5,27,9v-14,32,-41,53,-60,81r69,135v0,16,-24,20,-30,7r-61,-117r-43,51v-4,26,11,71,-16,74v-9,0,-16,-7,-16,-16r0,-213","w":205,"k":{"\u00ae":4,"v":8,"X":-2,"V":2,"*":4,"d":5,"g":5,"q":5,"e":5,"\u00e8":5,"\u00e9":5,"\u00ea":5,"\u00eb":5,"o":5,"\u00f2":5,"\u00f3":5,"\u00f4":5,"\u00f5":5,"\u00f6":5,"\u00f8":5,"t":1,"u":4,"\u00f9":4,"\u00fa":4,"\u00fb":4,"\u00fc":4,"w":5,"y":8,"\u00fd":8,"\u00ff":8,"C":11,"G":11,"\u00c7":11,"O":11,"Q":11,"\u00d2":11,"\u00d3":11,"\u00d4":11,"\u00d5":11,"\u00d6":11,"\u00d8":11,"U":1,"\u00d9":1,"\u00da":1,"\u00db":1,"\u00dc":1,"W":2,"\u00ab":4,"-":14,"c":5,"\u00e7":5,"s":3,"A":-1,"\u00c0":-1,"\u00c1":-1,"\u00c2":-1,"\u00c3":-1,"\u00c4":-1,"\u00c5":-1,"\u00c6":-1,"J":2,"a":2,"\u00e0":2,"\u00e1":2,"\u00e2":2,"\u00e3":2,"\u00e4":2,"\u00e5":2,"\u00e6":2}},"L":{"d":"59,-226r0,196r95,0v8,0,15,6,15,15v0,8,-7,15,-15,15r-111,0v-9,0,-16,-7,-16,-16r0,-210v0,-9,7,-17,16,-17v9,0,16,8,16,17","w":174,"k":{"\u00ae":38,"x":-2,"v":16,"]":3,"\\":16,"V":25,"?":6,"*":50,"d":6,"g":6,"q":6,"e":6,"\u00e8":6,"\u00e9":6,"\u00ea":6,"\u00eb":6,"o":6,"\u00f2":6,"\u00f3":6,"\u00f4":6,"\u00f5":6,"\u00f6":6,"\u00f8":6,"t":9,"u":5,"\u00f9":5,"\u00fa":5,"\u00fb":5,"\u00fc":5,"w":10,"y":14,"\u00fd":14,"\u00ff":14,"C":15,"G":15,"\u00c7":15,"O":15,"Q":15,"\u00d2":15,"\u00d3":15,"\u00d4":15,"\u00d5":15,"\u00d6":15,"\u00d8":15,"S":4,"T":34,"U":9,"\u00d9":9,"\u00da":9,"\u00db":9,"\u00dc":9,"W":22,"Y":27,"\u00dd":27,",":-2,".":-2,"\u00ab":4,"-":40,"c":6,"\u00e7":6,"f":5,"s":1,":":-2,";":-2,"A":-2,"\u00c0":-2,"\u00c1":-2,"\u00c2":-2,"\u00c3":-2,"\u00c4":-2,"\u00c5":-2,"\u00c6":-2,"a":4,"\u00e0":4,"\u00e1":4,"\u00e2":4,"\u00e3":4,"\u00e4":4,"\u00e5":4,"\u00e6":4}},"M":{"d":"241,-227r0,214v0,9,-7,16,-16,16v-9,0,-15,-7,-15,-16r0,-143r-62,150v-2,11,-26,12,-28,0r-62,-150r0,143v0,9,-7,16,-16,16v-9,0,-15,-7,-15,-16r0,-214v-1,-19,23,-21,30,-5r77,184r77,-184v4,-18,31,-13,30,5","w":267},"N":{"d":"199,-13v2,14,-20,22,-28,9r-113,-172r0,163v0,8,-7,16,-16,16v-9,0,-15,-8,-15,-16r0,-214v-1,-17,21,-20,29,-8r112,172r0,-164v0,-9,7,-16,16,-16v9,0,15,7,15,16r0,214","w":226},"O":{"d":"217,-120v0,67,-37,124,-100,124v-63,0,-101,-57,-101,-124v0,-67,38,-124,101,-124v63,0,100,57,100,124xm49,-120v0,48,22,95,68,95v46,0,68,-47,68,-95v0,-48,-22,-95,-68,-95v-46,0,-68,47,-68,95","w":233,"k":{"}":4,"]":3,"\\":3,"X":8,"V":5,"\/":5,"*":2,")":8,"T":11,"W":4,"Y":7,"\u00dd":7,",":10,".":10,"f":-1,":":2,";":2,"A":11,"\u00c0":11,"\u00c1":11,"\u00c2":11,"\u00c3":11,"\u00c4":11,"\u00c5":11,"\u00c6":11,"Z":5,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1}},"P":{"d":"190,-168v0,59,-60,77,-131,70r0,85v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-211v3,-29,54,-16,82,-16v55,0,81,31,81,72xm158,-168v0,-46,-52,-44,-99,-42r0,83v46,1,99,6,99,-41","w":196,"k":{"\u00ff":-4,"\u00fd":-4,"\u00f8":8,"\u00f6":8,"\u00f5":8,"\u00f4":8,"\u00f3":8,"\u00f2":8,"\u00eb":8,"\u00ea":8,"\u00e9":8,"\u00e8":8,"\u00e7":8,"\u00e6":3,"\u00e5":3,"\u00e4":3,"\u00e3":3,"\u00e2":3,"\u00e1":3,"\u00e0":3,"\u00dd":-3,"\u00c6":20,"\u00c5":20,"\u00c4":20,"\u00c3":20,"\u00c2":20,"\u00c1":20,"\u00c0":20,"\u00bb":2,"\u00ab":7,"y":-4,"w":-5,"t":-7,"s":3,"q":8,"o":8,"g":8,"f":-4,"e":8,"d":8,"c":8,"a":3,"Z":4,"Y":-3,"W":-2,"J":36,"A":20,";":5,":":5,".":45,"-":9,",":45,"\u00ae":-14,"v":-5,"X":2,"V":-2,"\/":20,"*":-11,")":2}},"Q":{"d":"181,41v-20,0,-19,-29,-29,-43v-79,26,-136,-39,-136,-118v0,-67,38,-124,101,-124v107,0,130,172,58,228v6,15,15,26,19,43v0,8,-5,14,-13,14xm49,-120v0,56,32,110,90,91v-6,-14,-15,-25,-18,-41v-2,-14,20,-19,26,-6r14,31v42,-48,30,-170,-44,-170v-46,0,-68,47,-68,95","w":233,"k":{"}":4,"]":3,"\\":3,"X":8,"V":5,"\/":5,"*":2,")":8,"T":11,"W":4,"Y":7,"\u00dd":7,",":10,".":10,"f":-1,":":2,";":2,"A":11,"\u00c0":11,"\u00c1":11,"\u00c2":11,"\u00c3":11,"\u00c4":11,"\u00c5":11,"\u00c6":11,"Z":5,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1}},"R":{"d":"27,-223v3,-31,57,-13,87,-17v89,-12,109,113,35,136v15,31,34,57,46,91v2,16,-23,21,-30,7r-49,-93r-57,0r0,86v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-210xm59,-210r0,82v47,0,103,8,103,-41v0,-49,-56,-41,-103,-41","w":211,"k":{"x":-2,"V":1,"\/":-4,"d":4,"g":4,"q":4,"e":4,"\u00e8":4,"\u00e9":4,"\u00ea":4,"\u00eb":4,"o":4,"\u00f2":4,"\u00f3":4,"\u00f4":4,"\u00f5":4,"\u00f6":4,"\u00f8":4,"u":3,"\u00f9":3,"\u00fa":3,"\u00fb":3,"\u00fc":3,"T":4,"W":1,"Y":1,"\u00dd":1,"\u00ab":1,"-":9,"c":4,"\u00e7":4,"s":2,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1}},"S":{"d":"158,-195v-26,-19,-107,-37,-107,11v0,20,16,31,51,47v45,21,75,38,75,77v0,35,-25,64,-79,64v-38,0,-73,-14,-82,-45v0,-9,6,-13,14,-13v22,9,38,30,69,30v32,0,46,-16,46,-34v0,-23,-18,-33,-58,-51v-50,-22,-68,-42,-68,-74v0,-73,131,-79,153,-26v0,8,-5,14,-14,14","w":191,"k":{"}":-2,"v":3,"V":1,"d":1,"g":1,"q":1,"e":1,"\u00e8":1,"\u00e9":1,"\u00ea":1,"\u00eb":1,"t":1,"u":1,"\u00f9":1,"\u00fa":1,"\u00fb":1,"\u00fc":1,"w":2,"y":3,"\u00fd":3,"\u00ff":3,"C":1,"G":1,"\u00c7":1,"O":1,"Q":1,"\u00d2":1,"\u00d3":1,"\u00d4":1,"\u00d5":1,"\u00d6":1,"\u00d8":1,"S":1,"T":2,"W":1,"\u00ab":-3,"c":1,"\u00e7":1,"f":-1,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1}},"T":{"d":"71,-13r0,-197v-25,-4,-68,11,-71,-15v0,-8,7,-15,15,-15r145,0v8,0,15,7,15,15v-3,26,-46,11,-71,15r0,197v0,9,-8,16,-17,16v-9,0,-16,-7,-16,-16","w":174,"k":{"\u00ae":-9,"}":-5,"x":29,"v":32,"j":7,"]":-5,"\\":-5,"V":-4,"@":11,"?":-9,"\/":22,"*":-9,")":-4,"d":36,"g":36,"q":36,"e":36,"\u00e8":36,"\u00e9":36,"\u00ea":36,"\u00eb":36,"o":36,"\u00f2":36,"\u00f3":36,"\u00f4":36,"\u00f5":36,"\u00f6":36,"\u00f8":36,"t":13,"u":34,"\u00f9":34,"\u00fa":34,"\u00fb":34,"\u00fc":34,"w":31,"y":31,"\u00fd":31,"\u00ff":31,"C":11,"G":11,"\u00c7":11,"O":11,"Q":11,"\u00d2":11,"\u00d3":11,"\u00d4":11,"\u00d5":11,"\u00d6":11,"\u00d8":11,"W":-5,"Y":-5,"\u00dd":-5,",":41,".":41,"\u00ab":23,"-":31,"c":36,"\u00e7":36,"f":13,"s":36,":":36,";":36,"A":22,"\u00c0":22,"\u00c1":22,"\u00c2":22,"\u00c3":22,"\u00c4":22,"\u00c5":22,"\u00c6":22,"\u00bb":25,"J":29,"Z":2,"a":32,"\u00e0":32,"\u00e1":32,"\u00e2":32,"\u00e3":32,"\u00e4":32,"\u00e5":32,"\u00e6":32,"m":31,"n":31,"p":31,"r":31,"\u00f1":31,"z":32,"i":7,"\u00ec":7,"\u00ed":7,"\u00ee":7,"\u00ef":7}},"U":{"d":"114,-25v85,0,49,-124,56,-201v0,-9,7,-17,16,-17v9,0,16,8,16,17r0,139v0,57,-32,91,-88,91v-56,0,-89,-34,-89,-91r0,-139v0,-9,7,-17,16,-17v9,0,17,8,17,17v7,77,-29,201,56,201","w":227,"k":{"\/":4,"d":1,"g":1,"q":1,"e":1,"\u00e8":1,"\u00e9":1,"\u00ea":1,"\u00eb":1,"o":1,"\u00f2":1,"\u00f3":1,"\u00f4":1,"\u00f5":1,"\u00f6":1,"\u00f8":1,"u":1,"\u00f9":1,"\u00fa":1,"\u00fb":1,"\u00fc":1,"y":1,"\u00fd":1,"\u00ff":1,",":9,".":9,"\u00ab":3,"c":1,"\u00e7":1,"s":1,":":3,";":3,"A":7,"\u00c0":7,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c4":7,"\u00c5":7,"\u00c6":7,"a":3,"\u00e0":3,"\u00e1":3,"\u00e2":3,"\u00e3":3,"\u00e4":3,"\u00e5":3,"\u00e6":3,"z":1}},"V":{"d":"36,-232r63,179r63,-179v4,-16,32,-14,31,4r-79,221v-2,13,-26,13,-30,0r-79,-221v-1,-17,25,-20,31,-4","w":198,"k":{"\u00ff":5,"\u00fd":5,"\u00fc":11,"\u00fb":11,"\u00fa":11,"\u00f9":11,"\u00f8":22,"\u00f6":22,"\u00f5":22,"\u00f4":22,"\u00f3":22,"\u00f2":22,"\u00f1":13,"\u00eb":22,"\u00ea":22,"\u00e9":22,"\u00e8":22,"\u00e7":22,"\u00e6":22,"\u00e5":22,"\u00e4":22,"\u00e3":22,"\u00e2":22,"\u00e1":22,"\u00e0":22,"\u00dd":-2,"\u00d8":5,"\u00d6":5,"\u00d5":5,"\u00d4":5,"\u00d3":5,"\u00d2":5,"\u00c7":6,"\u00c6":22,"\u00c5":22,"\u00c4":22,"\u00c3":22,"\u00c2":22,"\u00c1":22,"\u00c0":22,"\u00bb":16,"\u00ab":18,"z":12,"y":5,"w":5,"u":11,"t":3,"s":18,"r":13,"q":22,"p":13,"o":22,"n":13,"m":13,"g":22,"e":22,"d":22,"c":22,"a":22,"Z":2,"Y":-2,"T":-4,"Q":5,"O":5,"J":23,"G":6,"C":6,"A":22,";":23,":":23,".":43,"-":18,",":43,"\u00ae":-7,"}":-4,"x":11,"v":4,"]":-4,"\\":-5,"@":4,"?":-5,"\/":16,"*":-7,")":-4}},"W":{"d":"166,-232r49,173r52,-172v2,-8,6,-12,15,-12v11,0,18,10,14,21r-67,214v-2,13,-26,15,-30,0r-47,-170r-48,170v-2,15,-26,13,-30,0r-68,-220v-1,-16,29,-22,30,-3r52,172r49,-173v2,-14,25,-14,29,0","w":303,"k":{"\u00ae":-7,"}":-4,"x":7,"v":3,"]":-4,"?":-5,"\/":16,"*":-7,")":-4,"d":16,"g":16,"q":16,"e":16,"\u00e8":16,"\u00e9":16,"\u00ea":16,"\u00eb":16,"o":16,"\u00f2":16,"\u00f3":16,"\u00f4":16,"\u00f5":16,"\u00f6":16,"\u00f8":16,"u":13,"\u00f9":13,"\u00fa":13,"\u00fb":13,"\u00fc":13,"w":4,"y":5,"\u00fd":5,"\u00ff":5,"C":8,"G":8,"\u00c7":8,"O":4,"Q":4,"\u00d2":4,"\u00d3":4,"\u00d4":4,"\u00d5":4,"\u00d6":4,"\u00d8":4,"T":-5,"Y":-4,"\u00dd":-4,",":38,".":38,"\u00ab":16,"-":16,"c":16,"\u00e7":16,"s":15,":":22,";":22,"A":18,"\u00c0":18,"\u00c1":18,"\u00c2":18,"\u00c3":18,"\u00c4":18,"\u00c5":18,"\u00c6":18,"\u00bb":14,"J":20,"Z":2,"a":15,"\u00e0":15,"\u00e1":15,"\u00e2":15,"\u00e3":15,"\u00e4":15,"\u00e5":15,"\u00e6":15,"m":7,"n":7,"p":7,"r":7,"\u00f1":7,"z":10}},"X":{"d":"103,-146r58,-89v7,-13,29,-9,28,7v-18,40,-47,71,-68,108v22,37,50,68,69,108v1,15,-21,20,-29,8r-58,-90r-58,90v-7,13,-30,7,-29,-8v18,-41,47,-71,69,-108v-22,-37,-49,-68,-68,-108v-1,-16,20,-19,28,-7","w":205,"k":{"\u00ff":7,"\u00fd":7,"\u00fc":4,"\u00fb":4,"\u00fa":4,"\u00f9":4,"\u00f8":7,"\u00f6":7,"\u00f5":7,"\u00f4":7,"\u00f3":7,"\u00f2":7,"\u00eb":7,"\u00ea":7,"\u00e9":7,"\u00e8":7,"\u00e7":7,"\u00e6":3,"\u00e5":3,"\u00e4":3,"\u00e3":3,"\u00e2":3,"\u00e1":3,"\u00e0":3,"\u00dd":-2,"\u00d8":8,"\u00d6":8,"\u00d5":8,"\u00d4":8,"\u00d3":8,"\u00d2":8,"\u00c7":9,"\u00bb":2,"\u00ab":4,"y":7,"w":4,"u":4,"t":1,"s":3,"q":7,"o":7,"g":7,"e":7,"d":7,"c":7,"a":3,"Y":-2,"Q":8,"O":8,"G":9,"C":9,".":4,"-":16,",":4,"v":7,"@":5,"\/":-4}},"Y":{"d":"176,-228v-18,48,-48,85,-70,129r0,86v0,9,-7,16,-16,16v-9,0,-17,-7,-17,-16r0,-86v-22,-44,-51,-81,-70,-129v-1,-16,22,-20,29,-7r58,104r57,-104v6,-13,30,-9,29,7","w":179,"k":{"}":-4,"x":15,"v":11,"]":-5,"\\":-4,"V":-5,"@":4,"?":-5,"\/":12,"*":-7,")":-4,"d":27,"g":27,"q":27,"e":27,"\u00e8":27,"\u00e9":27,"\u00ea":27,"\u00eb":27,"o":27,"\u00f2":27,"\u00f3":27,"\u00f4":27,"\u00f5":27,"\u00f6":27,"\u00f8":27,"t":5,"u":19,"\u00f9":19,"\u00fa":19,"\u00fb":19,"\u00fc":19,"w":13,"y":13,"\u00fd":13,"\u00ff":13,"C":11,"G":11,"\u00c7":11,"O":7,"Q":7,"\u00d2":7,"\u00d3":7,"\u00d4":7,"\u00d5":7,"\u00d6":7,"\u00d8":7,"S":1,"T":-5,"W":-4,",":43,".":43,"\u00ab":25,"-":23,"c":27,"\u00e7":27,"f":2,"s":22,":":29,";":29,"A":20,"\u00c0":20,"\u00c1":20,"\u00c2":20,"\u00c3":20,"\u00c4":20,"\u00c5":20,"\u00c6":20,"\u00bb":18,"J":27,"Z":2,"a":23,"\u00e0":23,"\u00e1":23,"\u00e2":23,"\u00e3":23,"\u00e4":23,"\u00e5":23,"\u00e6":23,"m":13,"n":13,"p":13,"r":13,"\u00f1":13,"z":20}},"Z":{"d":"179,-14v0,8,-6,14,-15,14r-129,0v-13,1,-18,-13,-12,-24r113,-187r-100,0v-9,0,-14,-6,-14,-15v0,-8,5,-14,14,-14r127,0v12,-2,18,13,12,23r-114,188r103,0v8,0,15,6,15,15","w":194,"k":{"v":7,"\/":-2,"d":9,"g":9,"q":9,"e":9,"\u00e8":9,"\u00e9":9,"\u00ea":9,"\u00eb":9,"o":9,"\u00f2":9,"\u00f3":9,"\u00f4":9,"\u00f5":9,"\u00f6":9,"\u00f8":9,"u":5,"\u00f9":5,"\u00fa":5,"\u00fb":5,"\u00fc":5,"w":7,"y":7,"\u00fd":7,"\u00ff":7,"C":5,"G":5,"\u00c7":5,"O":5,"Q":5,"\u00d2":5,"\u00d3":5,"\u00d4":5,"\u00d5":5,"\u00d6":5,"\u00d8":5,"\u00ab":4,"-":18,"c":9,"\u00e7":9,"s":3,"a":5,"\u00e0":5,"\u00e1":5,"\u00e2":5,"\u00e3":5,"\u00e4":5,"\u00e5":5,"\u00e6":5}},"[":{"d":"62,27v17,1,43,-5,43,13v0,23,-37,14,-59,14v-9,0,-15,-7,-15,-16r0,-269v0,-25,37,-14,60,-16v8,0,14,5,14,13v0,19,-25,13,-43,14r0,247","w":119,"k":{"\u00ff":-11,"\u00fd":-11,"\u00f8":2,"\u00f6":2,"\u00f5":2,"\u00f4":2,"\u00f3":2,"\u00f2":2,"\u00eb":2,"\u00ea":2,"\u00e9":2,"\u00e8":2,"\u00e7":2,"\u00dd":-5,"\u00d8":3,"\u00d6":3,"\u00d5":3,"\u00d4":3,"\u00d3":3,"\u00d2":3,"\u00c7":3,"\u00c6":9,"\u00c5":9,"\u00c4":9,"\u00c3":9,"\u00c2":9,"\u00c1":9,"\u00c0":9,"y":-11,"q":2,"o":2,"g":2,"e":2,"d":2,"c":2,"Y":-5,"W":-4,"T":-5,"Q":3,"O":3,"J":13,"G":3,"C":3,"A":9,"j":-14,"V":-4,"9":-4,"7":-7,"4":4,"3":-4,"1":-9}},"\\":{"d":"107,36r-82,-278v-2,-17,24,-18,28,-3r82,279v1,16,-27,17,-28,2","w":160,"k":{"\u00ff":-3,"\u00fd":-3,"\u00fc":2,"\u00fb":2,"\u00fa":2,"\u00f9":2,"\u00f8":2,"\u00f6":2,"\u00f5":2,"\u00f4":2,"\u00f3":2,"\u00f2":2,"\u00eb":2,"\u00ea":2,"\u00e9":2,"\u00e8":2,"\u00e7":2,"\u00dd":14,"\u00dc":5,"\u00db":5,"\u00da":5,"\u00d9":5,"\u00d8":9,"\u00d6":9,"\u00d5":9,"\u00d4":9,"\u00d3":9,"\u00d2":9,"\u00c7":9,"y":-3,"u":2,"t":-2,"q":2,"o":2,"g":2,"f":4,"e":2,"d":2,"c":2,"Y":14,"W":16,"U":5,"T":22,"Q":9,"O":9,"G":9,"C":9,"x":-7,"v":2,"j":-22,"V":20,"9":14,"8":5,"7":11,"6":4,"5":5,"4":9,"3":4,"2":-4,"1":11,"0":5}},"]":{"d":"14,40v0,-18,26,-12,43,-13r0,-247v-18,-1,-44,5,-43,-14v1,-22,38,-13,59,-13v9,0,16,7,16,16r0,269v-1,25,-38,14,-61,16v-8,0,-14,-6,-14,-14","w":119},"^":{"d":"96,-235v16,34,38,63,52,100v1,14,-19,16,-25,5r-38,-75r-39,75v-4,12,-27,9,-25,-5v15,-35,35,-66,52,-100v4,-10,18,-11,23,0","w":169},"_":{"d":"0,18r0,-14r148,0r0,14r-148,0","w":147},"`":{"d":"73,-193v1,13,-19,18,-25,7v-7,-12,-19,-20,-23,-36v0,-13,19,-18,25,-7v7,12,19,21,23,36","w":109},"a":{"d":"23,-136v5,-21,38,-25,60,-25v45,0,70,23,70,67r0,81v0,9,-7,16,-16,16v-11,0,-17,-9,-16,-21v-21,37,-110,25,-103,-25v-6,-49,80,-61,103,-27v2,-37,-3,-64,-41,-64v-20,0,-50,24,-57,-2xm84,-69v-21,0,-35,9,-35,26v0,15,13,26,35,26v22,0,37,-12,37,-26v0,-17,-19,-26,-37,-26","w":175,"k":{"\\":5,")":2}},"b":{"d":"57,-130v33,-60,119,-24,119,52v0,75,-86,111,-119,52v9,29,-32,40,-32,13r0,-214v0,-9,7,-16,16,-16v9,0,16,7,16,16r0,97xm101,-22v27,0,43,-25,43,-56v0,-31,-16,-56,-43,-56v-26,0,-44,24,-44,56v0,32,18,56,44,56","w":190,"k":{"}":2,"]":3,"\\":9,"\/":2,")":4,"w":1,",":5,".":5,"-":-1}},"c":{"d":"150,-34v-7,25,-32,37,-60,38v-50,0,-76,-38,-76,-82v0,-44,26,-83,76,-83v28,1,53,14,60,39v-14,35,-37,-19,-59,-12v-29,0,-45,27,-45,56v0,29,16,56,45,56v20,0,28,-20,45,-25v7,0,14,5,14,13","w":160,"k":{"x":-2,"v":-3,"\\":2,")":1,"w":-2,"y":-2,"\u00fd":-2,"\u00ff":-2,"-":-2,"f":-1,":":-2,";":-2,"\u00bb":-3}},"d":{"d":"14,-78v0,-76,86,-112,119,-52r0,-97v0,-9,7,-16,16,-16v9,0,16,7,16,16r0,214v0,9,-7,16,-16,16v-14,0,-18,-13,-16,-29v-33,58,-119,24,-119,-52xm89,-22v26,0,44,-24,44,-56v0,-32,-18,-56,-44,-56v-27,0,-43,25,-43,56v0,31,16,56,43,56","w":190},"e":{"d":"153,-33v-8,25,-36,36,-63,37v-51,0,-76,-37,-76,-82v0,-46,30,-83,74,-83v45,0,68,39,68,83v0,6,-3,11,-12,11r-97,0v1,27,17,46,44,46v23,0,29,-19,48,-24v7,0,14,4,14,12xm88,-135v-24,0,-36,20,-40,43r78,0v-2,-23,-15,-43,-38,-43","w":167,"k":{"]":2,"\\":5,")":2,"\u00ab":-4,"-":-4}},"f":{"d":"99,-214v-36,0,-37,24,-35,58v18,1,47,-6,47,13v0,19,-29,12,-47,13r0,117v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-117v-14,1,-29,0,-29,-13v0,-13,15,-14,29,-13v-4,-53,9,-88,67,-84v7,0,13,6,13,13v0,7,-6,13,-13,13","w":111,"k":{"\u00ff":-4,"\u00fd":-4,"\u00fc":2,"\u00fb":2,"\u00fa":2,"\u00f9":2,"\u00f8":4,"\u00f6":4,"\u00f5":4,"\u00f4":4,"\u00f3":4,"\u00f2":4,"\u00eb":4,"\u00ea":4,"\u00e9":4,"\u00e8":4,"\u00e7":4,"\u00e6":3,"\u00e5":3,"\u00e4":3,"\u00e3":3,"\u00e2":3,"\u00e1":3,"\u00e0":3,"\u00ab":5,"y":-4,"w":-5,"u":2,"s":2,"q":4,"o":4,"g":4,"e":4,"d":4,"c":4,"a":3,";":4,":":4,".":18,"-":5,",":18,"\u00ae":-22,"}":-16,"x":-2,"v":-5,"]":-13,"\\":-5,"?":-11,"\/":3,"*":-16,")":-7,"!":-9}},"g":{"d":"23,44v9,-28,40,6,64,0v47,1,48,-33,46,-76v-31,57,-119,29,-119,-49v0,-78,87,-107,119,-49v-9,-29,32,-40,32,-13v0,95,32,216,-78,213v-29,-2,-57,-4,-64,-26xm89,-134v-27,0,-43,22,-43,53v0,31,16,54,43,54v26,0,44,-23,44,-54v0,-31,-18,-53,-44,-53","w":190,"k":{"\\":5,"?":3}},"h":{"d":"41,3v-9,0,-16,-7,-16,-16r0,-214v0,-9,7,-16,16,-16v9,0,16,7,16,16r0,97v25,-55,118,-30,108,41v-5,31,14,86,-16,92v-45,-12,19,-134,-52,-135v-52,0,-39,68,-40,119v0,9,-7,16,-16,16","w":188,"k":{"v":1,"]":2,"\\":4,"y":2,"\u00fd":2,"\u00ff":2,"T":34}},"i":{"d":"57,-13v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-130v0,-9,7,-16,16,-16v9,0,16,7,16,16r0,130xm22,-201v0,-10,9,-19,19,-19v10,0,19,9,19,19v0,10,-9,19,-19,19v-10,0,-19,-9,-19,-19","w":82},"j":{"d":"-13,57v2,-23,45,-5,38,-36r0,-164v0,-9,7,-16,16,-16v9,0,16,7,16,16r0,160v0,37,-18,54,-56,53v-8,0,-14,-5,-14,-13xm22,-201v0,-10,9,-19,19,-19v10,0,19,9,19,19v0,10,-9,19,-19,19v-10,0,-19,-9,-19,-19","w":82},"k":{"d":"154,-12v2,14,-19,20,-27,8r-49,-71r-21,21v-2,22,9,56,-16,57v-9,0,-16,-7,-16,-16r0,-214v0,-9,7,-16,16,-16v9,0,16,7,16,16r0,134v27,-21,47,-49,79,-66v15,0,18,18,8,26r-44,40v18,27,39,51,54,81","w":163,"k":{"x":-2,"v":-2,"\\":5,")":2,"d":3,"g":3,"q":3,"e":3,"\u00e8":3,"\u00e9":3,"\u00ea":3,"\u00eb":3,"o":3,"\u00f2":3,"\u00f3":3,"\u00f4":3,"\u00f5":3,"\u00f6":3,"\u00f8":3,"u":2,"\u00f9":2,"\u00fa":2,"\u00fb":2,"\u00fc":2,"w":-3,"y":-2,"\u00fd":-2,"\u00ff":-2,"\u00ab":2,"-":4,"c":3,"\u00e7":3,"s":1,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1}},"l":{"d":"57,-13v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-214v0,-9,7,-16,16,-16v9,0,16,7,16,16r0,214","w":82},"m":{"d":"41,3v-9,0,-16,-7,-16,-16r0,-130v0,-9,7,-16,16,-16v14,0,18,13,16,29v16,-42,89,-40,101,4v11,-21,29,-35,56,-35v67,-2,61,80,59,148v0,9,-7,16,-16,16v-45,-12,19,-134,-52,-135v-52,0,-39,68,-40,119v0,9,-7,16,-16,16v-45,-12,19,-134,-52,-135v-52,0,-39,68,-40,119v0,9,-7,16,-16,16","w":296,"k":{"v":1,"]":2,"\\":4,"y":2,"\u00fd":2,"\u00ff":2,"T":34}},"n":{"d":"41,3v-9,0,-16,-7,-16,-16r0,-130v0,-9,7,-16,16,-16v14,0,18,13,16,29v25,-55,118,-30,108,41v-5,31,14,86,-16,92v-45,-12,19,-134,-52,-135v-52,0,-39,68,-40,119v0,9,-7,16,-16,16","w":188,"k":{"v":1,"]":2,"\\":4,"y":2,"\u00fd":2,"\u00ff":2,"T":34}},"o":{"d":"90,4v-47,0,-76,-38,-76,-82v0,-44,29,-83,76,-83v47,0,76,39,76,83v0,44,-29,82,-76,82xm90,-22v35,0,44,-26,44,-56v0,-30,-15,-56,-44,-56v-29,0,-44,26,-44,56v0,30,15,56,44,56","w":180,"k":{"}":2,"x":1,"v":1,"]":2,"\\":9,"?":2,"\/":2,")":2,"t":2,",":2,".":2,"\u00ab":-2,"-":-2,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1,"z":2}},"p":{"d":"176,-78v0,75,-86,111,-119,52r0,80v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-197v0,-9,7,-16,16,-16v14,0,18,13,16,29v33,-60,119,-24,119,52xm101,-134v-26,0,-44,24,-44,56v0,32,18,56,44,56v27,0,43,-25,43,-56v0,-31,-16,-56,-43,-56","w":190,"k":{"}":2,"]":3,"\\":9,"\/":2,")":4,"w":1,",":5,".":5,"-":-1}},"q":{"d":"133,-26v-33,58,-119,24,-119,-52v0,-76,86,-112,119,-52v-9,-29,32,-40,32,-13r0,197v0,9,-7,16,-16,16v-32,0,-10,-65,-16,-96xm89,-134v-27,0,-43,25,-43,56v0,31,16,56,43,56v26,0,44,-24,44,-56v0,-32,-18,-56,-44,-56","w":190},"r":{"d":"25,-143v0,-9,7,-16,16,-16v16,0,17,17,16,34v5,-22,21,-34,41,-34v9,0,16,5,16,14v0,9,-7,15,-17,15v-47,-2,-40,67,-40,117v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-130","w":114,"k":{"}":-3,"x":-2,"v":-7,"\\":1,"?":-7,"\/":2,"d":2,"g":2,"q":2,"e":2,"\u00e8":2,"\u00e9":2,"\u00ea":2,"\u00eb":2,"o":2,"\u00f2":2,"\u00f3":2,"\u00f4":2,"\u00f5":2,"\u00f6":2,"\u00f8":2,"w":-7,"y":-5,"\u00fd":-5,"\u00ff":-5,",":20,".":20,"\u00ab":2,"-":5,"c":2,"\u00e7":2,":":2,";":2,"\u00bb":-5,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1}},"s":{"d":"132,-134v-7,27,-36,-1,-55,-1v-16,0,-27,6,-27,18v0,12,8,19,33,24v67,15,72,97,-6,97v-28,0,-54,-10,-61,-32v12,-29,37,12,61,8v44,-6,30,-37,-5,-46v-37,-9,-53,-24,-53,-51v0,-54,96,-57,113,-17","w":148,"k":{"\\":4,"\/":-1,")":2}},"t":{"d":"39,-156v2,-24,-9,-63,16,-63v25,0,14,39,16,63v17,1,41,-5,41,13v0,17,-24,12,-41,13r0,117v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-117v-16,0,-38,4,-38,-13v0,-16,22,-13,38,-13","w":111,"k":{"\u00ae":-9,"v":-4,"\\":-1,"\/":2,"*":-14,"d":2,"g":2,"q":2,"e":2,"\u00e8":2,"\u00e9":2,"\u00ea":2,"\u00eb":2,"o":2,"\u00f2":2,"\u00f3":2,"\u00f4":2,"\u00f5":2,"\u00f6":2,"\u00f8":2,"t":-2,"w":-4,"y":-7,"\u00fd":-7,"\u00ff":-7,",":16,".":16,"\u00ab":2,"-":2,"c":2,"\u00e7":2,":":2,";":2,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1}},"u":{"d":"147,-159v9,0,16,7,16,16r0,130v0,9,-7,16,-16,16v-14,0,-18,-13,-16,-29v-25,53,-118,30,-108,-41v5,-31,-14,-86,16,-92v44,12,-18,135,52,135v51,0,39,-68,40,-119v0,-9,7,-16,16,-16","w":188,"k":{"\\":5,"?":3}},"v":{"d":"74,-44r41,-105v4,-15,28,-13,28,4v-16,49,-38,92,-56,139v-4,12,-23,12,-27,0r-56,-139v0,-17,23,-19,29,-4","w":147,"k":{"\u00f8":1,"\u00f6":1,"\u00f5":1,"\u00f4":1,"\u00f3":1,"\u00f2":1,"\u00eb":1,"\u00ea":1,"\u00e9":1,"\u00e8":1,"\u00e7":1,"\u00e6":1,"\u00e5":1,"\u00e4":1,"\u00e3":1,"\u00e2":1,"\u00e1":1,"\u00e0":1,"w":-2,"t":-3,"s":1,"q":1,"o":1,"g":1,"e":1,"d":1,"c":1,"a":1,";":3,":":3,".":25,"-":-2,",":25,"\u00ae":-5,"v":-2,"?":-9,"*":-7}},"w":{"d":"123,-150r35,100r30,-99v2,-14,29,-13,28,3r-43,140v-3,13,-23,10,-27,-2r-35,-99r-36,99v-1,13,-23,14,-27,2r-43,-140v-2,-16,24,-17,28,-3r30,99r35,-100v2,-12,21,-12,25,0","w":221,"k":{"\u00ae":-5,"?":-9,"t":-1,"y":-1,"\u00fd":-1,"\u00ff":-1,",":22,".":22,"-":-2,":":4,";":4,"a":2,"\u00e0":2,"\u00e1":2,"\u00e2":2,"\u00e3":2,"\u00e4":2,"\u00e5":2,"\u00e6":2}},"x":{"d":"37,-154r40,54r39,-54v12,-15,33,4,22,18r-44,58v16,23,36,41,49,67v1,13,-18,19,-26,8r-40,-54r-40,54v-7,11,-26,5,-26,-8v11,-27,33,-44,48,-67v-15,-23,-36,-40,-47,-67v-2,-13,18,-19,25,-9","w":153,"k":{"\u00ff":-1,"\u00fd":-1,"\u00f8":1,"\u00f6":1,"\u00f5":1,"\u00f4":1,"\u00f3":1,"\u00f2":1,"\u00eb":1,"\u00ea":1,"\u00e9":1,"\u00e8":1,"\u00e7":1,"y":-1,"q":1,"o":1,"g":1,"f":-1,"e":1,"d":1,"c":1,".":4,"-":4,",":4,"\\":2}},"y":{"d":"146,-145v-21,54,-50,193,-118,215v-8,0,-14,-5,-14,-12v11,-23,39,-31,48,-59r-54,-144v-1,-17,23,-17,28,-4r42,114r39,-113v3,-15,29,-15,29,3","w":149,"k":{"\u00ae":-7,"v":-5,"\\":2,"?":-9,"*":-7,"d":1,"g":1,"q":1,"e":1,"\u00e8":1,"\u00e9":1,"\u00ea":1,"\u00eb":1,"o":1,"\u00f2":1,"\u00f3":1,"\u00f4":1,"\u00f5":1,"\u00f6":1,"\u00f8":1,"t":-4,"w":-5,"y":-4,"\u00fd":-4,"\u00ff":-4,",":22,".":22,"-":-2,"c":1,"\u00e7":1,"f":-4,":":2,";":2,"a":2,"\u00e0":2,"\u00e1":2,"\u00e2":2,"\u00e3":2,"\u00e4":2,"\u00e5":2,"\u00e6":2}},"z":{"d":"126,-156v12,-1,18,13,11,22r-81,108r72,0v7,0,13,5,13,13v0,8,-6,13,-13,13r-100,0v-12,0,-16,-14,-9,-23r79,-107r-69,0v-7,0,-13,-6,-13,-13v0,-7,6,-13,13,-13r97,0","w":153,"k":{"v":-2,"\\":2,"\/":-5,"d":2,"g":2,"q":2,"e":2,"\u00e8":2,"\u00e9":2,"\u00ea":2,"\u00eb":2,"o":2,"\u00f2":2,"\u00f3":2,"\u00f4":2,"\u00f5":2,"\u00f6":2,"\u00f8":2,"w":-3,"y":-1,"\u00fd":-1,"\u00ff":-1,"-":2,"c":2,"\u00e7":2,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1}},"{":{"d":"112,43v0,14,-14,13,-28,13v-55,0,-31,-71,-36,-118v5,-26,-35,-10,-35,-33v0,-23,40,-7,35,-34v5,-53,-23,-118,51,-118v7,0,13,5,13,13v0,22,-32,5,-32,25v0,48,19,112,-35,114v54,2,30,66,35,113v-3,21,33,3,32,25","w":124,"k":{"\u00ff":-11,"\u00fd":-11,"\u00f8":2,"\u00f6":2,"\u00f5":2,"\u00f4":2,"\u00f3":2,"\u00f2":2,"\u00eb":2,"\u00ea":2,"\u00e9":2,"\u00e8":2,"\u00e7":2,"\u00dd":-4,"\u00d8":4,"\u00d6":4,"\u00d5":4,"\u00d4":4,"\u00d3":4,"\u00d2":4,"\u00c7":4,"\u00c6":4,"\u00c5":4,"\u00c4":4,"\u00c3":4,"\u00c2":4,"\u00c1":4,"\u00c0":4,"y":-11,"q":2,"o":2,"g":2,"e":2,"d":2,"c":2,"Y":-4,"W":-4,"T":-5,"S":-2,"Q":4,"O":4,"J":4,"G":4,"C":4,"A":4,"j":-16,"V":-4,"7":-7,"5":-3,"4":4,"3":-2,"1":-11}},"|":{"d":"34,59r0,-311v0,-7,5,-13,13,-13v8,0,12,6,12,13r0,311v0,7,-4,12,-12,12v-8,0,-13,-5,-13,-12","w":93},"}":{"d":"76,-62v-3,56,19,118,-50,118v-7,0,-13,-5,-13,-13v-2,-21,32,-3,32,-25v0,-47,-19,-111,34,-113v-53,-2,-28,-67,-34,-114v2,-20,-33,-2,-32,-25v1,-14,14,-13,28,-13v54,0,29,72,35,118v-5,26,35,11,36,34v1,23,-41,7,-36,33","w":124},"~":{"d":"158,-107v-6,23,-29,35,-43,35v-20,0,-36,-19,-52,-19v-18,0,-16,21,-32,21v-7,0,-13,-5,-13,-13v5,-23,24,-35,43,-35v11,-5,42,20,53,20v16,0,16,-19,30,-21v8,0,14,5,14,12","w":172},"\u00a0":{"w":91},"\u00a1":{"d":"55,-89v0,44,9,91,8,143v0,9,-5,16,-15,16v-10,0,-16,-7,-16,-16v-1,-52,2,-100,8,-143v1,-9,15,-11,15,0xm27,-140v0,-11,10,-21,21,-21v11,0,20,10,20,21v0,11,-9,20,-20,20v-11,0,-21,-9,-21,-20","w":95},"\u00a2":{"d":"159,-76v-5,22,-25,32,-46,37v-1,18,5,43,-14,43v-19,0,-13,-25,-14,-43v-82,-10,-83,-152,0,-162v1,-18,-5,-42,14,-42v19,0,13,24,14,42v21,4,40,15,46,37v-14,35,-38,-19,-59,-12v-29,0,-45,27,-45,56v0,29,16,56,45,56v20,0,29,-19,45,-25v7,0,14,5,14,13","w":180,"k":{"2":-5,"1":-5}},"\u00a3":{"d":"148,-244v22,1,54,5,58,25v-5,28,-39,-1,-58,3v-44,-4,-41,39,-40,81v27,5,74,-13,80,13v-5,27,-53,9,-80,14r0,82r81,0v8,0,13,5,13,13v0,8,-5,13,-13,13r-156,0v-8,0,-13,-5,-13,-13v1,-22,36,-10,56,-13r0,-82v-20,-2,-52,7,-52,-14v0,-21,33,-11,52,-13v-4,-65,8,-111,72,-109","w":223,"k":{"9":2,"7":-7,"1":-9}},"\u00a5":{"d":"22,-126v0,-16,24,-11,40,-12v-15,-30,-34,-57,-47,-90v-1,-16,24,-21,29,-5r54,103r54,-103v5,-15,31,-12,29,5v-11,34,-32,59,-46,90v16,1,39,-5,39,12v0,20,-33,10,-52,12v-4,8,-10,15,-8,29v21,3,57,-9,60,12v-3,20,-40,8,-60,11v-3,24,10,65,-16,65v-26,0,-13,-41,-16,-65v-21,-3,-56,9,-60,-11v3,-21,39,-9,60,-12v2,-14,-3,-21,-8,-29v-19,-2,-52,7,-52,-12","w":196,"k":{"7":-9,"2":-2,"1":-13}},"\u00a6":{"d":"34,-130r0,-122v0,-7,5,-13,13,-13v8,0,12,6,12,13r0,122v0,7,-4,13,-12,13v-8,0,-13,-6,-13,-13xm34,59r0,-123v0,-7,5,-12,13,-12v8,0,12,5,12,12r0,123v0,7,-4,12,-12,12v-8,0,-13,-5,-13,-12","w":93},"\u00a7":{"d":"67,-198v0,41,110,55,110,109v0,15,-6,30,-24,43v33,37,10,88,-53,86v-32,-2,-66,-10,-73,-35v0,-7,5,-13,13,-13v19,5,32,22,61,22v21,0,36,-10,36,-24v0,-19,-20,-28,-57,-44v-65,-27,-72,-76,-24,-105v-41,-34,-18,-88,48,-85v25,0,61,7,66,29v0,7,-4,13,-12,13v-18,-4,-32,-16,-55,-16v-21,0,-36,3,-36,20xm146,-88v-1,-30,-47,-40,-69,-56v-9,5,-21,15,-21,29v0,23,63,44,74,54v7,-6,16,-15,16,-27","w":200},"\u00a8":{"d":"82,-206v0,-10,8,-18,18,-18v10,0,18,8,18,18v0,10,-8,18,-18,18v-10,0,-18,-8,-18,-18xm23,-206v0,-10,8,-18,18,-18v10,0,18,8,18,18v0,10,-8,18,-18,18v-10,0,-18,-8,-18,-18","w":141},"\u00a9":{"d":"18,-120v0,-68,56,-124,125,-124v69,0,124,56,124,124v0,68,-55,124,-124,124v-69,0,-125,-56,-125,-124xm39,-120v0,58,44,106,104,106v60,0,104,-48,104,-106v0,-58,-44,-106,-104,-106v-60,0,-104,48,-104,106xm87,-120v-7,-60,88,-83,109,-32v0,3,-3,8,-8,8v-15,-6,-20,-19,-40,-19v-23,0,-42,17,-42,43v0,26,19,44,42,44v20,0,25,-14,40,-20v5,0,8,5,8,8v-20,51,-117,28,-109,-32","w":285},"\u00aa":{"d":"25,-229v20,-28,95,-19,87,28v-4,22,10,60,-10,66v-6,0,-11,-5,-11,-12v-18,23,-69,14,-69,-20v0,-35,48,-41,69,-21v9,-40,-30,-44,-57,-32v-5,0,-9,-4,-9,-9xm66,-184v-14,0,-23,6,-23,17v0,11,10,18,23,18v13,0,25,-6,25,-17v0,-10,-12,-18,-25,-18","w":131},"\u00ab":{"d":"74,-138v7,-9,24,-3,23,9v-10,23,-34,34,-49,52v16,17,37,30,49,51v1,12,-15,19,-23,10v-19,-21,-43,-37,-58,-61v15,-25,40,-40,58,-61xm156,-138v7,-9,24,-3,23,9v-10,23,-34,34,-49,52v16,17,37,30,49,51v1,12,-15,19,-23,10v-19,-21,-43,-37,-58,-61v15,-25,40,-40,58,-61","w":200,"k":{"X":2,"V":16,"@":2,"8":2,"7":5,"1":4,"T":25,"W":14,"Y":18,"\u00dd":18,",":2,".":2,":":2,";":2,"J":-5}},"\u00ac":{"d":"168,-32v-25,0,-10,-44,-14,-68r-119,0v-7,0,-13,-6,-13,-13v0,-8,6,-13,13,-13r135,0v25,5,13,53,13,79v0,8,-6,15,-15,15","w":213},"\u00ae":{"d":"13,-184v0,-33,25,-60,59,-60v34,0,60,27,60,60v0,33,-26,59,-60,59v-34,0,-59,-26,-59,-59xm26,-184v0,25,18,47,46,47v28,0,46,-22,46,-47v0,-25,-18,-48,-46,-48v-28,0,-46,23,-46,48xm59,-215v29,-8,49,21,25,34v2,8,19,21,7,26v-12,-5,-6,-29,-28,-25v0,9,2,34,-9,21r0,-51v0,-3,2,-5,5,-5xm86,-197v1,-10,-12,-11,-23,-10r0,19v10,0,25,1,23,-9","w":144},"\u00af":{"d":"108,-194r-71,0v-6,0,-12,-5,-12,-12v0,-7,6,-11,12,-11r71,0v6,0,11,4,11,11v0,7,-5,12,-11,12","w":144},"\u00b0":{"d":"57,-163v-24,0,-41,-18,-41,-40v0,-22,17,-40,41,-40v24,0,41,18,41,40v0,22,-17,40,-41,40xm57,-180v13,0,22,-10,22,-23v0,-13,-9,-23,-22,-23v-13,0,-21,10,-21,23v0,13,8,23,21,23","w":114},"\u00b1":{"d":"42,-25r135,0v7,0,13,4,13,12v0,7,-6,13,-13,13r-135,0v-7,0,-13,-6,-13,-13v0,-8,6,-12,13,-12xm190,-122v-3,23,-43,9,-66,13v-3,25,11,65,-15,68v-25,-3,-10,-44,-14,-68v-23,-3,-63,10,-66,-13v3,-24,43,-9,66,-13v3,-22,-10,-62,14,-62v24,0,12,40,15,62v23,4,63,-11,66,13","w":218},"\u00b2":{"d":"24,-107v0,-11,10,-20,21,-20v11,0,21,9,21,20v0,11,-10,21,-21,21v-11,0,-21,-10,-21,-21"},"\u00b3":{"d":"24,-107v0,-11,10,-20,21,-20v11,0,21,9,21,20v0,11,-10,21,-21,21v-11,0,-21,-10,-21,-21"},"\u00b4":{"d":"61,-186v-7,10,-26,6,-25,-7v8,-16,17,-35,34,-42v29,6,0,36,-9,49","w":109},"\u00b5":{"d":"147,-159v9,0,16,7,16,16r0,130v0,9,-7,16,-16,16v-14,0,-18,-13,-16,-29v-11,26,-47,38,-76,24v-3,26,11,70,-16,72v-9,0,-16,-7,-16,-16r0,-197v0,-9,7,-16,16,-16v45,12,-20,135,52,135v51,0,39,-68,40,-119v0,-9,7,-16,16,-16","w":188},"\u00b6":{"d":"148,3v-8,0,-12,-6,-12,-13r0,-206r-31,0r0,274v0,7,-5,12,-12,12v-7,0,-13,-5,-13,-12r0,-169v-36,0,-66,-24,-66,-64v0,-66,65,-69,134,-65v7,0,13,5,13,13r0,217v0,7,-5,13,-13,13","w":189},"\u00b7":{"d":"24,-107v0,-11,10,-20,21,-20v11,0,21,9,21,20v0,11,-10,21,-21,21v-11,0,-21,-10,-21,-21"},"\u00b8":{"d":"39,35v-18,-4,1,-24,2,-35r17,0r-7,19v19,-6,42,1,42,22v0,15,-13,29,-39,29v-15,0,-45,-11,-23,-20v13,2,39,7,39,-8v0,-13,-24,-10,-31,-7","w":115},"\u00b9":{"d":"24,-107v0,-11,10,-20,21,-20v11,0,21,9,21,20v0,11,-10,21,-21,21v-11,0,-21,-10,-21,-21"},"\u00ba":{"d":"68,-134v-31,0,-52,-24,-52,-55v0,-31,21,-55,52,-55v31,0,52,24,52,55v0,31,-21,55,-52,55xm68,-153v19,0,30,-16,30,-36v0,-20,-11,-36,-30,-36v-19,0,-30,16,-30,36v0,20,11,36,30,36","w":136},"\u00bb":{"d":"104,-129v-1,-12,14,-17,22,-9r54,52v6,5,5,13,0,18v-22,18,-37,42,-63,56v-12,1,-16,-15,-8,-23r43,-42v-15,-18,-37,-30,-48,-52xm22,-129v-1,-12,14,-17,22,-9r54,52v6,5,5,13,0,18v-22,18,-37,42,-63,56v-12,1,-16,-15,-8,-23r43,-42v-15,-18,-37,-30,-48,-52","w":200,"k":{"X":4,"V":18,"9":5,"7":7,"4":-5,"1":5,"*":11,"o":-2,"\u00f2":-2,"\u00f3":-2,"\u00f4":-2,"\u00f5":-2,"\u00f6":-2,"\u00f8":-2,"S":2,"T":23,"U":3,"\u00d9":3,"\u00da":3,"\u00db":3,"\u00dc":3,"W":16,"Y":25,"\u00dd":25,",":5,".":5,"A":4,"\u00c0":4,"\u00c1":4,"\u00c2":4,"\u00c3":4,"\u00c4":4,"\u00c5":4,"\u00c6":4,"Z":2}},"\u00bc":{"d":"24,-107v0,-11,10,-20,21,-20v11,0,21,9,21,20v0,11,-10,21,-21,21v-11,0,-21,-10,-21,-21"},"\u00bd":{"d":"24,-107v0,-11,10,-20,21,-20v11,0,21,9,21,20v0,11,-10,21,-21,21v-11,0,-21,-10,-21,-21"},"\u00be":{"d":"24,-107v0,-11,10,-20,21,-20v11,0,21,9,21,20v0,11,-10,21,-21,21v-11,0,-21,-10,-21,-21"},"\u00bf":{"d":"150,39v-22,45,-136,44,-136,-20v0,-18,8,-33,32,-54v24,-21,28,-23,27,-51v0,-9,7,-16,16,-16v12,0,18,11,16,25v10,39,-61,67,-59,95v3,38,69,22,90,8v8,0,14,5,14,13xm110,-140v0,11,-10,20,-21,20v-11,0,-20,-9,-20,-20v0,-11,9,-21,20,-21v11,0,21,10,21,21","w":161},"\u00c0":{"d":"122,-231r82,219v2,16,-27,21,-30,5r-19,-49r-97,0v-11,19,-8,53,-33,59v-12,0,-18,-11,-14,-21r80,-213v3,-15,25,-15,31,0xm144,-85r-37,-107r-38,107r75,0xm113,-284v8,8,2,26,-9,23v-17,-4,-27,-19,-33,-35v10,-28,31,1,42,12","w":213,"k":{"\u00ae":14,"}":4,"x":-3,"v":8,"]":9,"\\":13,"V":22,"@":7,"?":8,"\/":-2,"*":32,")":7}},"\u00c1":{"d":"122,-231r82,219v2,16,-27,21,-30,5r-19,-49r-97,0v-11,19,-8,53,-33,59v-12,0,-18,-11,-14,-21r80,-213v3,-15,25,-15,31,0xm144,-85r-37,-107r-38,107r75,0xm108,-261v-29,-8,-1,-31,9,-43v7,-10,25,-4,24,8v-7,15,-17,29,-33,35","w":213,"k":{"\u00ae":14,"}":4,"x":-3,"v":8,"]":9,"\\":13,"V":22,"@":7,"?":8,"\/":-2,"*":32,")":7}},"\u00c2":{"d":"122,-231r82,219v2,16,-27,21,-30,5r-19,-49r-97,0v-11,19,-8,53,-33,59v-12,0,-18,-11,-14,-21r80,-213v3,-15,25,-15,31,0xm144,-85r-37,-107r-38,107r75,0xm98,-306v20,-12,32,18,46,26v8,5,1,20,-8,19v-12,-5,-19,-16,-29,-23v-11,8,-31,37,-41,12v5,-17,22,-22,32,-34","w":213,"k":{"\u00ae":14,"}":4,"x":-3,"v":8,"]":9,"\\":13,"V":22,"@":7,"?":8,"\/":-2,"*":32,")":7}},"\u00c3":{"d":"122,-231r82,219v2,16,-27,21,-30,5r-19,-49r-97,0v-11,19,-8,53,-33,59v-12,0,-18,-11,-14,-21r80,-213v3,-15,25,-15,31,0xm144,-85r-37,-107r-38,107r75,0xm159,-295v-5,13,-13,29,-29,29v-13,0,-33,-12,-43,-13v-9,-1,-11,14,-20,14v-6,0,-12,-3,-12,-9v5,-13,12,-29,29,-29v14,0,33,12,43,13v10,1,11,-16,20,-15v6,0,12,4,12,10","w":213,"k":{"\u00ae":14,"}":4,"x":-3,"v":8,"]":9,"\\":13,"V":22,"@":7,"?":8,"\/":-2,"*":32,")":7}},"\u00c4":{"d":"122,-231r82,219v2,16,-27,21,-30,5r-19,-49r-97,0v-11,19,-8,53,-33,59v-12,0,-18,-11,-14,-21r80,-213v3,-15,25,-15,31,0xm144,-85r-37,-107r-38,107r75,0xm59,-284v0,-26,35,-21,35,0v0,9,-8,17,-17,17v-9,0,-18,-8,-18,-17xm120,-284v0,-9,8,-18,17,-18v24,0,20,35,0,35v-9,0,-17,-8,-17,-17","w":213,"k":{"\u00ae":14,"}":4,"x":-3,"v":8,"]":9,"\\":13,"V":22,"@":7,"?":8,"\/":-2,"*":32,")":7}},"\u00c5":{"d":"120,-235r83,223v3,17,-24,19,-30,5r-19,-49r-96,0r-19,49v-3,16,-32,11,-30,-5r84,-223v-24,-9,-15,-50,13,-50v29,0,38,40,14,50xm144,-85r-38,-107r-38,107r76,0xm106,-246v7,0,12,-5,12,-12v0,-7,-5,-13,-12,-13v-7,0,-11,6,-11,13v0,7,4,12,11,12","w":212,"k":{"\u00ae":14,"}":4,"x":-3,"v":8,"]":9,"\\":13,"V":22,"@":7,"?":8,"\/":-2,"*":32,")":7}},"\u00c6":{"d":"186,0v-24,-6,-20,-38,-32,-56r-96,0r-19,49v-3,16,-32,11,-30,-5r82,-217v3,-7,7,-11,15,-11r159,0v8,0,15,7,15,15v0,9,-7,15,-15,15r-137,0r28,73v29,5,80,-13,86,15v-4,26,-50,10,-75,14r30,78v29,5,80,-13,86,15v-8,29,-65,9,-97,15xm144,-85r-38,-105r-38,105r76,0","w":292},"\u00c7":{"d":"118,-25v30,0,40,-26,62,-34v14,0,20,15,11,25v-15,20,-36,36,-67,38r-6,15v19,-6,41,0,41,22v0,15,-12,29,-38,29v-15,0,-45,-11,-23,-20v13,2,39,7,39,-8v0,-20,-37,2,-39,-14r9,-24v-56,-5,-91,-55,-91,-124v0,-73,39,-124,101,-124v39,1,67,18,78,49v0,8,-6,15,-15,15v-21,-8,-32,-35,-62,-35v-42,0,-69,37,-69,95v0,58,27,95,69,95","w":207,"k":{"\u00ae":-13,"}":-7,"v":1,"]":-9,"\\":-3,"?":-4,"\/":-2,"*":-5,")":-2,"d":1,"g":1,"q":1,"e":1,"\u00e8":1,"\u00e9":1,"\u00ea":1,"\u00eb":1,"o":1,"\u00f2":1,"\u00f3":1,"\u00f4":1,"\u00f5":1,"\u00f6":1,"\u00f8":1,"u":1,"\u00f9":1,"\u00fa":1,"\u00fb":1,"\u00fc":1,"w":1,"C":1,"G":1,"\u00c7":1,"O":1,"Q":1,"\u00d2":1,"\u00d3":1,"\u00d4":1,"\u00d5":1,"\u00d6":1,"\u00d8":1,"\u00ab":-2,"-":2,"c":1,"\u00e7":1,":":-5,";":-5,"A":1,"\u00c0":1,"\u00c1":1,"\u00c2":1,"\u00c3":1,"\u00c4":1,"\u00c5":1,"\u00c6":1,"\u00bb":-4}},"\u00c8":{"d":"59,-210r0,73v27,4,72,-12,76,15v-4,25,-50,10,-76,14r0,78r102,0v8,0,15,6,15,15v0,8,-7,15,-15,15r-117,0v-10,0,-17,-7,-17,-16r0,-208v0,-9,8,-16,17,-16r114,0v8,0,15,7,15,15v0,9,-7,15,-15,15r-99,0xm112,-284v8,8,1,25,-10,23v-17,-4,-25,-21,-33,-35v11,-28,32,1,43,12","w":185,"k":{"}":-7,"v":6,"]":-7,"\\":-2,"X":-1,"*":-4,")":-4,"d":5,"g":5,"q":5,"e":5,"\u00e8":5,"\u00e9":5,"\u00ea":5,"\u00eb":5,"o":5,"\u00f2":5,"\u00f3":5,"\u00f4":5,"\u00f5":5,"\u00f6":5,"\u00f8":5,"t":1,"u":5,"\u00f9":5,"\u00fa":5,"\u00fb":5,"\u00fc":5,"w":4,"y":6,"\u00fd":6,"\u00ff":6,"C":9,"G":9,"\u00c7":9,"O":9,"Q":9,"\u00d2":9,"\u00d3":9,"\u00d4":9,"\u00d5":9,"\u00d6":9,"\u00d8":9,"\u00ab":4,"-":17,"c":5,"\u00e7":5,"f":2,"s":3,":":-2,";":-2,"\u00bb":-5,"J":4,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1,"m":1,"n":1,"p":1,"r":1,"\u00f1":1}},"\u00c9":{"d":"59,-210r0,73v27,4,72,-12,76,15v-4,25,-50,10,-76,14r0,78r102,0v8,0,15,6,15,15v0,8,-7,15,-15,15r-117,0v-10,0,-17,-7,-17,-16r0,-208v0,-9,8,-16,17,-16r114,0v8,0,15,7,15,15v0,9,-7,15,-15,15r-99,0xm98,-261v-29,-8,-1,-31,9,-43v7,-10,25,-4,24,8v-7,15,-17,29,-33,35","w":185,"k":{"}":-7,"v":6,"]":-7,"\\":-2,"X":-1,"*":-4,")":-4,"d":5,"g":5,"q":5,"e":5,"\u00e8":5,"\u00e9":5,"\u00ea":5,"\u00eb":5,"o":5,"\u00f2":5,"\u00f3":5,"\u00f4":5,"\u00f5":5,"\u00f6":5,"\u00f8":5,"t":1,"u":5,"\u00f9":5,"\u00fa":5,"\u00fb":5,"\u00fc":5,"w":4,"y":6,"\u00fd":6,"\u00ff":6,"C":9,"G":9,"\u00c7":9,"O":9,"Q":9,"\u00d2":9,"\u00d3":9,"\u00d4":9,"\u00d5":9,"\u00d6":9,"\u00d8":9,"\u00ab":4,"-":17,"c":5,"\u00e7":5,"f":2,"s":3,":":-2,";":-2,"\u00bb":-5,"J":4,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1,"m":1,"n":1,"p":1,"r":1,"\u00f1":1}},"\u00ca":{"d":"59,-210r0,73v27,4,72,-12,76,15v-4,25,-50,10,-76,14r0,78r102,0v8,0,15,6,15,15v0,8,-7,15,-15,15r-117,0v-10,0,-17,-7,-17,-16r0,-208v0,-9,8,-16,17,-16r114,0v8,0,15,7,15,15v0,9,-7,15,-15,15r-99,0xm91,-306v20,-12,33,18,47,26v7,6,0,21,-8,19v-14,-3,-19,-16,-30,-23v-11,8,-31,37,-41,12v6,-16,22,-22,32,-34","w":185,"k":{"}":-7,"v":6,"]":-7,"\\":-2,"X":-1,"*":-4,")":-4,"d":5,"g":5,"q":5,"e":5,"\u00e8":5,"\u00e9":5,"\u00ea":5,"\u00eb":5,"o":5,"\u00f2":5,"\u00f3":5,"\u00f4":5,"\u00f5":5,"\u00f6":5,"\u00f8":5,"t":1,"u":5,"\u00f9":5,"\u00fa":5,"\u00fb":5,"\u00fc":5,"w":4,"y":6,"\u00fd":6,"\u00ff":6,"C":9,"G":9,"\u00c7":9,"O":9,"Q":9,"\u00d2":9,"\u00d3":9,"\u00d4":9,"\u00d5":9,"\u00d6":9,"\u00d8":9,"\u00ab":4,"-":17,"c":5,"\u00e7":5,"f":2,"s":3,":":-2,";":-2,"\u00bb":-5,"J":4,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1,"m":1,"n":1,"p":1,"r":1,"\u00f1":1}},"\u00cb":{"d":"59,-210r0,73v27,4,72,-12,76,15v-4,25,-50,10,-76,14r0,78r102,0v8,0,15,6,15,15v0,8,-7,15,-15,15r-117,0v-10,0,-17,-7,-17,-16r0,-208v0,-9,8,-16,17,-16r114,0v8,0,15,7,15,15v0,9,-7,15,-15,15r-99,0xm54,-284v0,-26,35,-21,35,0v0,9,-8,17,-17,17v-9,0,-18,-8,-18,-17xm114,-284v0,-26,35,-21,35,0v0,9,-8,17,-17,17v-9,0,-18,-8,-18,-17","w":185,"k":{"}":-7,"v":6,"]":-7,"\\":-2,"X":-1,"*":-4,")":-4,"d":5,"g":5,"q":5,"e":5,"\u00e8":5,"\u00e9":5,"\u00ea":5,"\u00eb":5,"o":5,"\u00f2":5,"\u00f3":5,"\u00f4":5,"\u00f5":5,"\u00f6":5,"\u00f8":5,"t":1,"u":5,"\u00f9":5,"\u00fa":5,"\u00fb":5,"\u00fc":5,"w":4,"y":6,"\u00fd":6,"\u00ff":6,"C":9,"G":9,"\u00c7":9,"O":9,"Q":9,"\u00d2":9,"\u00d3":9,"\u00d4":9,"\u00d5":9,"\u00d6":9,"\u00d8":9,"\u00ab":4,"-":17,"c":5,"\u00e7":5,"f":2,"s":3,":":-2,";":-2,"\u00bb":-5,"J":4,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1,"m":1,"n":1,"p":1,"r":1,"\u00f1":1}},"\u00cc":{"d":"61,-226r0,213v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-213v0,-9,7,-17,16,-17v9,0,16,8,16,17xm53,-284v8,8,1,25,-10,23v-17,-4,-25,-21,-33,-35v11,-28,32,1,43,12"},"\u00cd":{"d":"61,-226r0,213v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-213v0,-9,7,-17,16,-17v9,0,16,8,16,17xm46,-261v-29,-8,-1,-31,9,-43v7,-10,25,-4,24,8v-6,16,-17,29,-33,35"},"\u00ce":{"d":"61,-226r0,213v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-213v0,-9,7,-17,16,-17v9,0,16,8,16,17xm36,-306v20,-12,32,18,46,26v8,5,2,20,-7,19v-14,-4,-19,-16,-30,-23v-11,8,-31,37,-41,12v6,-16,22,-22,32,-34"},"\u00cf":{"d":"61,-226r0,213v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-213v0,-9,7,-17,16,-17v9,0,16,8,16,17xm-2,-284v0,-9,8,-18,17,-18v24,0,20,35,0,35v-9,0,-17,-8,-17,-17xm58,-284v0,-9,8,-18,17,-18v26,0,21,35,0,35v-9,0,-17,-8,-17,-17"},"\u00d0":{"d":"42,-106v-16,0,-34,3,-34,-14v0,-17,18,-14,34,-14r0,-89v2,-27,45,-17,71,-17v68,0,104,49,104,120v1,93,-57,120,-158,120v-9,0,-17,-8,-17,-17r0,-89xm184,-120v0,-63,-36,-100,-109,-90r0,76v21,2,56,-9,56,14v0,23,-35,11,-56,14r0,76v73,9,109,-27,109,-90","w":232},"\u00d1":{"d":"199,-13v2,14,-20,22,-28,9r-113,-172r0,163v0,8,-7,16,-16,16v-9,0,-15,-8,-15,-16r0,-214v-1,-17,21,-20,29,-8r112,172r0,-164v0,-9,7,-16,16,-16v9,0,15,7,15,16r0,214xm165,-295v-5,13,-13,29,-29,29v-13,0,-33,-12,-43,-13v-9,-1,-11,14,-20,14v-6,0,-12,-3,-12,-9v4,-13,12,-29,29,-29v14,0,33,12,43,13v10,1,11,-16,20,-15v6,0,12,4,12,10","w":226},"\u00d2":{"d":"217,-120v0,67,-37,124,-100,124v-63,0,-101,-57,-101,-124v0,-67,38,-124,101,-124v63,0,100,57,100,124xm49,-120v0,48,22,95,68,95v46,0,68,-47,68,-95v0,-48,-22,-95,-68,-95v-46,0,-68,47,-68,95xm126,-284v8,8,1,26,-10,23v-17,-4,-26,-20,-32,-35v10,-29,32,1,42,12","w":233,"k":{"}":4,"]":3,"\\":3,"X":8,"V":5,"\/":5,"*":2,")":8,"T":11,"W":4,"Y":7,"\u00dd":7,",":10,".":10,"f":-1,":":2,";":2,"A":11,"\u00c0":11,"\u00c1":11,"\u00c2":11,"\u00c3":11,"\u00c4":11,"\u00c5":11,"\u00c6":11,"Z":5,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1}},"\u00d3":{"d":"217,-120v0,67,-37,124,-100,124v-63,0,-101,-57,-101,-124v0,-67,38,-124,101,-124v63,0,100,57,100,124xm49,-120v0,48,22,95,68,95v46,0,68,-47,68,-95v0,-48,-22,-95,-68,-95v-46,0,-68,47,-68,95xm116,-261v-26,-6,-2,-34,9,-43v7,-10,25,-4,24,8v-6,16,-17,29,-33,35","w":233,"k":{"}":4,"]":3,"\\":3,"X":8,"V":5,"\/":5,"*":2,")":8,"T":11,"W":4,"Y":7,"\u00dd":7,",":10,".":10,"f":-1,":":2,";":2,"A":11,"\u00c0":11,"\u00c1":11,"\u00c2":11,"\u00c3":11,"\u00c4":11,"\u00c5":11,"\u00c6":11,"Z":5,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1}},"\u00d4":{"d":"217,-120v0,67,-37,124,-100,124v-63,0,-101,-57,-101,-124v0,-67,38,-124,101,-124v63,0,100,57,100,124xm49,-120v0,48,22,95,68,95v46,0,68,-47,68,-95v0,-48,-22,-95,-68,-95v-46,0,-68,47,-68,95xm107,-306v20,-12,33,18,47,26v7,6,0,21,-8,19v-14,-3,-19,-16,-30,-23v-11,8,-31,37,-41,12v6,-16,22,-22,32,-34","w":233,"k":{"}":4,"]":3,"\\":3,"X":8,"V":5,"\/":5,"*":2,")":8,"T":11,"W":4,"Y":7,"\u00dd":7,",":10,".":10,"f":-1,":":2,";":2,"A":11,"\u00c0":11,"\u00c1":11,"\u00c2":11,"\u00c3":11,"\u00c4":11,"\u00c5":11,"\u00c6":11,"Z":5,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1}},"\u00d5":{"d":"217,-120v0,67,-37,124,-100,124v-63,0,-101,-57,-101,-124v0,-67,38,-124,101,-124v63,0,100,57,100,124xm49,-120v0,48,22,95,68,95v46,0,68,-47,68,-95v0,-48,-22,-95,-68,-95v-46,0,-68,47,-68,95xm168,-295v-3,15,-13,29,-28,29v-13,0,-33,-12,-43,-13v-9,-1,-11,14,-20,14v-6,0,-12,-3,-12,-9v4,-13,12,-29,29,-29v14,0,33,12,43,13v10,1,11,-16,20,-15v6,0,11,4,11,10","w":233,"k":{"}":4,"]":3,"\\":3,"X":8,"V":5,"\/":5,"*":2,")":8,"T":11,"W":4,"Y":7,"\u00dd":7,",":10,".":10,"f":-1,":":2,";":2,"A":11,"\u00c0":11,"\u00c1":11,"\u00c2":11,"\u00c3":11,"\u00c4":11,"\u00c5":11,"\u00c6":11,"Z":5,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1}},"\u00d6":{"d":"217,-120v0,67,-37,124,-100,124v-63,0,-101,-57,-101,-124v0,-67,38,-124,101,-124v63,0,100,57,100,124xm49,-120v0,48,22,95,68,95v46,0,68,-47,68,-95v0,-48,-22,-95,-68,-95v-46,0,-68,47,-68,95xm69,-284v0,-26,35,-21,35,0v0,9,-8,17,-17,17v-9,0,-18,-8,-18,-17xm130,-284v0,-9,8,-18,17,-18v24,0,20,35,0,35v-9,0,-17,-8,-17,-17","w":233,"k":{"}":4,"]":3,"\\":3,"X":8,"V":5,"\/":5,"*":2,")":8,"T":11,"W":4,"Y":7,"\u00dd":7,",":10,".":10,"f":-1,":":2,";":2,"A":11,"\u00c0":11,"\u00c1":11,"\u00c2":11,"\u00c3":11,"\u00c4":11,"\u00c5":11,"\u00c6":11,"Z":5,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1}},"\u00d7":{"d":"39,-177v22,7,31,30,47,42v16,-13,27,-35,48,-42v12,0,19,13,9,23r-38,38v13,16,34,26,42,48v1,11,-14,17,-22,9r-39,-39v-16,14,-26,34,-47,43v-12,0,-17,-15,-9,-23r38,-38v-14,-17,-35,-28,-43,-49v0,-7,7,-12,14,-12","w":172},"\u00d8":{"d":"27,22v-27,-11,11,-38,17,-53v-56,-67,-25,-213,73,-213v23,0,42,8,58,21v11,-12,16,-32,32,-39v7,0,13,9,8,16r-26,38v56,67,25,212,-72,212v-23,0,-44,-8,-59,-21v-11,12,-15,32,-31,39xm117,-215v-67,0,-83,101,-54,156r95,-139v-11,-11,-24,-17,-41,-17xm117,-25v67,0,83,-101,54,-156r-96,139v10,10,25,17,42,17","w":233,"k":{"}":4,"]":3,"\\":3,"X":8,"V":5,"\/":5,"*":2,")":8,"T":11,"W":4,"Y":7,"\u00dd":7,",":10,".":10,"f":-1,":":2,";":2,"A":11,"\u00c0":11,"\u00c1":11,"\u00c2":11,"\u00c3":11,"\u00c4":11,"\u00c5":11,"\u00c6":11,"Z":5,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1}},"\u00d9":{"d":"114,-25v85,0,49,-124,56,-201v0,-9,7,-17,16,-17v9,0,16,8,16,17r0,139v0,57,-32,91,-88,91v-56,0,-89,-34,-89,-91r0,-139v0,-9,7,-17,16,-17v9,0,17,8,17,17v7,77,-29,201,56,201xm126,-284v8,8,1,26,-10,23v-17,-4,-26,-20,-32,-35v10,-29,32,1,42,12","w":227,"k":{"\/":4,"d":1,"g":1,"q":1,"e":1,"\u00e8":1,"\u00e9":1,"\u00ea":1,"\u00eb":1,"o":1,"\u00f2":1,"\u00f3":1,"\u00f4":1,"\u00f5":1,"\u00f6":1,"\u00f8":1,"u":1,"\u00f9":1,"\u00fa":1,"\u00fb":1,"\u00fc":1,"y":1,"\u00fd":1,"\u00ff":1,",":9,".":9,"\u00ab":3,"c":1,"\u00e7":1,"s":1,":":3,";":3,"A":7,"\u00c0":7,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c4":7,"\u00c5":7,"\u00c6":7,"a":3,"\u00e0":3,"\u00e1":3,"\u00e2":3,"\u00e3":3,"\u00e4":3,"\u00e5":3,"\u00e6":3,"z":1}},"\u00da":{"d":"114,-25v85,0,49,-124,56,-201v0,-9,7,-17,16,-17v9,0,16,8,16,17r0,139v0,57,-32,91,-88,91v-56,0,-89,-34,-89,-91r0,-139v0,-9,7,-17,16,-17v9,0,17,8,17,17v7,77,-29,201,56,201xm108,-261v-26,-6,-2,-34,9,-43v7,-10,25,-4,24,8v-6,16,-17,29,-33,35","w":227,"k":{"\/":4,"d":1,"g":1,"q":1,"e":1,"\u00e8":1,"\u00e9":1,"\u00ea":1,"\u00eb":1,"o":1,"\u00f2":1,"\u00f3":1,"\u00f4":1,"\u00f5":1,"\u00f6":1,"\u00f8":1,"u":1,"\u00f9":1,"\u00fa":1,"\u00fb":1,"\u00fc":1,"y":1,"\u00fd":1,"\u00ff":1,",":9,".":9,"\u00ab":3,"c":1,"\u00e7":1,"s":1,":":3,";":3,"A":7,"\u00c0":7,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c4":7,"\u00c5":7,"\u00c6":7,"a":3,"\u00e0":3,"\u00e1":3,"\u00e2":3,"\u00e3":3,"\u00e4":3,"\u00e5":3,"\u00e6":3,"z":1}},"\u00db":{"d":"114,-25v85,0,49,-124,56,-201v0,-9,7,-17,16,-17v9,0,16,8,16,17r0,139v0,57,-32,91,-88,91v-56,0,-89,-34,-89,-91r0,-139v0,-9,7,-17,16,-17v9,0,17,8,17,17v7,77,-29,201,56,201xm105,-306v20,-12,33,18,47,26v7,6,0,21,-8,19v-14,-3,-19,-16,-30,-23v-11,8,-31,37,-41,12v6,-16,22,-22,32,-34","w":227,"k":{"\/":4,"d":1,"g":1,"q":1,"e":1,"\u00e8":1,"\u00e9":1,"\u00ea":1,"\u00eb":1,"o":1,"\u00f2":1,"\u00f3":1,"\u00f4":1,"\u00f5":1,"\u00f6":1,"\u00f8":1,"u":1,"\u00f9":1,"\u00fa":1,"\u00fb":1,"\u00fc":1,"y":1,"\u00fd":1,"\u00ff":1,",":9,".":9,"\u00ab":3,"c":1,"\u00e7":1,"s":1,":":3,";":3,"A":7,"\u00c0":7,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c4":7,"\u00c5":7,"\u00c6":7,"a":3,"\u00e0":3,"\u00e1":3,"\u00e2":3,"\u00e3":3,"\u00e4":3,"\u00e5":3,"\u00e6":3,"z":1}},"\u00dc":{"d":"114,-25v85,0,49,-124,56,-201v0,-9,7,-17,16,-17v9,0,16,8,16,17r0,139v0,57,-32,91,-88,91v-56,0,-89,-34,-89,-91r0,-139v0,-9,7,-17,16,-17v9,0,17,8,17,17v7,77,-29,201,56,201xm67,-284v0,-9,8,-18,17,-18v24,0,20,35,0,35v-9,0,-17,-8,-17,-17xm127,-284v0,-9,8,-18,17,-18v24,0,20,35,0,35v-9,0,-17,-8,-17,-17","w":227,"k":{"\/":4,"d":1,"g":1,"q":1,"e":1,"\u00e8":1,"\u00e9":1,"\u00ea":1,"\u00eb":1,"o":1,"\u00f2":1,"\u00f3":1,"\u00f4":1,"\u00f5":1,"\u00f6":1,"\u00f8":1,"u":1,"\u00f9":1,"\u00fa":1,"\u00fb":1,"\u00fc":1,"y":1,"\u00fd":1,"\u00ff":1,",":9,".":9,"\u00ab":3,"c":1,"\u00e7":1,"s":1,":":3,";":3,"A":7,"\u00c0":7,"\u00c1":7,"\u00c2":7,"\u00c3":7,"\u00c4":7,"\u00c5":7,"\u00c6":7,"a":3,"\u00e0":3,"\u00e1":3,"\u00e2":3,"\u00e3":3,"\u00e4":3,"\u00e5":3,"\u00e6":3,"z":1}},"\u00dd":{"d":"176,-228v-18,48,-48,85,-70,129r0,86v0,9,-7,16,-16,16v-9,0,-17,-7,-17,-16r0,-86v-22,-44,-51,-81,-70,-129v-1,-16,22,-20,29,-7r58,104r57,-104v6,-13,30,-9,29,7xm88,-261v-26,-6,-2,-34,9,-43v7,-10,25,-4,24,8v-6,16,-17,29,-33,35","w":179,"k":{"}":-4,"x":15,"v":11,"]":-5,"\\":-4,"V":-5,"@":4,"?":-5,"\/":12,"*":-7,")":-4,"d":27,"g":27,"q":27,"e":27,"\u00e8":27,"\u00e9":27,"\u00ea":27,"\u00eb":27,"o":27,"\u00f2":27,"\u00f3":27,"\u00f4":27,"\u00f5":27,"\u00f6":27,"\u00f8":27,"t":5,"u":19,"\u00f9":19,"\u00fa":19,"\u00fb":19,"\u00fc":19,"w":13,"y":13,"\u00fd":13,"\u00ff":13,"C":11,"G":11,"\u00c7":11,"O":7,"Q":7,"\u00d2":7,"\u00d3":7,"\u00d4":7,"\u00d5":7,"\u00d6":7,"\u00d8":7,"S":1,"T":-5,"W":-4,",":43,".":43,"\u00ab":25,"-":23,"c":27,"\u00e7":27,"f":2,"s":22,":":29,";":29,"A":20,"\u00c0":20,"\u00c1":20,"\u00c2":20,"\u00c3":20,"\u00c4":20,"\u00c5":20,"\u00c6":20,"\u00bb":18,"J":27,"Z":2,"a":23,"\u00e0":23,"\u00e1":23,"\u00e2":23,"\u00e3":23,"\u00e4":23,"\u00e5":23,"\u00e6":23,"m":13,"n":13,"p":13,"r":13,"\u00f1":13,"z":20}},"\u00de":{"d":"190,-121v0,59,-59,78,-131,71v-1,22,7,53,-16,53v-9,0,-16,-7,-16,-16r0,-213v0,-9,7,-17,16,-17v21,1,15,30,16,51r50,0v55,0,81,30,81,71xm59,-80v46,1,99,6,99,-41v0,-46,-52,-44,-99,-42r0,83","w":196},"\u00df":{"d":"165,-189v0,25,-36,51,-37,73v0,10,8,17,30,25v57,20,58,95,-18,95v-28,0,-48,-7,-55,-28v9,-29,35,5,56,3v39,-5,33,-36,-2,-47v-34,-10,-43,-27,-43,-48v0,-25,37,-51,37,-73v0,-17,-15,-28,-37,-28v-25,0,-40,10,-40,43r0,161v0,9,-6,16,-16,16v-10,0,-16,-7,-16,-16v8,-94,-34,-231,72,-231v41,0,69,20,69,55","w":210},"\u00e0":{"d":"23,-136v5,-21,38,-25,60,-25v45,0,70,23,70,67r0,81v0,9,-7,16,-16,16v-11,0,-17,-9,-16,-21v-21,37,-110,25,-103,-25v-6,-49,80,-61,103,-27v2,-37,-3,-64,-41,-64v-20,0,-50,24,-57,-2xm84,-69v-21,0,-35,9,-35,26v0,15,13,26,35,26v22,0,37,-12,37,-26v0,-17,-19,-26,-37,-26xm102,-193v1,13,-19,18,-25,7v-7,-12,-19,-20,-23,-36v0,-13,19,-18,25,-7v7,12,19,21,23,36","w":175,"k":{"\\":5,")":2}},"\u00e1":{"d":"23,-136v5,-21,38,-25,60,-25v45,0,70,23,70,67r0,81v0,9,-7,16,-16,16v-11,0,-17,-9,-16,-21v-21,37,-110,25,-103,-25v-6,-49,80,-61,103,-27v2,-37,-3,-64,-41,-64v-20,0,-50,24,-57,-2xm84,-69v-21,0,-35,9,-35,26v0,15,13,26,35,26v22,0,37,-12,37,-26v0,-17,-19,-26,-37,-26xm94,-186v-7,10,-26,6,-25,-7v8,-16,17,-35,34,-42v29,6,0,36,-9,49","w":175,"k":{"\\":5,")":2}},"\u00e2":{"d":"23,-136v5,-21,38,-25,60,-25v45,0,70,23,70,67r0,81v0,9,-7,16,-16,16v-11,0,-17,-9,-16,-21v-21,37,-110,25,-103,-25v-6,-49,80,-61,103,-27v2,-37,-3,-64,-41,-64v-20,0,-50,24,-57,-2xm84,-69v-21,0,-35,9,-35,26v0,15,13,26,35,26v22,0,37,-12,37,-26v0,-17,-19,-26,-37,-26xm78,-230v22,-12,36,21,51,31v9,6,2,20,-8,19v-15,-5,-22,-19,-34,-27v-11,9,-19,21,-33,27v-10,1,-16,-12,-8,-19","w":175,"k":{"\\":5,")":2}},"\u00e3":{"d":"23,-136v5,-21,38,-25,60,-25v45,0,70,23,70,67r0,81v0,9,-7,16,-16,16v-11,0,-17,-9,-16,-21v-21,37,-110,25,-103,-25v-6,-49,80,-61,103,-27v2,-37,-3,-64,-41,-64v-20,0,-50,24,-57,-2xm84,-69v-21,0,-35,9,-35,26v0,15,13,26,35,26v22,0,37,-12,37,-26v0,-17,-19,-26,-37,-26xm138,-216v-4,13,-13,28,-29,28v-14,0,-29,-12,-39,-13v-10,-1,-11,15,-20,15v-6,0,-11,-5,-11,-10v3,-14,14,-27,28,-28v14,-1,29,12,39,13v10,1,11,-15,20,-14v6,0,12,4,12,9","w":175,"k":{"\\":5,")":2}},"\u00e4":{"d":"23,-136v5,-21,38,-25,60,-25v45,0,70,23,70,67r0,81v0,9,-7,16,-16,16v-11,0,-17,-9,-16,-21v-21,37,-110,25,-103,-25v-6,-49,80,-61,103,-27v2,-37,-3,-64,-41,-64v-20,0,-50,24,-57,-2xm84,-69v-21,0,-35,9,-35,26v0,15,13,26,35,26v22,0,37,-12,37,-26v0,-17,-19,-26,-37,-26xm101,-206v0,-10,8,-18,18,-18v10,0,18,8,18,18v0,10,-8,18,-18,18v-10,0,-18,-8,-18,-18xm42,-206v0,-10,8,-18,18,-18v10,0,18,8,18,18v0,10,-8,18,-18,18v-10,0,-18,-8,-18,-18","w":175,"k":{"\\":5,")":2}},"\u00e5":{"d":"23,-136v5,-21,38,-25,60,-25v45,0,70,23,70,67r0,81v0,9,-7,16,-16,16v-11,0,-17,-9,-16,-21v-21,37,-110,25,-103,-25v-6,-49,80,-61,103,-27v2,-37,-3,-64,-41,-64v-20,0,-50,24,-57,-2xm84,-69v-21,0,-35,9,-35,26v0,15,13,26,35,26v22,0,37,-12,37,-26v0,-17,-19,-26,-37,-26xm89,-180v-16,0,-28,-11,-28,-26v0,-15,12,-27,28,-27v16,0,27,12,27,27v0,15,-11,26,-27,26xm89,-194v7,0,11,-5,11,-12v0,-7,-4,-13,-11,-13v-7,0,-12,6,-12,13v0,7,5,12,12,12","w":175,"k":{"\\":5,")":2}},"\u00e6":{"d":"22,-137v0,-19,41,-23,60,-24v26,0,45,10,55,30v13,-20,33,-30,57,-30v43,0,67,38,67,83v0,6,-3,11,-11,11r-97,0v1,29,18,46,44,46v22,0,31,-19,49,-25v9,0,12,7,12,13v0,47,-102,48,-120,9v-25,46,-120,32,-120,-20v0,-48,76,-61,102,-30v2,-36,-4,-60,-41,-60v-19,0,-30,7,-44,11v-8,0,-13,-6,-13,-14xm194,-135v-24,0,-39,20,-41,44r79,0v-2,-23,-15,-44,-38,-44xm84,-69v-21,0,-36,10,-36,25v0,16,15,26,36,26v20,0,36,-11,36,-26v0,-14,-15,-25,-36,-25","w":273},"\u00e7":{"d":"77,35v-17,-3,0,-22,1,-32v-42,-5,-64,-41,-64,-81v0,-44,26,-83,76,-83v28,1,53,14,60,39v-14,35,-37,-19,-59,-12v-29,0,-45,27,-45,56v0,29,16,56,45,56v20,0,28,-20,45,-25v13,-1,19,17,9,25v-12,15,-28,25,-50,26r-6,15v19,-6,42,1,42,22v0,15,-12,29,-38,29v-15,0,-45,-10,-24,-20v13,2,39,7,39,-8v0,-13,-24,-10,-31,-7","w":160,"k":{"x":-2,"v":-3,"\\":2,")":1,"w":-2,"y":-2,"\u00fd":-2,"\u00ff":-2,"-":-2,"f":-1,":":-2,";":-2,"\u00bb":-3}},"\u00e8":{"d":"153,-33v-8,25,-36,36,-63,37v-51,0,-76,-37,-76,-82v0,-46,30,-83,74,-83v45,0,68,39,68,83v0,6,-3,11,-12,11r-97,0v1,27,17,46,44,46v23,0,29,-19,48,-24v7,0,14,4,14,12xm88,-135v-24,0,-36,20,-40,43r78,0v-2,-23,-15,-43,-38,-43xm98,-201v10,15,-14,29,-22,15v-7,-12,-21,-20,-23,-36v-2,-13,17,-17,24,-7","w":167,"k":{"]":2,"\\":5,")":2,"\u00ab":-4,"-":-4}},"\u00e9":{"d":"153,-33v-8,25,-36,36,-63,37v-51,0,-76,-37,-76,-82v0,-46,30,-83,74,-83v45,0,68,39,68,83v0,6,-3,11,-12,11r-97,0v1,27,17,46,44,46v23,0,29,-19,48,-24v7,0,14,4,14,12xm88,-135v-24,0,-36,20,-40,43r78,0v-2,-23,-15,-43,-38,-43xm97,-186v-7,10,-26,6,-25,-7v8,-16,17,-35,34,-42v29,6,0,36,-9,49","w":167,"k":{"]":2,"\\":5,")":2,"\u00ab":-4,"-":-4}},"\u00ea":{"d":"153,-33v-8,25,-36,36,-63,37v-51,0,-76,-37,-76,-82v0,-46,30,-83,74,-83v45,0,68,39,68,83v0,6,-3,11,-12,11r-97,0v1,27,17,46,44,46v23,0,29,-19,48,-24v7,0,14,4,14,12xm88,-135v-24,0,-36,20,-40,43r78,0v-2,-23,-15,-43,-38,-43xm80,-230v22,-12,35,22,50,31v10,6,3,20,-8,19v-14,-5,-22,-19,-33,-27v-11,9,-19,22,-34,27v-11,1,-16,-13,-7,-19","w":167,"k":{"]":2,"\\":5,")":2,"\u00ab":-4,"-":-4}},"\u00eb":{"d":"153,-33v-8,25,-36,36,-63,37v-51,0,-76,-37,-76,-82v0,-46,30,-83,74,-83v45,0,68,39,68,83v0,6,-3,11,-12,11r-97,0v1,27,17,46,44,46v23,0,29,-19,48,-24v7,0,14,4,14,12xm88,-135v-24,0,-36,20,-40,43r78,0v-2,-23,-15,-43,-38,-43xm101,-206v0,-10,8,-18,18,-18v10,0,18,8,18,18v0,10,-8,18,-18,18v-10,0,-18,-8,-18,-18xm42,-206v0,-10,8,-18,18,-18v10,0,18,8,18,18v0,10,-8,18,-18,18v-10,0,-18,-8,-18,-18","w":167,"k":{"]":2,"\\":5,")":2,"\u00ab":-4,"-":-4}},"\u00ec":{"d":"57,-13v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-130v0,-9,7,-16,16,-16v9,0,16,7,16,16r0,130xm53,-193v1,13,-19,18,-25,7v-7,-12,-19,-20,-23,-36v0,-13,19,-18,25,-7v7,12,19,21,23,36","w":82},"\u00ed":{"d":"57,-13v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-130v0,-9,7,-16,16,-16v9,0,16,7,16,16r0,130xm54,-186v-6,11,-26,6,-25,-7v8,-16,17,-35,34,-42v29,6,0,36,-9,49","w":82},"\u00ee":{"d":"57,-13v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-130v0,-9,7,-16,16,-16v9,0,16,7,16,16r0,130xm32,-230v22,-12,35,22,50,31v9,6,4,20,-7,19v-15,-5,-22,-19,-34,-27v-12,9,-33,42,-46,17v7,-17,26,-26,37,-40","w":82},"\u00ef":{"d":"57,-13v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-130v0,-9,7,-16,16,-16v9,0,16,7,16,16r0,130xm53,-206v0,-10,8,-18,18,-18v10,0,18,8,18,18v0,10,-8,18,-18,18v-10,0,-18,-8,-18,-18xm-6,-206v0,-10,8,-18,18,-18v10,0,18,8,18,18v0,10,-8,18,-18,18v-10,0,-18,-8,-18,-18","w":82},"\u00f0":{"d":"59,-244v19,4,33,14,47,24v7,-16,45,-24,31,3r-14,13v53,45,74,208,-34,208v-50,0,-75,-36,-75,-76v0,-67,81,-99,121,-51v-3,-22,-18,-49,-32,-63v-10,9,-32,36,-40,10v3,-12,15,-17,22,-25v-11,-11,-34,-14,-39,-30v0,-8,5,-13,13,-13xm89,-120v-28,0,-43,20,-43,49v0,28,15,49,43,49v28,0,45,-22,45,-49v0,-31,-19,-49,-45,-49","w":182},"\u00f1":{"d":"41,3v-9,0,-16,-7,-16,-16r0,-130v0,-9,7,-16,16,-16v14,0,18,13,16,29v25,-55,118,-30,108,41v-5,31,14,86,-16,92v-45,-12,19,-134,-52,-135v-52,0,-39,68,-40,119v0,9,-7,16,-16,16xm144,-216v-4,13,-12,28,-28,28v-14,0,-30,-13,-40,-13v-10,-1,-11,15,-20,15v-6,0,-11,-5,-11,-10v3,-14,14,-27,28,-28v14,-1,29,12,39,13v10,1,11,-15,20,-14v6,0,12,4,12,9","w":188,"k":{"v":1,"]":2,"\\":4,"y":2,"\u00fd":2,"\u00ff":2,"T":34}},"\u00f2":{"d":"90,4v-47,0,-76,-38,-76,-82v0,-44,29,-83,76,-83v47,0,76,39,76,83v0,44,-29,82,-76,82xm90,-22v35,0,44,-26,44,-56v0,-30,-15,-56,-44,-56v-29,0,-44,26,-44,56v0,30,15,56,44,56xm102,-201v10,15,-14,29,-22,15v-7,-12,-21,-20,-23,-36v-2,-13,17,-17,24,-7","w":180,"k":{"}":2,"x":1,"v":1,"]":2,"\\":9,"?":2,"\/":2,")":2,"t":2,",":2,".":2,"\u00ab":-2,"-":-2,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1,"z":2}},"\u00f3":{"d":"90,4v-47,0,-76,-38,-76,-82v0,-44,29,-83,76,-83v47,0,76,39,76,83v0,44,-29,82,-76,82xm90,-22v35,0,44,-26,44,-56v0,-30,-15,-56,-44,-56v-29,0,-44,26,-44,56v0,30,15,56,44,56xm99,-186v-7,10,-26,6,-25,-7v8,-16,17,-35,34,-42v29,6,0,36,-9,49","w":180,"k":{"}":2,"x":1,"v":1,"]":2,"\\":9,"?":2,"\/":2,")":2,"t":2,",":2,".":2,"\u00ab":-2,"-":-2,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1,"z":2}},"\u00f4":{"d":"90,4v-47,0,-76,-38,-76,-82v0,-44,29,-83,76,-83v47,0,76,39,76,83v0,44,-29,82,-76,82xm90,-22v35,0,44,-26,44,-56v0,-30,-15,-56,-44,-56v-29,0,-44,26,-44,56v0,30,15,56,44,56xm81,-230v22,-12,35,22,50,31v10,6,3,20,-8,19v-14,-5,-22,-19,-33,-27v-12,9,-33,42,-46,17v7,-17,26,-26,37,-40","w":180,"k":{"}":2,"x":1,"v":1,"]":2,"\\":9,"?":2,"\/":2,")":2,"t":2,",":2,".":2,"\u00ab":-2,"-":-2,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1,"z":2}},"\u00f5":{"d":"90,4v-47,0,-76,-38,-76,-82v0,-44,29,-83,76,-83v47,0,76,39,76,83v0,44,-29,82,-76,82xm90,-22v35,0,44,-26,44,-56v0,-30,-15,-56,-44,-56v-29,0,-44,26,-44,56v0,30,15,56,44,56xm140,-216v-3,14,-13,27,-28,28v-14,1,-29,-12,-39,-13v-10,-1,-11,15,-20,15v-6,0,-11,-5,-11,-10v3,-14,14,-27,28,-28v14,-1,29,12,39,13v10,1,11,-15,20,-14v6,0,11,4,11,9","w":180,"k":{"}":2,"x":1,"v":1,"]":2,"\\":9,"?":2,"\/":2,")":2,"t":2,",":2,".":2,"\u00ab":-2,"-":-2,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1,"z":2}},"\u00f6":{"d":"90,4v-47,0,-76,-38,-76,-82v0,-44,29,-83,76,-83v47,0,76,39,76,83v0,44,-29,82,-76,82xm90,-22v35,0,44,-26,44,-56v0,-30,-15,-56,-44,-56v-29,0,-44,26,-44,56v0,30,15,56,44,56xm102,-206v0,-10,8,-18,18,-18v10,0,18,8,18,18v0,10,-8,18,-18,18v-10,0,-18,-8,-18,-18xm43,-206v0,-10,8,-18,18,-18v10,0,18,8,18,18v0,10,-8,18,-18,18v-10,0,-18,-8,-18,-18","w":180,"k":{"}":2,"x":1,"v":1,"]":2,"\\":9,"?":2,"\/":2,")":2,"t":2,",":2,".":2,"\u00ab":-2,"-":-2,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1,"z":2}},"\u00f7":{"d":"100,-159v-10,0,-19,-9,-19,-19v0,-10,9,-18,19,-18v10,0,18,8,18,18v0,10,-8,19,-18,19xm100,-36v-10,0,-19,-9,-19,-19v0,-10,9,-18,19,-18v10,0,18,8,18,18v0,10,-8,19,-18,19xm35,-103v-8,0,-13,-6,-13,-13v0,-7,5,-13,13,-13r130,0v8,0,13,6,13,13v0,7,-5,13,-13,13r-130,0","w":199},"\u00f8":{"d":"23,22v-22,-8,9,-28,13,-40v-44,-46,-19,-146,54,-143v16,0,30,4,41,12v9,-10,12,-25,26,-30v22,8,-8,30,-13,42v44,46,18,144,-54,141v-16,0,-30,-4,-41,-11v-9,9,-12,25,-26,29xm114,-126v-48,-33,-87,39,-60,82xm66,-30v45,31,88,-34,60,-82","w":180,"k":{"}":2,"x":1,"v":1,"]":2,"\\":9,"?":2,"\/":2,")":2,"t":2,",":2,".":2,"\u00ab":-2,"-":-2,"a":1,"\u00e0":1,"\u00e1":1,"\u00e2":1,"\u00e3":1,"\u00e4":1,"\u00e5":1,"\u00e6":1,"z":2}},"\u00f9":{"d":"147,-159v9,0,16,7,16,16r0,130v0,9,-7,16,-16,16v-14,0,-18,-13,-16,-29v-25,53,-118,30,-108,-41v5,-31,-14,-86,16,-92v44,12,-18,135,52,135v51,0,39,-68,40,-119v0,-9,7,-16,16,-16xm110,-193v1,13,-19,18,-25,7v-7,-12,-18,-22,-23,-36v0,-13,19,-18,25,-7v7,12,19,21,23,36","w":188,"k":{"\\":5,"?":3}},"\u00fa":{"d":"147,-159v9,0,16,7,16,16r0,130v0,9,-7,16,-16,16v-14,0,-18,-13,-16,-29v-25,53,-118,30,-108,-41v5,-31,-14,-86,16,-92v44,12,-18,135,52,135v51,0,39,-68,40,-119v0,-9,7,-16,16,-16xm102,-186v-7,10,-26,6,-25,-7v8,-16,17,-35,34,-42v29,6,0,36,-9,49","w":188,"k":{"\\":5,"?":3}},"\u00fb":{"d":"147,-159v9,0,16,7,16,16r0,130v0,9,-7,16,-16,16v-14,0,-18,-13,-16,-29v-25,53,-118,30,-108,-41v5,-31,-14,-86,16,-92v44,12,-18,135,52,135v51,0,39,-68,40,-119v0,-9,7,-16,16,-16xm87,-230v22,-12,36,21,51,31v9,6,2,20,-8,19v-15,-5,-22,-19,-34,-27v-12,9,-33,42,-46,17v7,-17,26,-26,37,-40","w":188,"k":{"\\":5,"?":3}},"\u00fc":{"d":"147,-159v9,0,16,7,16,16r0,130v0,9,-7,16,-16,16v-14,0,-18,-13,-16,-29v-25,53,-118,30,-108,-41v5,-31,-14,-86,16,-92v44,12,-18,135,52,135v51,0,39,-68,40,-119v0,-9,7,-16,16,-16xm105,-206v0,-10,8,-18,18,-18v10,0,18,8,18,18v0,10,-8,18,-18,18v-10,0,-18,-8,-18,-18xm46,-206v0,-10,8,-18,18,-18v10,0,18,8,18,18v0,10,-8,18,-18,18v-10,0,-18,-8,-18,-18","w":188,"k":{"\\":5,"?":3}},"\u00fd":{"d":"146,-145v-21,54,-50,193,-118,215v-8,0,-14,-5,-14,-12v11,-23,39,-31,48,-59r-54,-144v-1,-17,23,-17,28,-4r42,114r39,-113v3,-15,29,-15,29,3xm85,-186v-7,10,-26,6,-25,-7v8,-16,17,-35,34,-42v29,6,0,36,-9,49","w":152,"k":{"\u00ae":-7,"v":-5,"\\":2,"?":-9,"*":-7,"d":1,"g":1,"q":1,"e":1,"\u00e8":1,"\u00e9":1,"\u00ea":1,"\u00eb":1,"o":1,"\u00f2":1,"\u00f3":1,"\u00f4":1,"\u00f5":1,"\u00f6":1,"\u00f8":1,"t":-4,"w":-5,"y":-4,"\u00fd":-4,"\u00ff":-4,",":22,".":22,"-":-2,"c":1,"\u00e7":1,"f":-4,":":2,";":2,"a":2,"\u00e0":2,"\u00e1":2,"\u00e2":2,"\u00e3":2,"\u00e4":2,"\u00e5":2,"\u00e6":2}},"\u00fe":{"d":"176,-78v0,75,-86,111,-119,52r0,80v0,9,-7,16,-16,16v-9,0,-16,-7,-16,-16r0,-281v0,-9,7,-16,16,-16v9,0,16,7,16,16r0,97v33,-60,119,-24,119,52xm101,-134v-26,0,-44,24,-44,56v0,32,18,56,44,56v27,0,43,-25,43,-56v0,-31,-16,-56,-43,-56","w":190},"\u00ff":{"d":"146,-145v-21,54,-50,193,-118,215v-8,0,-14,-5,-14,-12v11,-23,39,-31,48,-59r-54,-144v-1,-17,23,-17,28,-4r42,114r39,-113v3,-15,29,-15,29,3xm89,-206v0,-10,8,-18,18,-18v10,0,18,8,18,18v0,10,-8,18,-18,18v-10,0,-18,-8,-18,-18xm30,-206v0,-10,8,-18,18,-18v10,0,18,8,18,18v0,10,-8,18,-18,18v-10,0,-18,-8,-18,-18","w":152,"k":{"\u00ae":-7,"v":-5,"\\":2,"?":-9,"*":-7,"d":1,"g":1,"q":1,"e":1,"\u00e8":1,"\u00e9":1,"\u00ea":1,"\u00eb":1,"o":1,"\u00f2":1,"\u00f3":1,"\u00f4":1,"\u00f5":1,"\u00f6":1,"\u00f8":1,"t":-4,"w":-5,"y":-4,"\u00fd":-4,"\u00ff":-4,",":22,".":22,"-":-2,"c":1,"\u00e7":1,"f":-4,":":2,";":2,"a":2,"\u00e0":2,"\u00e1":2,"\u00e2":2,"\u00e3":2,"\u00e4":2,"\u00e5":2,"\u00e6":2}},"\u00a4":{"d":"69,-186v23,-18,61,-18,84,0v11,-8,16,-23,31,-27v30,11,-5,31,-15,44v21,24,21,74,0,98v9,11,23,17,28,32v-11,29,-31,-3,-44,-14v-23,17,-61,17,-84,0v-11,9,-17,22,-32,27v-11,1,-15,-14,-8,-21r24,-24v-21,-24,-21,-74,0,-98v-9,-11,-23,-18,-28,-32v-1,-11,14,-16,21,-9xm111,-173v-27,0,-43,25,-43,53v0,28,16,53,43,53v27,0,43,-25,43,-53v0,-28,-16,-53,-43,-53","w":221}}});

/* end ../vendors/Bryant_Medium_Condensed.font.js */

/* start ../vendors/jquery.timers-1.0.0.js */
/**
 * jQuery.timers - Timer abstractions for jQuery
 * Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com)
 * Licensed under the WTFPL (http://sam.zoy.org/wtfpl/).
 * Date: 2008/08/26
 *
 * @author Blair Mitchelmore
 * @version 1.0.0
 *
 **/

jQuery.fn.extend({
	everyTime: function(interval, label, fn, times, belay) {
		return this.each(function() {
			jQuery.timer.add(this, interval, label, fn, times, belay);
		});
	},
	oneTime: function(interval, label, fn) {
		return this.each(function() {
			jQuery.timer.add(this, interval, label, fn, 1);
		});
	},
	stopTime: function(label, fn) {
		return this.each(function() {
			jQuery.timer.remove(this, label, fn);
		});
	}
});

jQuery.extend({
	timer: {
		guid: 1,
		global: {},
		regex: /^([0-9]+)\s*(.*s)?$/,
		powers: {
			// Yeah this is major overkill...
			'ms': 1,
			'cs': 10,
			'ds': 100,
			's': 1000,
			'das': 10000,
			'hs': 100000,
			'ks': 1000000
		},
		timeParse: function(value) {
			if (value == undefined || value == null)
				return null;
			var result = this.regex.exec(jQuery.trim(value.toString()));
			if (result[2]) {
				var num = parseInt(result[1], 10);
				var mult = this.powers[result[2]] || 1;
				return num * mult;
			} else {
				return value;
			}
		},
		add: function(element, interval, label, fn, times, belay) {
			var counter = 0;
			
			if (jQuery.isFunction(label)) {
				if (!times) 
					times = fn;
				fn = label;
				label = interval;
			}
			
			interval = jQuery.timer.timeParse(interval);

			if (typeof interval != 'number' || isNaN(interval) || interval <= 0)
				return;

			if (times && times.constructor != Number) {
				belay = !!times;
				times = 0;
			}
			
			times = times || 0;
			belay = belay || false;
			
			if (!element.$timers) 
				element.$timers = {};
			
			if (!element.$timers[label])
				element.$timers[label] = {};
			
			fn.$timerID = fn.$timerID || this.guid++;
			
			var handler = function() {
				if (belay && this.inProgress) 
					return;
				this.inProgress = true;
				if ((++counter > times && times !== 0) || fn.call(element, counter) === false)
					jQuery.timer.remove(element, label, fn);
				this.inProgress = false;
			};
			
			handler.$timerID = fn.$timerID;
			
			if (!element.$timers[label][fn.$timerID]) 
				element.$timers[label][fn.$timerID] = window.setInterval(handler,interval);
			
			if ( !this.global[label] )
				this.global[label] = [];
			this.global[label].push( element );
			
		},
		remove: function(element, label, fn) {
			var timers = element.$timers, ret;
			
			if ( timers ) {
				
				if (!label) {
					for ( label in timers )
						this.remove(element, label, fn);
				} else if ( timers[label] ) {
					if ( fn ) {
						if ( fn.$timerID ) {
							window.clearInterval(timers[label][fn.$timerID]);
							delete timers[label][fn.$timerID];
						}
					} else {
						for ( var fn in timers[label] ) {
							window.clearInterval(timers[label][fn]);
							delete timers[label][fn];
						}
					}
					
					for ( ret in timers[label] ) break;
					if ( !ret ) {
						ret = null;
						delete timers[label];
					}
				}
				
				for ( ret in timers ) break;
				if ( !ret ) 
					element.$timers = null;
			}
		}
	}
});

if (jQuery.browser.msie)
	jQuery(window).one("unload", function() {
		var global = jQuery.timer.global;
		for ( var label in global ) {
			var els = global[label], i = els.length;
			while ( --i )
				jQuery.timer.remove(els[i], label);
		}
	});

/* end ../vendors/jquery.timers-1.0.0.js */

/* start ../include/js/CForm.js */
/*
 * Form framework Singleton controlling class, counts all created elements
 * and holds global validators, and element validation change logic
 *
 * @author Denis Zenkovich
 */
var CForm = new function(){
    var _Elements = []; //list of all created elements
    var _ClassNames = {
        Validating: 'validationInProcess',
        Active: 'currentField',
        Passed: 'searchSuccess',
        Failed: 'validationError',
        Counter: 'countTextSpan',
        Messages: 'messagesContainer',
        FormMessages: 'formMessagesContainer'
    };

    var _pass = function(pass, Data){ //evaluate the return for onpass
        if(typeof pass == 'function') return pass(Data);
        return true;
    };
    var _fail = function(fail, Data){ //evaluate the return for onfail
        if(typeof fail == 'function') return fail(Data);
        return false;
    };

    this.Validators = {
        required: function(Val, Data, pass, fail){
            return Val?_pass(pass, Data):_fail(fail, Data);
        },
        minlength: function(Val, Data, pass, fail){
            return Val.toString().length<Data.length?_fail(fail, Data):_pass(pass, Data);
        },
        maxlength: function(Val, Data, pass, fail){
            return Val.toString().length>Data.length?_fail(fail, Data):_pass(pass, Data);
        },
		alphanum: function(Val, Data, pass, fail) {
			return /^\w+$/.test(Val)?_pass(pass, Data):_fail(fail, Data);
		},
		digits: function(Val, Data, pass, fail) {
			return /^\d+$/.test(Val)?_pass(pass, Data):_fail(fail, Data);
		},
		number: function(Val, Data, pass, fail) {
			return /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(Val)?_pass(pass, Data):_fail(fail, Data);
		},
		email: function(Val, Data, pass, fail) {
			// contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
			return /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(Val)
            ?_pass(pass, Data):_fail(fail, Data);
		},
		url: function(Val, Data, pass, fail) {
			// contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/
			return /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(Val)
            ?_pass(pass, Data):_fail(fail, Data);
		},
		equalTo: function(Val, Data, pass, fail) {
			return Val == Data.value?_pass(pass, Data):_fail(fail, Data);
		},
        ajax: function(Val, Data, pass, fail){
            var onAjax = function(Json){
                var Resp = null;
                try{
                    eval('Resp = '+Json);
                }
                catch(E){
                    Data.error = '<pre>'+Json+'</pre>';
                    _fail(fail, Data);
                }
                Data.Resp = Resp;
                if(Resp.valid) _pass(pass, Data);
                else _fail(fail, Data);
            }
            $.post(Data.url, {value: Val}, onAjax);
            return true;
        }
    };
    this.add = function(Element){
        _Elements.push(Element);
    };
    this.className = function(Type){
        return _ClassNames[Type];
    }
    this.setClassNames = function(Obj){
        for(var I in _ClassNames){
            if(Obj[I]) _ClassNames[I] = Obj[I];
        }

    }
    /*
     *  Validate - works as a queue of validator checks, main reason for the queue - ajax validators
     */
    this.validate = function(Value, Rules, onReady){
        var Num = 0;
        var Validators = []; //array of validator names
        for(var I in Rules) Validators.push(I);
        if(!Validators.length) onReady(true);
        var pass = function(Data){
            Num++;
            if(Num == Validators.length){ //stop validate process
                if(typeof onReady == 'function') onReady(true, Data);
            }
            else{
                check(Validators[Num]);
            }
        };
        var fail = function(Data){
            if(typeof onReady == 'function') onReady(false, Data);
        };
        var check = function(Name){
            if(!CForm.Validators[Name]) throw "Unknown CForm validator named: "+Name;
            Rules[Name].Validator = Name;
            CForm.Validators[Name](Value, Rules[Name], pass, fail);
        };
        check(Validators[0]);
    };
}();

/* end ../include/js/CForm.js */

/* start ../include/js/core-min.js */
var stNo = 1;
var BetterflyJSXAPI = {
    version: "0.1.0alpha"
};
BetterflyJSXAPI.Base = new Class({
    initialize: function () {
        this.version = BetterflyJSXAPI.version
    },
    RegisterModule: function (a) {
        a.Base = this
    }
});
var BetterflyJSXAPI = {
    version: "0.1.0alpha"
};
BetterflyJSXAPI.Base = new Class({
    initialize: function () {
        this.version = BetterflyJSXAPI.version
    },
    RegisterModule: function (a) {
        a.Base = this
    }
});
BetterflyJSXAPI.Comments = new Class({
    Implements: [Options],
    Base: {},
    page: 1,
    total: 0,
    changed: false,
    isEditing: false,
    options: {
        ajaxURL: "/misc_js.php",
        ajaxMethod: "post",
        ajaxSecure: false,
        canComment: false,
        commentHTML: false,
        commentCode: false,
        originalHeight: 70,
        type: false,
        typeIdentifier: false,
        typeID: false,
        paginate: false,
        cpp: false,
        commentLinks: {
            reply: false,
            walltowall: false
        },
        object_owner: false,
        object_owner_id: false,
        typeTab: false,
        typeCol: false,
        typeTabParent: false,
        typeColParent: false,
        typeChild: false
    },
    initialize: function (a) {
        this.setOptions(a);
        if (this.options.initialTotal) {
            this.total = this.options.initialTotal
        }
        var b = this;
        window.addEvent("domready", function () {
            b.showPostComment();
            b.options.originalHeight = textarea_autogrow("comment_body");
            b.getComments(1)
        })
    },
    showPostComment: function () {
        var c = "";
        c += "<div class='comment_headline dn'>" + this.Base.Language.Translate(854) + " (<span class='tc' id='" + this.options.type + "_" + this.options.typeID + "_totalcomments'>" + this.total + "</span>)</div>";
        if (this.options.canComment) {
            c += "<form action='/misc_js.php' method='post' target='ajaxframe' name='comment_post_form'><div class='profile_postcomment'><div class='modal-green-box'><div><textarea name='comment_body' id='comment_body'  cols='25' class='comment_area'>" + this.Base.Language.Translate(829) + "</textarea></div>";
            if (this.options.commentHTML) {
                c += "<div style='margin-top: 5px;'>" + this.Base.Language.TranslateFormatted(1034, [this.options.commentHTML]) + "</div>"
            }
            if (this.options.commentCode) {
                c += "<div style='float: left; margin-top: 5px;'><a href='javascript:void(0);' onClick=\"this.blur();$('secure_image').src=$('secure_image').src+'?'+(new Date()).getTime();\"><img src='/images/secure.php' id='secure_image' border='0' height='20' width='67' class='signup_code'></a> <input type='text' name='comment_secure' id='comment_secure' class='text' size='6' maxlength='10' /> <img src='/images/icons/tip.gif' border='0' class='Tips1' style='vertical-align: middle;' title='" + this.Base.Language.Translate(856) + "' /></div>"
            }
            c += "<div style='text-align: right; margin-top: 5px;'><input type='submit' id='comment_submit' class='newinputbtn' value='" + this.Base.Language.Translate(833) + "' /><input type='hidden' name='task' value='comment_post' /><input type='hidden' name='type' value='" + this.options.type + "' /><input type='hidden' name='iden' value='" + this.options.typeIdentifier + "' /><input type='hidden' name='value' value='" + this.options.typeID + "' />";
            if (this.options.object_owner && this.options.object_owner_id) {
                c += '<input type="hidden" name="object_owner" value="' + this.options.object_owner + '"><input type="hidden" name="object_owner_id" value="' + this.options.object_owner_id + '">'
            } else {
                c += '<input type="hidden" name="user" value="' + this.Base.Owner.user_info.user_username + '">'
            }
			if (this.options.typeTab) {
                c += "<input type='hidden' name='tab' value='" + this.options.typeTab + "'>"
            }
            if (this.options.typeCol) {
                c += "<input type='hidden' name='col' value='" + this.options.typeCol + "'>"
            }
            if (this.options.typeTabParent) {
                c += '<input type="hidden" name="tab_parent" value="' + this.options.typeTabParent + '">'
            }
            if (this.options.typeColParent) {
                c += '<input type="hidden" name="col_parent" value="' + this.options.typeColParent + '">'
            }
            if (this.options.typeChild) {
                c += '<input type="hidden" name="child" value="1">'
            }
            c += "</div><div id='comment_error' style='color: #FF0000; display: none;'></div></div></div></form>"
        }
        c += '<div style="display: none;" id="confirmcommentdelete"><div class="modal-green-box" style="margin-top: 10px;">' + this.Base.Language.Translate(1026) + '</div><br /><form action="/misc_js.php" method="post" target="ajaxframe"><div class="fr"><input type="submit" class="newinputbtn" value="' + this.Base.Language.Translate(175) + '" onClick="parent.TB_remove();"><input type="button" class="newcancelbtn" value="' + this.Base.Language.Translate(39) + '" onClick="parent.TB_remove();"></div><input type="hidden" name="task" value="comment_delete"><input type="hidden" name="comment_id" id="del_comment_id" value="0"><input type="hidden" name="type" value="' + this.options.type + '"><input type="hidden" name="iden" value="' + this.options.typeIdentifier + '"><input type="hidden" name="value" value="' + this.options.typeID + '">';
        if (this.options.object_owner && this.options.object_owner_id) {
            c += '<input type="hidden" name="object_owner" value="' + this.options.object_owner + '"><input type="hidden" name="object_owner_id" value="' + this.options.object_owner_id + '">'
        } else {
            c += '<input type="hidden" name="user" value="' + this.Base.Owner.user_info.user_username + '">'
        }
		if (this.options.typeTab) {
            c += '<input type="hidden" name="tab" value="' + this.options.typeTab + '">'
        }
        if (this.options.typeCol) {
            c += '<input type="hidden" name="col" value="' + this.options.typeCol + '">'
        }
        if (this.options.typeTabParent) {
            c += '<input type="hidden" name="tab_parent" value="' + this.options.typeTabParent + '">'
        }
        if (this.options.typeColParent) {
            c += '<input type="hidden" name="col_parent" value="' + this.options.typeColParent + '">'
        }
        if (this.options.typeChild) {
            c += '<input type="hidden" name="child" value="1">'
        }
        c += "</form></div>";
        var a = $(this.options.type + "_" + this.options.typeID + "_postcomment");
        a.innerHTML = c;
        //[DZ] added char limit to comment textarea
        jQuery(a).find('textarea').keydown(function(){ if(this.value.length>1000) return false; });
        var b = this;
        if (this.options.canComment) {
            a.getElement("form").addEvent("submit", function (d) {
                b.checkText(d);
                return b.doCommentPost(d);
            });
            a.getElement("textarea").addEvent("focus", function () {
                b.removeText(this)
            });
            a.getElement("textarea").addEvent("blur", function () {
                b.addText(this)
            });
        }
    },
    doCommentPost: function (d) {
        $("comment_error").style.display = "none";
        var c = new Event(d);
        var a = {
            task: "comment_post",
			gu: G_UID,
            type: this.options.type,
            iden: this.options.typeIdentifier,
            value: this.options.typeID,
            tab: this.options.typeTab,
            col: this.options.typeCol
        };
        if (this.options.typeTabParent) {
            a.tab_parent = this.options.typeTabParent
        }
        if (this.options.typeColParent) {
            a.col_parent = this.options.typeColParent
        }
        if (this.options.typeChild) {
            a.child = this.options.typeChild
        }
        if (this.options.object_owner && this.options.object_owner_id) {
            a.object_owner = this.options.object_owner;
            a.object_owner_id = this.options.object_owner_id
        } else {
            a.user = this.Base.Owner.user_info.user_username
        }
        if ($type(document.comment_post_form.comment_body)) {
            a.comment_body = document.comment_post_form.comment_body.value
        }
        if ($type(document.comment_post_form.comment_secure)) {
            a.comment_secure = document.comment_post_form.comment_secure.value
        }
        if(!a.comment_body || a.comment_body == this.Base.Language.Translate(829)){
            $("comment_error").style.display = "block";
            $("comment_error").innerHTML = this.Base.Language.Translate(831);
            $("comment_submit").value = this.Base.Language.Translate(833);
            $("comment_submit").disabled = false;
            if (typeof(this.onCommentFail) == "function") this.onCommentFail();
            c.stop();
            return false;
        }
        var f = this;
        var b = new Request.JSON({
            url: this.options.ajaxURL,
            method: this.options.ajaxMethod,
            secure: this.options.ajaxSecure,
            data: a,
            onComplete: function (e, g) {
                f.addComment(e.is_error, e.comment_body, e.comment_date)
            }
        }).send();
        c.stop()
    },
    doCommentEdit: function () {
        var a = {
            task: "comment_edit",
            type: this.options.type,
            iden: this.options.typeIdentifier,
            value: this.options.typeID,
            user: this.Base.Owner.user_info.user_username
        };
        if ($type(document.editCommentForm.comment_id)) {
            a.comment_id = document.editCommentForm.comment_id.value
        }
        if ($type(document.editCommentForm.comment_edit)) {
            a.comment_edit = document.editCommentForm.comment_edit.value
        }
        var c = this;
        var b = new Request.JSON({
            url: this.options.ajaxURL,
            method: this.options.ajaxMethod,
            secure: this.options.ajaxSecure,
            data: a,
            onComplete: function (d, e) {
                c.getComments()
            }
        }).send()
    },
    doCommentDelete: function (f, b) {
        var d = new Event(f);
        var a = {
            task: "comment_delete",
            comment_id: b,
            type: this.options.type,
            iden: this.options.typeIdentifier,
            value: this.options.typeID,
            tab: this.options.typeTab,
            col: this.options.typeCol,
            user: this.Base.Owner.user_info.user_username
        };
        if (this.options.typeTabParent) {
            a.tab_parent = this.options.typeTabParent
        }
        if (this.options.typeColParent) {
            a.col_parent = this.options.typeColParent
        }
        if (this.options.typeChild) {
            a.child = this.options.typeChild
        }
        if (this.options.object_owner) {
            a.object_owner = this.options.object_owner
        }
        if (this.options.object_owner_id) {
            a.object_owner_id = this.options.object_owner_id
        }
        if (document.commentDeleteForm && $type(document.commentDeleteForm.comment_body)) {
            a.comment_body = document.commentDeleteForm.comment_body.value
        }
        if (document.commentDeleteForm && $type(document.commentDeleteForm.comment_secure)) {
            a.comment_secure = document.commentDeleteForm.comment_secure.value
        }
        var g = this;
        var c = new Request.JSON({
            url: this.options.ajaxURL,
            method: this.options.ajaxMethod,
            secure: this.options.ajaxSecure,
            data: a,
            onComplete: function (e, h) {
                g.getComments()
            }
        }).send();
        d.stop()
    },
    getComments: function (e) {
        if (e == "next") {
            this.page++
        } else {
            if (e == "previous") {
                this.page--
            } else {
                if ($type(e)) {
                    this.page = e
                }
            }
        }
        if (this.options.paginate) {
            window.scroll(0, 0)
        } else {
            this.options.cpp = this.total
        }
        if (this.options.object_owner && this.options.object_owner_id) {
            var d = this.options.object_owner;
            var a = this.options.object_owner_id;
            var b = ""
        } else {
            var d = "";
            var a = "";
            var b = this.Base.Owner.user_info.user_username
        }
        var f = this;
        var c = new Request.JSON({
            url: this.options.ajaxURL,
            method: this.options.ajaxMethod,
            secure: this.options.ajaxSecure,
            data: {
                task: "comment_get",
                user: b,
                object_owner: d,
                object_owner_id: a,
                type: this.options.type,
                iden: this.options.typeIdentifier,
                value: this.options.typeID,
                cpp: this.options.cpp,
                p: this.page
            },
            onComplete: function (g, h) {
                f.updateComments(g)
            }
        });
        c.send()
    },
    updateComments: function (b) {
        if ($type(b) != "object") {
            alert("There was an error processing the request.");
            return false
        }
        this.total = parseInt(b.total_comments) || 0;
        this.page = b.p;
        var a = b.maxpage;
        var n = b.p_start;
        var m = b.p_end;
        var h = $(this.options.type + "_" + this.options.typeID + "_totalcomments");
        var g = $(this.options.type + "_" + this.options.typeID + "_comments");
        var k = $H(b.comments);
        h.innerHTML = this.total;
        g.empty();
        var l = this;
        if (l.Base.Core.settings.setting_url) {
            var e = "?"
        } else {
            var e = "&"
        }
        var stNo = 1;
        k.each(function (o, q) {
            var r = new Element("div", {
                id: "comment_" + q
            });
            var s = "<div class='singleComment'>";
            s += "<div>";
            if (!o.comment_authoruser_id) {
                s += "<div class='profile_comment_author'>" + l.Base.Language.Translate(835) + " "
            } else {
                if (!o.comment_authoruser_exists) {
                    s += "<div class='profile_comment_author'>" + l.Base.Language.Translate(1071) + " "
                } else {
                    s += "<div class='profile_comment_author'><a href='" + o.comment_authoruser_url + "'>" + o.comment_authoruser_displayname + "</a> "
                }
            }
            s += "<span class='profile_comment_date2'>" + o.comment_date.replace(' ', ' ') + "</span></div>";
            var type=(this.visible_tab=='blog'?'blog_comment':'res_comment');
            s += "<div class='profile_comment_body' id='profile_comment_body_" + q + "'>" + o.comment_body + "&nbsp;</div>";
            s += "<div class='profile_comment_links'><a href='#' onclick='BetterflyJSNN.utils.showIsSpam(\""+type+"\", \""+q+"\"); return false;'>Spam</a>";
            var p = new Array();
            if (l.Base.Viewer.user_exists && o.comment_authoruser_id && o.comment_authoruser_exists) {
                if (l.options.commentLinks.reply && l.Base.Viewer.user_info.user_id == l.Base.Owner.user_info.user_id && l.Base.Viewer.user_info.user_id != o.comment_authoruser_id) {
                    p.push("<a href='" + o.comment_authoruser_url + e + "v=comments'>" + l.Base.Language.Translate(787) + "</a>")
                }
                if (l.options.commentLinks.walltowall && o.comment_authoruser_id != l.Base.Owner.user_info.user_id && o.comment_authoruser_private == false) {
                    p.push("<a href=\"javascript:TB_show('" + l.Base.Language.Translate(1032) + "', 'profile_comments.php?user=" + l.Base.Owner.user_info.user_username + "&user2=" + o.comment_authoruser_username + "&TB_iframe=true&height=450&width=550', '', './images/trans.gif');\">" + l.Base.Language.Translate(891) + "</a>")
                }
                if (o.comment_authoruser_id != l.Base.Viewer.user_info.user_id) {
                    p.push("<a href=\"javascript:TB_show('" + l.Base.Language.Translate(784) + "', 'user_messages_new.php?to_user=" + o.comment_authoruser_displayname + "&to_id=" + o.comment_authoruser_username + "&TB_iframe=true&height=400&width=450', '', './images/trans.gif');\">" + l.Base.Language.Translate(834) + "</a>")
                }
                if (o.comment_authoruser_id == l.Base.Viewer.user_info.user_id) {
                    p.push('<a class="commentEditLink dn" href="javascript:void(0);" id=\'comment_edit_link_' + q + "'>" + l.Base.Language.Translate(187) + "</a>")
                }
            }
            if ((o.comment_authoruser_exists && o.comment_authoruser_id == l.Base.Viewer.user_info.user_id) || (l.Base.Viewer.user_exists && l.Base.Viewer.user_info.user_id == l.Base.Owner.user_info.user_id)) {
                p.push('<a class="commentDeleteLink" href="javascript:void(0);" id=\'comment_delete_link_' + q + "'>" + l.Base.Language.Translate(155) + "</a>")
            }
            s += p.join("&nbsp;<!----->&nbsp;");
            s += "&nbsp;</div></div></div>";
            r.setProperty("html", s);
            r.inject(g);
            if (r.getElement(".commentEditLink")) {
                r.getElement(".commentEditLink").addEvent("click", function () {
                    l.editComment(q)
                })
            }
            if (r.getElement(".commentDeleteLink")) {
                r.getElement(".commentDeleteLink").addEvent("click", function () {
                    l.confirmDelete(q)
                })
            }
        });
        if (this.options.paginate && this.total > this.options.cpp) {
            var i = new Element("div", {
                styles: {
                    "text-align": "center"
                }
            });
            var j = new Element("div", {
                styles: {
                    "text-align": "center"
                }
            });
            if (this.page > 1) {
                var d = "<a href='javascript:void(0);' id='comment_last_page_top'>&#171; " + l.Base.Language.Translate(182) + "</a>";
                var c = "<a href='javascript:void(0);' id='comment_last_page_bottom'>&#171; " + l.Base.Language.Translate(182) + "</a>"
            } else {
                var d = "<font class='disabled'>&#171; " + l.Base.Language.Translate(182) + "</font>";
                var c = "<font class='disabled'>&#171; " + l.Base.Language.Translate(182) + "</font>"
            }
            if (n == m) {
                d += "&nbsp;|&nbsp; " + this.Base.Language.TranslateFormatted(184, [n, this.total]) + "&nbsp;|&nbsp;";
                c += "&nbsp;|&nbsp; " + this.Base.Language.TranslateFormatted(184, [n, this.total]) + "&nbsp;|&nbsp;"
            } else {
                d += "&nbsp;|&nbsp; " + this.Base.Language.TranslateFormatted(185, [n, m, this.total]) + "&nbsp;|&nbsp;";
                c += "&nbsp;|&nbsp; " + this.Base.Language.TranslateFormatted(185, [n, m, this.total]) + "&nbsp;|&nbsp;"
            }
            if (this.page != a) {
                d += "<a href='javascript:void(0);' id='comment_next_page_top'>" + l.Base.Language.Translate(183) + " &#187;</a>";
                c += "<a href='javascript:void(0);' id='comment_next_page_bottom'>" + l.Base.Language.Translate(183) + " &#187;</a>"
            } else {
                d += "<font class='disabled'>" + l.Base.Language.Translate(183) + " &#187;</font>";
                c += "<font class='disabled'>" + l.Base.Language.Translate(183) + " &#187;</font>"
            }
            i.setProperty("html", d);
            j.setProperty("html", c);
            i.inject(g, "top");
            j.inject(g);
            if (i.getElement("a[id=comment_last_page_top]")) {
                i.getElement("a[id=comment_last_page_top]").addEvent("click", function () {
                    l.getComments("previous")
                })
            }
            if (j.getElement("a[id=comment_last_page_bottom]")) {
                j.getElement("a[id=comment_last_page_bottom]").addEvent("click", function () {
                    l.getComments("previous")
                })
            }
            if (i.getElement("a[id=comment_next_page_top]")) {
                i.getElement("a[id=comment_next_page_top]").addEvent("click", function () {
                    l.getComments("next")
                })
            }
            if (j.getElement("a[id=comment_next_page_bottom]")) {
                j.getElement("a[id=comment_next_page_bottom]").addEvent("click", function () {
                    l.getComments("next")
                })
            }
        }
    },
    addComment: function (c, a, b) {
        if (!this.options.canComment) {
            return false
        }
        if (c) {
            $("comment_error").style.display = "block";
            if (!a.trim()) {
                this.addText($("comment_body"));
                $("comment_error").innerHTML = this.Base.Language.Translate(831)
            } else {
                $("comment_error").innerHTML = this.Base.Language.Translate(832)
            }
            $("comment_submit").value = this.Base.Language.Translate(833);
            $("comment_submit").disabled = false
        } else {
            $("comment_error").style.display = "none";
            $("comment_error").innerHTML = "";
            $("comment_body").value = "";
            $("comment_body").style.height = this.options.originalHeight + "px";
            this.addText($("comment_body"));
            $("comment_submit").value = this.Base.Language.Translate(833);
            $("comment_submit").disabled = false;
            if ($("comment_secure")) {
                $("comment_secure").value = "";
                $("secure_image").src = $("secure_image").src + "?" + (new Date()).getTime()
            }
            this.page = 1;
            this.total++;
            this.getComments();
            if (typeof(this.onCommentAdd) == "function") this.onCommentAdd();
        }
    },
    editComment: function (c) {
        var f = this;
        if (this.isEditing) {
            return false
        }
        this.isEditing = true;
        var b = $("profile_comment_body_" + c);
        var a = b.offsetHeight + 10;
        var d = b.innerHTML.replace(/<br>/gi, "\r\n").replace(/>/gi, "&gt;");
        var e = "";
        e += "<form action='/misc_js.php' method='post' target='ajaxframe' name='editCommentForm'>";
        e += "<textarea name='comment_edit' id='comment_edit_" + c + "' style='height: " + a + " px; width: 100%;'>" + d + "</textarea>";
        e += "<input type='hidden' name='task' value='comment_edit'>";
        e += "<input type='hidden' name='comment_id' value='" + c + "'>";
        e += "<input type='hidden' name='type' value='" + this.options.type + "'>";
        e += "<input type='hidden' name='iden' value='" + this.options.typeIdentifier + "'>";
        e += "<input type='hidden' name='value' value='" + this.options.typeID + "'>";
        if (this.options.typeTab) {
            e += '<input type="hidden" name="tab" value="' + this.options.typeTab + '">'
        }
        if (this.options.typeCol) {
            e += '<input type="hidden" name="col" value="' + this.options.typeCol + '">'
        }
        if (this.options.typeTabParent) {
            e += '<input type="hidden" name="tab_parent" value="' + this.options.typeTabParent + '">'
        }
        if (this.options.typeColParent) {
            e += '<input type="hidden" name="col_parent" value="' + this.options.typeColParent + '">'
        }
        if (this.options.typeChild) {
            e += '<input type="hidden" name="child" value="1">'
        }
        e += "</form>";
        b.innerHTML = e;
        textarea_autogrow("comment_edit_" + c);
        $("comment_edit_" + c).focus();
        $("comment_edit_" + c).addEvent("blur", function () {
            f.doCommentEdit();
            f.isEditing = false
        })
    },
    confirmDelete: function (a) {
        $("del_comment_id").value = a;
        TB_show(this.Base.Language.Translate(1025), "#TB_inline?height=100&width=300&inlineId=confirmcommentdelete", "", "../images/trans.gif");
        var b = this;
        $("TB_window").getElement("form").name = "commentDeleteForm";
        $("TB_window").getElement("form").addEvent("submit", function (c) {
            b.doCommentDelete(c, a)
        })
    },
    removeText: function (a) {
        if (!this.changed) {
            a.value = "";
            a.style.color = "#000000";
            this.changed = true
        }
    },
    addText: function (a) {
        if (!a.value.trim()) {
            a.value = this.Base.Language.Translate(829);
            a.style.color = "#888888";
            this.changed = false
        }
    },
    checkText: function (a) {
        if (!this.changed) {
            $("comment_body").value = ""
        }
        $("comment_submit").value = this.Base.Language.Translate(830);
        $("comment_submit").disabled = true
    }
});
BetterflyJSXAPI.Core = new Class({
    Base: {},
    settings: {},
    plugins: {},
    options: {
        ajaxURL: "js_api.php"
    },
    initialize: function () {},
    ImportSettings: function (a) {
        this.settings = a
    },
    ImportPlugins: function (a) {
        this.plugins = a
    }
});
if (typeof(BetterflyJSXAPI) == "undefined") {
    var BetterflyJSXAPI = {}
}
BetterflyJSXAPI.Language = new Class({
    Base: {},
    initialize: function () {
        this.languageVariables = new Hash()
    },
    Translate: function (b) {
        var a = this.languageVariables.get(b) || "Missing Language Variable #" + b;
        return a
    },
    TranslateFormatted: function (d, c) {
        var b = this.languageVariables.get(d) || "Missing Language Variable #" + d;
        c.unshift(b);
        var a = sprintf.run(c);
        return a
    },
    Import: function (a) {
        if ($type(a) == "object") {
            this.languageVariables.extend(a)
        }
    }
});
var BetterflyJSXLanguage = BetterflyJSXAPI.Language;
BetterflyJSXAPI.URL = new Class({
    Base: {},
    url_base: null,
    url_info: {},
    initialize: function () {},
    url_create: function (c, a, e, d, b) {
        var f = (BetterflyJSX.Core.settings.setting_url ? this.url_info[c].url_subdirectory : this.url_info[c].url_regular);
        if (!f) {
            return false
        }
        f = f.replace("$user", a);
        f = f.replace("$id1", e);
        f = f.replace("$id2", d);
        f = f.replace("$id3", b);
        return this.url_base + f
    },
    url_userdir: function (a) {
        return "uploads_user/" + (a + 999 - ((a - 1) % 1000)).toString() + "/" + a + "/"
    },
    ImportURLBase: function (a) {
        this.url_base = a
    },
    ImportURLInfo: function (a) {
        this.url_info = a
    }
});
BetterflyJSXAPI.User = new Class({
    Base: {},
    user_exists: false,
    user_displayname: false,
    user_displayname_short: false,
    user_info: {},
    profile_info: {},
    level_info: {},
    usersetting_info: {},
    options: {
        ajaxURL: "misc_js.php",
        ajaxMethod: "post",
        ajaxSecure: false,
        displayname_order: "standard"
    },
    user_status: "",
    user_notify_cookie: {},
    user_notify_count: 0,
    initialize: function () {},
    userPhotoFullPath: function () {
        if (!this.Base.URL) {
            return false
        }
        if (!this.user_info.user_photo) {
            return this.Base.URL.url_base + "images/nophoto.gif"
        }
        return this.Base.URL.url_base + this.Base.URL.url_userdir(this.user_info.user_id) + this.user_info.user_photo
    },
    userStatusChange: function () {
        if (!$("ajax_status")) {
            return false
        }
        var b = this.user_status.replace(/<wbr>/g, "").replace(/&shy;/g, "");
        var a = "<input type='text' class='text_small' name='status_new' id='status_new' maxlength='100' value='";
        a += (b == "" ? this.Base.Language.Translate(744) : b);
        a += "' size='10' style='width: 178px; margin: 2px 0px 2px 0px;' onkeypress='return ( (new Event(event)).key==\"enter\" ? BetterflyJSX.Viewer.userStatusChangeSubmit() : true );'><br /><a href='javascript:void(0);' onclick='BetterflyJSX.Viewer.userStatusChangeSubmit(); return false;'>" + this.Base.Language.Translate(746) + "</a> | <a href='javascript:void(0);' onclick='BetterflyJSX.Viewer.userStatusChangeReturn(); return false;'>" + this.Base.Language.Translate(747) + "</a>";
        $("ajax_status").innerHTML = a;
        $("status_new").focus();
        $("status_new").select()
    },
    userStatusChangeReturn: function () {
        if (!$("ajax_status")) {
            return false
        }
        if (this.user_status == "") {
            $("ajax_status").innerHTML = "<a href='javascript:void(0);' onclick='BetterflyJSX.Viewer.userStatusChange(); return false;'>" + this.Base.Language.Translate(743) + "</a>"
        } else {
            $("ajax_status").innerHTML = "<div id='ajax_status'><span id='ajax_currentstatus_value'>" + this.user_status + "</span><br /><div style='padding-top: 5px;'><div style='float: left; padding-right: 5px;'>[ <a href='javascript:void(0);' onClick='BetterflyJSX.Viewer.userStatusChange(); return false;'>" + this.Base.Language.Translate(745) + "</a> ]</div><div class='home_updated'><span id='ajax_currentstatus_date'>" + this.Base.Language.Translate(1113) + " " + this.Base.Language.TranslateFormatted(773, [1]) + "</span></div><div style='clear: both; height: 0px;'></div></div></div>"
        }
    },
    userStatusChangeSubmit: function () {
        if (!$("ajax_status")) {
            return false
        }
        var b = this;
        var a = new Request.JSON({
            url: this.options.ajaxURL,
            method: this.options.ajaxMethod,
            secure: this.options.ajaxSecure,
            data: {
                task: "status_change",
                status: $("status_new").value
            },
            onComplete: function (c, d) {
                b.user_status = c.status;
                b.userStatusChangeReturn()
            }
        }).send()
    },
    userDelete: function () {
        TB_show(this.Base.Language.Translate(759), "#TB_inline?height=100&width=300&inlineId=confirmdelete", "", "../images/trans.gif")
    },
    userDeleteConfirm: function (b) {
        var c = this;
        var a = new Request.JSON({
            url: "user_account_delete.php",
            method: this.options.ajaxMethod,
            secure: this.options.ajaxSecure,
            data: {
                task: "dodelete",
                token: b
            },
            onComplete: function (d, e) {
                window.location = "home.php"
            }
        }).send()
    },
    userActionDelete: function (a) {
        var c = this;
        var b = new Request.JSON({
            url: this.options.ajaxURL,
            method: this.options.ajaxMethod,
            secure: this.options.ajaxSecure,
            data: {
                task: "action_delete",
                action_id: a
            },
            onComplete: function (d, e) {
                if ($("action_" + a)) {
                    $("action_" + a).style.display = "none";
                    total_actions--;
                    if (total_actions == 0) {
                        $("actions").style.display = "none"
                    }
                }
            }
        }).send()
    },

    userPhotoRemove: function () {
        var b = this;
        var a = new Request.JSON({
            url: "user_editprofile_photo.php",
            method: this.options.ajaxMethod,
            async: false,
            secure: this.options.ajaxSecure,
            data: {
                task: "remove"
            }
        }).send();

        BetterflyJSNN.utils.removeProfilePicture();


    },
    ImportUserInfo: function (a) {
        if (!a || $type(a) != "object" || !a.user_exists) {
            this.user_exists = false;
            return
        }
        this.user_exists = true;
        a.user_id = parseInt(a.user_id);
        delete a.user_exists;
        this.user_info = a;
        this.user_info.user_fname = this.user_info.user_fname.trim();
        this.user_info.user_lname = this.user_info.user_lname.trim();
        if (this.user_info.user_fname && this.user_info.user_lname) {
            if (this.options.displayname_order == "asian") {
                this.user_displayname_short = this.user_info.user_lname;
                this.user_displayname = this.user_info.user_lname + " " + this.user_info.user_fname
            } else {
                this.user_displayname_short = this.user_info.user_fname;
                this.user_displayname = this.user_info.user_fname + " " + this.user_info.user_lname
            }
        } else {
            if (this.user_info.user_fname) {
                this.user_displayname = this.user_displayname_short = this.user_info.user_fname
            } else {
                if (this.user_info.user_lname) {
                    this.user_displayname = this.user_displayname_short = this.user_info.user_lname
                } else {
                    if (this.user_info.user_username) {
                        this.user_displayname = this.user_displayname_short = this.user_info.user_username
                    }
                }
            }
        }
    }
});
BetterflyJSXAPI.Tags = new Class({
    Implements: [Options],
    Base: {},
    isTagging: false,
    newtag: false,
    tags: [],
    options: {
        ajaxURL: "misc_js.php",
        ajaxMethod: "post",
        ajaxSecure: false,
        canTag: false,
        type: false,
        media_id: false,
        media_dir: false,
        object_owner: false,
        object_owner_id: false
    },
    initialize: function (a) {
        this.setOptions(a);
        if (this.options.initialTotal) {
            this.total = this.options.initialTotal
        }
        var b = this;
        window.addEvent("domready", function () {
            b.showTagForm()
        })
    },
    showTagForm: function () {
        var e = "";
        var d = this;
        if (this.options.canTag) {
            e += "<div class='media_photo_tagform_titlebar'><img src='/images/icons/photos16.gif' class='icon' />" + this.Base.Language.Translate(1212) + "</div><div style='padding: 7px;'><div style='text-align: left;'><div style='font-size: 7pt; margin-bottom: 5px;'>" + this.Base.Language.Translate(1213) + "</div><div style='text-align: center;'><input type='text' style='width: 130px; padding-left: 4px; font-size: 8pt;' name='media_photo_tag' id='media_photo_tag' class='text' maxlength='40'/></div></div><div id='media_photo_friendlist' class='media_photo_friendlist'>";
            if (d.Base.Viewer.user_exists) {
                e += "<div><a href='javascript:void(0)' id='tag_me'>" + d.Base.Viewer.user_displayname + d.Base.Language.Translate(1214) + "</a></div>"
            }
            e += "</div><div><input type='button' class='button' name='save' id='tag_save' value='" + d.Base.Language.Translate(1215) + "' />&nbsp;&nbsp;<input type='button' class='button' id='tag_cancel' name='cancel' value='" + d.Base.Language.Translate(39) + "' /></div></div>";
            var a = new Element("div", {
                id: "media_photo_tagform",
                "class": "media_photo_tagform",
                html: e
            });
            var c = $("media_photo_div");
            a.inject(c);
            if (a.getElement("input[id=tag_cancel]")) {
                a.getElement("input[id=tag_cancel]").addEvent("click", function () {
                    d.cancelTag()
                })
            }
            if (a.getElement("input[id=tag_save]")) {
                a.getElement("input[id=tag_save]").addEvent("click", function () {
                    d.saveTag(0)
                })
            }
            if (a.getElement("a[id=tag_me]")) {
                a.getElement("a[id=tag_me]").addEvent("click", function () {
                    d.saveTag(d.Base.Viewer.user_info.user_id)
                })
            }
            var b = new Request.JSON({
                url: "misc_js.php?task=friends_all",
                secure: this.options.ajaxSecure,
                onComplete: function (f) {
                    d.addFriendToList(f.friends)
                }
            }).send()
        }
    },
    addFriendToList: function (a) {
        var b = this;
        a.each(function (f) {
            for (var c in f) {
                var e = new Element("div", {
                    id: "friend_div_" + c
                });
                var d = new Element("a", {
                    href: "javascript:void(0)",
                    id: "friend_link_" + c,
                    html: f[c]
                }).inject(e);
                e.inject($("media_photo_friendlist"));
                $("friend_link_" + c).addEvent("click", function () {
                    b.saveTag(c)
                })
            }
        })
    },
    insertTag: function (a, l, m, j, h, k, i, c) {
        var f = "";
        var g = this;
        if ($("media_tags").style.display == "none") {
            $("media_tags").style.display = "block"
        } else {
            if (g.tags.length != 0) {
                f = '<span id="tag_comma_' + a + '">, </span>'
            }
        }
        var d = new Element("span", {
            id: "full_tag_" + a,
            html: f
        });
        if (l != "") {
            var e = new Element("a", {
                href: l,
                id: "tag_link_" + a,
                html: m
            }).inject(d)
        } else {
            var e = new Element("span", {
                id: "tag_link_" + a,
                html: m,
                styles: {
                    cursor: "pointer"
                }
            }).inject(d)
        }
        if (g.Base.Viewer.user_exists && (g.Base.Viewer.user_info.user_username == c || g.Base.Viewer.user_info.user_username == g.Base.Owner.user_info.user_username)) {
            var b = $(d).get("html");
            $(d).set("html", b, " (<a href='javascript:void(0);' id='new_removetag_link'>" + g.Base.Language.Translate(1228) + "</a>)")
        }
        d.inject($("media_tags"));
        g.createTag(a, m, j, h, k, i);
        $("tag_link_" + a).addEvent("mouseover", function () {
            g.showTag(a)
        });
        $("tag_link_" + a).addEvent("mouseout", function () {
            g.hideTag(a)
        });
        if ($("new_removetag_link")) {
            $("new_removetag_link").addEvent("click", function () {
                g.removeTag(a)
            });
            $("new_removetag_link").set("id", "removetag_link_" + a)
        }
        g.tags.push(a)
    },
    createTag: function (f, d, c, b, e, a) {
        var g = this;
        new Element("div", {
            id: "tag_" + f,
            html: '<img src="/images/trans.gif" width="100%" height="100%" />',
            "class": "tag_div_hidden",
            styles: {
                width: (parseInt(e) - 4) + "px",
                height: (parseInt(a) - 4) + "px",
                top: c + "px",
                left: b + "px"
            }
        }).inject($("media_photo_div"));
        new Element("div", {
            id: "tag_label_" + f,
            html: d,
            "class": "tag_label",
            styles: {
                display: "none",
                top: (parseInt(c) + parseInt(a) + 10) + "px",
                left: b + "px"
            }
        }).inject($("media_photo_div"));
        $("tag_" + f).addEvent("mouseover", function () {
            g.showTag(f)
        });
        $("tag_" + f).addEvent("mouseout", function () {
            g.hideTag(f)
        })
    },
    showTag: function (a) {
        $("tag_" + a).className = "tag_div";
        $("tag_label_" + a).style.display = "block"
    },
    hideTag: function (a) {
        $("tag_" + a).className = "tag_div_hidden";
        $("tag_label_" + a).style.display = "none"
    },
    addTag: function () {
        if (!this.isTagging) {
            this.isTagging = true;
            this.newtag = new MooCrop("media_photo");
            var b = this;
            var a = $("media_photo_tagform").inject(b.newtag.wrapper);
            a.setStyles({
                top: this.newtag.crop.bottom + 10,
                left: this.newtag.crop.right + 10,
                display: "block"
            });
            this.newtag.addEvent("onBegin", function (f, e, d, c) {
                a.setStyle("display", "none")
            });
            this.newtag.addEvent("onCrop", function (f, e, d, c) {
                a.setStyles({
                    top: e.bottom + 10,
                    left: e.right + 10,
                    display: "none"
                })
            });
            this.newtag.addEvent("onComplete", function (f, e, d, c) {
                a.setStyle("display", "block")
            })
        }
    },
    cancelTag: function () {
        if (this.isTagging) {
            $("media_photo_tag").value = "";
            $("media_photo_tagform").inject("media_photo_div").setStyle("display", "none");
            var a = this.newtag.removeOverlay.bind(this.newtag);
            a();
            this.isTagging = false
        }
    },
    saveTag: function (d) {
        if (this.isTagging) {
            if (this.options.object_owner && this.options.object_owner_id) {
                var f = this.options.object_owner;
                var b = this.options.object_owner_id;
                var c = ""
            } else {
                var f = "";
                var b = "";
                var c = this.Base.Owner.user_info.user_username
            }
            var g = this;
            var e = new Request.JSON({
                url: this.options.ajaxURL,
                method: this.options.ajaxMethod,
                secure: this.options.ajaxSecure,
                data: {
                    task: "tag_do",
                    ajax: true,
                    mediatag_user_id: d,
                    mediatag_text: $("media_photo_tag").value,
                    mediatag_x: this.newtag.crop.top,
                    mediatag_y: this.newtag.crop.left,
                    mediatag_height: this.newtag.crop.height,
                    mediatag_width: this.newtag.crop.width,
                    user: c,
                    object_owner: f,
                    object_owner_id: b,
                    type: this.options.type,
                    media_id: this.options.media_id,
                    media_dir: this.options.media_dir
                },
                onComplete: function (h) {
                    if ($type(h.mediatag_id)) {
                        g.insertTag(h.mediatag_id, h.mediatag_link, h.mediatag_text, h.mediatag_x, h.mediatag_y, h.mediatag_width, h.mediatag_height, h.mediatag_user_username)
                    }
                }
            }).send();
            $("media_photo_tag").value = "";
            $("media_photo_tagform").inject("media_photo_div").setStyle("display", "none");
            var a = this.newtag.removeOverlay.bind(this.newtag);
            a();
            this.isTagging = false
        }
    },
    removeTag: function (e) {
        if (this.options.object_owner && this.options.object_owner_id) {
            var d = this.options.object_owner;
            var a = this.options.object_owner_id;
            var b = ""
        } else {
            var d = "";
            var a = "";
            var b = this.Base.Owner.user_info.user_username
        }
        var f = this;
        var c = new Request.JSON({
            url: this.options.ajaxURL,
            method: this.options.ajaxMethod,
            secure: this.options.ajaxSecure,
            data: {
                task: "tag_remove",
                ajax: true,
                mediatag_id: e,
                user: b,
                object_owner: d,
                object_owner_id: a,
                type: this.options.type,
                media_id: this.options.media_id
            }
        }).send();
        $("tag_" + e).destroy();
        $("tag_label_" + e).destroy();
        $("full_tag_" + e).destroy();
        if (this.tags.indexOf(e) == 0 && $("tag_comma_" + this.tags[1])) {
            $("tag_comma_" + this.tags[1]).destroy()
        }
        this.tags.splice(this.tags.indexOf(e), 1);
        if (this.tags.length == 0) {
            $("media_tags").style.display = "none"
        }
    }
});
var MooCrop = new Class({
    calculateHandles: true,
    current: {},
    options: {
        maskColor: "black",
        maskOpacity: ".3",
        handleColor: "#FFFFFF",
        handleWidth: "5px",
        handleHeight: "5px",
        cropBorder: "1px dashed #FFFFFF",
        min: {
            width: 50,
            height: 50
        },
        showMask: true,
        showHandles: false
    },
    initialize: function (b, a) {
        this.setOptions(a);
        this.img = $(b);
        if (this.img.get("tag") != "img") {
            return false
        }
        this.resizeFunc = this.refresh.bindWithEvent(this);
        this.removeFunc = this.removeListener.bind(this);
        this.buildOverlay();
        this.setup()
    },
    setup: function () {
        $(this.cropArea).setStyles({
            width: this.options.min.width,
            height: this.options.min.height,
            top: (this.img.height - this.options.min.height) / 2,
            left: (this.img.width - this.options.min.width) / 2
        });
        this.current.crop = this.crop = this.getCropArea();
        this.handleWidthOffset = this.options.handleWidth.toInt() / 2;
        this.handleHeightOffset = this.options.handleHeight.toInt() / 2;
        this.fixBoxModel();
        this.drawMasks();
        this.positionHandles()
    },
    getCropArea: function () {
        var a = this.cropArea.getCoordinates();
        a.left -= this.offsets.x;
        a.right -= this.offsets.x;
        a.top -= this.offsets.y;
        a.bottom -= this.offsets.y;
        return a
    },
    fixBoxModel: function () {
        var c = this.boxDiff = (this.crop.width - this.options.min.width) / 2;
        var a = this.bounds = {
            top: c,
            left: c,
            right: this.img.width + (c * 2),
            bottom: this.img.height + (c * 2),
            width: this.options.min.width + (c * 2),
            height: this.options.min.height + (c * 2)
        };
        this.wrapper.setStyles({
            width: a.right,
            height: a.bottom,
            background: "url(" + this.img.src + ") no-repeat " + c + "px " + c + "px"
        });
        this.north.setStyle("width", a.right);
        this.south.setStyle("width", a.right)
    },
    activate: function (a, b) {
        a.stop();
        this.current = {
            x: a.page.x,
            y: a.page.y,
            handle: b,
            crop: this.current.crop
        };
        if (this.current.handle == "NESW" && !this.options.showHandles) {
            this.hideHandles()
        }
        this.fireEvent("onBegin", [this.img.src, this.getCropInfo(), this.bounds, b]);
        document.addEvent("mousemove", this.resizeFunc);
        document.addEvent("mouseup", this.removeFunc)
    },
    removeListener: function () {
        if (this.current.handle == "NESW" && !this.options.showHandles) {
            this.showHandles()
        }
        document.removeEvent("mousemove", this.resizeFunc);
        document.removeEvent("mouseup", this.removeFunc);
        this.crop = this.current.crop;
        this.fireEvent("onComplete", [this.img.src, this.getCropInfo(), this.bounds, this.current.handle])
    },
    refresh: function (a) {
        var e = this.current.x - a.page.x;
        var d = this.current.y - a.page.y;
        var i = this.bounds;
        var h = this.crop;
        var f = this.current.handle;
        var k = {};
        var j = (f.length > 2) ? true : false;
        if (f.contains("S")) {
            if (h.bottom - d > i.bottom) {
                d = h.bottom - i.bottom
            }
            if (!j) {
                if ((h.height - d) < i.height) {
                    d = h.height - i.height
                }
                k.height = h.height - d
            }
        }
        if (f.contains("N")) {
            if (h.top - d < i.top) {
                d = h.top
            }
            if (!j) {
                if ((h.height + d) < i.height) {
                    d = i.height - h.height
                }
                k.height = h.height + d
            }
            k.top = h.top - d
        }
        if (f.contains("E")) {
            if (h.right - e > i.right) {
                e = h.right - i.right
            }
            if (!j) {
                if ((h.width - e) < i.width) {
                    e = h.width - i.width
                }
                k.width = h.width - e
            }
        }
        if (f.contains("W")) {
            if (h.left - e < i.left) {
                e = h.left
            }
            if (!j) {
                if ((h.width + e) < i.width) {
                    e = i.width - h.width
                }
                k.width = h.width + e
            }
            k.left = h.left - e
        }
        var g = $merge(k);
        if ($defined(k.width)) {
            k.width -= this.boxDiff * 2
        }
        if ($defined(k.height)) {
            k.height -= this.boxDiff * 2
        }
        this.cropArea.setStyles(k);
        this.getCurrentCoords(g);
        this.drawMasks();
        this.positionHandles();
        this.fireEvent("onCrop", [this.img.src, this.getCropInfo(), i, f])
    },
    getCurrentCoords: function (b) {
        var a = $merge(this.crop);
        if ($defined(b.left)) {
            a.left = b.left;
            if ($defined(b.width)) {
                a.width = b.width
            } else {
                a.right = a.left + a.width
            }
        }
        if ($defined(b.top)) {
            a.top = b.top;
            if ($defined(b.height)) {
                a.height = b.height
            } else {
                a.bottom = a.top + a.height
            }
        }
        if ($defined(b.width) && !$defined(b.left)) {
            a.width = b.width;
            a.right = a.left + a.width
        }
        if ($defined(b.height) && !$defined(b.top)) {
            a.height = b.height;
            a.bottom = a.top + a.height
        }
        this.current.crop = a
    },
    drawMasks: function () {
        if (!this.options.showMask) {
            return
        }
        var a = this.bounds;
        var e = this.current.crop;
        var d = this.current.handle;
        this.north.setStyle("height", e.top + "px");
        this.south.setStyle("height", a.bottom - e.bottom + "px");
        this.east.setStyles({
            height: e.height + "px",
            width: a.right - e.right + "px",
            top: e.top + "px",
            left: e.right + "px"
        });
        this.west.setStyles({
            height: e.height + "px",
            width: e.left + "px",
            top: e.top + "px"
        })
    },
    positionHandles: function () {
        if (!this.calculateHandles) {
            return
        }
        var d = this.current.crop;
        var a = this.handleWidthOffset;
        var b = this.handleHeightOffset;
        this.handles.get("N").setStyles({
            left: d.width / 2 - a + "px",
            top: -b + "px"
        });
        this.handles.get("NE").setStyles({
            left: d.width - a + "px",
            top: -b + "px"
        });
        this.handles.get("E").setStyles({
            left: d.width - a + "px",
            top: d.height / 2 - b + "px"
        });
        this.handles.get("SE").setStyles({
            left: d.width - a + "px",
            top: d.height - b + "px"
        });
        this.handles.get("S").setStyles({
            left: d.width / 2 - a + "px",
            top: d.height - b + "px"
        });
        this.handles.get("SW").setStyles({
            left: -a + "px",
            top: d.height - b + "px"
        });
        this.handles.get("W").setStyles({
            left: -a + "px",
            top: d.height / 2 - b + "px"
        });
        this.handles.get("NW").setStyles({
            left: -a + "px",
            top: -b + "px"
        })
    },
    hideHandles: function () {
        this.calculateHandles = false;
        this.handles.each(function (a) {
            a.setStyle("display", "none")
        })
    },
    showHandles: function () {
        this.calculateHandles = true;
        this.positionHandles();
        this.handles.each(function (a) {
            a.setStyle("display", "block")
        })
    },
    buildOverlay: function () {
        var b = this.options;
        this.wrapper = new Element("div", {
            styles: {
                "z-index": 100,
                position: "relative",
                width: this.img.width,
                height: this.img.height,
                background: "url(" + this.img.src + ") no-repeat",
                "float": this.img.getStyle("float"),
                "margin-left": "auto",
                "margin-right": "auto"
            }
        }).injectBefore(this.img);
        this.img.setStyle("display", "none");
        this.offsets = {
            x: this.wrapper.getLeft(),
            y: this.wrapper.getTop()
        };
        this.wrapper.addEvent("mouseover", function (c) {
            return false
        });
        if (this.options.showMask) {
            var a = {
                position: "absolute",
                overflow: "hidden",
                "background-color": b.maskColor,
                opacity: b.maskOpacity
            };
            this.north = new Element("div", {
                styles: $merge(a, {
                    left: "0px"
                })
            }).injectInside(this.wrapper);
            this.south = new Element("div", {
                styles: $merge(a, {
                    bottom: "0px",
                    left: "0px"
                })
            }).injectInside(this.wrapper);
            this.east = new Element("div", {
                styles: a
            }).injectInside(this.wrapper);
            this.west = new Element("div", {
                styles: $merge(a, {
                    left: "0px"
                })
            }).injectInside(this.wrapper)
        }
        this.cropArea = new Element("div", {
            styles: {
                position: "absolute",
                top: "0px",
                left: "0px",
                border: b.cropBorder,
                cursor: "move"
            },
            events: {
                dblclick: function () {
                    this.fireEvent("onDblClk", [this.img.src, this.getCropInfo(), this.bounds])
                }.bind(this),
                mousedown: this.activate.bindWithEvent(this, "NESW")
            }
        }).injectInside(this.wrapper);
        this.handles = new Hash();
        ["N", "NE", "E", "SE", "S", "SW", "W", "NW"].each(function (c) {
            this.handles.set(c, new Element("div", {
                styles: {
                    position: "absolute",
                    "background-color": b.handleColor,
                    width: b.handleWidth,
                    height: b.handleHeight,
                    overflow: "hidden",
                    cursor: (c.toLowerCase() + "-resize")
                },
                events: {
                    mousedown: this.activate.bindWithEvent(this, c)
                }
            }).injectInside(this.cropArea))
        },
        this)
    },
    getCropInfo: function () {
        var a = $merge(this.current.crop);
        a.width -= this.boxDiff * 2;
        a.height -= this.boxDiff * 2;
        return a
    },
    removeOverlay: function () {
        this.wrapper.destroy();
        this.img.setStyle("display", "")
    }
});
MooCrop.implement(new Events, new Options);
theObjects = document.getElementsByTagName("object");
for (var i = 0; i < theObjects.length; i++) {
    theObjects[i].outerHTML = theObjects[i].outerHTML
};
Function.prototype.bind = function (b) {
    var c = this,
        a = function () {
        return c.apply(b, arguments)
    };
    return (a)
};
SEMods = function () {};
SEMods.TextAreaControl = function (a) {
    this.obj = a;
    this.obj.style.overflow = "hidden";
    this.originalHeight = this.obj.getStyle("height").toInt();
    var b = this.update.bind(this);
    a.addEvent("focus", this.onFocus.bind(this));
    a.addEvent("blur", this.onBlur.bind(this));
    this.update()
};
SEMods.TextAreaControl.prototype = {
    obj: null,
    updating: false,
    autoGrow: false,
    originalHeight: null,
    shadowElement: null,
    increment: 0,
    timer: null,
    lastLength: 0,
    setAutoGrow: function (a) {
        this.autoGrow = a;
        this.createShadowElement();
        this.update()
    },
    onUpdate: function () {
        if (this.autoGrow && this.lastLength != this.obj.value.length) {
            this.lastLength = this.obj.value.length;
            this.updateShadowElement();
            this.obj.style.height = Math.max(this.originalHeight, this.shadowElement.offsetHeight + this.increment) + "px"
        }
    },
    beginUpdate: function () {
        if (this.updating) {
            return false
        }
        this.updating = true;
        return true
    },
    endUpdate: function () {
        this.updating = false
    },
    update: function () {
        if (!this.beginUpdate()) {
            return
        }
        this.onUpdate();
        this.endUpdate()
    },
    createShadowElement: function () {
        if (this.shadowElement) {
            return
        }
        this.shadowElement = document.createElement("DIV");
        this.shadowElement.style.position = "absolute";
        this.shadowElement.style.top = "-99999px";
        this.shadowElement.style.left = "-99999px";
        document.body.appendChild(this.shadowElement)
    },
    updateShadowElement: function () {
        if (this.shadowElement) {
            text = this.obj.value + "<br>";
            this.shadowElement.innerHTML = text.toString().replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#039;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\n/g, "<br />");
            var b = this.getPXMetrics(this.obj.getStyle("font-size"), 10);
            var a = this.obj.getStyle("line-height");
            if ((/Opera/i.test(navigator.userAgent))) {
                a = this.getPXMetrics(a, 0) + 3 + "px"
            }
            this.increment = b + 10;
            this.shadowElement.style.width = this.obj.offsetWidth + "px";
            this.shadowElement.style.lineHeight = a;
            this.shadowElement.style.fontSize = this.obj.getStyle("font-size");
            this.shadowElement.style.fontFamily = this.obj.getStyle("font-family");
            this.shadowElement.style.paddingLeft = this.obj.getStyle("padding-left");
            this.shadowElement.style.paddingRight = this.obj.getStyle("padding-right")
        }
    },
    onFocus: function () {
        this.timer = setInterval(this.update.bind(this), 500)
    },
    onBlur: function () {
        if (this.timer) {
            clearInterval(this.timer);
            this.timer = null
        }
    },
    getPXMetrics: function (c, b) {
        var a = parseFloat(c);
        if (isNaN(a)) {
            return b != null ? b : a
        }
        return /px/i.test(c) ? a : /pt/i.test(c) ? 1.3333 * a : a
    }
};

function textarea_autogrow(a) {
    var b = $(a);
    if (b && !b._controlled) {
        b._controlled = true;
        new SEMods.TextAreaControl(b).setAutoGrow(true);
        return b.getStyle("height").toInt()
    }
};
if (typeof(bsn) == "undefined") {
    _b = bsn = {}
}
if (typeof(_b.Autosuggest) == "undefined") {
    _b.Autosuggest = {}
} else {
    alert("Autosuggest is already set!")
}
_b.AutoSuggest = function (e, d) {
    if (!document.getElementById) {
        return 0
    }
    this.fld = _b.DOM.gE(e);
    if (!this.fld) {
        return 0
    }
    this.sInp = "";
    this.nInpC = 0;
    this.aSug = [];
    this.iHigh = 0;
    this.oP = d ? d : {};
    var a, b = {
        minchars: 1,
        meth: "get",
        varname: "input",
        className: "autosuggest",
        timeout: 2500,
        delay: 0,
        offsety: -5,
        shownoresults: true,
        noresults: "No results !",
        maxheight: 250,
        cache: true,
        maxentries: 25,
        blurtrigger: false,
        multisuggest: true
    };
    for (a in b) {
        if (typeof(this.oP[a]) != typeof(b[a])) {
            this.oP[a] = b[a]
        }
    }
    var c = this;
    this.fld.onkeypress = function (f) {
        return c.onKeyPress(f)
    };
    this.fld.onkeyup = function (f) {
        return c.onKeyUp(f)
    };
    if (typeof(this.oP.callback) == "function" && this.oP.blurtrigger) {
        this.fld.onblur = function (g) {
            if (document.activeElement && typeof(g) === "undefined") {
                var f = document.activeElement
            } else {
                var f = g.explicitOriginalTarget;
                while (f.parentNode) {
                    if (f.tagName == "A" && typeof(f.id) == "string") {
                        if (f.id.substring(0, 10) == "bsnsuggest") {
                            break
                        }
                    }
                    f = f.parentNode
                }
                if (typeof(f.id) != "string") {
                    f.id = ""
                }
            }
            if (f.id.substring(0, 10) != "bsnsuggest") {
                c.oP.callback({
                    id: c.fld.value,
                    value: c.fld.value
                });
                c.clearSuggestions()
            }
        }
    }
    this.fld.setAttribute("autocomplete", "off")
};
_b.AutoSuggest.prototype.onKeyPress = function (f) {
    var e = (window.event) ? window.event.keyCode : f.keyCode;
    var d = 13;
    var c = 9;
    var g = 27;
    var b = 186;
    var a = 1;
    switch (e) {
    case d:
        if (this.aSug.length != 0 && this.iHigh) {
            this.setHighlightedValue();
            a = false
        } else {
            if (this.fld.value.length > 0) {
                if (typeof(this.oP.callback) == "function") {
                    this.clearSuggestions();
                    this.oP.callback({
                        id: this.fld.value,
                        value: this.fld.value
                    })
                }
                a = false
            } else {
                a = false
            }
        }
        break;
    case g:
        this.clearSuggestions();
        break
    }
    return a
};
_b.AutoSuggest.prototype.onKeyUp = function (f) {
    var d = (window.event) ? window.event.keyCode : f.keyCode;
    var c = 38;
    var e = 40;
    var a = 1;
    switch (d) {
    case c:
        this.changeHighlight(d);
        a = 0;
        break;
    case e:
        this.changeHighlight(d);
        a = 0;
        break;
    default:
        var b = this.fld.value.split(/[;]+/ig);
        this.getSuggestions(b[b.length - 1])
    }
    return a
};
_b.AutoSuggest.prototype.getSuggestions = function (g) {
    if (g == this.sInp) {
        return 0
    }
    _b.DOM.remE(this.idAs);
    this.sInp = g;
    if (g.length < this.oP.minchars) {
        this.aSug = [];
        this.nInpC = g.length;
        return 0
    }
    var d = this.nInpC;
    this.nInpC = g.length ? g.length : 0;
    var b = this.aSug.length;
    if (this.nInpC > d && b && b < this.oP.maxentries && this.oP.cache) {
        var a = [];
        for (var e = 0; e < b; e++) {
            if (this.aSug[e].value.substr(0, g.length).toLowerCase() == g.toLowerCase() || this.aSug[e].info.substr(0, g.length).toLowerCase() == g.toLowerCase()) {
                a.push(this.aSug[e])
            }
        }
        this.aSug = a;
        if (this.aSug.length < b) {
            var f = this;
            var c = this.sInp;
            clearTimeout(this.ajID);
            this.ajID = setTimeout(function () {
                f.doAjaxRequest(c)
            },
            this.oP.delay)
        } else {
            this.createList(this.aSug)
        }
        return false
    } else {
        var f = this;
        var c = this.sInp;
        clearTimeout(this.ajID);
        this.ajID = setTimeout(function () {
            f.doAjaxRequest(c)
        },
        this.oP.delay)
    }
    return false
};
_b.AutoSuggest.prototype.doAjaxRequest = function (c) {
    var e = this.fld.value.split(/[;]+/ig);
    if (c != e[e.length - 1]) {
        return false
    }
    var h = this;
    if (typeof(this.oP.script) == "function") {
        var d = this.oP.script(encodeURIComponent(this.sInp))
    } else {
        var d = this.oP.script + this.oP.varname + "=" + encodeURIComponent(this.sInp)
    }
    if (!d) {
        return false
    }
    var b = this.oP.meth;
    var c = this.sInp;
    var a = function (i) {
        h.setSuggestions(i, c)
    };
    var f = function (i) {};
    var g = new _b.Ajax();
    g.makeRequest(d, b, a, f)
};
_b.AutoSuggest.prototype.setSuggestions = function (req, input) {
    var new_value = this.fld.value.split(/[;]+/ig);
    if (input != new_value[new_value.length - 1]) {
        return false
    }
    this.aSug = [];
    if (this.oP.json) {
        var jsondata = eval("(" + req.responseText + ")");
        for (var i = 0; i < jsondata.results.length; i++) {
            this.aSug.push({
                id: jsondata.results[i].id,
                value: jsondata.results[i].value,
                info: jsondata.results[i].info,
                photo: jsondata.results[i].photo,
                photo_width: jsondata.results[i].photo_width
            })
        }
    } else {
        var xml = req.responseXML;
        var results = xml.getElementsByTagName("results")[0].childNodes;
        for (var i = 0; i < results.length; i++) {
            if (results[i].hasChildNodes()) {
                this.aSug.push({
                    id: results[i].getAttribute("id"),
                    value: results[i].childNodes[0].nodeValue,
                    info: results[i].getAttribute("info")
                })
            }
        }
    }
    this.idAs = "as_" + this.fld.id;
    this.createList(this.aSug)
};
_b.AutoSuggest.prototype.createList = function (b) {
    var r = this;
    _b.DOM.remE(this.idAs);
    this.killTimeout();
    if (b.length == 0 && !this.oP.shownoresults) {
        return false
    }
    var m = _b.DOM.cE("div", {
        id: this.idAs,
        className: this.oP.className
    });
    var e = _b.DOM.cE("div", {
        className: "as_corner"
    });
    var h = _b.DOM.cE("div", {
        className: "as_bar"
    });
    var t = _b.DOM.cE("div", {
        className: "as_header"
    });
    t.appendChild(e);
    t.appendChild(h);
    m.appendChild(t);
    var l = _b.DOM.cE("ul", {
        id: "as_ul"
    });
    for (var u = 0; u < b.length; u++) {
        var z = b[u].value;
        var x = b[u].info;
        var q = z.toLowerCase().indexOf(this.sInp.toLowerCase());
        var c = x.toLowerCase().indexOf(this.sInp.toLowerCase());
        if (q != -1) {
            var j = z.substring(0, q) + "<em>" + z.substring(q, q + this.sInp.length) + "</em>" + z.substring(q + this.sInp.length);
            var p = x
        } else {
            var j = z;
            var p = x.substring(0, c) + "<em>" + x.substring(q, c + this.sInp.length) + "</em>" + x.substring(c + this.sInp.length)
        }
        if (z != x) {
            //j = p + " (" + j + ")";
            j = p;
        }
        var s = _b.DOM.cE("span", {},
        j, true);
        var n = _b.DOM.cE("img", {
            src: b[u].photo,
            width: b[u].photo_width,
            border: "0"
        });
        n.removeAttribute("height");
        s.insertBefore(n, s.childNodes[0]);
        var w = _b.DOM.cE("a", {
            href: "javascript:void(0);"
        });
        var f = _b.DOM.cE("span", {
            className: "tl"
        },
        " ");
        var d = _b.DOM.cE("span", {
            className: "tr"
        },
        " ");
        w.appendChild(f);
        w.appendChild(d);
        w.appendChild(s);
        w.name = u + 1;
        w.id = "bsnsuggest_" + (u + 1);
        w.onclick = function () {
            r.setHighlightedValue();
            return false
        };
        w.onmouseover = function () {
            r.setHighlight(this.name)
        };
        var k = _b.DOM.cE("li", {},
        w);
        l.appendChild(k)
    }
    if (b.length == 0 && this.oP.shownoresults) {
        var k = _b.DOM.cE("li", {
            className: "as_warning"
        },
        this.oP.noresults);
        l.appendChild(k)
    }
    m.appendChild(l);
    var v = _b.DOM.cE("div", {
        className: "as_corner"
    });
    var y = _b.DOM.cE("div", {
        className: "as_bar"
    });
    var o = _b.DOM.cE("div", {
        className: "as_footer"
    });
    o.appendChild(v);
    o.appendChild(y);
    m.appendChild(o);
    var g = _b.DOM.getPos(this.fld);
    m.style.left = g.x + "px";
    m.style.top = (g.y + this.fld.offsetHeight + this.oP.offsety) + "px";
    m.style.width = this.fld.offsetWidth + "px";
    m.onmouseover = function () {
        r.killTimeout()
    };
    m.onmouseout = function () {
        r.resetTimeout()
    };
    document.getElementsByTagName("body")[0].appendChild(m);
    this.iHigh = 0;
    var r = this;
    this.toID = setTimeout(function () {
        r.clearSuggestions()
    },
    this.oP.timeout)
};
_b.AutoSuggest.prototype.changeHighlight = function (a) {
    var b = _b.DOM.gE("as_ul");
    if (!b) {
        return false
    }
    var c;
    if (a == 40) {
        c = this.iHigh + 1
    } else {
        if (a == 38) {
            c = this.iHigh - 1
        }
    }
    if (c > b.childNodes.length) {
        c = b.childNodes.length
    }
    if (c < 1) {
        c = 1
    }
    this.setHighlight(c)
};
_b.AutoSuggest.prototype.setHighlight = function (b) {
    var a = _b.DOM.gE("as_ul");
    if (!a) {
        return false
    }
    if (this.iHigh > 0) {
        this.clearHighlight()
    }
    this.iHigh = Number(b);
    a.childNodes[this.iHigh - 1].className = "as_highlight";
    this.killTimeout()
};
_b.AutoSuggest.prototype.clearHighlight = function () {
    var a = _b.DOM.gE("as_ul");
    if (!a) {
        return false
    }
    if (this.iHigh > 0) {
        a.childNodes[this.iHigh - 1].className = "";
        this.iHigh = 0
    }
};
_b.AutoSuggest.prototype.setHighlightedValue = function () {
    if (this.iHigh) {
        var a = this.fld.value.split(/[;]+/ig);
        var Io = this.aSug[this.iHigh - 1];
        a.pop();
        a.push(Io.info);
        if (this.oP.multisuggest) {
            var b = ";"
        } else {
            var b = ""
        }
        this.sInp = this.fld.value = a.join(";") + b;
        this.fld.focus();
        if (this.fld.selectionStart) {
            this.fld.setSelectionRange(this.sInp.length, this.sInp.length)
        }
        if (typeof(this.oP.callback) == "function") {
            this.oP.callback(this.aSug[this.iHigh - 1])
        }
        this.clearSuggestions()
    }
};
_b.AutoSuggest.prototype.killTimeout = function () {
    clearTimeout(this.toID)
};
_b.AutoSuggest.prototype.resetTimeout = function () {
    clearTimeout(this.toID);
    var a = this;
    this.toID = setTimeout(function () {
        a.clearSuggestions()
    },
    1000)
};
_b.AutoSuggest.prototype.clearSuggestions = function () {
    this.killTimeout();
    this.aSug = [];
    var a = _b.DOM.gE(this.idAs);
    var c = this;
    if (a) {
        var b = new _b.Fader(a, 1, 0, 250, function () {
            _b.DOM.remE(c.idAs)
        })
    }
};
if (typeof(_b.Ajax) == "undefined") {
    _b.Ajax = {}
}
_b.Ajax = function () {
    this.req = {};
    this.isIE = false
};
_b.Ajax.prototype.makeRequest = function (c, b, a, d) {
    if (b != "POST") {
        b = "GET"
    }
    this.onComplete = a;
    this.onError = d;
    var e = this;
    if (window.XMLHttpRequest) {
        this.req = new XMLHttpRequest();
        this.req.onreadystatechange = function () {
            e.processReqChange()
        };
        this.req.open("GET", c, true);
        this.req.send(null)
    } else {
        if (window.ActiveXObject) {
            this.req = new ActiveXObject("Microsoft.XMLHTTP");
            if (this.req) {
                this.req.onreadystatechange = function () {
                    e.processReqChange()
                };
                this.req.open(b, c, true);
                this.req.send()
            }
        }
    }
};
_b.Ajax.prototype.processReqChange = function () {
    if (this.req.readyState == 4) {
        if (this.req.status == 200) {
            this.onComplete(this.req)
        } else {
            this.onError(this.req.status)
        }
    }
};
if (typeof(_b.DOM) == "undefined") {
    _b.DOM = {}
}
_b.DOM.cE = function (g, c, b, f) {
    var h = document.createElement(g);
    if (!h) {
        return 0
    }
    for (var d in c) {
        h[d] = c[d]
    }
    var e = typeof(b);
    if (e == "string" && !f) {
        h.appendChild(document.createTextNode(b))
    } else {
        if (e == "string" && f) {
            h.innerHTML = b
        } else {
            if (e == "object") {
                h.appendChild(b)
            }
        }
    }
    return h
};
_b.DOM.gE = function (c) {
    var a = typeof(c);
    if (a == "undefined") {
        return 0
    } else {
        if (a == "string") {
            var b = document.getElementById(c);
            if (!b) {
                return 0
            } else {
                if (typeof(b.appendChild) != "undefined") {
                    return b
                } else {
                    return 0
                }
            }
        } else {
            if (typeof(c.appendChild) != "undefined") {
                return c
            } else {
                return 0
            }
        }
    }
};
_b.DOM.remE = function (a) {
    var b = this.gE(a);
    if (!b) {
        return 0
    } else {
        if (b.parentNode.removeChild(b)) {
            return true
        } else {
            return 0
        }
    }
};
_b.DOM.getPos = function (c) {
    var c = this.gE(c);
    var b = c;
    var d = 0;
    if (b.offsetParent) {
        while (b.offsetParent) {
            d += b.offsetLeft;
            b = b.offsetParent
        }
    } else {
        if (b.x) {
            d += b.x
        }
    }
    var b = c;
    var a = 0;
    if (b.offsetParent) {
        while (b.offsetParent) {
            a += b.offsetTop;
            b = b.offsetParent
        }
    } else {
        if (b.y) {
            a += b.y
        }
    }
    return {
        x: d,
        y: a
    }
};
if (typeof(_b.Fader) == "undefined") {
    _b.Fader = {}
}
_b.Fader = function (b, f, e, a, d) {
    if (!b) {
        return 0
    }
    this.e = b;
    this.from = f;
    this.to = e;
    this.cb = d;
    this.nDur = a;
    this.nInt = 50;
    this.nTime = 0;
    var c = this;
    this.nID = setInterval(function () {
        c._fade()
    },
    this.nInt)
};
_b.Fader.prototype._fade = function () {
    this.nTime += this.nInt;
    var a = Math.round(this._tween(this.nTime, this.from, this.to, this.nDur) * 100);
    var c = a / 100;
    if (this.e.filters) {
        try {
            this.e.filters.item("DXImageTransform.Microsoft.Alpha").opacity = a
        } catch(b) {
            this.e.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + a + ")"
        }
    } else {
        this.e.style.opacity = c
    }
    if (this.nTime == this.nDur) {
        clearInterval(this.nID);
        if (this.cb != undefined) {
            this.cb()
        }
    }
};
_b.Fader.prototype._tween = function (e, a, g, f) {
    return a + ((g - a) * (e / f))
};
TB_WIDTH = 0;
TB_HEIGHT = 0;
var TB_doneOnce = 0;
var TB_ready = false;
var TB_useReady = true;
var TB_Window_Frame = null;
var TB_Window_Loading = null;

function TB_init() {
    TB_ready = true;
    $$("a.smoothbox").each(function (a) {
        a.onclick = TB_bind
    })
}
window.addEvent("domready", TB_init);

function TB_bind(b) {
    if (TB_useReady && !TB_ready) {
        return
    }
    var b = new Event(b);
    b.preventDefault();
    this.blur();
    var a = this.title || this.name || "";
    var c = this.rel || false;
    TB_show(a, this.href, c);
    this.onclick = TB_bind;
    return false
}
//IE7 frames put a shit on my beautifull onload close, had to create the stupid global function
function TB_Window_Frame_Loaded(){
    if(TB_Window_Frame) TB_Window_Frame.setStyle('display', '');
    if(TB_Window_Loading) TB_Window_Loading.dispose();
};
function TB_show(j, b, k, e, h) {
    if (TB_useReady && !TB_ready) {
        return
    }
    if (!h) {
        h = 0
    }
    if (!$("TB_overlay")) {
        (new Element("div").setProperty("id", "TB_overlay")).inject($("smoothbox_container") || document.body);
        $("TB_overlay").setOpacity(0.6);
        TB_overlaySize()
    }
    if (!$("TB_window")) {
        (new Element("div").setProperty("id", "TB_window")).inject($("smoothbox_container") || document.body);
        $("TB_window").setOpacity(0)
    } else {
        $("TB_window").destroy();
        (new Element("div").setProperty("id", "TB_window")).inject($("smoothbox_container") || document.body);
        $("TB_window").setOpacity(0)
    }
    if (h == 0) {
        $("TB_overlay").onclick = TB_remove
    } else {
        $("TB_overlay").onclick = ""
    }
    //window.onscroll = TB_position;
    var c = b.match(/(.+)?/)[1] || b;
    var a = b.match(/\?(.+)/)[1];
    var f = TB_parseQuery(a);
    TB_WIDTH = (f.width * 1) + 30;
    TB_HEIGHT = (f.height * 1) + 40;
    var d = TB_WIDTH - 30,
        i = TB_HEIGHT - 45;
    if (b.indexOf("TB_iframe") != -1) {
        urlNoQuery = b.split("TB_");
        $("TB_window").innerHTML = "<div id='TB_title'><div id='TB_ajaxWindowTitle'>" + j + "</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>X</a></div></div><iframe frameborder='0' hspace='0' src='" + urlNoQuery[0] + "&in_smoothbox=true' id='TB_iframeContent' name='TB_iframeContent' scrolling='auto' style='width:" + (d + 29) + "px;height:" + (i - 50) + "px;' onload='TB_Window_Frame_Loaded()'> </iframe>"
        TB_Window_Frame = $("TB_window").getElementById('TB_iframeContent').setStyle('display', 'none');
        TB_Window_Loading = new Element('div').set('html', '<div style="clear:both; float:none; margin:10px; text-align:center">Loading...</div>').injectBefore(TB_Window_Frame);
    } else {
        $("TB_window").innerHTML = "<div id='TB_title'><div id='TB_ajaxWindowTitle'>" + j + "</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>X</a></div></div><div id='TB_ajaxContent' style='width:" + d + "px;'></div>"
    }
    $("TB_closeWindowButton").onclick = TB_remove;
    if (b.indexOf("TB_inline") != -1) {
        $("TB_ajaxContent").innerHTML = ($(f.inlineId).innerHTML);
        TB_position();
        //TB_showWindow()
    } else {
        if (b.indexOf("TB_iframe") != -1) {
            TB_position();
            if (frames.TB_iframeContent == undefined) {
                $(document).keyup(function (m) {
                    var l = m.keyCode;
                    if (l == 27) {
                        TB_remove()
                    }
                });
                //TB_showWindow()
            }
        } else {
            var g = function () {
                TB_position();
                //TB_showWindow()
            };
            new Request.HTML({
                method: "get",
                update: $("TB_ajaxContent"),
                onComplete: g
            }).get(b)
        }
    }
    TB_showWindow();
    window.onresize = function () {
        TB_position();
        TB_overlaySize()
    };
    document.onkeyup = function (l) {
        var l = new Event(l);
        if (l.code == 27) {
            TB_remove()
        }
    }
}
function TB_showWindow() {
    if (TB_useReady && !TB_ready) {
        return
    }
    if (TB_doneOnce == 0) {
        TB_doneOnce = 1;
        $("TB_window").set("tween", {
            duration: 250
        });
        $("TB_window").tween("opacity", 0, 1)
    } else {
        $("TB_window").setStyle("opacity", 1)
    }
}
function TB_remove() {
    if (TB_useReady && !TB_ready) {
        return
    }
    $("TB_overlay").onclick = null;
    document.onkeyup = null;
    document.onkeydown = null;
    if ($("TB_closeWindowButton")) {
        $("TB_closeWindowButton").onclick = null
    }
    $("TB_window").set("tween", {
        duration: 250,
        onComplete: function () {
            $("TB_window").destroy()
        }
    });
    $("TB_window").tween("opacity", 1, 0);
    $("TB_overlay").set("tween", {
        duration: 400,
        onComplete: function () {
            $("TB_overlay").destroy()
        }
    });
    $("TB_overlay").tween("opacity", 0.6, 0);
    window.onscroll = null;
    window.onresize = null;
    TB_init();
    TB_doneOnce = 0;
    return false
}
function TB_position() {
    if (TB_useReady && !TB_ready) {
        return
    }
    $("TB_window").set("morph", {
        duration: 75
    });
    $("TB_window").morph({
        width: TB_WIDTH + "px",
        left: (window.getScrollLeft() + (window.getWidth() - TB_WIDTH) / 2) + "px",
        top: (window.getScrollTop() + (window.getHeight() - TB_HEIGHT) / 2) + "px"
    })
}
function TB_overlaySize() {
    if (TB_useReady && !TB_ready) {
        return
    }
    $("TB_overlay").setStyles({
        height: "0px",
        width: "0px"
    });
    $("TB_overlay").setStyles({
        height: window.getScrollHeight() + "px",
        width: window.getScrollWidth() + "px"
    })
}
function TB_parseQuery(c) {
    if (TB_useReady && !TB_ready) {
        return
    }
    if (!c) {
        return {}
    }
    var e = {};
    var b = c.split(/[;&]/);
    for (var a = 0; a < b.length; a++) {
        var d = b[a].split("=");
        if (!d || d.length != 2) {
            continue
        }
        e[unescape(d[0])] = unescape(d[1]).replace(/\+/g, " ")
    }
    return e
};

function str_repeat(b, a) {
    for (var c = []; a > 0; c[--a] = b) {}
    return (c.join(""))
}
function sprintf() {
    var g = 0,
        e, h = arguments[g++],
        k = [],
        d, j, l, b;
    while (h) {
        if (d = /^[^\x25]+/.exec(h)) {
            k.push(d[0])
        } else {
            if (d = /^\x25{2}/.exec(h)) {
                k.push("%")
            } else {
                if (d = /^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(h)) {
                    if (((e = arguments[d[1] || g++]) == null) || (e == undefined)) {
                        throw ("Too few arguments.")
                    }
                    if (/[^s]/.test(d[7]) && (typeof(e) != "number")) {
                        throw ("Expecting number but found " + typeof(e))
                    }
                    switch (d[7]) {
                    case "b":
                        e = e.toString(2);
                        break;
                    case "c":
                        e = String.fromCharCode(e);
                        break;
                    case "d":
                        e = parseInt(e);
                        break;
                    case "e":
                        e = d[6] ? e.toExponential(d[6]) : e.toExponential();
                        break;
                    case "f":
                        e = d[6] ? parseFloat(e).toFixed(d[6]) : parseFloat(e);
                        break;
                    case "o":
                        e = e.toString(8);
                        break;
                    case "s":
                        e = ((e = String(e)) && d[6] ? e.substring(0, d[6]) : e);
                        break;
                    case "u":
                        e = Math.abs(e);
                        break;
                    case "x":
                        e = e.toString(16);
                        break;
                    case "X":
                        e = e.toString(16).toUpperCase();
                        break
                    }
                    e = (/[def]/.test(d[7]) && d[2] && e > 0 ? "+" + e : e);
                    l = d[3] ? d[3] == "0" ? "0" : d[3].charAt(1) : " ";
                    b = d[5] - String(e).length;
                    j = d[5] ? str_repeat(l, b) : "";
                    k.push(d[4] ? e + j : j + e)
                } else {
                    throw ("Huh ?!")
                }
            }
        }
        h = h.substring(d[0].length)
    }
    return k.join("")
};
/* end ../include/js/core-min.js */

/* start ../include/js/searchautocomplete.js */
/*
 * Search autocomplete singleton class
 */
var CSearchAutoComplete = function(_Id, _CatServices){
    var self = this;
    var _MaxRes = 20; //better [number of sections]*x
    var _SB = null;
    var _Pop = null;
    var _Url = '/ajaxcall/search';
    var _Blocks = {};
    var _Links = {};
    var _Order = ['Bt', 'CtSv', 'Bl', 'Be'];
    var _LinksStack = [];
    var _Last = null;
    var _ActLink = -1;
    var _skipHide = false;
    var _Call = null;
    var _LastSearch = null;
    var _Delay = false;
    var _ReSearchDelay = 700;

    var _init = function(){
        _SB = jQuery('#'+_Id);
        _Pop = _SB.find('.j-drop-search').click(function(){_skipHide = true;});
        _Blocks.Loading = _SB.find('.qs_loading');
        _Blocks.NoRes = _SB.find('.qs_nores');
        _Blocks.Be = _SB.find('.qs_bets');
        _Blocks.Be.a = _Blocks.Be.find('.qs_bets_a');
        _Blocks.Be.ul = _Blocks.Be.find('.qs_bets_ul');
        _Blocks.Bt = _SB.find('.qs_prof');
        _Blocks.Bt.a = _Blocks.Bt.find('.qs_prof_a');
        _Blocks.Bt.ul = _Blocks.Bt.find('.qs_prof_ul');
        _Blocks.Bl = _SB.find('.qs_blogs');
        _Blocks.Bl.a = _Blocks.Bl.find('.qs_blogs');
        _Blocks.Bl.ul = _Blocks.Bl.find('.qs_blogs_ul');
        _Blocks.CtSv = _SB.find('.qs_serv');
        _Blocks.CtSv.a = _Blocks.CtSv.find('.qs_serv_a');
        _Blocks.CtSv.ul = _Blocks.CtSv.find('.qs_serv_ul');
        _SB.find('.j-lnk-results').click(function(){ _SB.find('form').submit(); return false; });
        _SB.find('.j-search-inpt').keypress(_trapKeys).keyup(_key).click(function(){_skipHide = true;});
        jQuery(document).click(_hide);
    };
    var _processData = function(Data){
        Data = eval('Data='+Data);
        var Be = Data.betterees;
        var Bt = Data.betterists;
        var Bl = Data.blogs;
        var Ct = Data.categories;
        var Sv = Data.services;
        //combine categories and services
        var CtSv = [];
        CtSv.find = function(Id, Obj){
            for(var I=0; I<this.length; I++){
                if(this[I].Id && this[I].Id == Id) return this[I];
            }
            this.push(Obj);
            return Obj;
        };
        if(Ct){
            for(var I=0; I<Ct.length; I++){
                CtSv.find(Ct[I].user_id, {Id: Ct[I].user_id, Title: Ct[I].user_displayname, Url: Ct[I].profile_url, Services: Ct[I].services});//[]
            }
        }
        /*if(Sv){
            for(I=0; I<Sv.length; I++){
                var C = CtSv.find(Sv[I].category_id, {Id: Sv[I].category_id, Title: Sv[I].category, Url: Sv[I].category_url, Services: []});
                C.Services.push(Sv[I]);
            }
        }*/
        CtSv.totall = CtSv.length;
        for(I=0; I<CtSv.length; I++){
            CtSv.totall = CtSv.totall+CtSv[I].Services.length;
        }
        var Ttls = [
            ['Be', Be, Be?Be.length*2:0], //double space for Betteree
            ['Bt', Bt, Bt?Bt.length*2:0], //double space for Betterist
            ['Bl', Bl, Bl?Bl.length:0],
            ['CtSv', CtSv, CtSv.totall]
        ];
        var All = 0;
        for(I=0; I<Ttls.length; I++){
            All+= Ttls[2];
        }
        if(!All){
            _hide();
            return;
        }
        Ttls.sort(function(a, b){return (a[2] > b[2]?1:-1)});
        var TM = Math.floor(_MaxRes/4);
        var Extra = 0;
        for(I=0; I<Ttls.length; I++){
            if(Ttls[I][2]<=TM){
                Extra = Extra + TM - Ttls[I][2];
                Ttls[I][3] = Ttls[I][2];
            }
            else{
                var ToAdd = Math.floor(Extra/(5-I));
                var Add = (Ttls[I][2]<(TM+ToAdd)?Ttls[I][2]-TM:ToAdd)
                Ttls[I][3] = TM+Add;
                Extra-= Add;
            }
            if(Ttls[I][0]=='Be' || Ttls[I][0]=='Bt'){ //back to real number of items not the space they take
                Ttls[I][3] = Math.round(Ttls[I][3]/2);
            }
            _render(Ttls[I][0], Ttls[I][1], Ttls[I][3]);
        }
        _setLastLine();
        _stackLinks();
        _show();
        _Blocks.NoRes.css('display', _LinksStack.length?'none':'block');
    };
    var _clear = function(){
        _ActLink = -1;
        _Links = {Be: [], Bt: [], Bl: [], CtSv: []};
        for(var I=0; I<_Order.length; I++){
            _Blocks[_Order[I]].css("display", "none").ul.html('');
        }
    };
    var _render = function(Type, Data, Length){
        _Blocks.Loading.css('display', 'none');
        if(Length){
            _Blocks[Type].css("display", "block");
        }
        else{
            _Blocks[Type].css("display", "none");
        }
        var SvCount = 0;
        for(var I=0; I<Length; I++){
            if(!Data[I]) break;
            if(Type!='CtSv'){
                var Name = Data[I].user_displayname;
                var Photo = '/images/no_user_pic.jpg';
                var Url = Data[I].profile_url;
                if(Data[I].user_photo){
                    var P = Data[I].user_photo.split('.');
                    P[0]+= '_thumb';
                    Photo = Data[I].dir + P.join('.'); //'/' + 
                }
            }
            if(Type=='Be'){
                _Links.Be.push(jQuery('<li><a class="tl-item" href="'+Url+'">'+
                        '<img height="38" width="37" src="'+Photo+'"/>'+
                        '<span class="tl-head">'+Name+'</span>'+
                        //'<span class="tl-sub">'+Data[I]+'</span>'+
                    '</a></li>').appendTo(_Blocks.Be.ul));
                if(Length) _Blocks.Be.css("display", "block");
            }
            if(Type=='Bt'){
                _Links.Bt.push(jQuery('<li><a class="tl-item" href="'+Url+'">'+
                    '<img height="38" width="37" src="'+Photo+'"/>'+
                    '<span class="tl-head">'+Name+'</span>'+
                    //'<span class="tl-sub">'+Data[I]+'</span>'+
                '</a></li>').appendTo(_Blocks.Bt.ul));
            }
            if(Type=='Bl'){
                _Links.Bl.push(jQuery('<li><a class="l-item" href="'+Data[I].post_url+'">'+Name+'</a></li>').appendTo(_Blocks.Bl.ul));
            }
            if(Type=='CtSv'){
                if(SvCount < Length){
                    var Cat = jQuery('<li><a class="l-item" href="'+Data[I].Url+'">'+Data[I].Title+'</a><ul class="sub-list"></ul></li>').appendTo(_Blocks.CtSv.ul);
                    _Links.CtSv.push(Cat);
                    var Ul = Cat.find('ul');
					
                    for(var J=0; J<Data[I].Services.length; J++){
                        if(SvCount+I >= Length) break;
                        var S = Data[I].Services[J];
                        _Links.CtSv.push(jQuery('<li><a class="l-item" href="/category/'+S.cat_slug+'">'+S.name+'</a></li>').appendTo(Ul));
                        SvCount++;
                    }
                }
            }
        }
    };
    var _setLastLine = function(){
        if(_Last){
            _Last.removeClass('last-item');
        }
        for(var I=_Order.length-1; I>=0; I--){
            if(_Links[_Order[I]].length){
                _Blocks[_Order[I]].addClass('last-item');
                return;
            }
        }
    };
    var _stackLinks = function(){
        _LinksStack = [];
        for(var I=0; I<_Order.length; I++){
            if(_Links[_Order[I]] && _Links[_Order[I]].length){
                for(var J=0; J<_Links[_Order[I]].length; J++){
                    _LinksStack.push(_Links[_Order[I]][J]);
                }
            }
        }
    };
    var _key = function(E){
        var Min = 1;
        var V = this.value;
        if(E.keyCode == '13' && _LinksStack[_ActLink]){ //enter
            window.location.href = _LinksStack[_ActLink].find('a').attr('href');
            return true;
        }
        var hoverup = function(I){
            if(_LinksStack[I]){
                if(_LinksStack[_ActLink]){
                    _LinksStack[_ActLink].removeClass('hover');
                }
                _LinksStack[I].addClass('hover');
                _ActLink = I;
            }
            else if(I==-1){
                _LinksStack[_ActLink].removeClass('hover');
                _ActLink = -1;
            }
            return true;
        }
        if(E.keyCode == '38'){ //up
            return hoverup(_ActLink-1);
        }
        if(E.keyCode == '40'){ //down
            return hoverup(_ActLink+1);
        }
        if(V.length >= Min){ //results to min of 2
            window.clearTimeout(_Delay);
            _Delay = window.setTimeout(function(){
                self.search(V);
            }, _ReSearchDelay);
        }
        return true;
    };
    var _trapKeys = function(E){
        if(E.keyCode == '13' && _ActLink>-1){ //enter
            return false;
        }
        return true;
    };
    var _heightUpA = function(){
        for(var I=0; I<_Order.length; I++){
            var B = _Blocks[_Order[I]];
            B.a.height(B.ul.height()-(parseInt(B.a.css("padding-top"))+parseInt(B.a.css("padding-bottom")))-4);
        }
    };
    var _show = function(){
        _SB.addClass("search-drop-active");
        _Pop.fadeIn(200, _heightUpA);
    };
    var _hide = function(){
        if(_skipHide){
            _skipHide = false;
            return;
        }
        _SB.removeClass("search-drop-active");
        _Pop.fadeOut(200);
    };
    
    this.search = function(Str){
        if(!Str || _LastSearch==Str)
            return;
        _Blocks.Be.a.attr("href", "#");
        _Blocks.Bt.a.attr("href", "./search.php?task=dosearch&search_text="+Str+"&t=0");
        _Blocks.Bl.a.attr("href", "#");
        _Blocks.CtSv.a.attr("href", "#");
        if(_Call){
            _Call.abort();
        }
        _clear();
        _show();
        _Blocks.NoRes.css('display', 'none');
        _Blocks.Loading.css('display', 'block');
        _LastSearch = Str;
        var Data = {'term': Str, 'srvcat': 1, 'operation': (_CatServices?'catservs':'')};
        _Call = jQuery.ajax({type: "GET", url: _Url, cache:false, data: Data, success: _processData});
    };
    jQuery(document).ready(_init);
};

var SearchAutoCompleteBar = new CSearchAutoComplete('j_search_form');
/* end ../include/js/searchautocomplete.js */

/* start ../include/js/CNotifications.js */

var CNotifications = function(){
    var self = this;
    var _Counters = null;
    var _Blocks = null;
    var _Period = 60*1000;
    var _MaxInBlock = 7;
    var _InDismiss = {};

    var _init = function(){
        _Counters = jQuery('.cnote_counter');
        _Blocks = jQuery('.cnote_block');
        _initNotes();
        self.refresh();
        window.setInterval(function(){self.refresh()}, _Period);
    };
    var _process = function(Data){
        _updateCounters(Data.length);
        if(_Blocks.length){
            var Html = '<ul>';
            for(var I=0; I<(Data.length>_MaxInBlock?_MaxInBlock:Data.length); I++){
                Html+= '<li><a class="note_kill" href="#" title="delete notification" data-id="';
                Html+= Data[I].notify_id+'"></a>'+Data[I].html+'</li>';
            }
            Html+= '</ul>';
        }
        for(I=0; I<_Blocks.length; I++){
            _Blocks.eq(I).html(Html).find('.note_kill').click(function(){
                var A = jQuery(this);
                var succ = function(){
                    A.parent().remove();
                    self.refresh();
                };
                var fail = function(Err){
                    A.removeClass('ajax');
                    if(Err) alert(Err);
                };
                A.addClass('ajax');
                self.dissmiss(A.attr('data-id'), succ, fail);
            });
        }
    };
    var _load = function(){
        var onUpdate = function(Data){
            try{eval('Data='+Data);}catch(e){
                if(IsLoggedIn) window.location = '/home.php?logoutpp=true';
            }
            _process(Data);
        };
        jQuery.post("/ajaxcall/get_notifies", {}, onUpdate);
    };
    var _updateCounters = function(Total){
        if(Total) _Counters.html(Total).removeClass('none');
        else _Counters.html('').addClass('none');
    };
    var _initNotes = function(){
        var Notes = jQuery('.notification_item');
        Notes.each(function(){
            var Nt = jQuery(this);
            var Lnk = Nt.find('.note_hide_lnk');
            if(Lnk.length){ //skip notes without Hide
                Lnk.click(function(){
                    self.dissmiss(jQuery(this).attr('data-id'), Nt, Lnk);
                });
            }
        });
    };

    this.refresh = function(){
        _load();
    };
    this.dissmiss = function(Id, Note, Link){
        if(!Id || _InDismiss[Id]) return;
        var Pos = Note.offset();
        var Ico = jQuery('<img src="/images/_bf_custom/ajax-loader.gif"/>');
        Ico.css({position: 'absolute', left: Pos.left-20, top: Pos.top+20}).appendTo(document.body);
        var onUpdate = function(Data){
            Ico.remove();
            _InDismiss[Id] = false;
            try{eval('Data='+Data)}catch(e){};
            if(Data.status){
                Link.closest('.usermenu').remove();
                var Block = Note.parent();
                var Page = Block.parent();
                Note.remove();
                if(!Block.find('.notification_item').length) Block.remove();
                if(!Page.find('.notification_item_hold').length){
                    jQuery('#j_no_notifications').show().prev('.generic-content-page').hide();
                }
                _load();
            }
            else{}
        };
        jQuery.post("ajaxcall/del_notify", {'nid': Id}, onUpdate);
        _InDismiss[Id] = true;
    }

    jQuery(_init);
}

var G_Notifications = new CNotifications();

/* end ../include/js/CNotifications.js */

/* start ../include/js/CBfTip.js */
/*
 * Class for betterfly 
 */
CBfTip = function(Obj){
    var self = this;
    this.Block = Obj;
    this.CurTip = null;
    this.Tips = [];

    var _init = function(){
        if(!Obj.length) return;
        self.Tips = Obj.find('.j_tip');
        if(!self.Tips.length) throw 'BfTip box has no tips.';
        var StartTip = self.Tips.filter('.active');
        self.Block.find('.closer').click( function(){self.close()} );
        self.Block.find('.j_next').click( function(){self.next()} );
        self.Block.find('.j_prev').click( function(){self.prev()} );
        self.show(StartTip.length?StartTip:null);
    };
    var _find = function(Num, returnIndex){
        for(var I=0; I<self.Tips.length; I++){
            if(self.Tips.eq(I).attr('data') == Num) return returnIndex?I:self.Tips.eq(I);
        }
        return null;
    };

    this.close = function(){
        this.Block.fadeOut(200);
        if(typeof this.onClose == 'function') this.onClose();
		document.cookie = "no_tips=1;expires=0";
    };
    this.show = function(Tip){
        if(this.Block.is(':hidden')) this.Block.fadeIn(200);
        if(!Tip) Tip = this.Tips.eq(0);
        if(typeof Tip != 'object') Tip = _find(Tip);
        if(Tip){
            var display = function(){
                Tip.fadeIn(100);
                self.CurTip = Tip;
            };
            if(this.CurTip) this.CurTip.fadeOut(100, display);
            else display();
        }
    };
    this.next = function(){
        var Ind = _find(this.CurTip.attr('data'), true);
        if(this.Tips[Ind+1]) this.show(this.Tips.eq(Ind+1));
        else this.show(this.Tips.eq(0));
    };
    this.prev = function(){
        var Ind = _find(this.CurTip.attr('data'), true);
        if(Ind && this.Tips[Ind-1]) this.show(this.Tips.eq(Ind-1));
        else this.show(this.Tips.eq(this.Tips.length-1));
    };
    this.load = function(){
        //jQuery.post( ... );
    };

    _init();
};
/* end ../include/js/CBfTip.js */

/* start ../include/js/_BetterflyJSNN.js */
var BetterflyJSNN = {};

BetterflyJSNN.base = {
    ajaxUrl : "/ajaxcall/misc"
}

BetterflyJSNN.utils = {
    openRegister: function(){
        if(typeof(showRegisterDialog)=='function'){
            showRegisterDialog();
            return false;
        }
        return true;
    },
    forceRefresh : function(tab, sec, pane, username){

        tab = (typeof tab === 'undefined') ? '' : tab ;
        sec = (typeof sec === 'undefined') ? '' : sec ;
        pane = (typeof pane === 'undefined') ? '' : pane ;
		
        //var se_user = (BetterflyJSX.Owner.user_exists) ? '?user=' + BetterflyJSX.Owner.user_info.user_username : '?user=' + BetterflyJSX.Viewer.user_info.user_username ;
        var se_user = (BetterflyJSX.Owner.user_exists) ? BetterflyJSX.Owner.user_info.user_username : BetterflyJSX.Viewer.user_info.user_username ;
        username = username || se_user;
		
        var query = '?user=' + username;
		
        if( tab !== "" ) query += '&v='+tab;
        if( pane !== "" ) query += '&pane='+pane;
        if( sec !== "" ) query += '&sec='+sec;

        if (document.location.pathname.search(/user_settings/i) !== -1){
            document.location = document.location;
        }else{
            document.location = '/profile.php' + query;
        }

    },	
    resizeHomeTabs : function() {
        var $featured = jQuery("#bf-home-feature-holder"),
        $main = jQuery(".snn_content"),
        $slider = jQuery(".bf-home-slider-shadow"),
        mw = $main.width(),
        sw = $slider.width(),
        fw = $featured.width();
			
        if ((mw - sw + 17) < 395){
            $featured.width(350);
        }else{
            $featured.css("width","39%");
        }
			
    },
    putProfilePicture : function(Reset) {
        var $image 	= jQuery("iframe#snn_profile_photo_iframe").contents().find("#userEditPhotoImg"),
        isrc 	= $image.attr("src");

        jQuery("[id^=bf_profile_picture], .j_profile_thumb").attr("src", isrc);
        if(Reset){
            G_resetCropDialog(isrc.replace('_thumb', ''));
            G_CropDialog.dialog('open');
        }
    },
    removeProfilePicture : function() {
        var $iimage 	= jQuery("iframe#snn_profile_photo_iframe").contents().find("#userEditPhotoImg"),
        $pimage		= jQuery("[id^=bf_profile_picture]"),
        $links		= jQuery("iframe#snn_profile_photo_iframe").contents().find(".photo_links");
			
        $iimage.attr("src","/images/no_user_pic.jpg");
        $pimage.attr("src","/images/no_user_pic.jpg");
        $links.hide();
    },
    genFormSave : function(Type, Options) {

        var $thisForm = jQuery(this).closest('form'),
        $acc = $thisForm.closest('.snn_accordion'),
        $pane = $acc.find('h3.ui-state-active'),
        pane = $acc.find('h3.ui-accordion-header').index($pane),
        acc = $acc.attr("alt"),
        $error = $thisForm.find('li.error'),
        self = this,
        label = jQuery(self).val();
		

        jQuery.metadata.setType("attr", "data");

        var Valid = true;
        $thisForm.find('#usr_sets_male').parent().find('.error').remove();
        $thisForm.find('#usr_sets_dob_year').parent().find('.error').remove();
        //[DZ] Was made to do it as this dirty hack
        if(Type=='user_settings_info'){
            if(!$thisForm.find('#usr_sets_male')[0].checked && !$thisForm.find('#usr_sets_female')[0].checked){
                Valid = false;
                jQuery('<label class="error fl" for="usr_sets_male"></label>')
                    .html('Please select gender')
                    .appendTo($thisForm.find('#usr_sets_female').parent());
            }
            var Missing = [];
            if(!$thisForm.find('#usr_sets_dob_month').val()) Missing.push('month');
            if(!$thisForm.find('#usr_sets_dob_date').val()) Missing.push('date');
            if(!$thisForm.find('#usr_sets_dob_year').val()) Missing.push('year');
            if(Missing.length>0){
                Valid = false;
                jQuery('<label class="error fl" style="margin:5px 0 5px 15%" for="usr_sets_dob_'+Missing[0]+'"></label>')
                    .html('Please enter '+Missing.join(', '))
                    .appendTo($thisForm.find('#usr_sets_dob_year').parent());
            }
        }

        //$thisForm.validate();
        if(Valid && $thisForm.valid()){
            var postUrl = $thisForm.find('input[name=postUrl]').val();
            var operation = $thisForm.find('input[name=operation]').val();
            var norefresh = $thisForm.find('input[name=norefresh]').val();
            var postData = $thisForm.serialize();
            jQuery(self).val("Please wait...");
		
            jQuery.post(postUrl, postData, function(json){
                var username = "";
                if (operation === 'save_profile_details'){
                    jQuery(self).val('not saved!');
                    if (json.fail) return false;
                }
                if (operation === 'save_account_settings'){
                    if (json.status === 1){
                        jQuery(self).val('Saved!');
                    }
                    else if (json.status === 2){
                        jQuery(self).val('not saved!');
                        var Msg = 'User name is taken or invalid.';
                        if(json.error && json.error==694) Msg = 'Only letters and numbers are allowed.';
                        if(json.error && jQuery.inArray(json.error, [695, 696, 699])!=-1) Msg = 'User name is already taken.';
                        $error.html(Msg).show();
					
                        setTimeout(function() {
                            $error.hide(500).html('');
                        }, 5000)
                        return false;
                    }
                    else if (json.status === 3){
                        jQuery(self).val('not saved!');
                        $error.html('Email is taken or invalid!').show();
                        setTimeout(function() {
                            $error.hide(500).html('');
                        }, 5000)
                        return false;
                    }
                    else if (json.status === 4){
                        jQuery(self).val('not saved!');
                        $error.html('Password is invalid!').show();
                        setTimeout(function() {
                            $error.hide(500).html('');
                        }, 5000)
                        return false;
                    }
                    else if (json.status === 5){
                        jQuery(self).val('not saved!');
                        $error.html('Password is invalid for this account!').show();
                        setTimeout(function() {
                            $error.hide(500).html('');
                        }, 5000)
                        return false;
                    }	
                }
                if ( typeof json.url !== 'undefined' ){
                    username = json["redirect_username"];
                }
	
                jQuery(self).val('Saved!');
                
                //[DZ] hacks for this uber form!
                if($thisForm.find('input[name="task"]').val() == 'change_password'){
                    jQuery('.success_message').show();
                    window.setTimeout(function(){ jQuery('.success_message').hide(); }, 10000);
                    $thisForm.find('input[name="user_password"]').val('');
                    $thisForm.find('input[name="user_new_password"]').val('');
                    $thisForm.find('input[name="user_new_password_confirm"]').val('');
                    norefresh = true;
                }
                if($thisForm.find('input[name="operation"]').val() == 'loc_prefs'){
                    jQuery('#snn_location_preferences .success_message').show();
                    window.setTimeout(function(){ jQuery('#snn_location_preferences .success_message').hide(); }, 10000);
                }
                if($thisForm.find('input[name="operation"]').val() == 'save_profile_details_aboutme'){
                    jQuery('#j_about_me_saved').show();
                    window.setTimeout(function(){ jQuery('#j_about_me_saved').hide(); }, 10000);
                }
                if($thisForm.find('input[name="task"]').val() == 'change_username'){
                    jQuery('#j_url_saved').show();
                    window.setTimeout(function(){ jQuery('#j_url_saved').hide(); }, 10000);
                }
                if($thisForm.find('input[name="operation"]').val() == 'ats_save_about'){
                    jQuery('#j_srv_overview_saved').show();
                    window.setTimeout(function(){ jQuery('#j_srv_overview_saved').hide(); }, 10000);
                }
                if($thisForm.find('input[name="operation"]').val() == 'save_payment_policy'){
                    jQuery('#j_srv_payment_saved').show();
                    window.setTimeout(function(){ jQuery('#j_srv_payment_saved').hide(); }, 10000);
                }
                if($thisForm.find('input[name="operation"]').val() == 'save_special_offers'){
                    jQuery('#j_srv_special_saved').show();
                    window.setTimeout(function(){ jQuery('#j_srv_special_saved').hide(); }, 10000);
                }
	
                $thisForm.find('input[type=text], textarea').animate({
                    "backgroundColor": "#fdf9e1"
                }, 400,function(){
                    jQuery(this).animate({
                        "backgroundColor": "#ffffff"
                    }, 200);
                });
                var params = [];
                if (typeof visible_tab !== "undefined") params[0] = visible_tab;
                if(typeof acc !== "undefined") params[1] = acc;
                if(typeof pane !== "undefined") params[2] = pane;
                if(typeof username !== "undefined") params[3] = username;

                if(!norefresh) BetterflyJSNN.utils.forceRefresh.apply(this, params);
                else if(Options && Options.onComplete) Options.onComplete();
            },"json");
	
        }else{
            jQuery(self).val("Please check the form...");
        }
	
        setTimeout(function(){
            jQuery(self).val(label);
        }, 3000)
    },
    validateZip: function(Zip, onOk, onFail){
        var Url = '/ajaxcall/misc';
        var onUpdate = function(Data){
            if(Data=='0'){
                if(onFail) onFail(Data);
            }
            else{
                if(onOk) onOk(Data);
            }
        };
        jQuery.post(Url, {
            operation: 'zip_check',
            zip: Zip
        }, onUpdate);
    },
    hoverPopup: function(Trigger, Popup, Options){
        if(!Options) Options = {};
        
        var show = function(E){
            var Ofs = Trigger.offset();
            var CorT = Options.CorTop?Options.CorTop:-1;
            var CorL = Options.CorLeft?Options.CorLeft:-15;
            Popup.css({top: Ofs.top+Trigger.get(0).offsetHeight+CorT, left: Ofs.left-15+CorL});
            //Popup.get(0).active = true; //IE hack for search page
            if(Delay) window.clearTimeout(Delay);
            if(!Popup.is(":visible")) Popup.fadeIn(200);
        };
        var hide = function(){
            if(Delay) window.clearTimeout(Delay);
            var close = function(){
                //Popup.get(0).active = false; //IE hack for search page
                Popup.fadeOut(200);
            };
            Delay = window.setTimeout(close, 200);
        };
        var Delay = null;
        Trigger.click( function(){show(); return false;} ).mouseover(show).mouseout(hide);
        Popup.mouseover(show).mouseout(hide).mousemove(show);
        Popup.appendTo(document.body);
    },
    showIsSpam: function(Type, Id){
        var self = this;
        if(!this.isSpamPopup){
            this.isSpamPopup = jQuery("#is_spam_popup").dialog({
                resizable: false,
                modal: true,
                title: "Mark As Spam",
                height: 'auto',
                width: 330,
                autoOpen: false,
                buttons: {
                    No: function(){
                        self.isSpamPopup.dialog('close');
                    },
                    Yes: function(){
                        var Id = self.isSpamPopup.Id;
                        self.isSpamPopup.Icon.css('display', '');
                        var onReady = function(Resp){
                            self.isSpamPopup.find('.j_sure').css('display', 'none');
                            self.isSpamPopup.find('.j_done').css('display', '');
                            self.isSpamPopup.Icon.css('display', 'none');
                            self.isSpamPopup.No.css('display', 'none');
                            self.isSpamPopup.Yes.css('display', 'none');
                            self.isSpamPopup.Ok.css('display', '');
                        };
                        if(Id.push) Id = Id.join(',');
                        jQuery.post('/ajaxcall/mark_spam', {type: self.isSpamPopup.Type, id: Id, url: window.location.href}, onReady);
                    },
                    Ok: function(){
                        self.isSpamPopup.dialog('close');
                    }
                }
            });
            var Btns = this.isSpamPopup.parent().find('button');
            this.isSpamPopup.No = Btns.filter('button:contains("No")');
            this.isSpamPopup.Yes = Btns.filter('button:contains("Yes")').addClass('greenbutton');
            this.isSpamPopup.Ok = Btns.filter('button:contains("Ok")');
            this.isSpamPopup.Icon = jQuery('<img class="ajax_ico" src="/images/_bf_custom/ajax-loader.gif"/>');
            this.isSpamPopup.Icon.css('display', 'none').insertAfter(this.isSpamPopup.Ok);
        }
        this.isSpamPopup.find('.j_done').css('display', 'none');
        this.isSpamPopup.find('.j_sure').css('display', '');
        this.isSpamPopup.No.css('display', '');
        this.isSpamPopup.Yes.css('display', '');
        this.isSpamPopup.Ok.css('display', 'none');
        this.isSpamPopup.Type = Type;
        this.isSpamPopup.Id = Id;
        this.isSpamPopup.dialog('open');
    },
    tooltip: function(Els){
        Els.each(function(){
            var Tip = jQuery(this);
            Tip.find('.tipclose').click(function(){
                var A = jQuery(this);
                var Url = A.attr('data-url');
                var Data = A.attr('data-post');
                if(Url) jQuery.post(Url, {data: Data});
                Tip.fadeOut(200, function(){Tip.remove()});
            });
        });
    },
    showInvitePopup: function(){
        if(!this.InvitePopup){
            var self = this;
            var HTML = "You cannot invite people to Betterfly yet because the site is still password protected."+
                " If you would like to invite somebody to Betterfly, please email "+
                "<a href='mailto:invite@betterfly.com'>invite@betterfly.com</a> requesting to do so.";
            this.InvitePopup = jQuery('<div title="Invite Friend">'+HTML+'</div>').dialog({
                bgiframe: true,
                autoOpen: false,
                height: 'auto',
                width: 450,
                modal: true,
                autoOpen: false,
                buttons: {
                    OK: function(){
                        self.InvitePopup.dialog('close');
                    }
                }
            });
        }
        this.InvitePopup.dialog('open');
    },
    verticalScroller: function(Obj){
        var Pane = 0;
        var H = 0;
        var Scroller = Obj.find('.scroller');
        var TotalPanes = 0;
        var move = function(Dir){
            Up.removeClass('disabled');
            Down.removeClass('disabled');
            if(!H){
                H = Obj.find('.contents').height();
                TotalPanes = Math.ceil(Scroller.height()/H);
            }
            if(Dir=='up' && Pane > 0){
                Pane--;
                Scroller.animate({top: -H*Pane}, {queue:false, duration:300});
                if(Pane==0) Up.addClass('disabled');
            }
            if(Dir=='down' && Pane < TotalPanes){
                Pane++;
                Scroller.animate({top: -H*Pane}, {queue:false, duration:300});
                if(Pane==TotalPanes-1) Down.addClass('disabled');
            }
        };
        
        var Up = Obj.find('.up').click(function(){ move('up') }).addClass('disabled');
        var Down = Obj.find('.down').click(function(){ move('down') });
    }
}

BetterflyJSNN.homePage = {
    homeTopFiveData : [],
    homeTopFive : function() {
        var $tHolder = jQuery(this).closest('ul');
        var	$lHolder = jQuery('div#bf_top_5_list');
        var url = jQuery(this).attr("href");
		
        //change the active items bg
        var index = $tHolder.find('a').index(this);
        $tHolder.find('a').removeClass('active');
        jQuery(this).addClass('active');
		
        //write the list with supplied data
        function renderList(json){
            var c = '<a href="'+json.top_url+'"><img width="75" src="'+json.top_thumb+'" class="fl"/></a><div class="popup-select-head mh2"><h3 >Top '+json.top_title+'</h3><a href="#">'+json.total_amount+'</a> '+json.top_title+' registered <a href="#">'+json.total_online+'</a> '+json.top_title+' <span>online</span> now </div><ul class="bf_top_5_list">',
            i = 1;
            betterist_empty_slots = 5;
		  	
            json.betterists = (typeof json.betterists === "undefined" || json.betterists === null) ? {} : json.betterists ;
		  	
            jQuery.each(json.betterists, function(name,val) {
                c += '<li><span class="bf-home-rank">'+i+'</span><div class="bf-home-popup-smimg"><img src="'+val.user_thumb+'" width="44" /></div><div class="bf-home-popup-ranking "><span><a href="profile.php?user='+val.username+'">'+val.name+'</a></span><div class="item-w-rating"><span class="stars'+val.rating+'"></span><span class="thumb">'+val.voted+'</span></div></div></li>';
                i++;
                betterist_empty_slots--;
            });

            if (betterist_empty_slots > 0){
                var t = betterist_empty_slots,
                j=1;
                for (j=1;j<=t;j++)
                {
                    c += '<li><span class="bf-home-rank">'+(5-t+j)+'</span><div class="bf-home-popup-smimg"><img src="/images/nophoto.gif" width="44" /></div><div class="bf-home-popup-ranking "><span><a href="/signup.php" title="Click here to join Betterfly!">This could be you!</a></span><div class="item-w-rating"><span class="stars0"></span><span class="thumb">0</span></div></div></li>';
                }
				
            }
			
			
            c += '</ul>';
			
            $lHolder.html(c);
        }
		
        //if data called once just render it otherwise first get then render
        if (typeof BetterflyJSNN.homePage.homeTopFiveData[index] !== "object") {
            $lHolder.html('<div align="center">Loading...</div>');
            jQuery.getJSON(url, function(json) {
                BetterflyJSNN.homePage.homeTopFiveData[index] = json;
                renderList(json);
            });
        }else{
            renderList(BetterflyJSNN.homePage.homeTopFiveData[index]);
        }
					
        return false;
    },
    initData : null, //it's filled at home.tpl
    getTopThemes : {
        tHolder : "bf_top_5_triggers",
        getInitList : function(path) {
            path = path || BetterflyJSNN.homePage.initData;
            if (typeof path === "string"){
                jQuery.getJSON(path, BetterflyJSNN.homePage.getTopThemes.renderList);
            }else{
                BetterflyJSNN.homePage.getTopThemes.renderList(BetterflyJSNN.homePage.initData);
            }
        },
        renderList : function (json) {
            var i = 0;
            var c = "";

            jQuery.each(json, function(name,val) {
                var a = (i === 0) ? " active" : "";
                c += '<li><a href="'+val.url+'" class="bf_top_5_trigger'+a+'">'+val.title+'</a></li>';
                i++;
            });

            //put categories on page
            jQuery("#"+BetterflyJSNN.homePage.getTopThemes.tHolder).html(c);

            //trigger first item to fill the related betterist list
            jQuery("#"+BetterflyJSNN.homePage.getTopThemes.tHolder).find('a').eq(0).trigger('click');
        }
    },
    showChangeLocation : function() {
        var $dialog = jQuery("#top5_change_location");
        //give modal options and show it
        $dialog.dialog({
            resizable: false,
            modal: true,
            title: "Change Location",
            height: 200,
            width: 300,
            open: function(event, ui) {
                $dialog.parent().find('button').filter(function () {
                    return jQuery(this).text() === "Go back";
                }).addClass('newcancelbtn');

                $dialog.dialog('option', 'buttons', {
                    //cancel button functionality
                    "Go back" : function(){
                        $dialog.dialog("close");
                    },
                    //submit button functionality
                    "Submit" : function(){
                        $dialog.dialog("close");
                        //re-render the list with new data
                        BetterflyJSNN.homePage.getTopThemes.getInitList("/templates/dummy_json/0.js");
                    }
				
                });
            },
            close: function() {
                $dialog.dialog("destroy");
                $dialog.hide();
                $dialog.html();
            }
        }).show();
    }
}

/* RESOURCES UPLOADER */

BetterflyJSNN.resUploader = {
	
    putInList : function(a) {
    //TBDL
    },
    _sendJustUploadedImageAttrs : function() {
        var $self = jQuery(this);
		
        $form = $self.closest('form');

        var IsDelete = $self.hasClass('snn_finished_item_delete');

        //if delete button clicked change form operation
        if(IsDelete){
            $form.find('input[name=operation]').val('delete_resource');
        }
		
        var formData = $form.serializeArray();
		
        var video = ($form.find('input[name=video_id]').val() === "undefined") ? false : true;

        var onSave = function(r) {
            if(video){
                $self.closest('.after_upload_form').slideUp(800, function() {
                    jQuery(this).remove();
                    if (jQuery('.snn_finished_item_save').length === 0){
                        BetterflyJSNN.utils.forceRefresh('edit_resources', '', 1);
                    }
                });
            }else{
                $self.closest('li.file-success').slideUp(800, function() {
                    jQuery(this).find('a.file-remove').trigger('click');
                    jQuery(this).remove();

                    var type = $form.find('input[name=type]').val();

                    if(type === "file"){
                        var pane = 2;
                    }else{
                        var pane = 0;
                    };

                    //refresh page, temporary solution
                    if (jQuery('.snn_finished_item_save').length === 0){
                        BetterflyJSNN.utils.forceRefresh('edit_resources','',pane);
                    }
                });
            }
        }

        if(video && IsDelete) onSave();
        else jQuery.post("/resources/saveDetails", formData, onSave);
        return false;
    },
    createAfterUploadForm : function(file, type, id, is_video, videoparams) {
        var Form = jQuery('#j_after_upload_form_sample').clone().attr('id', '');
        Form.find('.notice').html(is_video?"<strong>Your video has been uploaded, it will be available for viewing in appoximately 10 more minutes. Thanks for your patience.</strong>":'');
        Form.find('input[name=title]').val(file.name);
        Form.find('input[name=id]').val(id);
        Form.find('input[name=video_embed]').val(videoparams.embed);
        Form.find('input[name=video_id]').val(videoparams.id);
        Form.find('input[name=video_previewUrl]').val(videoparams.previewUrl);
        Form.find('input[name=type]').val(type);
        Form.find('input[name=creation_time]').val(file.creationDate);

        if(is_video){
            var $li = jQuery("#bf_video_uploader");
        }
        else{
            var $li = jQuery("#fileList .file-success[alt="+file.creationDate+"]");
        }

        var $save = jQuery("<a class='fl newinputbtn snn_finished_item_save'>Save</a>");
        var $delete = jQuery("<a class='fl newcancelbtn snn_finished_item_delete'>Delete</a>");

        $save.bind('click', this._sendJustUploadedImageAttrs);
        $delete.bind('click', this._sendJustUploadedImageAttrs);
    	
        $li.append(Form.css('display', '')).append('<div class="clear"></div>');
    	
        Form.find('.buttons').append($save);
        Form.find('.buttons').append($delete);
    }
	
}

BetterflyJSNN.betteristProfile = {
	
    idBoxToggle : function(El) {
        var Big = 	jQuery(".betterist_id_box_big");
        var Small = jQuery(".betterist_id_box_small");
        var post_it = function(visible) {
            jQuery.post(BetterflyJSNN.base.ajaxUrl, {
                "id_box" : visible ,
                "operation" : "box_view"
            });
        }

        if(Small.eq(0).hasClass('none')){
            $(El).removeClass('to_small').addClass('to_big');
            Big.addClass('none');
            Small.fadeIn(200, function(){
                jQuery(this).removeClass('none').css('display', '')
                });
            post_it("small");
        }
        else{
            $(El).removeClass('to_big').addClass('to_small');
            Small.addClass('none');
            Big.fadeIn(200, function(){
                jQuery(this).removeClass('none').css('display', '')
                });
            post_it("big");
        }
    }
}

/* end ../include/js/_BetterflyJSNN.js */

/* start ../vendors/jquery.rating.js */
/*
 ### jQuery Star Rating Plugin v3.12 - 2009-04-16 ###
 * Home: http://www.fyneworks.com/jquery/star-rating/
 * Code: http://code.google.com/p/jquery-star-rating-plugin/
 *
	* Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 ###
*/

/*# AVOID COLLISIONS #*/
;if(window.jQuery) (function($){
/*# AVOID COLLISIONS #*/
	
	// IE6 Background Image Fix
	if ($.browser.msie) try { document.execCommand("BackgroundImageCache", false, true)} catch(e) { };
	// Thanks to http://www.visualjquery.com/rating/rating_redux.html
	
	// plugin initialization
	$.fn.rating = function(options){
		if(this.length==0) return this; // quick fail
		
		// Handle API methods
		if(typeof arguments[0]=='string'){
			// Perform API methods on individual elements
			if(this.length>1){
				var args = arguments;
				return this.each(function(){
					$.fn.rating.apply($(this), args);
    });
			};
			// Invoke API method handler
			$.fn.rating[arguments[0]].apply(this, $.makeArray(arguments).slice(1) || []);
			// Quick exit...
			return this;
		};
		
		// Initialize options for this call
		var options = $.extend(
			{}/* new object */,
			$.fn.rating.options/* default options */,
			options || {} /* just-in-time options */
		);
		
		// Allow multiple controls with the same name by making each call unique
		$.fn.rating.calls++;
		
		// loop through each matched element
		this
		 .not('.star-rating-applied')
			.addClass('star-rating-applied')
		.each(function(){
			
			// Load control parameters / find context / etc
			var control, input = $(this);
			var eid = (this.name || 'unnamed-rating').replace(/\[|\]/g, '_').replace(/^\_+|\_+$/g,'');
			var context = $(this.form || document.body);
			
			// FIX: http://code.google.com/p/jquery-star-rating-plugin/issues/detail?id=23
			var raters = context.data('rating');
			if(!raters || raters.call!=$.fn.rating.calls) raters = { count:0, call:$.fn.rating.calls };
			var rater = raters[eid];
			
			// if rater is available, verify that the control still exists
			if(rater) control = rater.data('rating');
			
			if(rater && control)//{// save a byte!
				// add star to control if rater is available and the same control still exists
				control.count++;
				
			//}// save a byte!
			else{
				// create new control if first star or control element was removed/replaced
				
				// Initialize options for this raters
				control = $.extend(
					{}/* new object */,
					options || {} /* current call options */,
					($.metadata? input.metadata(): ($.meta?input.data():null)) || {}, /* metadata options */
					{ count:0, stars: [], inputs: [] }
				);
				
				// increment number of rating controls
				control.serial = raters.count++;
				
				// create rating element
				rater = $('<span class="star-rating-control"/>');
				input.before(rater);
				
				// Mark element for initialization (once all stars are ready)
				rater.addClass('rating-to-be-drawn');
				
				// Accept readOnly setting from 'disabled' property
				if(input.attr('disabled')) control.readOnly = true;
				
				// Create 'cancel' button
				rater.append(
					control.cancel = $('<div class="rating-cancel"><a title="' + control.cancel + '">' + control.cancelValue + '</a></div>')
					.mouseover(function(){
						$(this).rating('drain');
						$(this).addClass('star-rating-hover');
						//$(this).rating('focus');
					})
					.mouseout(function(){
						$(this).rating('draw');
						$(this).removeClass('star-rating-hover');
						//$(this).rating('blur');
					})
					.click(function(){
					 $(this).rating('select');
					})
					.data('rating', control)
				);
				
			}; // first element of group
			
			// insert rating star
			var star = $('<div class="star-rating rater-'+ control.serial +'"><a title="' + (this.title || this.value) + '">' + this.value + '</a></div>');
			rater.append(star);
			
			// inherit attributes from input element
			if(this.id) star.attr('id', this.id);
			if(this.className) star.addClass(this.className);
			
			// Half-stars?
			if(control.half) control.split = 2;
			
			// Prepare division control
			if(typeof control.split=='number' && control.split>0){
				var stw = ($.fn.width ? star.width() : 0) || control.starWidth;
				var spi = (control.count % control.split), spw = Math.floor(stw/control.split);
				star
				// restrict star's width and hide overflow (already in CSS)
				.width(spw)
				// move the star left by using a negative margin
				// this is work-around to IE's stupid box model (position:relative doesn't work)
				.find('a').css({ 'margin-left':'-'+ (spi*spw) +'px' })
			};
			
			// readOnly?
			if(control.readOnly)//{ //save a byte!
				// Mark star as readOnly so user can customize display
				star.addClass('star-rating-readonly');
			//}  //save a byte!
			else//{ //save a byte!
			 // Enable hover css effects
				star.addClass('star-rating-live')
				 // Attach mouse events
					.mouseover(function(){
						$(this).rating('fill');
						$(this).rating('focus');
					})
					.mouseout(function(){
						$(this).rating('draw');
						$(this).rating('blur');
					})
					.click(function(){
						$(this).rating('select');
					})
				;
			//}; //save a byte!
			
			// set current selection
			if(this.checked)	control.current = star;
			
			// hide input element
			input.hide();
			
			// backward compatibility, form element to plugin
			input.change(function(){
    $(this).rating('select');
   });
			
			// attach reference to star to input element and vice-versa
			star.data('rating.input', input.data('rating.star', star));
			
			// store control information in form (or body when form not available)
			control.stars[control.stars.length] = star[0];
			control.inputs[control.inputs.length] = input[0];
			control.rater = raters[eid] = rater;
			control.context = context;
			
			input.data('rating', control);
			rater.data('rating', control);
			star.data('rating', control);
			context.data('rating', raters);
  }); // each element
		
		// Initialize ratings (first draw)
		$('.rating-to-be-drawn').rating('draw').removeClass('rating-to-be-drawn');
		
		return this; // don't break the chain...
	};
	
	/*--------------------------------------------------------*/
	
	/*
		### Core functionality and API ###
	*/
	$.extend($.fn.rating, {
		// Used to append a unique serial number to internal control ID
		// each time the plugin is invoked so same name controls can co-exist
		calls: 0,
		
		focus: function(){
			var control = this.data('rating'); if(!control) return this;
			if(!control.focus) return this; // quick fail if not required
			// find data for event
			var input = $(this).data('rating.input') || $( this.tagName=='INPUT' ? this : null );
   // focus handler, as requested by focusdigital.co.uk
			if(control.focus) control.focus.apply(input[0], [input.val(), $('a', input.data('rating.star'))[0]]);
		}, // $.fn.rating.focus
		
		blur: function(){
			var control = this.data('rating'); if(!control) return this;
			if(!control.blur) return this; // quick fail if not required
			// find data for event
			var input = $(this).data('rating.input') || $( this.tagName=='INPUT' ? this : null );
   // blur handler, as requested by focusdigital.co.uk
			if(control.blur) control.blur.apply(input[0], [input.val(), $('a', input.data('rating.star'))[0]]);
		}, // $.fn.rating.blur
		
		fill: function(){ // fill to the current mouse position.
			var control = this.data('rating'); if(!control) return this;
			// do not execute when control is in read-only mode
			if(control.readOnly) return;
			// Reset all stars and highlight them up to this element
			this.rating('drain');
			this.prevAll().andSelf().filter('.rater-'+ control.serial).addClass('star-rating-hover');
		},// $.fn.rating.fill
		
		drain: function() { // drain all the stars.
			var control = this.data('rating'); if(!control) return this;
			// do not execute when control is in read-only mode
			if(control.readOnly) return;
			// Reset all stars
			control.rater.children().filter('.rater-'+ control.serial).removeClass('star-rating-on').removeClass('star-rating-hover');
		},// $.fn.rating.drain
		
		draw: function(){ // set value and stars to reflect current selection
			var control = this.data('rating'); if(!control) return this;
			// Clear all stars
			this.rating('drain');
			// Set control value
			if(control.current){
				control.current.data('rating.input').attr('checked','checked');
				control.current.prevAll().andSelf().filter('.rater-'+ control.serial).addClass('star-rating-on');
			}
			else
			 $(control.inputs).removeAttr('checked');
			// Show/hide 'cancel' button
			control.cancel[control.readOnly || control.required?'hide':'show']();
			// Add/remove read-only classes to remove hand pointer
			this.siblings()[control.readOnly?'addClass':'removeClass']('star-rating-readonly');
		},// $.fn.rating.draw
		
		select: function(value){ // select a value
			var control = this.data('rating'); if(!control) return this;
			// do not execute when control is in read-only mode
			if(control.readOnly) return;
			// clear selection
			control.current = null;
			// programmatically (based on user input)
			if(typeof value!='undefined'){
			 // select by index (0 based)
				if(typeof value=='number')
 			 return $(control.stars[value]).rating('select');
				// select by literal value (must be passed as a string
				if(typeof value=='string')
					//return 
					$.each(control.stars, function(){
						if($(this).data('rating.input').val()==value) $(this).rating('select');
					});
			}
			else
				control.current = this[0].tagName=='INPUT' ? 
				 this.data('rating.star') : 
					(this.is('.rater-'+ control.serial) ? this : null);
			
			// Update rating control state
			this.data('rating', control);
			// Update display
			this.rating('draw');
			// find data for event
			var input = $( control.current ? control.current.data('rating.input') : null );
			// click callback, as requested here: http://plugins.jquery.com/node/1655
			if(control.callback) control.callback.apply(input[0], [input.val(), $('a', control.current)[0]]);// callback event
		},// $.fn.rating.select
		
		readOnly: function(toggle, disable){ // make the control read-only (still submits value)
			var control = this.data('rating'); if(!control) return this;
			// setread-only status
			control.readOnly = toggle || toggle==undefined ? true : false;
			// enable/disable control value submission
			if(disable) $(control.inputs).attr("disabled", "disabled");
			else     			$(control.inputs).removeAttr("disabled");
			// Update rating control state
			this.data('rating', control);
			// Update display
			this.rating('draw');
		},// $.fn.rating.readOnly
		
		disable: function(){ // make read-only and never submit value
			this.rating('readOnly', true, true);
		},// $.fn.rating.disable
		
		enable: function(){ // make read/write and submit value
			this.rating('readOnly', false, false);
		}// $.fn.rating.select
		
 });
	
	/*--------------------------------------------------------*/
	
	/*
		### Default Settings ###
		eg.: You can override default control like this:
		$.fn.rating.options.cancel = 'Clear';
	*/
	$.fn.rating.options = { //$.extend($.fn.rating, { options: {
			cancel: 'Cancel Rating',   // advisory title for the 'cancel' link
			cancelValue: '',           // value to submit when user click the 'cancel' link
			split: 0,                  // split the star into how many parts?
			
			// Width of star image in case the plugin can't work it out. This can happen if
			// the jQuery.dimensions plugin is not available OR the image is hidden at installation
			starWidth: 16//,
			
			//NB.: These don't need to be pre-defined (can be undefined/null) so let's save some code!
			//half:     false,         // just a shortcut to control.split = 2
			//required: false,         // disables the 'cancel' button so user can only select one of the specified values
			//readOnly: false,         // disable rating plugin interaction/ values cannot be changed
			//focus:    function(){},  // executed when stars are focused
			//blur:     function(){},  // executed when stars are focused
			//callback: function(){},  // executed when a star is clicked
 }; //} });
	
	/*--------------------------------------------------------*/
	
	/*
		### Default implementation ###
		The plugin will attach itself to file inputs
		with the class 'multi' when the page loads
	*/
	$(function(){
	 $('input[type=radio].star').rating();
	});
	
	
	
/*# AVOID COLLISIONS #*/
})(jQuery);
/*# AVOID COLLISIONS #*/

/* end ../vendors/jquery.rating.js */

/* start ../vendors/gks.js */
jQuery.fn.maxLength = function(max){
	this.each(function(){
		//Get the type of the matched element
		var type = this.tagName.toLowerCase();
		//If the type property exists, save it in lower case
		var inputType = this.type? this.type.toLowerCase() : null;
		//Check if is a input type=text OR type=password
		if(type == "input" && inputType == "text" || inputType == "password"){
			//Apply the standard maxLength
			this.maxLength = max;
		}
		//Check if the element is a textarea
		else if(type == "textarea"){
			//Add the key press event
			this.onkeypress = function(e){
				//Get the event object (for IE)
				var ob = e || event;
				//Get the code of key pressed
				var keyCode = ob.keyCode;
				//Check if it has a selected text
				var hasSelection = document.selection? document.selection.createRange().text.length > 0 : this.selectionStart != this.selectionEnd;
				//return false if can't write more
				return !(this.value.length >= max && (keyCode > 50 || keyCode == 32 || keyCode == 0 || keyCode == 13) && !ob.ctrlKey && !ob.altKey && !hasSelection);
			};
			//Add the key up event
			this.onkeyup = function(){
				//If the keypress fail and allow write more text that required, this event will remove it
				if(this.value.length > max){
					this.value = this.value.substring(0,max);
				}
			};
		}
	});
};

function infoPopup(Els){
    Els.mouseover(function(event){
        //take info icons offset on the page
        var o = jQuery(this).offset();
        //get info text
        var content = jQuery(this).attr('alt');
        //put info text into popup
        jQuery("#info_popup>p").html(content);
        //get popups new height with content
        var h = jQuery("#info_popup").height();
        //show popup with half second delay
        jQuery(this).oneTime(500, "popupShow", function() {
            jQuery("#info_popup").css({ top: o.top-h-10, left: o.left+18 }).fadeIn(400);
        });
        //avoid bubbling of the event
        event.stopPropagation();

    }).click(function(event){
        //take info icons offset on the page
        var o = jQuery(this).offset();
        //get info text
        var content = jQuery(this).attr('alt');
        //put info text into popup
        jQuery("#info_popup>p").html(content);
        //get popups new height with content
        var h = jQuery("#info_popup").height();
        //show popup with half second delay
        jQuery("#info_popup").css({ top: o.top-h-10, left: o.left+18 }).fadeIn(400);
        //avoid bubbling of the event
        if(jQuery(this).hasClass('info_popup')){
            event.stopPropagation();
            return false;
        }
    }).mouseout(function(){
        //hide popup
        jQuery("#info_popup").fadeOut(400);
        //kill event if any queued
        jQuery(this).stopTime("popupShow");
    });
};

jQuery(function($){
				
	$(".top_menu_link_loggedin ul li:last-child").css("background","0");
	
	$(".top_menu_link_loggedin ul li").hover(
		function(){
			$(this).find("a").addClass("hover");
			$(this).find(".rounded").show();
		},
		function(){
			$(this).find("a").removeClass("hover");
			$(this).find(".rounded").hide();
		}
	);
	
	/* RETIRED BY SINAN
	$(".tab-container ul li").click(
		function(){
			$(".tab-container ul li").removeClass("active");
			$(this).addClass("active");
			return false;
		}
	);
	*/
	/*
	$(".tab-container ul li a").each(function(){
		var linkHtml = $(this).html();
		$(this).html('<b class="l">&nbsp;</b><b class="m">'+linkHtml+'</b><b class="r">&nbsp;</b>');
	});
	*/
	$(".roundedGreen, .roundedGrey").each(function(){
		var linkHtml = $(this).html();
		$(this).html('<b class="b1">&nbsp;</b><b class="b2">'+linkHtml+'</b><b class="b3">&nbsp;</b>');
	});
	


	$(".snn_top_login_form .email").focus(function(){if($(this).val() == "Email Address") $(this).val("")});
	$(".snn_top_login_form .email").blur(function(){if(!$(this).val()) $(this).val("Email Address")});

	$(".snn_search_form .snn_text").focus(function(){if($(this).val() == "Type an interest or someone's name") $(this).val("")});
	$(".snn_search_form .snn_text").blur(function(){if(!$(this).val()) $(this).val("Type an interest or someone's name")});
    $(".snn_search_form .submit, .snn_search_form .gobtn").click( function(){
        var Search = $(".snn_search_form .snn_text");
        if(Search.val() == "Type an interest or someone's name") Search.val('');
    } );

	$(".searcher input").focus(function(){if($(this).val() == "Search Inbox") $(this).val("")});
	$(".searcher input").blur(function(){if(!$(this).val()) $(this).val("Search Inbox")});
	
	/*
	$(".education-item").each(function(){
		$(this).find(".bold:eq(0)").css("margin","-5px 0 0 0");
	});
*/
	
	$(".top_menu_link_loggedin").css("visibility","visible");
	
	$("#company_accordion").accordion({clearStyle: true,autoHeight: false,active: false}).show();
	$(".slideDownOnLoad").slideDown();
	

	$("#gsk_specialOffers").click(function(){
	   loadProfileTab('information');
		$('html, body').animate({scrollTop: $("#specialOffers").offset().top-20}, 500);
	});
	
	//$("input[type=text]").attr("maxlength",70);
/*
	$(".none form:contains('*')").each(function(){
		$(this).append("<p class='reqNote'>*Required</p>")
	});
*/
	$('textarea').keyup(function(){
		 var maxLength = 4000;
		 if($(this).val().length>maxLength) $(this).val($(this).val().substr(0,maxLength));
 	});
	
	infoPopup($(".info_popup, .tip_popup"));
	
	$("#info_popup").mouseleave(function() {
		$(this).fadeOut(400);
	}).appendTo(document.body);
	
	if(!$("#dk_profile_tabs li.active").size() && typeof G_VToPage == undefined) $("#profile_tabs_profile").addClass("active");
	
    var LogBtn = $(".signIn .signInBtn");
    var LogPop = $(".signIn form").css({display: 'none', height: 'auto'});
    var showLogin = function(){
        if(Delay) window.clearTimeout(Delay);
        if(!LogPop.is(":visible")){
            LogBtn.addClass("signInBtnHover");
            LogPop.fadeIn(200);
        }
    };
    var hideLogin = function(){
        if(Delay) window.clearTimeout(Delay);
        var close = function(){
            LogBtn.removeClass("signInBtnHover");
            LogPop.fadeOut(400);
        };
        if(!LogPop.find('input').hasClass('focused')) Delay = window.setTimeout(close, 300);
    };
    var Delay = null;
    LogBtn.mouseover(showLogin).mouseout(hideLogin);
    LogPop.mouseover(showLogin).mouseout(hideLogin).mousemove(showLogin);
    LogPop.find("input").bind('focus.signin',function() {
        $(this).addClass('focused');
    }).bind('blur.signin',function() {
        $(this).removeClass('focused');
        setTimeout(function() {LogPop.trigger('mouseout');},500);
    });

    $(".menu>li").hover(
		function(){
			$(this).children("a").addClass("hover");
			$(this).find("ul").show();
            if($.browser.msie) $('input[type="text"]:visible, textarea:visible').blur();
		},
		function(){
			$(this).children("a").removeClass("hover");
			$(this).find("ul").hide();
		}
	);

	$(".resource-list ul li:last").css("margin-right","0");
	$(".appointmentlist .rightcol table table td:last").css("border-bottom","none");
	
});
///////////////////////////////////////////////////////////////////////////////////////////////////////

function FCKeditor_OnComplete( editorInstance )
{
    var fck_iframe = document.getElementById(editorInstance.Name+'___Frame');
    var fck_editing_area = fck_iframe.contentDocument.getElementById('xEditingArea');
    fck_editing_area.style.height = '100.1%';
    setTimeout(function() {fck_editing_area.style.height = '100%'}, 100);
}

function getIds(bu){
    bu.append("<div class='commentNumber'>1</div>");
}


/* end ../vendors/gks.js */

/* start ../include/js/user.register.js */
var G_RegisterDialog;
var G_RoleDialog;
var errorsOnRegistrationCount = 0;

function showRoleDialog(){
    var setRole = function(){
        G_RoleDialog.Icon.css('display', '');
        var Data = G_RegisterDialog.find('#j_reg_role_form').serialize();
        jQuery.post('/ajaxcall/register_set_role', Data, function(Resp) {
            var Json = null;
            try{ eval('Json = '+Resp)} catch(e){}
            G_RoleDialog.Icon.css('display', 'none');
            if(Json && Json.status){
                G_RoleDialog.RoleForm.hide();
                G_RoleDialog.ResetForm.show();
                G_RoleDialog.Btn.html('Complete');
                G_RoleDialog.Reset = true;
            }
            else{
                G_RoleDialog.dialog("close");
                showLoginDialog();
            }
        });
    }
    var resetPassword = function(){
        var triggerError = function(element, message, insertAfter){
            var Error = jQuery('<div class="error" style="display:none"></div>').html(message);
            if (insertAfter) jQuery(insertAfter).after(Error);
            else jQuery(element).after(Error);
            Error.fadeIn('slow');
        }
        var Password = jQuery('#resetPassword');
        var ConfirmPassword = jQuery('#resetConfirmPW');
        if(!Password.val()){
            triggerError(Password, 'Please type your password.');
            return;
        }
        if(Password.val().length < 6){
            triggerError(Password, 'This password is too short.');
            return;
        }
        if(Password.val() != ConfirmPassword.val()){
            triggerError(ConfirmPassword, 'Password and confirm password do not match.');
            return;
        }
        
        G_RoleDialog.Icon.css('display', '');
        var Data = G_RoleDialog.find('#j_reset_form').serialize();
        jQuery.post('/ajaxcall/register_reset_pass', Data, function(Resp) {
            var Json = null;
            try{ eval('Json = '+Resp)} catch(e){}
            if(Json){
                G_RoleDialog.Finished = true;
                G_RoleDialog.Icon.css('display', 'none');
                try{ pageTracker._trackPageview('popup-user-preregistered-finished'); }catch(e){}
                if(Json && Json.status) document.location = "/home.php";
            }
        });
    }
    if(!G_RoleDialog){
        G_RoleDialog = jQuery('#j_role_reset_form').dialog({
            modal: true,
            resizable: false,
            autoOpen: false,
            title: 'Sign Up',
            width: 385,
            height: 'auto',
            buttons: {
                'Get Started': function(){
                    if(!G_RoleDialog.Reset) setRole();
                    else resetPassword();
                }
            },
            close: function(){
                if(!G_RoleDialog.Finished) window.setTimeout( function(){G_RoleDialog.dialog('open');}, 100);
            }
        });
        G_RoleDialog.Btn = G_RoleDialog.parent().find('button').addClass('greenbutton');
        G_RoleDialog.Icon = jQuery('<img class="ajax_ico" src="/images/_bf_custom/ajax-loader.gif"/>');
        G_RoleDialog.Icon.css('display', 'none').insertAfter(G_RoleDialog.Btn);
        G_RoleDialog.RoleForm = G_RoleDialog.find('#j_role_form');
        G_RoleDialog.ResetForm = G_RoleDialog.find('#j_reset_form');
        G_RoleDialog.parent().find('.ui-icon-closethick').hide();
    }
    G_RoleDialog.dialog('open');
    try{ pageTracker._trackPageview('popup-user-preregistered-role'); }catch(e){}
};

function showRegisterDialog() {
    G_RegisterDialog.showRegister();
    G_RegisterDialog.clearRegister();
    G_RegisterDialog.dialog('open');
    try{ pageTracker._trackPageview('popup-user-register-open'); }catch(e){}
}

function showLoginDialog(Url) {
    G_RegisterDialog.showLogin(Url);
    G_RegisterDialog.clearLogin();
    G_RegisterDialog.dialog('open');
}

jQuery(function($) {
    var _Url = null;
    var Title = "<span class='name'>Sign Up</span> <div class='right'>step 2 of 2</div>";
    Title+= "<div class='note log'>Already signed up? <a class='login' href='#'>Log in</a></div>";
    Title+= "<div class='note reg' style='display:none'>Not on Betterfly?  <a class='register' href='#'>Sign Up</a></div>";
    G_RegisterDialog = $('#register_form').dialog({
        modal: true,
        resizable: false,
        autoOpen: false,
        title: Title,
        width: 385,
        height: 'auto',
        buttons: {
            'Sign Up': function(){
                validateInfoForm();
            },
            'Log In': function(){
                validateLogin();
            }
        }
    });
    var Btns = G_RegisterDialog.parent().find('button').addClass('greenbutton');
    $('#register_form').find('form').submit(validateInfoForm);
    G_RegisterDialog.BtnReg = Btns.filter(':contains("Sign Up")');
    G_RegisterDialog.BtnLog = Btns.filter(':contains("Log In")').css('display', 'none');
    G_RegisterDialog.RegBlock = G_RegisterDialog.find('#j_register_block');
    G_RegisterDialog.LogBlock = G_RegisterDialog.find('#j_login_block');
    G_RegisterDialog.LogBlock.find('#registerLoginEmail, #registerLoginPassword').keyup(function(E){
        if(E.keyCode == 13){
            validateLogin();
            return false;
        }
    });
    G_RegisterDialog.Icon = $('<img class="ajax_ico" src="/images/_bf_custom/ajax-loader.gif"/>');
    G_RegisterDialog.Icon.css('display', 'none').insertAfter(G_RegisterDialog.BtnLog);
    G_RegisterDialog.parent().find('.note.log .login').click(toggleLogin);
    G_RegisterDialog.parent().find('.note.reg .register').click(toggleLogin);
    G_RegisterDialog.showLogin = function(Url){
        if(Url) _Url = Url;
        toggleLogin(true);
    };
    G_RegisterDialog.showRegister = function(){
        if(!G_RegisterDialog.RegBlock.is(':visible')) toggleLogin();
    };
    G_RegisterDialog.clearRegister = function(){
        $('#registerFirstName').val('');
        $('#registerLastName').val('');
        $('#registerUserEmail').val('');
        $('#registerPassword').val('');
        $('#registerConfirmPW').val('');
        $('#registerZip').val('');
        $('#registerAgreement').attr('checked', 'checked');
        G_RegisterDialog.RegBlock.find('.error').remove();
    };
    G_RegisterDialog.clearLogin = function(){
        $('#registerLoginEmail').val('');
        $('#registerLoginPassword').val('');
        $('#registerLoginRemember').get(0).checked = false;
        if(G_RegisterDialog.LogBlock) G_RegisterDialog.LogBlock.find('.error').html('');
    };
    function toggleLogin(Mode){
        if(G_RegisterDialog.RegBlock.is(':visible') || Mode===true){
            G_RegisterDialog.RegBlock.css('display', 'none');
            G_RegisterDialog.LogBlock.css('display', 'block');
            G_RegisterDialog.BtnReg.css('display', 'none');
            G_RegisterDialog.BtnLog.css('display', '');
            G_RegisterDialog.parent().find('.note.log').css('display', 'none');
            G_RegisterDialog.parent().find('.note.reg').css('display', '');
            G_RegisterDialog.parent().find('.name').html('Log In');
        }
        else{
            G_RegisterDialog.LogBlock.css('display', 'none');
            G_RegisterDialog.RegBlock.css('display', 'block');
            G_RegisterDialog.BtnLog.css('display', 'none');
            G_RegisterDialog.BtnReg.css('display', '');
            G_RegisterDialog.parent().find('.note.reg').css('display', 'none');
            G_RegisterDialog.parent().find('.note.log').css('display', '');
            G_RegisterDialog.parent().find('.name').html('Sign Up');
        }
        return false;
    }

    function step2(){
        G_RegisterDialog.BtnReg.html('Get Started').unbind('click').click(validateRoleForm);
        G_RegisterDialog.parent().find('.ui-dialog-title .right').css('display', 'block');
        G_RegisterDialog.find('#j_reg_info_form').hide();
        G_RegisterDialog.find('#j_reg_role_form').show();
        G_RegisterDialog.parent().find('.note.log').css('display', 'none');
    }
	
    function validateInfoForm(){
        clearErrors();
        var processing = 0;
        var randomUserName			= Math.floor(Math.random()*10000000001);
        var emailInput 				= $('#registerUserEmail');
        var passwordInput 			= $('#registerPassword');
        var confirmPasswordInput 	= $('#registerConfirmPW');
        var zipInput 				= $('#registerZip');
        var agreementInput	 		= $('#registerAgreement');
		
        var firstName 	= $('#registerFirstName').val().trim();
        var lastName 	= $('#registerLastName').val().trim();

        var fnames = firstName.split(" ");
        if (!firstName) triggerError($('#registerFirstName'), 'Please enter your first name.');
        else if (firstName.length > 20) triggerError($('#registerFirstName'), 'Your first name is too long.');
        else if (fnames.length > 2) triggerError($('#registerFirstName'), 'Your first name can\'t be more than two words.');
        else{
            for(var I=0; I<fnames.length; I++){
                if(fnames[I].length < 2){
                    triggerError($('#registerFirstName'), 'First name can\'t have one character word');
                    break;
                }
            }
        }
        
        var lnames = lastName.split(" ");
        if (!lastName) triggerError($('#registerLastName'), 'Please enter your last name.');
        else if (lastName.length > 20) triggerError($('#registerLastName'), 'Your last name is too long.');
        else if (lnames.length > 2) triggerError($('#registerLastName'), 'Your last name can\'t be more than two words.');
        else{
            for(I=0; I<lnames.length; I++){
                if(lnames[I].length < 2){
                    triggerError($('#registerLastName'), 'Last name can\'t have one character word');
                    break;
                }
            }
        }

        var emailPattern = /^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/i;
        if (emailInput.val().trim() == '')
            triggerError(emailInput, 'Fill in this field please.');
        else if (!emailPattern.test(emailInput.val()))
            triggerError(emailInput, 'This is not a valid email.');
        else{
            processing++;
            G_RegisterDialog.Icon.css('display', '');
            $.post('/ajaxcall/misc', {
                email: emailInput.val(),
                operation: 'email_check'
            }, function(a) {
                processing--;
                G_RegisterDialog.Icon.css('display', 'none');
                if (a !== '0'){
                    var DisErr = 'This email is associated with a Betterfly account that has '+
                        ' been deactivated. If you feel this is an error, or you would like to'+
                        ' reactivate your account, please email <a href="mailto:help@betterfly.com">help@betterfly.com</a>';
                    if(a == '2') triggerError(emailInput, DisErr);
                    else triggerError(emailInput, 'We are sorry, this email is already taken.');
                }
                else{
                    proceed();
                }
            });
        }
		
        if (passwordInput.val().length < 6)
            triggerError(passwordInput, 'This password is too short.');
		
        if (passwordInput.val() != confirmPasswordInput.val())
            triggerError(confirmPasswordInput, 'This confirm password does not match.');
		
        if (!agreementInput.is(':checked'))
            triggerError(agreementInput, 'In order to register you have to agree.', $('#agreementBox'));

        var ZipMsg = 'This is an invalid zip code. Please enter a valid U.S. zip code. '+
            'If you are outside of the U.S., you can use 99999 to register.';
        if (zipInput.val().length < 5)
            triggerError(zipInput, ZipMsg);
		
        else if (zipInput.val().length > 5)
            triggerError(zipInput, ZipMsg);
        else{
            processing++;
            G_RegisterDialog.Icon.css('display', '');
            $.post('/ajaxcall/misc', {
                zip: zipInput.val(),
                operation: 'zip_check'
            }, function(a) {
                processing--;
                G_RegisterDialog.Icon.css('display', 'none');
                if (a == '0')
                    triggerError(zipInput, ZipMsg);
                else
                    proceed();
            });
        }

        var scrollHeight = $('#register_form')[0].scrollHeight;
        var clientHeight = $('#register_form')[0].clientHeight;

        if (scrollHeight > clientHeight) {
            var toScroll = scrollHeight - clientHeight;
            G_RegisterDialog.dialog('option', 'height', 400 + toScroll);
            G_RegisterDialog.dialog('close');
            G_RegisterDialog.dialog('open');
        }
        var proceed = function(){
            if(processing>0 || errorsOnRegistrationCount) return;
            G_RegisterDialog.Icon.css('display', '');
            $.post('/ajaxcall/misc', {
                operation : "base64_encode",
                str: passwordInput.val()
            }, function(aa) {
                var b64 = aa;
                //make the last kick
                $.post('/signup.php', {
                    field_1: firstName,
                    field_6: lastName,
                    field_7_1 : '01',
                    field_7_2 : '01',
                    field_7_3 : '1986',
                    field_8 : '1',
                    step : 2,
                    task : "step2do",
                    signup_email : emailInput.val(),
                    signup_password : b64,
                    signup_password2 : b64,
                    signup_username : randomUserName,
                    signup_timezone : '+3',
                    signup_lang : 0,
                    signup_agree : 1,
                    signup_cat : 2,
                    signup_zip : zipInput.val()

                }, function(aaa, bbb) {
                    G_RegisterDialog.Icon.css('display', 'none');
                    if ( bbb === "success"){
                        step2();
                    }
                });
            });
        };
        return false;
    }

    function validateRoleForm() {
        G_RegisterDialog.Icon.css('display', '');
        var Data = G_RegisterDialog.find('#j_reg_role_form').serialize();
        IsBetterist = (Data == 'my_role=both' || Data == 'my_role=betterist');
        $.post('/ajaxcall/register_set_role', Data, function(aaa, bbb) {
            G_RegisterDialog.Icon.css('display', 'none');
            try{ pageTracker._trackPageview('popup-user-register-finished'); }catch(e){}
            /*
            var finish = function(){
                window.location.href = "/home.php";
            }
            */
            if(bbb === "success"){
                if(IsBetterist){
                    G_RegisterDialog.dialog('close');
                    window.location.href = "/home.php?firstregister=1";
                    /*
                    BetteristAddServicePopUp.open();
                    BetteristAddServicePopUp.toggleFirstTime(true);
                    BetteristAddServicePopUp.setOnSave(finish);
                    BetteristAddServicePopUp.setOnClose(finish);
                    */
                    return;
                }
                window.location.href = "/home.php";
            }
        });
    }

    function validateLogin(){
        var Form = G_RegisterDialog.LogBlock.find('form').get(0);
        var Error = G_RegisterDialog.LogBlock.find('.error');
        var onLogin = function(Resp){
            G_RegisterDialog.Icon.css('display', 'none');
            var Data = {};
            try{
                eval('Data = '+Resp);
            } catch(e){}
            if(!Data.status){
                Error.html(Data.error_message);
            }
            else{
                G_RegisterDialog.dialog('close');
                if(_Url) window.location.href = _Url;
                else window.location.reload();
            }
        };
        Error.html('');
        if(!Form.email.value){
            Error.html('Please type email address.');
            return;
        }
        if(!Form.email.value){
            Error.html('Please type your password.');
            return;
        }
        G_RegisterDialog.Icon.css('display', '');
        var Data = G_RegisterDialog.LogBlock.find('form').serialize();
        $.post('/login.php', Data, onLogin);
    }

    function triggerError(element, message, insertAfter)
    {
        errorsOnRegistrationCount++;
        var errorContainer = $('<div class="error" style="display:none"></div>');
        errorContainer.html(message);
        if (insertAfter)
            $(insertAfter).after(errorContainer);
        else
            $(element).after(errorContainer);
        errorContainer.fadeIn('slow');
    }
	
    function clearErrors()
    {
        errorsOnRegistrationCount = 0;
        $('.error').hide('slow').remove();
    }
});
/* end ../include/js/user.register.js */

/* start ../include/js/serviceautocomplete.js */
/*
 *  Class for services smart autocomplete dropdown
 */
var MinSearchAutoCompleteClass = function(Obj){
    var self = this;
    var _SrvSrchText = 'Type to search among our list of services';
    var _OrigVal = _SrvSrchText;
    var _OrigId = null;
    var _SB = null;
    var _Ul = null;
    var _Links = {};
    var _Services = [];
    var _ActLink = -1;
    var _skipHide = false;
    var _Loaded = false;
    var _LoadSearch = null;
    this.reset = true;
    this.onselect = null;
    this.blockonsingle = false;

    var _init = function(){
        var onfocus = function(){
            _skipHide = true;
            if(this.value == _SrvSrchText) _SB.I.val('').removeClass('inptgrey');
        }
        var onblur = function(){
            if(!this.value){
                this.value = _SrvSrchText;
                _SB.I.addClass('inptgrey');
            }
        }
        _SB = Obj?Obj:jQuery('.dz-services-select');
        _Ul = _SB.find('.dz-service-drop-search').hide().click(function(){_skipHide = true;});
        _SB.I = _SB.find('.dz-service-input').keypress(_trapKeys).keyup(_key).click(onfocus).focus(onfocus).blur(onblur);
        _SB.I.val(_OrigVal).addClass('inptgrey');
        _SB.Hid = _SB.find('.dz-service-id-input');
        _SB.find('.dz-service-submit').click(function(){self.search( _SB.I.val() ); return false;})
        jQuery(document).click(_hide);
        _load();
    };
    var _load = function(){
        var processData = function(Data){
            for(var I=0; I<Data.length; I++){
                _Services.push({Val: Data[I].user_displayname, Id: Data[I].user_id});
                if(Data[I].user_id == _OrigId){
                    _OrigVal = Data[I].user_displayname;
                    _select();
                }
            }
            _Loaded = true;
            if(_LoadSearch && _Ul.is(':visible')) self.search(_LoadSearch);
            if(typeof self.onload == 'function') self.onload();
        };
        jQuery.getJSON('/ajaxcall/search?operation=services&snn=1', {}, processData);
    }
    var _clear = function(){
        _Links = [];
        _ActLink = -1;
        _Ul.html('');
    };
    var _key = function(E){
        var Min = 1;
        var V = this.value;
        if(E.keyCode == '13' && (_Links[_ActLink] || !self.reset)){ //enter
            if(!_Links[_ActLink] &&  typeof self.onselect == 'function') self.onselect(_OrigVal, _OrigId);
            _select();
            _skipHide = false;
            _hide(true);
            return true;
        }
        var hoverup = function(I){
            if(_Links[I]){
                if(_Links[_ActLink]){
                    _Links[_ActLink].removeClass('hover');
                }
                _Links[I].addClass('hover');
                _ActLink = I;
            }
            else if(I==-1){
                _Links[_ActLink].removeClass('hover');
                _ActLink = -1;
            }
            return true;
        }
        if(E.keyCode == '38'){ //up
            return hoverup(_ActLink-1);
        }
        if(E.keyCode == '40'){ //down
            return hoverup(_ActLink+1);
        }
        if(self.blockonsingle && _Links.length==1){ //do not allow to type further if the only match found
            if(_SB.I.val().match(new RegExp('^'+_Links[0].Val+'.', 'i'))){
                _SB.I.val(_Links[0].Val);
                return false;
            }
        }
        if(V.length >= Min){ //results to min of 2
            self.search(V);
        }
        return true;
    };
    var _trapKeys = function(E){
        if(E.keyCode == '13' && _ActLink>-1){ //enter
            return false;
        }
        return true;
    };
    var _show = function(){
        _SB.addClass("search-drop-active");
        _Ul.fadeIn(200);
    };
    var _hide = function(NoSelect){
        if(_skipHide){
            _skipHide = false;
            return;
        }
        if(NoSelect !== true && self.reset) _select();
        _SB.removeClass("search-drop-active");
        if(_Ul.is(':visible')) _Ul.fadeOut(200);
        else _Ul.hide();
    };
    var _select = function(Link, runOnSel){
        if(Link){
            for(var I=0; I<_Links.length; I++){
                if(_Links[I]==Link){
                    _ActLink = I;
                    break;
                }
            }
        }
        if(!Link && _ActLink >= 0){
            Link = _Links[_ActLink];
        }
        if(Link){
            _SB.I.val(Link.Val);
            _SB.Hid.val(Link.Id);
            _OrigVal = Link.Val;
            _OrigId = Link.Id;
            if(typeof self.onselect == 'function') self.onselect(_OrigVal, _OrigId);
            return false;
        }
        if(runOnSel){
            if(typeof self.onselect == 'function') self.onselect(_OrigVal, _OrigId);
        }
        if(self.reset){
            _SB.I.val(_OrigVal);
            _SB.Hid.val(_OrigId);
            if(_OrigVal == _SrvSrchText) _SB.I.addClass('inptgrey');
        }
        else{
            _SB.Hid.val('');
        }
        return false;
    };

    this.set = function(Id){
        if(!_Loaded){
            self.onload = function(){ self.set(Id); }
            return;
        }
        _ActLink = -1;
        for(var I=0; I<_Services.length; I++){
            if(_Services[I].Id == Id){
                _OrigVal = _Services[I].Val;
                _OrigId = _Services[I].Id;
                _SB.I.val(_OrigVal);
                _SB.Hid.val(_OrigId);
                return;
            }
        }
    };
    this.search = function(Str){
        if(!Str){
            return;
        }
        _clear();
        if(!_Loaded){
            jQuery('<li class="no_services">Loading...</li>').appendTo(_Ul);
            _LoadSearch = Str;
            _show();
            return;
        }
        var Data = [];
        var LowData = [];
        for(var I=0; I<_Services.length; I++){
            var R = new RegExp("^"+Str+".*", "i");
            var LR = new RegExp("[ /(]"+Str+".*", "i");
            if(_Services[I].Val.match(R)){
                Data.push({Val: _Services[I].Val, Id: _Services[I].Id});
            }
            if(_Services[I].Val.match(LR)){
                LowData.push({Val: _Services[I].Val, Id: _Services[I].Id});
            }
        }
        if(LowData.length > 0){
            while(LowData.length) Data.push(LowData.pop())
        }
        jQuery.each(Data, function(I, V){
            var Ln = jQuery('<li><a href="#">'+V.Val+'</a></li>').appendTo(_Ul);
            Ln.find('a').click(function(){_select(Ln); _hide(true); return false;});
            Ln.Id = V.Id;
            Ln.Val = V.Val;
            _Links.push(Ln);
            if(V.Val.toLowerCase() == _SB.I.val().toLowerCase()){
                _ActLink = _Links.length-1;
            }
        });
        if(!Data.length){
            jQuery('<li class="no_services">No services found</li>').appendTo(_Ul);
        }
        _show();
    };
    this.clear = function(){
        _ActLink = -1;
        _OrigVal = _SrvSrchText;
        _OrigId = '';
        _SB.I.val(_OrigVal).addClass('inptgrey');
        _SB.Hid.val(_OrigId);
    };
    this.select = function(){
        _select(null, true);
        _hide();
    }
    this.hide = function(){
        _hide();
    }

    jQuery(window).ready(_init);
};

/* end ../include/js/serviceautocomplete.js */

/* start ../include/js/services_search.js */
/*
 * Advanced category service select class
 */
var CServicesSearch = function(_Obj){
    var self = this;
    var _inited = false;
    var _observerUrl = '/services_search_observer.php';
    var _regionsCount = 5;
    var _CatChain = [].concat(window.G_CatChain);
    this.onSelect = null;
    this.selSrvId = null;
    this.selSrvName = null;
    this.ppMode = false;
    
    var _init = function() {
        if(_inited) return;
        if(!_Obj) _Obj = jQuery('.srv_search_block').eq(0);
        _inited = true;
        _load(0, 1, 0);
    };

    var _load = function(iniciatorRegionId, destinationRegionId, iniciatorId) {
        var Dest = _Obj.find('.box_' + destinationRegionId);
        Dest.html('<div style="margin-top:120px; text-align:center; font-weight:bold; height:auto;">Loading...</div>');
        jQuery.ajax({
            url: _observerUrl,
            type: 'post',
            dataType: 'json',
            data: 'iniciatorRegionId=' + iniciatorRegionId + '&destinationRegionId=' + destinationRegionId + '&iniciatorId=' + iniciatorId,
            success: function(response) {
                _fetchToRegion(destinationRegionId, response.items);
                _Obj.find('.ServicesSearchCountResult').html(response.searchResultCount);
                if(self.ppMode && parseInt(destinationRegionId)<2)
                    _Obj.find('.ServicesSearchResult tr td').html('<p class="too_many">Too many services found. Please refine your criteria further.</p>');
                else{
                    _Obj.find('.ServicesSearchResult tr td').html(response.searchResult);
                    if(self.ppMode){
                        //hight up the body
                        var Cover = jQuery('.ui-widget-overlay:visible');
                        var PopUp = Cover.next();
                        var T = parseInt(PopUp.css('top'));
                        var H = PopUp.height();
                        if(Cover.height() < T+H) Cover.height(T+H+50);
                        _Obj.find('.ServicesSearchResult tr td').find('a').click(function(){
                            _Obj.find('.ServicesSearchResult tr td').find('a.selected').removeClass('selected');
                            var A = jQuery(this).addClass('selected');
                            self.selSrvId = A.attr('data-id');
                            self.selSrvName = A.text();
                            if(self.onSelect) self.onSelect();
                            return false;
                        });
                    }
                }
            },
            error: function(){
                _load(iniciatorRegionId, destinationRegionId, iniciatorId);
            }
        });
    };

    var _fetchToRegion = function(regionId, items) {
        var destinationRegion 	= _Obj.find('.box_' + regionId);
        destinationRegion.html('');
        
        if(_CatChain.length){
            var ToLoad = _CatChain.shift();
        }
        if(items.length){
            destinationRegion.addClass('active');

            var div = jQuery('<div></div>');
            var ul	= jQuery('<ul></ul>');
            div.append(ul);
            items.each(function(item) {

                var li		= jQuery('<li></li>');
                var link 	= jQuery('<a href="#">' + item.title + '</a>');
                li.append(link);
                ul.append(li);
                link.click(function() {
                    _blackOutRegionsFrom(regionId);
                    _load(regionId, regionId + 1, item.id);
                    div.find('a').removeClass('selected');
                    link.addClass('selected');
                    return false;
                });
                if(ToLoad == item.id){
                    _blackOutRegionsFrom(regionId);
                    div.find('a').removeClass('selected');
                    link.addClass('selected');
                    _load(regionId, regionId + 1, ToLoad);
                }

                destinationRegion.append(div);
            });
        }

    };

    var _blackOutRegionsFrom = function (regionId) {
        regionId++;
        for (var i = regionId; i <= _regionsCount; i++) {
            var region = _Obj.find('.box_' + i);
            region.html('');
            region.removeClass('active');
        }
    }

    _init();
};
/* end ../include/js/services_search.js */

/* start ../include/js/BetteristAddServicePopUp.js */
/*
 * Singleton - Betterist Add Service popup
 *
 * &author Denis Zenkovich
 */
var BetteristAddServicePopUp = new function(){
    var self = this;
    var _Inited = false;
    var _Popup = null;
    var _AnPopup = null;
    var _ReloadOnClose = false;
    var _AddAnother = false;
    var _SrvsAutoComplete = null;
    var _PriceSets = [];
    var _PriceSetsPat = null;
    var _DefPriceSet = null;
    var _AgesMode = null;
    var _onSave = null;
    var _onClose = null;
    var _CloseDelay = null;
    var _SrvExText = 'Ex: Trombone Lessons With Heather';

    function _init(){
        _AnPopup = jQuery('#j_betterist_add_another_service_popup').dialog({
            resizable: false,
            modal: true,
            width: 400,
            autoOpen: false,
            buttons: {
                'Go to my Betterist Page': function(){
                    if(window.G_FirstOverview) window.location.reload();
                    _AnPopup.dialog('close');
                },
                'Add another service': function(){
                    _AnPopup.dialog('close');
                    _Popup.dialog('open');
                }
            },
            open: function(){
                if(_CloseDelay){
                    window.clearTimeout(_CloseDelay);
                    _CloseDelay = null;
                }
                _AddAnother = false;
            }
        });
        _AnPopup.parent().find('button:contains("Add another service")').addClass('greenbutton');
        _Popup = jQuery('#j_betterist_add_service_popup').dialog({
            resizable: false,
            modal: true,
            title: 'Add a Service',
            width: 680,
            autoOpen: false,
            buttons: {
                Cancel: function(){ _Popup.dialog('close') },
                'Save & Add Another Service': function(){
                    _AddAnother = true;
                    _save();
                },
                Save: _save
            },
            close: function(){
                _reset();
                if(_onClose && typeof _onClose == 'function') _onClose();
                if(_ReloadOnClose){
                    _CloseDelay = window.setTimeout(function(){window.location.reload();}, 200);
                } 
            },
            open: function(){
                _Popup.find('.error').removeClass('error');
                _Popup.Error.html('');
            }
        });
        _Popup.parent().find('button:contains("Save & Add Another Service")').addClass('greenbutton');
        _Popup.SaveBtn = _Popup.parent().find('button:contains("Save")').addClass('greenbutton');
        _Popup.CancelBtn = _Popup.parent().find('button:contains("Cancel")');
        _Popup.Error = _Popup.find('.error_message');
        _Popup.SrvTtl = _Popup.find('#service_item_title');
        _Popup.SrvTtl.focus(function(){
            if(this.value == _SrvExText){
                this.value = '';
                _Popup.SrvTtl.removeClass('inptgrey');
            }
        }).blur(function(){
            if(this.value == ''){
                this.value = _SrvExText;
                _Popup.SrvTtl.addClass('inptgrey');
            }
        });

        _SrvsAutoComplete = new MinSearchAutoCompleteClass(_Popup.find('.dz-services-select'));
        _initAdvSrvs();
        _initPriceSet();

        _Popup.find('#j_srv_pp_age_radio_all').click(function(){_toggleAges(true)});
        _Popup.find('#j_srv_pp_age_radio_range').click(function(){_toggleAges(false)});
        _reset();
        _Inited = true;
    }
    function _initAdvSrvs(){
        var srvsel = function(){
            _SrvsAutoComplete.set(SrvSearch.selSrvId);
            AdvSrvs.dialog('close');
        };
        var SrvSearch = new CServicesSearch($('.j_service_add_advcats_dialog'));
        SrvSearch.ppMode = true;
        SrvSearch.onSelect = srvsel;
        var AdvSrvs = jQuery('.j_service_add_advcats_dialog').dialog({
            bgiframe: true,
            autoOpen: false,
            height: 'auto',
            width: 960,
            modal: true,
            close: function(){
                _Popup.dialog('moveToTop', true);
            }
        });
        AdvSrvs.parent().find('button:contains("OK")').addClass('greenbutton');
        _Popup.find('#service_advcats_lnk').click(function(){AdvSrvs.dialog('open'); return false;});
    }
    function _initPriceSet(){
        _PriceSetsPat =_Popup.find('.j_dur_price_set').remove();
        _PriceSetsPat.find('input[name="item_default_price_set"]').attr('checked', false);
        _Popup.find('#snn_add_price_set').click(_addPriceSet);
        _addPriceSet();
    }
    function _toggleAges(On){
        var AgesB = _Popup.find('#j_srv_pp_age_radio_all').parent();
        if(On){
            _Popup.find('#j_srv_pp_age_radio_all').attr('checked', 'checked');
            AgesB.find('select[name=item_age_from]').attr('disabled', 'disabled').val(0);
            AgesB.find('select[name=item_age_to]').attr('disabled', 'disabled').val(99);
            AgesB.find('.j_age_all').removeClass('disabled');
            AgesB.find('.j_age_mm').addClass('disabled');
        }
        else{
            _Popup.find('#j_srv_pp_age_radio_range').attr('checked', 'checked');
            AgesB.find('select[name=item_age_from]').attr('disabled', '');
            AgesB.find('select[name=item_age_to]').attr('disabled', '');
            AgesB.find('.j_age_all').addClass('disabled');
            AgesB.find('.j_age_mm').removeClass('disabled');
        }
    }
    function _addPriceSet(){
        var NewPS = _PriceSetsPat.clone();
        var Ind = _PriceSets.length;
        NewPS.appendTo(_Popup.find('.j_dur_price_set_table'));
        NewPS.find('input[name="item_default_price_set"]').attr('id', 'item_default_price_set_'+Ind).val(Ind+1);
        NewPS.find('label[for="item_default_price_set_0"]').attr('for', 'item_default_price_set_'+Ind);
        NewPS.find('.j_del_price_dur_set').click(function(){ _deletePriceSet(NewPS); return false; });
        if(_PriceSets.length) NewPS.find('.j_del_price_dur_set').show();
        infoPopup(NewPS.find(".info_popup"));
        _PriceSets.push(NewPS);
        return NewPS;
    }
    function _deletePriceSet(PS){
        for(var I=0; I<_PriceSets.length; I++){
            if(_PriceSets[I] == PS){
                _PriceSets[I] = null;
                break;
            }
        }
        if(PS.find('input[name="item_default_price_set"]:checked').length){
            _PriceSets[0].find('input[name="item_default_price_set"]').attr('checked', 'checked');
        }
        PS.remove();
    }
    function _loadPriceSets(Data){
        while(_PriceSets.length){
            var PS = _PriceSets.shift();
            if(PS) PS.remove();
        }
        for(var I=0; I<Data.length; I++){
            PS = _addPriceSet();
            var H = Math.floor(Data[I].duration/60);
            var M = Data[I].duration%60;
            PS.find('.duration_h').val(H);
            PS.find('.duration_m').val(M);
            PS.find('.prc').val(Data[I].price);
            PS.find('input[name="combo_item_id"]').val(Data[I].combo_id);
        }
    }
    function _validateService(){
        var SrvInpt = _Popup.find('.dz-service-input');
        var SrvInptId = _Popup.find('.dz-service-id-input');
        if(!SrvInptId.val()){
            SrvInpt.addClass('error');
            var Txt = 'Please enter a Betterfly Service';
            if(!_Popup.Error.find('.error_service').length) _Popup.Error.append(jQuery('<div class="error_service">'+Txt+'</div>'));
            return false;
        }
        return true;
    }
    function _validateAges(){
        var AgeFrom = _Popup.find('select[name=item_age_from]');
        var AgeTo = _Popup.find('select[name=item_age_to]');
        if(AgeFrom.length && !AgeFrom.is(':disabled') && parseInt(AgeFrom.val()) > parseInt(AgeTo.val())){
            AgeFrom.addClass('error');
            AgeTo.addClass('error');
            var Txt = 'Invalid age range specified';
            if(!_Popup.Error.find('.error_ages').length) _Popup.Error.append(jQuery('<div class="error_ages">'+Txt+'</div>'));
            return false;
        }
        return true;
    }
    function _validatePriceSets(){
        var Valid = true;
        for(var I=0; I<_PriceSets.length; I++){
            if(!_PriceSets[I]) continue;
            var DurError = false;
            var PrError = false;
            var DurH = _PriceSets[I].find('.duration_h');
            var DurM = _PriceSets[I].find('.duration_m');
            var Pr = _PriceSets[I].find('.prc');
            var Dur = DurH.val()*60 + DurM.val()*1;
            if(!DurH.val() && !DurM.val()){
                DurError = 'error_dur_missing';
                var Txt = 'Please enter a service duration';
            }
            else if(!Dur){
                DurError = 'error_dur_invalid';
                Txt = 'Please enter a service duration';
            }
            else if(Dur > 1435){
                DurError = 'error_dur_long';
                Txt = 'Appointment duration cannot exceed 23 hours 55 minutes';
            }
            if(DurError){
                Valid = false;
                DurH.addClass('error');
                DurM.addClass('error');
                if(!_Popup.find('.'+DurError).length){
                    _Popup.Error.append(jQuery('<div class="'+DurError+'">'+Txt+'</div>'));
                }
            }
            if(Pr.val()===''){
                PrError = 'error_pr_missing';
                Txt = 'Please enter a service price';
            }
            else if(!(parseFloat(Pr.val())>=0)){
                PrError = 'error_pr_invalid';
                Txt = 'Please enter a valid service price';
            }
            if(PrError){
                Valid = false;
                Pr.addClass('error');
                if(!_Popup.find('.'+PrError).length){
                    _Popup.Error.append(jQuery('<div class="'+PrError+'">'+Txt+'</div>'));
                }
            }
        }
        return Valid;
    }
    function _preparePriceSets(){
        var Ind = 1;
        for(var I=0; I<_PriceSets.length; I++){
            if(!_PriceSets[I]) continue;
            var DurH = _PriceSets[I].find('.duration_h');
            var DurM = _PriceSets[I].find('.duration_m');
            var Dur = DurH.val()*60 + DurM.val()*1;
            var Pr = _PriceSets[I].find('.prc');
            _PriceSets[I].find('input[name="item_duration"]').val(Dur).attr('name', 'item_duration['+(Ind)+']');
            _PriceSets[I].find('input[name="item_price"]').val(Pr.val()).attr('name', 'item_price['+(Ind)+']');
            _PriceSets[I].find('input[name="combo_item_id"]').attr('name', 'combo_item_id['+(Ind)+']');
            Ind++;
        }
    }
    function _save(){
        _Popup.find('.error').removeClass('error');
        _Popup.Error.html('');
        if(_Popup.SrvTtl.val() == _SrvExText) _Popup.SrvTtl.val('');
        var V1 = _validateService();
        var V2 = _validateAges();
        var V3 = _validatePriceSets();
        if(!V1 || !V2 || !V3){
            return;
        }
        _preparePriceSets();
        var Data = _Popup.find('form').serialize();
        var onSave = function(Resp){
            var Data = null;
            try{ eval("Data = "+Resp) }catch(e){}
            if(Data && Data.errorcode == 4){
                var Txt = '"Your Service Title" below; it\'s the same as another service you offer';
                _Popup.find('.dz-service-input').addClass('error');
                if(!_Popup.Error.find('.error_same_name').length){
                    _Popup.Error.append(jQuery('<div class="error_same_name">'+Txt+'</div>'));
                }
                return;
            }
            if(_onSave && typeof _onSave == 'function') _onSave(Resp, _AddAnother);
            _Popup.dialog('close');
            if(window.G_FirstOverview){
                _AnPopup.dialog('open');
                _ReloadOnClose = true;
            }
            if(_AddAnother) _AnPopup.dialog('open');
        }
        jQuery.post('ats_store_ex_mystore_items.php', Data, onSave);
    }
    function _reset(){
        var Data = {
            item_title: _SrvExText,
            item_pvt: '1',
            item_grp: '0',
            item_level_1: '1',
            item_level_2: '1',
            item_level_3: '1',
            item_age_from: '0',
            item_age_to: '99',
            item_description: '',
            item_default_price_set: '1',
            task: 'ats_new',
            price_sets: [{
                duration: '',
                price: '',
                combo_id: ''
            }]
        };
        self.load(Data);
    }

    this.setService = function(Srv){
        _SrvsAutoComplete.set(Srv);
    };
    this.load = function(Data){
        if(Data.modal && Data.modal.title) _Popup.dialog('option', 'title', Data.modal.title);
        else _Popup.dialog('option', 'title', 'Add a Service');
        if(window.G_FirstOverview) this.toggleFirstTime(true);
        if(!Data.task) Data.task = 'ats_new';
        if(!Data.item_id) Data.item_id = '';
        _Popup.find('input[name="task"]').val(Data.task);
        _Popup.find('input[name="item_id"]').val(Data.item_id);
        //service and title
        if(Data.service_id) _SrvsAutoComplete.set(Data.service_id);
        else _SrvsAutoComplete.clear();
        _Popup.find('input[name="item_title"]').val(Data.item_title);
        if(Data.item_title == _SrvExText) _Popup.SrvTtl.addClass('inptgrey');
        else _Popup.SrvTtl.removeClass('inptgrey');
        //group
        _Popup.find('input[name="item_pvt"]').attr('checked', Data.item_pvt == '1');
        _Popup.find('input[name="item_grp"]').attr('checked', Data.item_grp == '1');
        //levels
        _Popup.find('input[name="item_level_1"]').attr('checked', Data.item_level_1 == '1');
        _Popup.find('input[name="item_level_2"]').attr('checked', Data.item_level_2 == '1');
        _Popup.find('input[name="item_level_3"]').attr('checked', Data.item_level_3 == '1');
        //ages
        _AgesMode = Data.item_age_from == '0' && Data.item_age_to == '99';
        _Popup.find('select[name="item_age_from"]').val(Data.item_age_from);
        _Popup.find('select[name="item_age_to"]').val(Data.item_age_to);
        //description
        _Popup.find('textarea[name="item_description"]').val(Data.item_description);
        //duration/price
        _loadPriceSets(Data.price_sets);
        _DefPriceSet = Data.item_default_price_set-1;
        _PriceSets[_DefPriceSet].find('input[name="item_default_price_set"]').attr('checked', 'checked');
    };
    this.open = function(){
        if(!_Inited) _init();
        _Popup.dialog('open');
        if(_DefPriceSet != null)
            _PriceSets[_DefPriceSet].find('input[name="item_default_price_set"]').attr('checked', 'checked');
        _toggleAges(_AgesMode);
        _onSave = null;
    };
    this.toggleFirstTime = function(On){
        if(On){
            _Popup.dialog('option', 'title', 'What Service Do You Want to Offer?');
            _Popup.CancelBtn.html('Add my Service Later');
        }
        else{
            _Popup.dialog('option', 'title', 'Add a Service');
            _Popup.CancelBtn.html('Cancel');
        }
    };
    this.setOnSave = function(Func){
        if(typeof Func == 'function') _onSave = Func;
    };
    this.setOnClose = function(Func){
        if(typeof Func == 'function') _onClose = Func;
    };
    this.init = function(){
        _init();
    }
}();
/* end ../include/js/BetteristAddServicePopUp.js */

/* start ../vendors/jquery.betterfly.slider.js */
/*
 * jQuery Betterfly slider plug-in 0.1
 *
 * http://betterfly.com
 *
 * Copyright (c) 2009 Sinan Yasar
 *
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */

(function($) {

$.fn.betterflySlider = function(settings) {

	var c = {
		'slideshow'	: true,
		'delay'		: 15000,
		'speed'		: 800,
		'max'		: 10,
		'data' 		: []
	};
	
	var o = {};
	
	if (settings) { $.extend(c, settings); }
    if(c.data.length) c.data.push(c.data[0]);
    var l = c.data.length;
	var t;
	
	this.each(function(i) {
		var self = this;
		var $self = $(this);
		var $frame = $("<div class='bf-slide-frame'></div>");
		var $film = $("<div class='bf-slide-film'></div>");
		
		var slideTo = function (i, NoEffect) {
			clearTimeout(t);
            if(NoEffect){
                $frame.css({marginLeft: -(i*901)+"px"});
                $self.find('ul.captions li').hide();
                $self.find('ul.captions li:eq('+i+')').fadeIn(c.speed/2);
            }
            else{
                $frame.animate({marginLeft: -(i*901)+"px"}, c.speed, function() {
                    if(i==l-1){
                        $frame.css('margin-left', 0);
                        i=0;
                    }
                    $self.find('ul.captions li').hide();
                    $self.find('ul.captions li:eq('+i+')').fadeIn(c.speed/2);
                });
            }

			$self.find('ul.small_nav li a').removeClass('active');
			$self.find('ul.small_nav li:eq('+(i==l-1?0:i)+') a').addClass('active');

			$self.find('ul.captions li').fadeOut(c.speed/2);
		}
		
		var slideToNext = function () {
			var i = $self.find('ul.small_nav li a').index($self.find('ul.small_nav li a.active'));
            if(i>=l) i=-1;
            slideTo(i+1);
			
			t = setTimeout(function(){
				slideToNext();
			}, c.data[i+1].time?c.data[i+1].time:c.delay);
		}
		
		$film.width((l+1)*$self.width());
		
		$self.append('<div class="bf-slider-nav-back"></div><div class="bf-slider-nav-text"><ul class="captions"></ul><ul class="small_nav"></ul></div>');

		$.each(c.data, function(i) {
			var that = this;
			var $slide = $("<div title=\""+that.title+"\" class=\"bf_home_slide slide"+i+"\"><img alt=\""+that.title+"\" src=\""+that.src+"\"/>"+(that.html?that.html:'')+"</div>").click(function() {
				document.location = that.link;
			});
            $film.append($slide);

            if(c.slideshow){
                if (i === 0){
                    var $nav_item = $('<li><a href="#" class="active"></a></li>').click(function() {slideTo(i, true)});
                    var $caption = $('<li>'+that.caption+'</li>');
                }else if(i != l-1) {
                    var $nav_item = $('<li><a href="#"></a></li>').click(function() {slideTo(i, true)});
                    var $caption = $('<li>'+that.caption+'</li>').hide();
                }

                if(i != l-1) {
                    $self.find('ul.small_nav').append($nav_item);
                    $self.find('ul.captions').append($caption);
                }
            }
		});
		
		$frame.append($film);
		$self.append($frame);
		
		if (c.slideshow){
			jQuery(function($){
				setTimeout(function(){
					slideToNext()
				}, c.data[0].time?c.data[0].time:c.delay);
			});
		}
	});
	
	return this;

};

})(jQuery);
/* end ../vendors/jquery.betterfly.slider.js */

/* start ../include/js/invite.js */
var G_Invite = {};
function inviteClientReview(){
    if(G_Invite.ClientReview) G_Invite.ClientReview.dialog('open');
    return false;
}
function inviteFriend(){
    if(G_Invite.Friend) G_Invite.Friend.dialog('open');
    return false;
}
function inviteClient(){
    if(G_Invite.Client) G_Invite.Client.dialog('open');
    return false;
}
function inviteBetterist(){
    if(G_Invite.Betterist) G_Invite.Betterist.dialog('open');
    return false;
}
function inviteFriendPlugin(){
    showPlaxoABChooser('recipients_list', '/plaxo_emails.php');
}
function inviteFriendPluginOnAdd(Data){
    G_Invite.InvitePlugin.dialog('open');
    var Emails = [];
    for(var I=0; I<Data.length; I++){
        Emails.push(Data[I][1]);
    }
    G_Invite.InvitePlugin.find('.invite_emails').val(Emails.join(', '));
}

jQuery( function($){
    var Error = $('#j_invite_error_table');
    Error.Msg = Error.find('.error');
    var validateEmails = function(onPass){
        Error.css('display', 'none').Msg.html('');
        var Emls = $('#j_invite_emails').val().split(/,\s*/g);
        for(var I=0; I<Emls.length; I++){
            if(!Emls[I]){
                Emls.splice(I, 1);
                I--;
            }
        }
        if(!Emls.length || (Emls.length == 1 && Emls[0]=='')){
            Error.css('display', '').Msg.html('Please provide friend email address.');
            return;
        }
        $('#j_invite_emails').val(Emls.join(', '));
        var Num = 0;
        var check = function(){
            var onReady = function(Valid, Obj){
                if(!Valid){
                    Error.css('display', '').Msg.html('This is not a vlid email: "'+Emls[Num]+'".');
                    return;
                }
                Num++;
                if(Num == Emls.length){
                    if(typeof onPass == 'function') onPass();
                    return;
                }
                check();
            };
            CForm.validate(Emls[Num], {required: {}, email: {}}, onReady);
        };
        check();
    }
    $('#j_invite_emails').blur(validateEmails);
    var Form = $('#j_invite_form').submit( function(){
        var onPass = function(){
            Form.unbind('submit').submit();
        };
        validateEmails(onPass);
        return false;
    } );

    /*
     * Invite Popups
     */
    var DialogSets = {
        resizable: false,
        modal: true,
        autoOpen: false,
        height: 'auto',
        width: 450,
        buttons: {
            Cancel: function(){
                $(this).dialog('close');
            },
            Invite: function(){
                var Obj = $(this);
                var Error = Obj.find('.field_error').html('');
                var Emails = Obj.find('.invite_emails').val();
                var YName = Obj.find('.invite_your_name').val();
                var YEmail = Obj.find('.invite_your_email').val();
                var Message = Obj.find('.invite_message').val();
                if(!Emails || !YName || !YEmail){
                    Error.html('Please fill out all required fields.');
                    return;
                }
                Emails = Emails.split(/,\s*/g);
                if(Emails.length > 10){
                    Error.html('You can invite up to 10 people at a time.');
                    return;
                }
                var Num = 0;
                var check = function(){
                    var onReady = function(Valid){
                        if(!Valid){
                            Error.html('This is not a valid email: "'+Emails[Num]+'".');
                            return;
                        }
                        Num++;
                        if(Num == Emails.length){
                            var Ico = $('<img src="/images/_bf_custom/ajax-loader.gif" style="float:right; margin:5px 10px 0 0;">');
                            Ico.appendTo(Obj.parent().find('.ui-dialog-buttonpane'));
                            var onComplete = function(Resp){
                                Ico.remove();
                                var Data = null;
                                try{eval('Data = '+Resp)}catch(e){
                                    Error.html('Server error, please try again.');
                                    return;
                                }
                                if(!Data.status){
                                    Error.html(Data.error?Data.error:'Server error, please try again.');
                                    return;
                                }
                                Obj.dialog('close');
                                G_Invite.LastPopup = Obj;
                                G_Invite.Sent.dialog('open');
                            }
                            var Data = {
                                emails: Emails.join(','),
                                your_email: YEmail,
                                your_name: YName,
                                message: Message,
                                type: Obj.attr('id').replace('j_invite_', '')
                            };
                            $.post('/ajaxcall/sendinvites', Data, onComplete);
                            return;
                        }
                        check();
                    };
                    CForm.validate(Emails[Num], {required: {}, email: {}}, onReady);
                };
                var checkYourEmail = function(Valid){
                    if(!Valid){
                        Error.html('Your email address is not valid.');
                        return;
                    }
                    check();
                }
                CForm.validate(YEmail, {required: {}, email: {}}, checkYourEmail);
            }
        },
        open: function(){
            var Obj = $(this);
            Obj.parent().find('button:contains("Invite")').addClass('greenbutton');
            Obj.find('.invite_emails').val('');
            var YName = Obj.find('.invite_your_name');
            var YEmail = Obj.find('.invite_your_email');
            var Message = Obj.find('.invite_message');
            YName.val(YName.attr('data'));
            YEmail.val(YEmail.attr('data'));
            Message.val(Message.attr('data'));
            YEmail.attr('disabled', (YEmail.val()?'disabled':''));
        }
    }
    G_Invite.Sent = $('#j_invites_sent').dialog({
        resizable: false,
        modal: true,
        autoOpen: false,
        height: 'auto',
        width: 450,
        buttons: {
            "Not Right Now": function(){
                $(this).dialog('close');
            },
            "Send Another Invite": function(){
                $(this).dialog('close');
                if(G_Invite.LastPopup) G_Invite.LastPopup.dialog('open');
            }
        }
    });
    G_Invite.PluginSent = $('#j_invites_plugin_sent').dialog({
        resizable: false,
        modal: true,
        autoOpen: false,
        height: 'auto',
        width: 450,
        buttons: {
            "Not Right Now": function(){
                $(this).dialog('close');
            },
            "Invite More People": function(){
                $(this).dialog('close');
                inviteFriendPlugin();
            }
        }
    });
    G_Invite.Sent.parent().find('button:contains("Send Another Invite")').addClass('greenbutton');
    G_Invite.PluginSent.parent().find('button:contains("Invite More People")').addClass('greenbutton');
    G_Invite.ClientReview = $('#j_invite_client_review').dialog(DialogSets);
    G_Invite.Friend = $('#j_invite_friend').dialog(DialogSets);
    G_Invite.Client = $('#j_invite_client').dialog(DialogSets);
    G_Invite.Betterist = $('#j_invite_betterist').dialog(DialogSets);
    G_Invite.InvitePlugin = $('#j_invite_plugin').dialog({
        resizable: false,
        modal: true,
        autoOpen: false,
        height: 'auto',
        width: 550,
        buttons: {
            Cancel: function(){
                $(this).dialog('close');
            },
            Invite: function(){
                var Obj = $(this);
                var Error = Obj.find('.field_error').html('');
                var Emails = Obj.find('.invite_emails').val();
                var YName = Obj.find('.invite_your_name').val();
                if(!Emails || !YName){
                    Error.html('Please fill out all required fields.');
                    return;
                }
                Emails = Emails.split(/,\s*/g);
                var Num = 0;
                var check = function(){
                    var onReady = function(Valid){
                        if(!Valid){
                            Error.html('This is not a valid email: "'+Emails[Num]+'".');
                            return;
                        }
                        Num++;
                        if(Num == Emails.length){
                            var Ico = $('<img src="/images/_bf_custom/ajax-loader.gif" style="float:right; margin:5px 10px 0 0;">');
                            Ico.appendTo(Obj.parent().find('.ui-dialog-buttonpane'));
                            var onComplete = function(Resp){
                                Ico.remove();
                                var Data = null;
                                try{eval('Data = '+Resp)}catch(e){
                                    Error.html('Server error, please try again.');
                                    return;
                                }
                                if(!Data.status){
                                    Error.html(Data.error?Data.error:'Server error, please try again.');
                                    return;
                                }
                                Obj.dialog('close');
                                G_Invite.PluginSent.dialog('open');
                            }
                            var Data = {
                                emails: Emails.join(','),
                                your_name: YName,
                                type: Obj.attr('id').replace('j_invite_', '')
                            };
                            $.post('/ajaxcall/sendinvites', Data, onComplete);
                            return;
                        }
                        check();
                    };
                    CForm.validate(Emails[Num], {required: {}, email: {}}, onReady);
                };
                check();
            }
        },
        open: function(){
            var Obj = $(this);
            Obj.parent().find('button:contains("Invite")').addClass('greenbutton');
            Obj.find('.invite_emails').val('');
            var YName = Obj.find('.invite_your_name');
            YName.val(YName.attr('data')).blur(function(){
                Obj.find('.invite_message_name').html(this.value);
            });
            YName.blur();
        }
    });
});

/* end ../include/js/invite.js */
