/*
 * 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 g=this,j,z=g.jQuery,p=g.$,b=g.jQuery=g.$=function(E,F){return new b.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,k=/^.[^:#\[\.,]*$/;b.fn=b.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=b.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return b().find(E)}var F=b(I||[]);F.context=document;F.selector=E;return F}}else{return b(H).find(E)}}else{if(b.isFunction(E)){return b(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(b.isArray(E)?E:b.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===j?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=b(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 b.each(this,F,E)},index:function(E){return b.inArray(E&&E.jquery?E[0]:E,this)},attr:function(E,H,G){var F=E;if(typeof E==="string"){if(H===j){return this[0]&&b[G||"attr"](this[0],E)}else{F={};F[E]=H}}return this.each(function(I){for(E in F){b.attr(G?this.style:this,E,b.prop(this,F[E],G,I,E))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=j}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="";b.each(F||this,function(){b.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:b.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=b(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(){b(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){b(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||b([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;b.find(E,this[0],F);return F}else{return this.pushStack(b.unique(b.map(this,function(G){return b.find(E,G)})),"find",E)}},clone:function(F){var E=this.map(function(){if(!b.support.noCloneEvent&&!b.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return b.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(F===true){var H=this.find("*").andSelf(),G=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[G].nodeName){return}var I=b.data(H[G],"events");for(var K in I){for(var J in I[K]){b.event.add(this,K,I[K][J],I[K][J].data)}}G++})}return E},filter:function(E){return this.pushStack(b.isFunction(E)&&b.grep(this,function(G,F){return E.call(G,F)})||b.multiFilter(E,b.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=b.expr.match.POS.test(E)?b(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:b(H).is(E)){b.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(k.test(E)){return this.pushStack(b.multiFilter(E,this,true),"not",E)}else{E=b.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==j&&!E.nodeType;return this.filter(function(){return F?b.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(b.unique(b.merge(this.get(),typeof E==="string"?b(E):b.makeArray(E))))},is:function(E){return !!E&&b.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(L){if(L===j){var F=this[0];if(F){if(b.nodeName(F,"option")){return(F.attributes.value||{}).specified?F.value:F.text}if(b.nodeName(F,"select")){var I=F.selectedIndex,M=[],K=F.options,H=F.type=="select-one";if(I<0){return null}for(var G=H?I:0,J=H?I+1:K.length;G<J;G++){var E=K[G];if(E.selected){L=b(E).val();if(H){return L}M.push(L)}}return M}return(F.value||"").replace(/\r/g,"")}return j}if(typeof L==="number"){L+=""}return this.each(function(){if(this.nodeType!=1){return}if(b.isArray(L)&&/radio|checkbox/.test(this.type)){this.checked=(b.inArray(this.value,L)>=0||b.inArray(this.name,L)>=0)}else{if(b.nodeName(this,"select")){var N=b.makeArray(L);b("option",this).each(function(){this.selected=(b.inArray(this.value,N)>=0||b.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=L}}})},html:function(E){return E===j?(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(b.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 E=(this[0].ownerDocument||this[0]).createDocumentFragment(),G=b.clean(J,(this[0].ownerDocument||this[0]),E),I=E.firstChild;if(I){for(var H=0,F=this.length;H<F;H++){L.call(K(this[H],I),this.length>1||H>0?E.cloneNode(true):E)}}if(G){b.each(G,r)}}return this;function K(N,O){return M&&b.nodeName(N,"table")&&b.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};b.fn.init.prototype=b.fn;function r(E,F){if(F.src){b.ajax({url:F.src,async:false,dataType:"script"})}else{b.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function d(){return +new Date}b.extend=b.fn.extend=function(){var L=arguments[0]||{},I=1,F=arguments.length,E=false,H;if(typeof L==="boolean"){E=L;L=arguments[1]||{};I=2}if(typeof L!=="object"&&!b.isFunction(L)){L={}}if(F==I){L=this;--I}for(;I<F;I++){if((H=arguments[I])!=null){for(var G in H){var J=L[G],K=H[G];if(L===K){continue}if(E&&K&&typeof K==="object"&&!K.nodeType){L[G]=b.extend(E,J||(K.length!=null?[]:{}),K)}else{if(K!==j){L[G]=K}}}}}return L};var o=/z-?index|font-?weight|opacity|zoom|line-?height/i,A=document.defaultView||{},x=Object.prototype.toString;b.extend({noConflict:function(E){g.$=p;if(E){g.jQuery=z}return b},isFunction:function(E){return x.call(E)==="[object Function]"},isArray:function(E){return x.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&b.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var E=document.getElementsByTagName("head")[0]||document.documentElement,F=document.createElement("script");F.type="text/javascript";if(b.support.scriptEval){F.appendChild(document.createTextNode(G))}else{F.text=G}E.insertBefore(F,E.firstChild);E.removeChild(F)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(I,K,G){var F,H=0,E=I.length;if(G){if(E===j){for(F in I){if(K.apply(I[F],G)===false){break}}}else{for(;H<E;){if(K.apply(I[H++],G)===false){break}}}}else{if(E===j){for(F in I){if(K.call(I[F],F,I[F])===false){break}}}else{for(var J=I[0];H<E&&K.call(J,H,J)!==false;J=I[++H]){}}}return I},prop:function(H,I,G,F,E){if(b.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!o.test(E)?I+"px":I},className:{add:function(E,F){b.each((F||"").split(/\s+/),function(H,G){if(E.nodeType==1&&!b.className.has(E.className,G)){E.className+=(E.className?" ":"")+G}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==j?b.grep(E.className.split(/\s+/),function(G){return !b.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&b.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}b.each(K,function(){if(!E){L-=parseFloat(b.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(b.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(b.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{b.swap(H,G,I)}return Math.max(0,Math.round(L))}return b.curCSS(H,F,J)},curCSS:function(I,E,G){var L,F=I.style;if(E=="opacity"&&!b.support.opacity){L=b.attr(F,"opacity");return L==""?"1":L}if(E.match(/float/i)){E=w}if(!G&&F&&F[E]){L=F[E]}else{if(A.getComputedStyle){if(E.match(/float/i)){E="float"}E=E.replace(/([A-Z])/g,"-$1").toLowerCase();var M=A.getComputedStyle(I,null);if(M){L=M.getPropertyValue(E)}if(E=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var K=E.replace(/\-(\w)/g,function(O,N){return N.toUpperCase()});L=I.currentStyle[E]||I.currentStyle[K];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var J=F.left,H=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;F.left=L||0;L=F.pixelLeft+"px";F.left=J;I.runtimeStyle.left=H}}}}return L},clean:function(F,K,J){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!J&&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");b.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>"]||!b.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!b.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(b.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!b.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=b.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=b.merge(G,S)}});if(J){for(var I=0;G[I];I++){if(b.nodeName(G[I],"script")&&(!G[I].type||G[I].type.toLowerCase()==="text/javascript")){E.push(G[I].parentNode?G[I].parentNode.removeChild(G[I]):G[I])}else{if(G[I].nodeType===1){G.splice.apply(G,[I+1,0].concat(b.makeArray(G[I].getElementsByTagName("script"))))}J.appendChild(G[I])}}return E}return G},attr:function(J,H,K){if(!J||J.nodeType==3||J.nodeType==8){return j}var G=!b.isXMLDoc(J),L=K!==j;H=G&&b.props[H]||H;if(J.tagName){var I=/href|src|style/.test(H);if(H=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(H in J&&G&&!I){if(L){if(H=="type"&&b.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[H]=K}if(b.nodeName(J,"form")&&J.getAttributeNode(H)){return J.getAttributeNode(H).nodeValue}if(H=="tabIndex"){var F=J.getAttributeNode("tabIndex");return F&&F.specified?F.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:j}return J[H]}if(!b.support.style&&G&&H=="style"){return b.attr(J.style,"cssText",K)}if(L){J.setAttribute(H,""+K)}var E=!b.support.hrefNormalized&&G&&I?J.getAttribute(H,2):J.getAttribute(H);return E===null?j:E}if(!b.support.opacity&&H=="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)+"":""}H=H.replace(/-([a-z])/ig,function(N,M){return M.toUpperCase()});if(L){J[H]=K}return J[H]},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"||b.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var F=0,E=H.length;F<E;F++){if(H[F]===G){return F}}return -1},merge:function(H,F){var E=0,G,I=H.length;if(!b.support.getAll){while((G=F[E++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=F[E++])!=null){H[I++]=G}}return H},unique:function(K){var G=[],F={};try{for(var H=0,E=K.length;H<E;H++){var J=b.data(K[H]);if(!F[J]){F[J]=true;G.push(K[H])}}}catch(I){G=K}return G},grep:function(G,J,E){var H=[];for(var I=0,F=G.length;I<F;I++){if(!E!=!J(G[I],I)){H.push(G[I])}}return H},map:function(F,J){var G=[];for(var H=0,E=F.length;H<E;H++){var I=J(F[H],H);if(I!=null){G[G.length]=I}}return G.concat.apply([],G)}});var C=navigator.userAgent.toLowerCase();b.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)};b.each({parent:function(E){return E.parentNode},parents:function(E){return b.dir(E,"parentNode")},next:function(E){return b.nth(E,2,"nextSibling")},prev:function(E){return b.nth(E,2,"previousSibling")},nextAll:function(E){return b.dir(E,"nextSibling")},prevAll:function(E){return b.dir(E,"previousSibling")},siblings:function(E){return b.sibling(E.parentNode.firstChild,E)},children:function(E){return b.sibling(E.firstChild)},contents:function(E){return b.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:b.makeArray(E.childNodes)}},function(E,F){b.fn[E]=function(G){var H=b.map(this,F);if(G&&typeof G=="string"){H=b.multiFilter(G,H)}return this.pushStack(b.unique(H),E,G)}});b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){b.fn[E]=function(H){var K=[],G=b(H);for(var L=0,I=G.length;L<I;L++){var J=(L>0?this.clone(true):this).get();b.fn[F].apply(b(G[L]),J);K=K.concat(J)}return this.pushStack(K,E,H)}});b.each({removeAttr:function(E){b.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){b.className.add(this,E)},removeClass:function(E){b.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!b.className.has(this,F)}b.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||b.filter(E,[this]).length){b("*",this).add([this]).each(function(){b.event.remove(this);b.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){b(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){b.fn[E]=function(){return this.each(F,arguments)}});function l(E,F){return E[0]&&parseInt(b.curCSS(E[0],F,true),10)||0}var i="jQuery"+d(),v=0,B={};b.extend({cache:{},data:function(F,E,G){F=F==g?B:F;var H=F[i];if(!H){H=F[i]=++v}if(E&&!b.cache[H]){b.cache[H]={}}if(G!==j){b.cache[H][E]=G}return E?b.cache[H][E]:H},removeData:function(F,E){F=F==g?B:F;var H=F[i];if(E){if(b.cache[H]){delete b.cache[H][E];E="";for(E in b.cache[H]){break}if(!E){b.removeData(F)}}}else{try{delete F[i]}catch(G){if(F.removeAttribute){F.removeAttribute(i)}}delete b.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=b.data(F,E);if(!G||b.isArray(H)){G=b.data(F,E,b.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=b.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==j){F.call(H)}}});b.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===j){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===j&&this.length){F=b.data(this[0],E)}return F===j&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){b.data(this,E,G)})}},removeData:function(E){return this.each(function(){b.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===j){return b.queue(this[0],E)}return this.each(function(){var G=b.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){b.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,I=0,L=Object.prototype.toString;var N=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&&G.exec(Y)){if(Z.length===2&&F.relative[Z[0]]){af=H(Z[0]+Z[1],U)}else{af=F.relative[Z[0]]?[U]:N(Z.shift(),U);while(Z.length){Y=Z.shift();if(F.relative[Y]){Y+=Z.shift()}af=H(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:N.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=N.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(!F.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}F.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(L.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&&J(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){N(V,U,ab,ac);if(K){hasDuplicate=false;ab.sort(K);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};N.matches=function(T,U){return N(T,null,null,U)};N.find=function(Z,T,ab){var aa,X;if(!Z){return[]}for(var W=0,V=F.order.length;W<V;W++){var Y=F.order[W],X;if((X=F.match[Y].exec(Z))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");aa=F.find[Y](X,T,ab);if(aa!=null){Z=Z.replace(F.match[Y],"");break}}}}if(!aa){aa=T.getElementsByTagName("*")}return{set:aa,expr:Z}};N.filter=function(ad,ae,ah,U){var T=ad,ac=[],Y=ae,W,aa,X=ae&&ae[0]&&Q(ae[0]);while(ad&&ae.length){for(var ab in F.filter){if((W=F.match[ab].exec(ad))!=null){var Z=F.filter[ab],ai,ag;aa=false;if(Y==ac){ac=[]}if(F.preFilter[ab]){W=F.preFilter[ab](W,Y,ah,ac,U,X);if(!W){aa=ai=true}else{if(W===true){continue}}}if(W){for(var V=0;(ag=Y[V])!=null;V++){if(ag){ai=Z(ag,W,V,Y);var af=U^!!ai;if(ah&&ai!=null){if(af){aa=true}else{Y[V]=false}}else{if(af){ac.push(ag);aa=true}}}}}if(ai!==j){if(!ah){Y=ac}ad=ad.replace(F.match[ab],"");if(!aa){return[]}break}}}if(ad==T){if(aa==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}T=ad}return Y};var F=N.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,ab){var U=typeof T==="string",Z=U&&!/\W/.test(T),Y=U&&!Z;if(Z&&!ab){T=T.toUpperCase()}for(var X=0,W=aa.length,V;X<W;X++){if((V=aa[X])){while((V=V.previousSibling)&&V.nodeType!==1){}aa[X]=Y||V&&V.nodeName===T?V||false:V===T}}if(Y){N.filter(T,aa,true)}},">":function(Z,W,aa){var V=typeof W==="string";if(V&&!/\W/.test(W)){W=aa?W:W.toUpperCase();for(var X=0,T=Z.length;X<T;X++){var Y=Z[X];if(Y){var U=Y.parentNode;Z[X]=U.nodeName===W?U:false}}}else{for(var X=0,T=Z.length;X<T;X++){var Y=Z[X];if(Y){Z[X]=V?Y.parentNode:Y.parentNode===W}}if(V){N.filter(W,Z,true)}}},"":function(W,U,Y){var V=I++,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=I++,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(V,T,U,Z,Y,aa){V=" "+V[1].replace(/\\/g,"")+" ";if(aa){return V}for(var W=0,X;(X=T[W])!=null;W++){if(X){if(Y^(X.className&&(" "+X.className+" ").indexOf(V)>=0)){if(!U){Z.push(X)}}else{if(U){T[W]=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]=I++;return T},ATTR:function(W,T,U,Y,X,Z){var V=W[1].replace(/\\/g,"");if(!Z&&F.attrMap[V]){W[1]=F.attrMap[V]}if(W[2]==="~="){W[4]=" "+W[4]+" "}return W},PSEUDO:function(W,T,U,Y,X){if(W[1]==="not"){if(W[3].match(R).length>1||/^\w/.test(W[3])){W[3]=N(W[3],null,null,T)}else{var V=N.filter(W[3],T,U,true^X);if(!U){Y.push.apply(Y,V)}return false}}else{if(F.match.POS.test(W[0])||F.match.CHILD.test(W[0])){return true}}return W},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 !!N(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,W,X,aa){var V=W[1],U=F.filters[V];if(U){return U(Z,X,W,aa)}else{if(V==="contains"){return(Z.textContent||Z.innerText||"").indexOf(W[3])>=0}else{if(V==="not"){var Y=W[3];for(var X=0,T=Y.length;X<T;X++){if(Y[X]===Z){return false}}return true}}}},CHILD:function(U,V){var Z=V[1],T=U;switch(Z){case"only":case"first":while(T=T.previousSibling){if(T.nodeType===1){return false}}if(Z=="first"){return true}T=U;case"last":while(T=T.nextSibling){if(T.nodeType===1){return false}}return true;case"nth":var W=V[2],ab=V[3];if(W==1&&ab==0){return true}var Y=V[0],ac=U.parentNode;if(ac&&(ac.sizcache!==Y||!U.nodeIndex)){var X=0;for(T=ac.firstChild;T;T=T.nextSibling){if(T.nodeType===1){T.nodeIndex=++X}}ac.sizcache=Y}var aa=U.nodeIndex-ab;if(W==0){return aa==0}else{return(aa%W==0&&aa/W>=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(X,V){var U=V[1],Z=F.attrHandle[U]?F.attrHandle[U](X):X[U]!=null?X[U]:X.getAttribute(U),Y=Z+"",W=V[2],T=V[4];return Z==null?W==="!=":W==="="?Y===T:W==="*="?Y.indexOf(T)>=0:W==="~="?(" "+Y+" ").indexOf(T)>=0:!T?Y&&Z!==false:W==="!="?Y!=T:W==="^="?Y.indexOf(T)===0:W==="$="?Y.substr(Y.length-T.length)===T:W==="|="?Y===T||Y.substr(0,T.length+1)===T+"-":false},POS:function(X,V,W,Y){var U=V[2],T=F.setFilters[U];if(T){return T(X,W,V,Y)}}}};var G=F.match.POS;for(var O in F.match){F.match[O]=RegExp(F.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(M){E=function(X,W){var U=W||[];if(L.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 K;if(document.documentElement.compareDocumentPosition){K=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){K=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){K=function(U,T){var W=U.ownerDocument.createRange(),X=T.ownerDocument.createRange();W.selectNode(U);W.collapse(true);X.selectNode(T);X.collapse(true);var V=W.compareBoundaryPoints(Range.START_TO_END,X);if(V===0){hasDuplicate=true}return V}}}}(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)){F.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]:j:[]}};F.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){F.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")!=="#"){F.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=N,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}N=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)};N.find=T.find;N.filter=T.filter;N.selectors=T.selectors;N.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}F.order.splice(1,0,"CLASS");F.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,ab,Y,ac,aa,ad){var Z=U=="previousSibling"&&!ad;for(var W=0,V=ac.length;W<V;W++){var T=ac[W];if(T){if(Z&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ac[T.sizset];break}if(T.nodeType===1&&!ad){T.sizcache=Y;T.sizset=W}if(T.nodeName===ab){X=T;break}T=T[U]}ac[W]=X}}}function S(U,ab,Y,ac,aa,ad){var Z=U=="previousSibling"&&!ad;for(var W=0,V=ac.length;W<V;W++){var T=ac[W];if(T){if(Z&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ac[T.sizset];break}if(T.nodeType===1){if(!ad){T.sizcache=Y;T.sizset=W}if(typeof ab!=="string"){if(T===ab){X=true;break}}else{if(N.filter(ab,[T]).length>0){X=T;break}}}T=T[U]}ac[W]=X}}}var J=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 H=function(T,Z){var aa=[],W="",X,V=Z.nodeType?[Z]:Z;while((X=F.match.PSEUDO.exec(T))){W+=X[0];T=T.replace(F.match.PSEUDO,"")}T=F.relative[T]?T+"*":T;for(var Y=0,U=V.length;Y<U;Y++){N(T,V[Y],aa)}return N.filter(W,aa)};b.find=N;b.filter=N.filter;b.expr=N.selectors;b.expr[":"]=b.expr.filters;N.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};N.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};N.selectors.filters.animated=function(T){return b.grep(b.timers,function(U){return T===U.elem}).length};b.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return N.matches(V,T)};b.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};b.nth=function(X,W,U,V){W=W||1;var T=0;for(;X;X=X[U]){if(X.nodeType==1&&++T==W){break}}return X};b.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;g.Sizzle=N})();b.event={add:function(J,G,I,K){if(J.nodeType==3||J.nodeType==8){return}if(J.setInterval&&J!=g){J=g}if(!I.guid){I.guid=this.guid++}if(K!==j){var H=I;I=this.proxy(H);I.data=K}var F=b.data(J,"events")||b.data(J,"events",{}),E=b.data(J,"handle")||b.data(J,"handle",function(){return typeof b!=="undefined"&&!b.event.triggered?b.event.handle.apply(arguments.callee.elem,arguments):j});E.elem=J;b.each(G.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();I.type=O.slice().sort().join(".");var L=F[N];if(b.event.specialAll[N]){b.event.specialAll[N].setup.call(J,K,O)}if(!L){L=F[N]={};if(!b.event.special[N]||b.event.special[N].setup.call(J,K,O)===false){if(J.addEventListener){J.addEventListener(N,E,false)}else{if(J.attachEvent){J.attachEvent("on"+N,E)}}}}L[I.guid]=I;b.event.global[N]=true});J=null},guid:1,global:{},remove:function(L,I,K){if(L.nodeType==3||L.nodeType==8){return}var H=b.data(L,"events"),G,F;if(H){if(I===j||(typeof I==="string"&&I.charAt(0)==".")){for(var J in H){this.remove(L,J+(I||""))}}else{if(I.type){K=I.handler;I=I.type}b.each(I.split(/\s+/),function(N,P){var Q=P.split(".");P=Q.shift();var O=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(H[P]){if(K){delete H[P][K.guid]}else{for(var M in H[P]){if(O.test(H[P][M].type)){delete H[P][M]}}}if(b.event.specialAll[P]){b.event.specialAll[P].teardown.call(L,Q)}for(G in H[P]){break}if(!G){if(!b.event.special[P]||b.event.special[P].teardown.call(L,Q)===false){if(L.removeEventListener){L.removeEventListener(P,b.data(L,"handle"),false)}else{if(L.detachEvent){L.detachEvent("on"+P,b.data(L,"handle"))}}}G=null;delete H[P]}}})}for(G in H){break}if(!G){var E=b.data(L,"handle");if(E){E.elem=null}b.removeData(L,"events");b.removeData(L,"handle")}}},trigger:function(J,K,I,G){var H=J.type||J;if(!G){J=typeof J==="object"?J[i]?J:b.extend(b.Event(H),J):b.Event(H);if(H.indexOf("!")>=0){J.type=H=H.slice(0,-1);J.exclusive=true}if(!I){J.stopPropagation();if(this.global[H]){b.each(b.cache,function(){if(this.events&&this.events[H]){b.event.trigger(J,K,this.handle.elem)}})}}if(!I||I.nodeType==3||I.nodeType==8){return j}J.result=j;J.target=I;K=b.makeArray(K);K.unshift(J)}J.currentTarget=I;var E=b.data(I,"handle");if(E){E.apply(I,K)}if((!I[H]||(b.nodeName(I,"a")&&H=="click"))&&I["on"+H]&&I["on"+H].apply(I,K)===false){J.result=false}if(!G&&I[H]&&!J.isDefaultPrevented()&&!(b.nodeName(I,"a")&&H=="click")){this.triggered=true;try{I[H]()}catch(L){}}this.triggered=false;if(!J.isPropagationStopped()){var F=I.parentNode||I.ownerDocument;if(F){b.event.trigger(J,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=b.event.fix(K||g.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=(b.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!==j){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[i]){return H}var F=H;H=b.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:q,teardown:function(){}}},specialAll:{live:{setup:function(E,F){b.event.add(this,F[0],n)},teardown:function(G){if(G.length){var F=0,E=RegExp("(^|\\.)"+G[0]+"(\\.|$)");b.each((b.data(this,"events").live||{}),function(){if(E.test(this.type)){F++}});if(F<1){b.event.remove(this,G[0],n)}}}}}};b.Event=function(E){if(!this.preventDefault){return new b.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=d();this[i]=true};function f(){return false}function u(){return true}b.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:f,isPropagationStopped:f,isImmediatePropagationStopped:f};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;b.event.handle.apply(this,arguments)}};b.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){b.event.special[E]={setup:function(){b.event.add(this,F,a,E)},teardown:function(){b.event.remove(this,F,a)}}});b.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){b.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=b.event.proxy(F||H,function(I){b(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){b.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){b.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){b.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=b.Event(E);F.preventDefault();F.stopPropagation();b.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){b.event.proxy(G,E[F++])}return this.click(b.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){q();if(b.isReady){E.call(document,b)}else{b.readyList.push(E)}return this},live:function(G,F){var E=b.event.proxy(F);E.guid+=this.selector+G;b(document).bind(h(G,this.selector),this.selector,E);return this},die:function(F,E){b(document).unbind(h(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function n(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];b.each(b.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=b(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return b.data(J.elem,"closest")-b.data(I.elem,"closest")});b.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function h(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}b.extend({isReady:false,readyList:[],ready:function(){if(!b.isReady){b.isReady=true;if(b.readyList){b.each(b.readyList,function(){this.call(document,b)});b.readyList=null}b(document).triggerHandler("ready")}}});var y=false;function q(){if(y){return}y=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);b.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);b.ready()}});if(document.documentElement.doScroll&&g==g.top){(function(){if(b.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}b.ready()})()}}}b.event.add(g,"load",b.ready)}b.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){b.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});b(g).bind("unload",function(){for(var E in b.cache){if(E!=1&&b.cache[E].handle){b.event.remove(b.cache[E].handle.elem)}}});(function(){b.support={};var F=document.documentElement,H=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 G=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!G||!G.length||!E){return}b.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};H.type="text/javascript";try{H.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(H,F.firstChild);if(g[J]){b.support.scriptEval=true;delete g[J]}F.removeChild(H);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){b.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}b(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);b.boxModel=b.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=b.support.cssFloat?"cssFloat":"styleFloat";b.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};b.fn.extend({_load:b.fn.load,load:function(G,K,I){if(typeof G!=="string"){return this._load(G)}var J=G.indexOf(" ");if(J>=0){var E=G.slice(J,G.length);G=G.slice(0,J)}var H="GET";if(K){if(b.isFunction(K)){I=K;K=null}else{if(typeof K==="object"){K=b.param(K);H="POST"}}}var F=this;b.ajax({url:G,type:H,dataType:"html",data:K,complete:function(L,M){if(M=="success"||M=="notmodified"){F.html(E?b("<div/>").append(L.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):L.responseText)}if(I){F.each(I,[L.responseText,M,L])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.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=b(this).val();return G==null?null:b.isArray(G)?b.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});b.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){b.fn[F]=function(G){return this.bind(F,G)}});var s=d();b.extend({get:function(E,G,H,F){if(b.isFunction(G)){H=G;G=null}return b.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return b.get(E,null,F,"script")},getJSON:function(E,F,G){return b.get(E,F,G,"json")},post:function(E,G,H,F){if(b.isFunction(G)){H=G;G={}}return b.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){b.extend(b.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return g.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(L){L=b.extend(true,L,b.extend(true,{},b.ajaxSettings,L));var V,F=/=\?(&|$)/g,Q,S,G=L.type.toUpperCase();if(L.data&&L.processData&&typeof L.data!=="string"){L.data=b.param(L.data)}if(L.dataType=="jsonp"){if(G=="GET"){if(!L.url.match(F)){L.url+=(L.url.match(/\?/)?"&":"?")+(L.jsonp||"callback")+"=?"}}else{if(!L.data||!L.data.match(F)){L.data=(L.data?L.data+"&":"")+(L.jsonp||"callback")+"=?"}}L.dataType="json"}if(L.dataType=="json"&&(L.data&&L.data.match(F)||L.url.match(F))){V="jsonp"+s++;if(L.data){L.data=(L.data+"").replace(F,"="+V+"$1")}L.url=L.url.replace(F,"="+V+"$1");L.dataType="script";g[V]=function(X){S=X;H();U();g[V]=j;try{delete g[V]}catch(Y){}if(I){I.removeChild(N)}}}if(L.dataType=="script"&&L.cache==null){L.cache=false}if(L.cache===false&&G=="GET"){var E=d();var T=L.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");L.url=T+((T==L.url)?(L.url.match(/\?/)?"&":"?")+"_="+E:"")}if(L.data&&G=="GET"){L.url+=(L.url.match(/\?/)?"&":"?")+L.data;L.data=null}if(L.global&&!b.active++){b.event.trigger("ajaxStart")}var P=/^(\w+:)?\/\/([^\/?#]+)/.exec(L.url);if(L.dataType=="script"&&G=="GET"&&P&&(P[1]&&P[1]!=location.protocol||P[2]!=location.host)){var I=document.getElementsByTagName("head")[0];var N=document.createElement("script");N.src=L.url;if(L.scriptCharset){N.charset=L.scriptCharset}if(!V){var M=false;N.onload=N.onreadystatechange=function(){if(!M&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){M=true;H();U();N.onload=N.onreadystatechange=null;I.removeChild(N)}}}I.appendChild(N);return j}var K=false;var J=L.xhr();if(L.username){J.open(G,L.url,L.async,L.username,L.password)}else{J.open(G,L.url,L.async)}try{if(L.data){J.setRequestHeader("Content-Type",L.contentType)}if(L.ifModified){J.setRequestHeader("If-Modified-Since",b.lastModified[L.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",L.dataType&&L.accepts[L.dataType]?L.accepts[L.dataType]+", */*":L.accepts._default)}catch(R){}if(L.beforeSend&&L.beforeSend(J,L)===false){if(L.global&&!--b.active){b.event.trigger("ajaxStop")}J.abort();return false}if(L.global){b.event.trigger("ajaxSend",[J,L])}var W=function(Y){if(J.readyState==0){if(O){clearInterval(O);O=null;if(L.global&&!--b.active){b.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||Y=="timeout")){K=true;if(O){clearInterval(O);O=null}Q=Y=="timeout"?"timeout":!b.httpSuccess(J)?"error":L.ifModified&&b.httpNotModified(J,L.url)?"notmodified":"success";if(Q=="success"){try{S=b.httpData(J,L.dataType,L)}catch(Z){Q="parsererror"}}if(Q=="success"){var X;try{X=J.getResponseHeader("Last-Modified")}catch(Z){}if(L.ifModified&&X){b.lastModified[L.url]=X}if(!V){H()}}else{b.handleError(L,J,Q)}U();if(Y){J.abort()}if(L.async){J=null}}}};if(L.async){var O=setInterval(W,13);if(L.timeout>0){setTimeout(function(){if(J&&!K){W("timeout")}},L.timeout)}}try{J.send(L.data)}catch(R){b.handleError(L,J,null,R)}if(!L.async){W()}function H(){if(L.success){L.success(S,Q)}if(L.global){b.event.trigger("ajaxSuccess",[J,L])}}function U(){if(L.complete){L.complete(J,Q)}if(L.global){b.event.trigger("ajaxComplete",[J,L])}if(L.global&&!--b.active){b.event.trigger("ajaxStop")}}return J},handleError:function(E,H,F,G){if(E.error){E.error(H,F,G)}if(E.global){b.event.trigger("ajaxError",[H,E,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(H,E){try{var G=H.getResponseHeader("Last-Modified");return H.status==304||G==b.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"){b.globalEval(I)}if(H=="json"){I=g["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(b.isArray(E)||E.jquery){b.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(b.isArray(E[F])){b.each(E[F],function(){H(F,this)})}else{H(F,b.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var e={},c,m=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};b.each(m.concat.apply([],m.slice(0,E)),function(){G[this]=F});return G}b.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=b.data(this[H],"olddisplay");this[H].style.display=E||"";if(b.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(e[G]){K=e[G]}else{var I=b("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();e[G]=K}b.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=b.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=b.data(this[G],"olddisplay");if(!E&&E!=="none"){b.data(this[G],"olddisplay",b.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:b.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return b.isFunction(G)&&b.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:b(this).is(":hidden");b(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=b.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var L=b.extend({},E),M,J=this.nodeType==1&&b(this).is(":hidden"),K=this;for(M in I){if(I[M]=="hide"&&J||I[M]=="show"&&!J){return L.complete.call(this)}if((M=="height"||M=="width")&&this.style){L.display=b.css(this,"display");L.overflow=this.style.overflow}}if(L.overflow!=null){this.style.overflow="hidden"}L.curAnim=b.extend({},I);b.each(I,function(O,S){var R=new b.fx(K,L,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?J?"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"){K.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;K.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,G){var E=b.timers;if(F){this.queue([])}this.each(function(){for(var H=E.length-1;H>=0;H--){if(E[H].elem==this){if(G){E[H](true)}E.splice(H,1)}}});if(!G){this.dequeue()}return this}});b.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){b.fn[E]=function(G,H){return this.animate(F,G,H)}});b.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||b.isFunction(G)&&G,duration:G,easing:F&&H||H&&!b.isFunction(H)&&H};E.duration=b.fx.off?0:typeof E.duration==="number"?E.duration:b.fx.speeds[E.duration]||b.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){b(this).dequeue()}if(b.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={}}}});b.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(b.fx.step[this.prop]||b.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(b.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(b.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=d();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()&&b.timers.push(F)&&!c){c=setInterval(function(){var J=b.timers;for(var K=0;K<J.length;K++){if(!J[K]()){J.splice(K--,1)}}if(!J.length){clearInterval(c);c=j}},13)}},show:function(){this.options.orig[this.prop]=b.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());b(this.elem).show()},hide:function(){this.options.orig[this.prop]=b.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=d();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(b.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){b(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){b.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=b.easing[this.options.easing||(b.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}};b.extend(b.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){b.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){b.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return b.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),K=this[0].ownerDocument,F=K.body,E=K.documentElement,J=E.clientTop||F.clientTop||0,L=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||b.boxModel&&E.scrollTop||F.scrollTop)-J,H=G.left+(self.pageXOffset||b.boxModel&&E.scrollLeft||F.scrollLeft)-L;return{top:I,left:H}}}else{b.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return b.offset.bodyOffset(this[0])}b.offset.initialized||b.offset.initialize();var I=this[0],E=I.offsetParent,M=I,O=I.ownerDocument,L,G=O.documentElement,J=O.body,F=O.defaultView,K=F.getComputedStyle(I,null),N=I.offsetTop,H=I.offsetLeft;while((I=I.parentNode)&&I!==J&&I!==G){L=F.getComputedStyle(I,null);N-=I.scrollTop,H-=I.scrollLeft;if(I===E){N+=I.offsetTop,H+=I.offsetLeft;if(b.offset.doesNotAddBorder&&!(b.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(I.tagName))){N+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}M=E,E=I.offsetParent}if(b.offset.subtractsBorderForOverflowNotVisible&&L.overflow!=="visible"){N+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}K=L}if(K.position==="relative"||K.position==="static"){N+=J.offsetTop,H+=J.offsetLeft}if(K.position==="fixed"){N+=Math.max(G.scrollTop,J.scrollTop),H+=Math.max(G.scrollLeft,J.scrollLeft)}return{top:N,left:H}}}b.offset={initialize:function(){if(this.initialized){return}var K=document.body,L=document.createElement("div"),G,F,N,H,M,E,I=K.style.marginTop,J='<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){L.style[E]=M[E]}L.innerHTML=J;K.insertBefore(L,K.firstChild);G=L.firstChild,F=G.firstChild,H=G.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(F.offsetTop!==5);this.doesAddBorderForTableAndCells=(H.offsetTop===5);G.style.overflow="hidden",G.style.position="relative";this.subtractsBorderForOverflowNotVisible=(F.offsetTop===-5);K.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(K.offsetTop===0);K.style.marginTop=I;K.removeChild(L);this.initialized=true},bodyOffset:function(E){b.offset.initialized||b.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(b.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(b.curCSS(E,"marginTop",true),10)||0,F+=parseInt(b.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};b.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-=l(this,"marginTop");J.left-=l(this,"marginLeft");E.top+=l(G,"borderTopWidth");E.left+=l(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)&&b.css(E,"position")=="static")){E=E.offsetParent}return b(E)}});b.each(["Left","Top"],function(F,E){var G="scroll"+E;b.fn[G]=function(H){if(!this[0]){return null}return H!==j?this.each(function(){this==g||this==document?g.scrollTo(!F?H:b(g).scrollLeft(),F?H:b(g).scrollTop()):this[G]=H}):this[0]==g||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||b.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});b.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();b.fn["inner"+G]=function(){return this[0]?b.css(this[0],F,false,"padding"):null};b.fn["outer"+G]=function(K){return this[0]?b.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();b.fn[J]=function(K){return this[0]==g?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===j?(this.length?b.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
 * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
 */
// old school cookie functions grabbed off the web

if (!window.Mage) var Mage = {};

Mage.Cookies = {};
Mage.Cookies.set = function(name, value){
 var argv = arguments;
 var argc = arguments.length;
 var expires = (argc > 2) ? argv[2] : null;
 var path = (argc > 3) ? argv[3] : '/';
 var domain = (argc > 4) ? argv[4] : null;
 var secure = (argc > 5) ? argv[5] : false;
 document.cookie = name + "=" + escape (value) +
 ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
 ((path == null) ? "" : ("; path=" + path)) +
 ((domain == null) ? "" : ("; domain=" + domain)) +
 ((secure == true) ? "; secure" : "");
};

Mage.Cookies.get = function(name){
 var arg = name + "=";
 var alen = arg.length;
 var clen = document.cookie.length;
 var i = 0;
 var j = 0;
 while(i < clen){
 j = i + alen;
 if (document.cookie.substring(i, j) == arg)
 return Mage.Cookies.getCookieVal(j);
 i = document.cookie.indexOf(" ", i) + 1;
 if(i == 0)
 break;
 }
 return null;
};

Mage.Cookies.clear = function(name) {
 if(Mage.Cookies.get(name)){
 document.cookie = name + "=" +
 "; expires=Thu, 01-Jan-70 00:00:01 GMT";
 }
};

Mage.Cookies.getCookieVal = function(offset){
 var endstr = document.cookie.indexOf(";", offset);
 if(endstr == -1){
 endstr = document.cookie.length;
 }
 return unescape(document.cookie.substring(offset, endstr));
};
(function(a){a.extend(a.fn,{validate:function(c){if(!this.length){c&&c.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return}var b=a.data(this[0],"validator");if(b){return b}b=new a.validator(c,this[0]);a.data(this[0],"validator",b);if(b.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){b.cancelSubmit=true});if(b.settings.submitHandler){this.find("input, button").filter(":submit").click(function(){b.submitButton=this})}this.submit(function(e){if(b.settings.debug){e.preventDefault()}function d(){if(b.settings.submitHandler){if(b.submitButton){var f=a("<input type='hidden'/>").attr("name",b.submitButton.name).val(b.submitButton.value).appendTo(b.currentForm)}b.settings.submitHandler.call(b,b.currentForm);if(b.submitButton){f.remove()}return false}return true}if(b.cancelSubmit){b.cancelSubmit=false;return d()}if(b.form()){if(b.pendingRequest){b.formSubmitted=true;return false}return d()}else{b.focusInvalid();return false}})}return b},valid:function(){if(a(this[0]).is("form")){return this.validate().form()}else{var c=true;var b=a(this[0].form).validate();this.each(function(){c&=b.element(this)});return c}},removeAttrs:function(c){var d={},b=this;a.each(c.split(/\s/),function(e,f){d[f]=b.attr(f);b.removeAttr(f)});return d},rules:function(f,h){var d=this[0];if(f){var e=a.data(d.form,"validator").settings;var j=e.rules;var i=a.validator.staticRules(d);switch(f){case"add":a.extend(i,a.validator.normalizeRule(h));j[d.name]=i;if(h.messages){e.messages[d.name]=a.extend(e.messages[d.name],h.messages)}break;case"remove":if(!h){delete j[d.name];return i}var b={};a.each(h.split(/\s/),function(k,l){b[l]=i[l];delete i[l]});return b}}var g=a.validator.normalizeRules(a.extend({},a.validator.metadataRules(d),a.validator.classRules(d),a.validator.attributeRules(d),a.validator.staticRules(d)),d);if(g.required){var c=g.required;delete g.required;g=a.extend({required:c},g)}return g}});a.extend(a.expr[":"],{blank:function(b){return !a.trim(""+b.value)},filled:function(b){return !!a.trim(""+b.value)},unchecked:function(b){return !b.checked}});a.validator=function(b,c){this.settings=a.extend(true,{},a.validator.defaults,b);this.currentForm=c;this.init()};a.validator.format=function(b,c){if(arguments.length==1){return function(){var d=a.makeArray(arguments);d.unshift(b);return a.validator.format.apply(this,d)}}if(arguments.length>2&&c.constructor!=Array){c=a.makeArray(arguments).slice(1)}if(c.constructor!=Array){c=[c]}a.each(c,function(d,e){b=b.replace(new RegExp("\\{"+d+"\\}","g"),e)});return b};a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(b){this.lastActive=b;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,b,this.settings.errorClass,this.settings.validClass);this.errorsFor(b).hide()}},onfocusout:function(b){if(!this.checkable(b)&&(b.name in this.submitted||!this.optional(b))){this.element(b)}},onkeyup:function(b){if(b.name in this.submitted||b==this.lastElement){this.element(b)}},onclick:function(b){if(b.name in this.submitted){this.element(b)}else{if(b.parentNode.name in this.submitted){this.element(b.parentNode)}}},highlight:function(c,b,d){a(c).addClass(b).removeClass(d)},unhighlight:function(c,b,d){a(c).removeClass(b).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",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:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=a(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm);this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var c=(this.groups={});a.each(this.settings.groups,function(e,f){a.each(f.split(/\s/),function(h,g){c[g]=e})});var d=this.settings.rules;a.each(d,function(e,f){d[e]=a.validator.normalizeRule(f)});function b(g){var e=a.data(this[0].form,"validator"),f="on"+g.type.replace(/^validate/,"");e.settings[f]&&e.settings[f].call(e,this[0])}a(this.currentForm).validateDelegate(":text, :password, :file, select, textarea","focusin focusout keyup",b).validateDelegate(":radio, :checkbox, select, option","click",b);if(this.settings.invalidHandler){a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)}},form:function(){this.checkForm();a.extend(this.submitted,this.errorMap);this.invalid=a.extend({},this.errorMap);if(!this.valid()){a(this.currentForm).triggerHandler("invalid-form",[this])}this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var c=0,b=(this.currentElements=this.elements());b[c];c++){this.check(b[c])}return this.valid()},element:function(b){b=this.clean(b);this.lastElement=b;this.prepareElement(b);this.currentElements=a(b);var c=this.check(b);if(c){delete this.invalid[b.name]}else{this.invalid[b.name]=true}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)}this.showErrors();return c},showErrors:function(c){if(c){a.extend(this.errorMap,c);this.errorList=[];for(var b in c){this.errorList.push({message:c[b],element:this.findByName(b)[0]})}this.successList=a.grep(this.successList,function(d){return !(d.name in c)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){if(a.fn.resetForm){a(this.currentForm).resetForm()}this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(d){var c=0;for(var b in d){c++}return c},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{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}}},findLastActive:function(){var b=this.lastActive;return b&&a.grep(this.errorList,function(c){return c.element.name==b.name}).length==1&&b},elements:function(){var c=this,b={};return a([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&c.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!c.objectLength(a(this).rules())){return false}b[this.name]=true;return true})},clean:function(b){return a(b)[0]},errors:function(){return a(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=a([]);this.toHide=a([]);this.currentElements=a([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(b){this.reset();this.toHide=this.errorsFor(b)},check:function(b){b=this.clean(b);if(this.checkable(b)){b=this.findByName(b.name)[0]}var h=a(b).rules();var c=false;for(method in h){var g={method:method,parameters:h[method]};try{var d=a.validator.methods[method].call(this,b.value.replace(/\r/g,""),b,g.parameters);if(d=="dependency-mismatch"){c=true;continue}c=false;if(d=="pending"){this.toHide=this.toHide.not(this.errorsFor(b));return}if(!d){this.formatAndAdd(b,g);return false}}catch(f){this.settings.debug&&window.console&&console.log("exception occured when checking element "+b.id+", check the '"+g.method+"' method",f);throw f}}if(c){return}if(this.objectLength(h)){this.successList.push(b)}return true},customMetaMessage:function(b,d){if(!a.metadata){return}var c=this.settings.meta?a(b).metadata()[this.settings.meta]:a(b).metadata();return c&&c.messages&&c.messages[d]},customMessage:function(c,d){var b=this.settings.messages[c];return b&&(b.constructor==String?b:b[d])},findDefined:function(){for(var b=0;b<arguments.length;b++){if(arguments[b]!==undefined){return arguments[b]}}return undefined},defaultMessage:function(b,c){return this.findDefined(this.customMessage(b.name,c),this.customMetaMessage(b,c),!this.settings.ignoreTitle&&b.title||undefined,a.validator.messages[c],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(c,e){var d=this.defaultMessage(c,e.method),b=/\$?\{(\d+)\}/g;if(typeof d=="function"){d=d.call(this,e.parameters,c)}else{if(b.test(d)){d=jQuery.format(d.replace(b,"{$1}"),e.parameters)}}this.errorList.push({message:d,element:c});this.errorMap[c.name]=d;this.submitted[c.name]=d},addWrapper:function(b){if(this.settings.wrapper){b=b.add(b.parent(this.settings.wrapper))}return b},defaultShowErrors:function(){for(var d=0;this.errorList[d];d++){var c=this.errorList[d];this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass);this.showLabel(c.element,c.message)}if(this.errorList.length){this.toShow=this.toShow.add(this.containers)}if(this.settings.success){for(var d=0;this.successList[d];d++){this.showLabel(this.successList[d])}}if(this.settings.unhighlight){for(var d=0,b=this.validElements();b[d];d++){this.settings.unhighlight.call(this,b[d],this.settings.errorClass,this.settings.validClass)}}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 a(this.errorList).map(function(){return this.element})},showLabel:function(c,d){var b=this.errorsFor(c);if(b.length){b.removeClass().addClass(this.settings.errorClass);b.attr("generated")&&b.html(d)}else{b=a("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(c),generated:true}).addClass(this.settings.errorClass).html(d||"");if(this.settings.wrapper){b=b.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()}if(!this.labelContainer.append(b).length){this.settings.errorPlacement?this.settings.errorPlacement(b,a(c)):b.insertAfter(c)}}if(!d&&this.settings.success){b.text("");typeof this.settings.success=="string"?b.addClass(this.settings.success):this.settings.success(b)}this.toShow=this.toShow.add(b)},errorsFor:function(c){var b=this.idOrName(c);return this.errors().filter(function(){return a(this).attr("for")==b})},idOrName:function(b){return this.groups[b.name]||(this.checkable(b)?b.name:b.id||b.name)},checkable:function(b){return/radio|checkbox/i.test(b.type)},findByName:function(b){var c=this.currentForm;return a(document.getElementsByName(b)).map(function(e,d){return d.form==c&&d.name==b&&d||null})},getLength:function(c,b){switch(b.nodeName.toLowerCase()){case"select":return a("option:selected",b).length;case"input":if(this.checkable(b)){return this.findByName(b.name).filter(":checked").length}}return c.length},depend:function(c,b){return this.dependTypes[typeof c]?this.dependTypes[typeof c](c,b):true},dependTypes:{"boolean":function(c,b){return c},string:function(c,b){return !!a(c,b.form).length},"function":function(c,b){return c(b)}},optional:function(b){return !a.validator.methods.required.call(this,a.trim(b.value),b)&&"dependency-mismatch"},startRequest:function(b){if(!this.pending[b.name]){this.pendingRequest++;this.pending[b.name]=true}},stopRequest:function(b,c){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0}delete this.pending[b.name];if(c&&this.pendingRequest==0&&this.formSubmitted&&this.form()){a(this.currentForm).submit();this.formSubmitted=false}else{if(!c&&this.pendingRequest==0&&this.formSubmitted){a(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false}}},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:true,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:true},email:{email: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(b,c){b.constructor==String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var d={};var c=a(b).attr("class");c&&a.each(c.split(" "),function(){if(this in a.validator.classRuleSettings){a.extend(d,a.validator.classRuleSettings[this])}});return d},attributeRules:function(c){var e={};var b=a(c);for(method in a.validator.methods){var d=b.attr(method);if(d){e[method]=d}}if(e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)){delete e.maxlength}return e},metadataRules:function(b){if(!a.metadata){return{}}var c=a.data(b.form,"validator").settings.meta;return c?a(b).metadata()[c]:a(b).metadata()},staticRules:function(c){var d={};var b=a.data(c.form,"validator");if(b.settings.rules){d=a.validator.normalizeRule(b.settings.rules[c.name])||{}}return d},normalizeRules:function(c,b){a.each(c,function(f,d){if(d===false){delete c[f];return}if(d.param||d.depends){var e=true;switch(typeof d.depends){case"string":e=!!a(d.depends,b.form).length;break;case"function":e=d.depends.call(b,b);break}if(e){c[f]=d.param!==undefined?d.param:true}else{delete c[f]}}});a.each(c,function(d,e){c[d]=a.isFunction(e)?e(b):e});a.each(["minlength","maxlength","min","max"],function(){if(c[this]){c[this]=Number(c[this])}});a.each(["rangelength","range"],function(){if(c[this]){c[this]=[Number(c[this][0]),Number(c[this][1])]}});if(a.validator.autoCreateRanges){if(c.min&&c.max){c.range=[c.min,c.max];delete c.min;delete c.max}if(c.minlength&&c.maxlength){c.rangelength=[c.minlength,c.maxlength];delete c.minlength;delete c.maxlength}}if(c.messages){delete c.messages}return c},normalizeRule:function(c){if(typeof c=="string"){var b={};a.each(c.split(/\s/),function(){b[this]=true});c=b}return c},addMethod:function(b,d,c){a.validator.methods[b]=d;a.validator.messages[b]=c!=undefined?c:a.validator.messages[b];if(d.length<3){a.validator.addClassRules(b,a.validator.normalizeRule(b))}},methods:{required:function(c,b,e){if(!this.depend(e,b)){return"dependency-mismatch"}switch(b.nodeName.toLowerCase()){case"select":var d=a(b).val();return d&&d.length>0;case"input":if(this.checkable(b)){return this.getLength(c,b)>0}default:return a.trim(c).length>0}},remote:function(f,d,g){if(this.optional(d)){return"dependency-mismatch"}var b=this.previousValue(d);if(!this.settings.messages[d.name]){this.settings.messages[d.name]={}}b.originalMessage=this.settings.messages[d.name].remote;this.settings.messages[d.name].remote=b.message;g=typeof g=="string"&&{url:g}||g;if(b.old!==f){b.old=f;var c=this;this.startRequest(d);var e={};e[d.name]=f;a.ajax(a.extend(true,{url:g,mode:"abort",port:"validate"+d.name,dataType:"json",data:e,success:function(i){c.settings.messages[d.name].remote=b.originalMessage;var k=i===true;if(k){var h=c.formSubmitted;c.prepareElement(d);c.formSubmitted=h;c.successList.push(d);c.showErrors()}else{var l={};var j=(b.message=i||c.defaultMessage(d,"remote"));l[d.name]=a.isFunction(j)?j(f):j;c.showErrors(l)}b.valid=k;c.stopRequest(d,k)}},g));return"pending"}else{if(this.pending[d.name]){return"pending"}}return b.valid},minlength:function(c,b,d){return this.optional(b)||this.getLength(a.trim(c),b)>=d},maxlength:function(c,b,d){return this.optional(b)||this.getLength(a.trim(c),b)<=d},rangelength:function(d,c,e){var b=this.getLength(a.trim(d),c);return this.optional(c)||(b>=e[0]&&b<=e[1])},min:function(c,b,d){return this.optional(b)||c>=d},max:function(c,b,d){return this.optional(b)||c<=d},range:function(c,b,d){return this.optional(b)||(c>=d[0]&&c<=d[1])},email:function(c,b){return this.optional(b)||/^((([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(c)},url:function(c,b){return this.optional(b)||/^(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(c)},date:function(c,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(c))},dateISO:function(c,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(c)},number:function(c,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(c)},digits:function(c,b){return this.optional(b)||/^\d+$/.test(c)},creditcard:function(f,e){if(this.optional(e)){return"dependency-mismatch"}if(/[^0-9-]+/.test(f)){return false}var g=0,d=0,c=false;f=f.replace(/\D/g,"");for(var h=f.length-1;h>=0;h--){var b=f.charAt(h);var d=parseInt(b,10);if(c){if((d*=2)>9){d-=9}}g+=d;c=!c}return(g%10)==0},accept:function(c,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||c.match(new RegExp(".("+d+")$","i"))},equalTo:function(c,b,d){var e=a(d).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(b).valid()});return c==e.val()}}});a.format=a.validator.format})(jQuery);(function(c){var b=c.ajax;var a={};c.ajax=function(e){e=c.extend(e,c.extend({},c.ajaxSettings,e));var d=e.port;if(e.mode=="abort"){if(a[d]){a[d].abort()}return(a[d]=b.apply(this,arguments))}return b.apply(this,arguments)}})(jQuery);(function(a){if(!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener){a.each({focus:"focusin",blur:"focusout"},function(c,b){a.event.special[b]={setup:function(){this.addEventListener(c,d,true)},teardown:function(){this.removeEventListener(c,d,true)},handler:function(f){arguments[0]=a.event.fix(f);arguments[0].type=b;return a.event.handle.apply(this,arguments)}};function d(f){f=a.event.fix(f);f.type=b;return a.event.handle.call(this,f)}})}a.extend(a.fn,{validateDelegate:function(d,c,b){return this.bind(c,function(e){var f=a(e.target);if(f.is(d)){return b.apply(f,arguments)}})}})})(jQuery);
jQuery(document).ready(function(){jQuery("div.middle-container").find("form").validate({rules:{name:{required:true},email:{required:true,email:true}},messages:{name:{required:"<span class='red' style='padding-left:5px;'><em>Name is a required field </em></span>"},email:{required:"<span class='red' style='padding-left:5px;'><em>Email is a required field</em></span>",email:"<span class='red' style='padding-left:5px;'><em>Please enter a valid email address</em></span>"}},wrapper:"td",errorPlacement:function(b,a){b.insertAfter(a.parent())}})});
