/*
 * 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 n=this,g,C=n.jQuery,t=n.$,r=n.jQuery=n.$=function(I,J){return new r.fn.init(I,J)},H=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;r.fn=r.prototype={init:function(I,L){I=I||document;if(I.nodeType){this[0]=I;this.length=1;this.context=I;return this}if(typeof I==="string"){var K=H.exec(I);if(K&&(K[1]||!L)){if(K[1]){I=r.clean([K[1]],L)}else{var M=document.getElementById(K[3]);if(M&&M.id!=K[3]){return r().find(I)}var J=r(M||[]);J.context=document;J.selector=I;return J}}else{return r(L).find(I)}}else{if(r.isFunction(I)){return r(document).ready(I)}}if(I.selector&&I.context){this.selector=I.selector;this.context=I.context}return this.setArray(r.isArray(I)?I:r.makeArray(I))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(I){return I===g?Array.prototype.slice.call(this):this[I]},pushStack:function(J,L,I){var K=r(J);K.prevObject=this;K.context=this.context;if(L==="find"){K.selector=this.selector+(this.selector?" ":"")+I}else{if(L){K.selector=this.selector+"."+L+"("+I+")"}}return K},setArray:function(I){this.length=0;Array.prototype.push.apply(this,I);return this},each:function(J,I){return r.each(this,J,I)},index:function(I){return r.inArray(I&&I.jquery?I[0]:I,this)},attr:function(J,L,K){var I=J;if(typeof J==="string"){if(L===g){return this[0]&&r[K||"attr"](this[0],J)}else{I={};I[J]=L}}return this.each(function(M){for(J in I){r.attr(K?this.style:this,J,r.prop(this,I[J],K,M,J))}})},css:function(I,J){if((I=="width"||I=="height")&&parseFloat(J)<0){J=g}return this.attr(I,J,"curCSS")},text:function(J){if(typeof J!=="object"&&J!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(J))}var I="";r.each(J||this,function(){r.each(this.childNodes,function(){if(this.nodeType!=8){I+=this.nodeType!=1?this.nodeValue:r.fn.text([this])}})});return I},wrapAll:function(I){if(this[0]){var J=r(I,this[0].ownerDocument).clone();if(this[0].parentNode){J.insertBefore(this[0])}J.map(function(){var K=this;while(K.firstChild){K=K.firstChild}return K}).append(this)}return this},wrapInner:function(I){return this.each(function(){r(this).contents().wrapAll(I)})},wrap:function(I){return this.each(function(){r(this).wrapAll(I)})},append:function(){return this.domManip(arguments,true,function(I){if(this.nodeType==1){this.appendChild(I)}})},prepend:function(){return this.domManip(arguments,true,function(I){if(this.nodeType==1){this.insertBefore(I,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(I){this.parentNode.insertBefore(I,this)})},after:function(){return this.domManip(arguments,false,function(I){this.parentNode.insertBefore(I,this.nextSibling)})},end:function(){return this.prevObject||r([])},push:[].push,sort:[].sort,splice:[].splice,find:function(I){if(this.length===1){var J=this.pushStack([],"find",I);J.length=0;r.find(I,this[0],J);return J}else{return this.pushStack(r.unique(r.map(this,function(K){return r.find(I,K)})),"find",I)}},clone:function(K){var I=this.map(function(){if(!r.support.noCloneEvent&&!r.isXMLDoc(this)){var M=this.outerHTML;if(!M){var N=this.ownerDocument.createElement("div");N.appendChild(this.cloneNode(true));M=N.innerHTML}return r.clean([M.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(K===true){var L=this.find("*").andSelf(),J=0;I.find("*").andSelf().each(function(){if(this.nodeName!==L[J].nodeName){return}var M=r.data(L[J],"events");for(var O in M){for(var N in M[O]){r.event.add(this,O,M[O][N],M[O][N].data)}}J++})}return I},filter:function(I){return this.pushStack(r.isFunction(I)&&r.grep(this,function(K,J){return I.call(K,J)})||r.multiFilter(I,r.grep(this,function(J){return J.nodeType===1})),"filter",I)},closest:function(I){var K=r.expr.match.POS.test(I)?r(I):null,J=0;return this.map(function(){var L=this;while(L&&L.ownerDocument){if(K?K.index(L)>-1:r(L).is(I)){r.data(L,"closest",J);return L}L=L.parentNode;J++}})},not:function(I){if(typeof I==="string"){if(f.test(I)){return this.pushStack(r.multiFilter(I,this,true),"not",I)}else{I=r.multiFilter(I,this)}}var J=I.length&&I[I.length-1]!==g&&!I.nodeType;return this.filter(function(){return J?r.inArray(this,I)<0:this!=I})},add:function(I){return this.pushStack(r.unique(r.merge(this.get(),typeof I==="string"?r(I):r.makeArray(I))))},is:function(I){return !!I&&r.multiFilter(I,this).length>0},hasClass:function(I){return !!I&&this.is("."+I)},val:function(O){if(O===g){var I=this[0];if(I){if(r.nodeName(I,"option")){return(I.attributes.value||{}).specified?I.value:I.text}if(r.nodeName(I,"select")){var M=I.selectedIndex,P=[],Q=I.options,L=I.type=="select-one";if(M<0){return null}for(var J=L?M:0,N=L?M+1:Q.length;J<N;J++){var K=Q[J];if(K.selected){O=r(K).val();if(L){return O}P.push(O)}}return P}return(I.value||"").replace(/\r/g,"")}return g}if(typeof O==="number"){O+=""}return this.each(function(){if(this.nodeType!=1){return}if(r.isArray(O)&&/radio|checkbox/.test(this.type)){this.checked=(r.inArray(this.value,O)>=0||r.inArray(this.name,O)>=0)}else{if(r.nodeName(this,"select")){var R=r.makeArray(O);r("option",this).each(function(){this.selected=(r.inArray(this.value,R)>=0||r.inArray(this.text,R)>=0)});if(!R.length){this.selectedIndex=-1}}else{this.value=O}}})},html:function(I){return I===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(I)},replaceWith:function(I){return this.after(I).remove()},eq:function(I){return this.slice(I,+I+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(I){return this.pushStack(r.map(this,function(K,J){return I.call(K,J,K)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(N,Q,P){if(this[0]){var M=(this[0].ownerDocument||this[0]).createDocumentFragment(),J=r.clean(N,(this[0].ownerDocument||this[0]),M),L=M.firstChild;if(L){for(var K=0,I=this.length;K<I;K++){P.call(O(this[K],L),this.length>1||K>0?M.cloneNode(true):M)}}if(J){r.each(J,D)}}return this;function O(R,S){return Q&&r.nodeName(R,"table")&&r.nodeName(S,"tr")?(R.getElementsByTagName("tbody")[0]||R.appendChild(R.ownerDocument.createElement("tbody"))):R}}};r.fn.init.prototype=r.fn;function D(I,J){if(J.src){r.ajax({url:J.src,async:false,dataType:"script"})}else{r.globalEval(J.text||J.textContent||J.innerHTML||"")}if(J.parentNode){J.parentNode.removeChild(J)}}function e(){return +new Date}r.extend=r.fn.extend=function(){var N=arguments[0]||{},L=1,M=arguments.length,I=false,K;if(typeof N==="boolean"){I=N;N=arguments[1]||{};L=2}if(typeof N!=="object"&&!r.isFunction(N)){N={}}if(M==L){N=this;--L}for(;L<M;L++){if((K=arguments[L])!=null){for(var J in K){var O=N[J],P=K[J];if(N===P){continue}if(I&&P&&typeof P==="object"&&!P.nodeType){N[J]=r.extend(I,O||(P.length!=null?[]:{}),P)}else{if(P!==g){N[J]=P}}}}}return N};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,u=document.defaultView||{},w=Object.prototype.toString;r.extend({noConflict:function(I){n.$=t;if(I){n.jQuery=C}return r},isFunction:function(I){return w.call(I)==="[object Function]"},isArray:function(I){return w.call(I)==="[object Array]"},isXMLDoc:function(I){return I.nodeType===9&&I.documentElement.nodeName!=="HTML"||!!I.ownerDocument&&r.isXMLDoc(I.ownerDocument)},globalEval:function(K){if(K&&/\S/.test(K)){var J=document.getElementsByTagName("head")[0]||document.documentElement,I=document.createElement("script");I.type="text/javascript";if(r.support.scriptEval){I.appendChild(document.createTextNode(K))}else{I.text=K}J.insertBefore(I,J.firstChild);J.removeChild(I)}},nodeName:function(J,I){return J.nodeName&&J.nodeName.toUpperCase()==I.toUpperCase()},each:function(K,O,J){var I,L=0,M=K.length;if(J){if(M===g){for(I in K){if(O.apply(K[I],J)===false){break}}}else{for(;L<M;){if(O.apply(K[L++],J)===false){break}}}}else{if(M===g){for(I in K){if(O.call(K[I],I,K[I])===false){break}}}else{for(var N=K[0];L<M&&O.call(N,L,N)!==false;N=K[++L]){}}}return K},prop:function(L,M,K,J,I){if(r.isFunction(M)){M=M.call(L,J)}return typeof M==="number"&&K=="curCSS"&&!b.test(I)?M+"px":M},className:{add:function(I,J){r.each((J||"").split(/\s+/),function(K,L){if(I.nodeType==1&&!r.className.has(I.className,L)){I.className+=(I.className?" ":"")+L}})},remove:function(I,J){if(I.nodeType==1){I.className=J!==g?r.grep(I.className.split(/\s+/),function(K){return !r.className.has(J,K)}).join(" "):""}},has:function(J,I){return J&&r.inArray(I,(J.className||J).toString().split(/\s+/))>-1}},swap:function(L,K,M){var I={};for(var J in K){I[J]=L.style[J];L.style[J]=K[J]}M.call(L);for(var J in K){L.style[J]=I[J]}},css:function(L,J,N,I){if(J=="width"||J=="height"){var P,K={position:"absolute",visibility:"hidden",display:"block"},O=J=="width"?["Left","Right"]:["Top","Bottom"];function M(){P=J=="width"?L.offsetWidth:L.offsetHeight;if(I==="border"){return}r.each(O,function(){if(!I){P-=parseFloat(r.curCSS(L,"padding"+this,true))||0}if(I==="margin"){P+=parseFloat(r.curCSS(L,"margin"+this,true))||0}else{P-=parseFloat(r.curCSS(L,"border"+this+"Width",true))||0}})}if(L.offsetWidth!==0){M()}else{r.swap(L,K,M)}return Math.max(0,Math.round(P))}return r.curCSS(L,J,N)},curCSS:function(M,J,K){var P,I=M.style;if(J=="opacity"&&!r.support.opacity){P=r.attr(I,"opacity");return P==""?"1":P}if(J.match(/float/i)){J=A}if(!K&&I&&I[J]){P=I[J]}else{if(u.getComputedStyle){if(J.match(/float/i)){J="float"}J=J.replace(/([A-Z])/g,"-$1").toLowerCase();var Q=u.getComputedStyle(M,null);if(Q){P=Q.getPropertyValue(J)}if(J=="opacity"&&P==""){P="1"}}else{if(M.currentStyle){var N=J.replace(/\-(\w)/g,function(R,S){return S.toUpperCase()});P=M.currentStyle[J]||M.currentStyle[N];if(!/^\d+(px)?$/i.test(P)&&/^\d/.test(P)){var L=I.left,O=M.runtimeStyle.left;M.runtimeStyle.left=M.currentStyle.left;I.left=P||0;P=I.pixelLeft+"px";I.left=L;M.runtimeStyle.left=O}}}}return P},clean:function(J,O,M){O=O||document;if(typeof O.createElement==="undefined"){O=O.ownerDocument||O[0]&&O[0].ownerDocument||document}if(!M&&J.length===1&&typeof J[0]==="string"){var L=/^<(\w+)\s*\/?>$/.exec(J[0]);if(L){return[O.createElement(L[1])]}}var K=[],I=[],P=O.createElement("div");r.each(J,function(T,W){if(typeof W==="number"){W+=""}if(!W){return}if(typeof W==="string"){W=W.replace(/(<(\w+)[^>]*?)\/>/g,function(Y,Z,X){return X.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?Y:Z+"></"+X+">"});var S=W.replace(/^\s+/,"").substring(0,10).toLowerCase();var U=!S.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!S.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||S.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!S.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!S.indexOf("<td")||!S.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!S.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!r.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];P.innerHTML=U[1]+W+U[2];while(U[0]--){P=P.lastChild}if(!r.support.tbody){var V=/<tbody/i.test(W),R=!S.indexOf("<table")&&!V?P.firstChild&&P.firstChild.childNodes:U[1]=="<table>"&&!V?P.childNodes:[];for(var Q=R.length-1;Q>=0;--Q){if(r.nodeName(R[Q],"tbody")&&!R[Q].childNodes.length){R[Q].parentNode.removeChild(R[Q])}}}if(!r.support.leadingWhitespace&&/^\s/.test(W)){P.insertBefore(O.createTextNode(W.match(/^\s*/)[0]),P.firstChild)}W=r.makeArray(P.childNodes)}if(W.nodeType){K.push(W)}else{K=r.merge(K,W)}});if(M){for(var N=0;K[N];N++){if(r.nodeName(K[N],"script")&&(!K[N].type||K[N].type.toLowerCase()==="text/javascript")){I.push(K[N].parentNode?K[N].parentNode.removeChild(K[N]):K[N])}else{if(K[N].nodeType===1){K.splice.apply(K,[N+1,0].concat(r.makeArray(K[N].getElementsByTagName("script"))))}M.appendChild(K[N])}}return I}return K},attr:function(N,K,O){if(!N||N.nodeType==3||N.nodeType==8){return g}var L=!r.isXMLDoc(N),P=O!==g;K=L&&r.props[K]||K;if(N.tagName){var J=/href|src|style/.test(K);if(K=="selected"&&N.parentNode){N.parentNode.selectedIndex}if(K in N&&L&&!J){if(P){if(K=="type"&&r.nodeName(N,"input")&&N.parentNode){throw"type property can't be changed"}N[K]=O}if(r.nodeName(N,"form")&&N.getAttributeNode(K)){return N.getAttributeNode(K).nodeValue}if(K=="tabIndex"){var M=N.getAttributeNode("tabIndex");return M&&M.specified?M.value:N.nodeName.match(/(button|input|object|select|textarea)/i)?0:N.nodeName.match(/^(a|area)$/i)&&N.href?0:g}return N[K]}if(!r.support.style&&L&&K=="style"){return r.attr(N.style,"cssText",O)}if(P){N.setAttribute(K,""+O)}var I=!r.support.hrefNormalized&&L&&J?N.getAttribute(K,2):N.getAttribute(K);return I===null?g:I}if(!r.support.opacity&&K=="opacity"){if(P){N.zoom=1;N.filter=(N.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(O)+""=="NaN"?"":"alpha(opacity="+O*100+")")}return N.filter&&N.filter.indexOf("opacity=")>=0?(parseFloat(N.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}K=K.replace(/-([a-z])/ig,function(Q,R){return R.toUpperCase()});if(P){N[K]=O}return N[K]},trim:function(I){return(I||"").replace(/^\s+|\s+$/g,"")},makeArray:function(K){var I=[];if(K!=null){var J=K.length;if(J==null||typeof K==="string"||r.isFunction(K)||K.setInterval){I[0]=K}else{while(J){I[--J]=K[J]}}}return I},inArray:function(K,L){for(var I=0,J=L.length;I<J;I++){if(L[I]===K){return I}}return -1},merge:function(L,I){var J=0,K,M=L.length;if(!r.support.getAll){while((K=I[J++])!=null){if(K.nodeType!=8){L[M++]=K}}}else{while((K=I[J++])!=null){L[M++]=K}}return L},unique:function(O){var J=[],I={};try{for(var K=0,L=O.length;K<L;K++){var N=r.data(O[K]);if(!I[N]){I[N]=true;J.push(O[K])}}}catch(M){J=O}return J},grep:function(J,N,I){var K=[];for(var L=0,M=J.length;L<M;L++){if(!I!=!N(J[L],L)){K.push(J[L])}}return K},map:function(I,N){var J=[];for(var K=0,L=I.length;K<L;K++){var M=N(I[K],K);if(M!=null){J[J.length]=M}}return J.concat.apply([],J)}});var G=navigator.userAgent.toLowerCase();r.browser={version:(G.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(G),opera:/opera/.test(G),msie:/msie/.test(G)&&!/opera/.test(G),mozilla:/mozilla/.test(G)&&!/(compatible|webkit)/.test(G)};r.each({parent:function(I){return I.parentNode},parents:function(I){return r.dir(I,"parentNode")},next:function(I){return r.nth(I,2,"nextSibling")},prev:function(I){return r.nth(I,2,"previousSibling")},nextAll:function(I){return r.dir(I,"nextSibling")},prevAll:function(I){return r.dir(I,"previousSibling")},siblings:function(I){return r.sibling(I.parentNode.firstChild,I)},children:function(I){return r.sibling(I.firstChild)},contents:function(I){return r.nodeName(I,"iframe")?I.contentDocument||I.contentWindow.document:r.makeArray(I.childNodes)}},function(I,J){r.fn[I]=function(K){var L=r.map(this,J);if(K&&typeof K=="string"){L=r.multiFilter(K,L)}return this.pushStack(r.unique(L),I,K)}});r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(I,J){r.fn[I]=function(K){var N=[],P=r(K);for(var O=0,L=P.length;O<L;O++){var M=(O>0?this.clone(true):this).get();r.fn[J].apply(r(P[O]),M);N=N.concat(M)}return this.pushStack(N,I,K)}});r.each({removeAttr:function(I){r.attr(this,I,"");if(this.nodeType==1){this.removeAttribute(I)}},addClass:function(I){r.className.add(this,I)},removeClass:function(I){r.className.remove(this,I)},toggleClass:function(J,I){if(typeof I!=="boolean"){I=!r.className.has(this,J)}r.className[I?"add":"remove"](this,J)},remove:function(I){if(!I||r.filter(I,[this]).length){r("*",this).add([this]).each(function(){r.event.remove(this);r.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){r(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(I,J){r.fn[I]=function(){return this.each(J,arguments)}});function l(I,J){return I[0]&&parseInt(r.curCSS(I[0],J,true),10)||0}var h="jQuery"+e(),z=0,E={};r.extend({cache:{},data:function(J,I,K){J=J==n?E:J;var L=J[h];if(!L){L=J[h]=++z}if(I&&!r.cache[L]){r.cache[L]={}}if(K!==g){r.cache[L][I]=K}return I?r.cache[L][I]:L},removeData:function(J,I){J=J==n?E:J;var L=J[h];if(I){if(r.cache[L]){delete r.cache[L][I];I="";for(I in r.cache[L]){break}if(!I){r.removeData(J)}}}else{try{delete J[h]}catch(K){if(J.removeAttribute){J.removeAttribute(h)}}delete r.cache[L]}},queue:function(J,I,L){if(J){I=(I||"fx")+"queue";var K=r.data(J,I);if(!K||r.isArray(L)){K=r.data(J,I,r.makeArray(L))}else{if(L){K.push(L)}}}return K},dequeue:function(L,K){var I=r.queue(L,K),J=I.shift();if(!K||K==="fx"){J=I[0]}if(J!==g){J.call(L)}}});r.fn.extend({data:function(I,K){var L=I.split(".");L[1]=L[1]?"."+L[1]:"";if(K===g){var J=this.triggerHandler("getData"+L[1]+"!",[L[0]]);if(J===g&&this.length){J=r.data(this[0],I)}return J===g&&L[1]?this.data(L[0]):J}else{return this.trigger("setData"+L[1]+"!",[L[0],K]).each(function(){r.data(this,I,K)})}},removeData:function(I){return this.each(function(){r.removeData(this,I)})},queue:function(I,J){if(typeof I!=="string"){J=I;I="fx"}if(J===g){return r.queue(this[0],I)}return this.each(function(){var K=r.queue(this,I,J);if(I=="fx"&&K.length==1){K[0].call(this)}})},dequeue:function(I){return this.each(function(){r.dequeue(this,I)})}});
/*
 * 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 V=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,P=0,L=Object.prototype.toString;var J=function(ac,Y,af,ag){af=af||[];Y=Y||document;if(Y.nodeType!==1&&Y.nodeType!==9){return[]}if(!ac||typeof ac!=="string"){return af}var ad=[],aa,aj,am,X,ah,Z,ab=true;V.lastIndex=0;while((aa=V.exec(ac))!==null){ad.push(aa[1]);if(aa[2]){Z=RegExp.rightContext;break}}if(ad.length>1&&Q.exec(ac)){if(ad.length===2&&M.relative[ad[0]]){aj=N(ad[0]+ad[1],Y)}else{aj=M.relative[ad[0]]?[Y]:J(ad.shift(),Y);while(ad.length){ac=ad.shift();if(M.relative[ac]){ac+=ad.shift()}aj=N(ac,aj)}}}else{var ai=ag?{expr:ad.pop(),set:I(ag)}:J.find(ad.pop(),ad.length===1&&Y.parentNode?Y.parentNode:Y,U(Y));aj=J.filter(ai.expr,ai.set);if(ad.length>0){am=I(aj)}else{ab=false}while(ad.length){var al=ad.pop(),ak=al;if(!M.relative[al]){al=""}else{ak=ad.pop()}if(ak==null){ak=Y}M.relative[al](am,ak,U(Y))}}if(!am){am=aj}if(!am){throw"Syntax error, unrecognized expression: "+(al||ac)}if(L.call(am)==="[object Array]"){if(!ab){af.push.apply(af,am)}else{if(Y.nodeType===1){for(var ae=0;am[ae]!=null;ae++){if(am[ae]&&(am[ae]===true||am[ae].nodeType===1&&O(Y,am[ae]))){af.push(aj[ae])}}}else{for(var ae=0;am[ae]!=null;ae++){if(am[ae]&&am[ae].nodeType===1){af.push(aj[ae])}}}}}else{I(am,af)}if(Z){J(Z,Y,af,ag);if(K){hasDuplicate=false;af.sort(K);if(hasDuplicate){for(var ae=1;ae<af.length;ae++){if(af[ae]===af[ae-1]){af.splice(ae--,1)}}}}}return af};J.matches=function(X,Y){return J(X,null,null,Y)};J.find=function(ae,X,af){var ad,ab;if(!ae){return[]}for(var aa=0,Z=M.order.length;aa<Z;aa++){var ac=M.order[aa],ab;if((ab=M.match[ac].exec(ae))){var Y=RegExp.leftContext;if(Y.substr(Y.length-1)!=="\\"){ab[1]=(ab[1]||"").replace(/\\/g,"");ad=M.find[ac](ab,X,af);if(ad!=null){ae=ae.replace(M.match[ac],"");break}}}}if(!ad){ad=X.getElementsByTagName("*")}return{set:ad,expr:ae}};J.filter=function(ah,ag,ak,aa){var Z=ah,am=[],ae=ag,ac,X,ad=ag&&ag[0]&&U(ag[0]);while(ah&&ag.length){for(var af in M.filter){if((ac=M.match[af].exec(ah))!=null){var Y=M.filter[af],al,aj;X=false;if(ae==am){am=[]}if(M.preFilter[af]){ac=M.preFilter[af](ac,ae,ak,am,aa,ad);if(!ac){X=al=true}else{if(ac===true){continue}}}if(ac){for(var ab=0;(aj=ae[ab])!=null;ab++){if(aj){al=Y(aj,ac,ab,ae);var ai=aa^!!al;if(ak&&al!=null){if(ai){X=true}else{ae[ab]=false}}else{if(ai){am.push(aj);X=true}}}}}if(al!==g){if(!ak){ae=am}ah=ah.replace(M.match[af],"");if(!X){return[]}break}}}if(ah==Z){if(X==null){throw"Syntax error, unrecognized expression: "+ah}else{break}}Z=ah}return ae};var M=J.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(X){return X.getAttribute("href")}},relative:{"+":function(ae,X,ad){var ab=typeof X==="string",af=ab&&!/\W/.test(X),ac=ab&&!af;if(af&&!ad){X=X.toUpperCase()}for(var aa=0,Z=ae.length,Y;aa<Z;aa++){if((Y=ae[aa])){while((Y=Y.previousSibling)&&Y.nodeType!==1){}ae[aa]=ac||Y&&Y.nodeName===X?Y||false:Y===X}}if(ac){J.filter(X,ae,true)}},">":function(ad,Y,ae){var ab=typeof Y==="string";if(ab&&!/\W/.test(Y)){Y=ae?Y:Y.toUpperCase();for(var Z=0,X=ad.length;Z<X;Z++){var ac=ad[Z];if(ac){var aa=ac.parentNode;ad[Z]=aa.nodeName===Y?aa:false}}}else{for(var Z=0,X=ad.length;Z<X;Z++){var ac=ad[Z];if(ac){ad[Z]=ab?ac.parentNode:ac.parentNode===Y}}if(ab){J.filter(Y,ad,true)}}},"":function(aa,Y,ac){var Z=P++,X=W;if(!Y.match(/\W/)){var ab=Y=ac?Y:Y.toUpperCase();X=T}X("parentNode",Y,Z,aa,ab,ac)},"~":function(aa,Y,ac){var Z=P++,X=W;if(typeof Y==="string"&&!Y.match(/\W/)){var ab=Y=ac?Y:Y.toUpperCase();X=T}X("previousSibling",Y,Z,aa,ab,ac)}},find:{ID:function(Y,Z,aa){if(typeof Z.getElementById!=="undefined"&&!aa){var X=Z.getElementById(Y[1]);return X?[X]:[]}},NAME:function(Z,ac,ad){if(typeof ac.getElementsByName!=="undefined"){var Y=[],ab=ac.getElementsByName(Z[1]);for(var aa=0,X=ab.length;aa<X;aa++){if(ab[aa].getAttribute("name")===Z[1]){Y.push(ab[aa])}}return Y.length===0?null:Y}},TAG:function(X,Y){return Y.getElementsByTagName(X[1])}},preFilter:{CLASS:function(aa,Y,Z,X,ad,ae){aa=" "+aa[1].replace(/\\/g,"")+" ";if(ae){return aa}for(var ab=0,ac;(ac=Y[ab])!=null;ab++){if(ac){if(ad^(ac.className&&(" "+ac.className+" ").indexOf(aa)>=0)){if(!Z){X.push(ac)}}else{if(Z){Y[ab]=false}}}}return false},ID:function(X){return X[1].replace(/\\/g,"")},TAG:function(Y,X){for(var Z=0;X[Z]===false;Z++){}return X[Z]&&U(X[Z])?Y[1]:Y[1].toUpperCase()},CHILD:function(X){if(X[1]=="nth"){var Y=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(X[2]=="even"&&"2n"||X[2]=="odd"&&"2n+1"||!/\D/.test(X[2])&&"0n+"+X[2]||X[2]);X[2]=(Y[1]+(Y[2]||1))-0;X[3]=Y[3]-0}X[0]=P++;return X},ATTR:function(ab,Y,Z,X,ac,ad){var aa=ab[1].replace(/\\/g,"");if(!ad&&M.attrMap[aa]){ab[1]=M.attrMap[aa]}if(ab[2]==="~="){ab[4]=" "+ab[4]+" "}return ab},PSEUDO:function(ab,Y,Z,X,ac){if(ab[1]==="not"){if(ab[3].match(V).length>1||/^\w/.test(ab[3])){ab[3]=J(ab[3],null,null,Y)}else{var aa=J.filter(ab[3],Y,Z,true^ac);if(!Z){X.push.apply(X,aa)}return false}}else{if(M.match.POS.test(ab[0])||M.match.CHILD.test(ab[0])){return true}}return ab},POS:function(X){X.unshift(true);return X}},filters:{enabled:function(X){return X.disabled===false&&X.type!=="hidden"},disabled:function(X){return X.disabled===true},checked:function(X){return X.checked===true},selected:function(X){X.parentNode.selectedIndex;return X.selected===true},parent:function(X){return !!X.firstChild},empty:function(X){return !X.firstChild},has:function(Z,Y,X){return !!J(X[3],Z).length},header:function(X){return/h\d/i.test(X.nodeName)},text:function(X){return"text"===X.type},radio:function(X){return"radio"===X.type},checkbox:function(X){return"checkbox"===X.type},file:function(X){return"file"===X.type},password:function(X){return"password"===X.type},submit:function(X){return"submit"===X.type},image:function(X){return"image"===X.type},reset:function(X){return"reset"===X.type},button:function(X){return"button"===X.type||X.nodeName.toUpperCase()==="BUTTON"},input:function(X){return/input|select|textarea|button/i.test(X.nodeName)}},setFilters:{first:function(Y,X){return X===0},last:function(Z,Y,X,aa){return Y===aa.length-1},even:function(Y,X){return X%2===0},odd:function(Y,X){return X%2===1},lt:function(Z,Y,X){return Y<X[3]-0},gt:function(Z,Y,X){return Y>X[3]-0},nth:function(Z,Y,X){return X[3]-0==Y},eq:function(Z,Y,X){return X[3]-0==Y}},filter:{PSEUDO:function(ad,Z,aa,ae){var Y=Z[1],ab=M.filters[Y];if(ab){return ab(ad,aa,Z,ae)}else{if(Y==="contains"){return(ad.textContent||ad.innerText||"").indexOf(Z[3])>=0}else{if(Y==="not"){var ac=Z[3];for(var aa=0,X=ac.length;aa<X;aa++){if(ac[aa]===ad){return false}}return true}}}},CHILD:function(X,aa){var ad=aa[1],Y=X;switch(ad){case"only":case"first":while(Y=Y.previousSibling){if(Y.nodeType===1){return false}}if(ad=="first"){return true}Y=X;case"last":while(Y=Y.nextSibling){if(Y.nodeType===1){return false}}return true;case"nth":var Z=aa[2],ag=aa[3];if(Z==1&&ag==0){return true}var ac=aa[0],af=X.parentNode;if(af&&(af.sizcache!==ac||!X.nodeIndex)){var ab=0;for(Y=af.firstChild;Y;Y=Y.nextSibling){if(Y.nodeType===1){Y.nodeIndex=++ab}}af.sizcache=ac}var ae=X.nodeIndex-ag;if(Z==0){return ae==0}else{return(ae%Z==0&&ae/Z>=0)}}},ID:function(Y,X){return Y.nodeType===1&&Y.getAttribute("id")===X},TAG:function(Y,X){return(X==="*"&&Y.nodeType===1)||Y.nodeName===X},CLASS:function(Y,X){return(" "+(Y.className||Y.getAttribute("class"))+" ").indexOf(X)>-1},ATTR:function(ac,aa){var Z=aa[1],X=M.attrHandle[Z]?M.attrHandle[Z](ac):ac[Z]!=null?ac[Z]:ac.getAttribute(Z),ad=X+"",ab=aa[2],Y=aa[4];return X==null?ab==="!=":ab==="="?ad===Y:ab==="*="?ad.indexOf(Y)>=0:ab==="~="?(" "+ad+" ").indexOf(Y)>=0:!Y?ad&&X!==false:ab==="!="?ad!=Y:ab==="^="?ad.indexOf(Y)===0:ab==="$="?ad.substr(ad.length-Y.length)===Y:ab==="|="?ad===Y||ad.substr(0,Y.length+1)===Y+"-":false},POS:function(ab,Y,Z,ac){var X=Y[2],aa=M.setFilters[X];if(aa){return aa(ab,Z,Y,ac)}}}};var Q=M.match.POS;for(var S in M.match){M.match[S]=RegExp(M.match[S].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var I=function(Y,X){Y=Array.prototype.slice.call(Y);if(X){X.push.apply(X,Y);return X}return Y};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(R){I=function(ab,aa){var Y=aa||[];if(L.call(ab)==="[object Array]"){Array.prototype.push.apply(Y,ab)}else{if(typeof ab.length==="number"){for(var Z=0,X=ab.length;Z<X;Z++){Y.push(ab[Z])}}else{for(var Z=0;ab[Z];Z++){Y.push(ab[Z])}}}return Y}}var K;if(document.documentElement.compareDocumentPosition){K=function(Y,X){var Z=Y.compareDocumentPosition(X)&4?-1:Y===X?0:1;if(Z===0){hasDuplicate=true}return Z}}else{if("sourceIndex" in document.documentElement){K=function(Y,X){var Z=Y.sourceIndex-X.sourceIndex;if(Z===0){hasDuplicate=true}return Z}}else{if(document.createRange){K=function(aa,Y){var Z=aa.ownerDocument.createRange(),X=Y.ownerDocument.createRange();Z.selectNode(aa);Z.collapse(true);X.selectNode(Y);X.collapse(true);var ab=Z.compareBoundaryPoints(Range.START_TO_END,X);if(ab===0){hasDuplicate=true}return ab}}}}(function(){var Y=document.createElement("form"),Z="script"+(new Date).getTime();Y.innerHTML="<input name='"+Z+"'/>";var X=document.documentElement;X.insertBefore(Y,X.firstChild);if(!!document.getElementById(Z)){M.find.ID=function(ab,ac,ad){if(typeof ac.getElementById!=="undefined"&&!ad){var aa=ac.getElementById(ab[1]);return aa?aa.id===ab[1]||typeof aa.getAttributeNode!=="undefined"&&aa.getAttributeNode("id").nodeValue===ab[1]?[aa]:g:[]}};M.filter.ID=function(ac,aa){var ab=typeof ac.getAttributeNode!=="undefined"&&ac.getAttributeNode("id");return ac.nodeType===1&&ab&&ab.nodeValue===aa}}X.removeChild(Y)})();(function(){var X=document.createElement("div");X.appendChild(document.createComment(""));if(X.getElementsByTagName("*").length>0){M.find.TAG=function(Y,ac){var ab=ac.getElementsByTagName(Y[1]);if(Y[1]==="*"){var aa=[];for(var Z=0;ab[Z];Z++){if(ab[Z].nodeType===1){aa.push(ab[Z])}}ab=aa}return ab}}X.innerHTML="<a href='#'></a>";if(X.firstChild&&typeof X.firstChild.getAttribute!=="undefined"&&X.firstChild.getAttribute("href")!=="#"){M.attrHandle.href=function(Y){return Y.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var X=J,Y=document.createElement("div");Y.innerHTML="<p class='TEST'></p>";if(Y.querySelectorAll&&Y.querySelectorAll(".TEST").length===0){return}J=function(ac,ab,Z,aa){ab=ab||document;if(!aa&&ab.nodeType===9&&!U(ab)){try{return I(ab.querySelectorAll(ac),Z)}catch(ad){}}return X(ac,ab,Z,aa)};J.find=X.find;J.filter=X.filter;J.selectors=X.selectors;J.matches=X.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var X=document.createElement("div");X.innerHTML="<div class='test e'></div><div class='test'></div>";if(X.getElementsByClassName("e").length===0){return}X.lastChild.className="e";if(X.getElementsByClassName("e").length===1){return}M.order.splice(1,0,"CLASS");M.find.CLASS=function(Y,Z,aa){if(typeof Z.getElementsByClassName!=="undefined"&&!aa){return Z.getElementsByClassName(Y[1])}}})()}function T(Y,ad,ac,ah,ae,ag){var af=Y=="previousSibling"&&!ag;for(var aa=0,Z=ah.length;aa<Z;aa++){var X=ah[aa];if(X){if(af&&X.nodeType===1){X.sizcache=ac;X.sizset=aa}X=X[Y];var ab=false;while(X){if(X.sizcache===ac){ab=ah[X.sizset];break}if(X.nodeType===1&&!ag){X.sizcache=ac;X.sizset=aa}if(X.nodeName===ad){ab=X;break}X=X[Y]}ah[aa]=ab}}}function W(Y,ad,ac,ah,ae,ag){var af=Y=="previousSibling"&&!ag;for(var aa=0,Z=ah.length;aa<Z;aa++){var X=ah[aa];if(X){if(af&&X.nodeType===1){X.sizcache=ac;X.sizset=aa}X=X[Y];var ab=false;while(X){if(X.sizcache===ac){ab=ah[X.sizset];break}if(X.nodeType===1){if(!ag){X.sizcache=ac;X.sizset=aa}if(typeof ad!=="string"){if(X===ad){ab=true;break}}else{if(J.filter(ad,[X]).length>0){ab=X;break}}}X=X[Y]}ah[aa]=ab}}}var O=document.compareDocumentPosition?function(Y,X){return Y.compareDocumentPosition(X)&16}:function(Y,X){return Y!==X&&(Y.contains?Y.contains(X):true)};var U=function(X){return X.nodeType===9&&X.documentElement.nodeName!=="HTML"||!!X.ownerDocument&&U(X.ownerDocument)};var N=function(X,ae){var aa=[],ab="",ac,Z=ae.nodeType?[ae]:ae;while((ac=M.match.PSEUDO.exec(X))){ab+=ac[0];X=X.replace(M.match.PSEUDO,"")}X=M.relative[X]?X+"*":X;for(var ad=0,Y=Z.length;ad<Y;ad++){J(X,Z[ad],aa)}return J.filter(ab,aa)};r.find=J;r.filter=J.filter;r.expr=J.selectors;r.expr[":"]=r.expr.filters;J.selectors.filters.hidden=function(X){return X.offsetWidth===0||X.offsetHeight===0};J.selectors.filters.visible=function(X){return X.offsetWidth>0||X.offsetHeight>0};J.selectors.filters.animated=function(X){return r.grep(r.timers,function(Y){return X===Y.elem}).length};r.multiFilter=function(Z,X,Y){if(Y){Z=":not("+Z+")"}return J.matches(Z,X)};r.dir=function(Z,Y){var X=[],aa=Z[Y];while(aa&&aa!=document){if(aa.nodeType==1){X.push(aa)}aa=aa[Y]}return X};r.nth=function(ab,X,Z,aa){X=X||1;var Y=0;for(;ab;ab=ab[Z]){if(ab.nodeType==1&&++Y==X){break}}return ab};r.sibling=function(Z,Y){var X=[];for(;Z;Z=Z.nextSibling){if(Z.nodeType==1&&Z!=Y){X.push(Z)}}return X};return;n.Sizzle=J})();r.event={add:function(M,J,L,O){if(M.nodeType==3||M.nodeType==8){return}if(M.setInterval&&M!=n){M=n}if(!L.guid){L.guid=this.guid++}if(O!==g){var K=L;L=this.proxy(K);L.data=O}var I=r.data(M,"events")||r.data(M,"events",{}),N=r.data(M,"handle")||r.data(M,"handle",function(){return typeof r!=="undefined"&&!r.event.triggered?r.event.handle.apply(arguments.callee.elem,arguments):g});N.elem=M;r.each(J.split(/\s+/),function(Q,R){var S=R.split(".");R=S.shift();L.type=S.slice().sort().join(".");var P=I[R];if(r.event.specialAll[R]){r.event.specialAll[R].setup.call(M,O,S)}if(!P){P=I[R]={};if(!r.event.special[R]||r.event.special[R].setup.call(M,O,S)===false){if(M.addEventListener){M.addEventListener(R,N,false)}else{if(M.attachEvent){M.attachEvent("on"+R,N)}}}}P[L.guid]=L;r.event.global[R]=true});M=null},guid:1,global:{},remove:function(O,L,N){if(O.nodeType==3||O.nodeType==8){return}var K=r.data(O,"events"),J,I;if(K){if(L===g||(typeof L==="string"&&L.charAt(0)==".")){for(var M in K){this.remove(O,M+(L||""))}}else{if(L.type){N=L.handler;L=L.type}r.each(L.split(/\s+/),function(Q,S){var U=S.split(".");S=U.shift();var R=RegExp("(^|\\.)"+U.slice().sort().join(".*\\.")+"(\\.|$)");if(K[S]){if(N){delete K[S][N.guid]}else{for(var T in K[S]){if(R.test(K[S][T].type)){delete K[S][T]}}}if(r.event.specialAll[S]){r.event.specialAll[S].teardown.call(O,U)}for(J in K[S]){break}if(!J){if(!r.event.special[S]||r.event.special[S].teardown.call(O,U)===false){if(O.removeEventListener){O.removeEventListener(S,r.data(O,"handle"),false)}else{if(O.detachEvent){O.detachEvent("on"+S,r.data(O,"handle"))}}}J=null;delete K[S]}}})}for(J in K){break}if(!J){var P=r.data(O,"handle");if(P){P.elem=null}r.removeData(O,"events");r.removeData(O,"handle")}}},trigger:function(M,O,L,I){var K=M.type||M;if(!I){M=typeof M==="object"?M[h]?M:r.extend(r.Event(K),M):r.Event(K);if(K.indexOf("!")>=0){M.type=K=K.slice(0,-1);M.exclusive=true}if(!L){M.stopPropagation();if(this.global[K]){r.each(r.cache,function(){if(this.events&&this.events[K]){r.event.trigger(M,O,this.handle.elem)}})}}if(!L||L.nodeType==3||L.nodeType==8){return g}M.result=g;M.target=L;O=r.makeArray(O);O.unshift(M)}M.currentTarget=L;var N=r.data(L,"handle");if(N){N.apply(L,O)}if((!L[K]||(r.nodeName(L,"a")&&K=="click"))&&L["on"+K]&&L["on"+K].apply(L,O)===false){M.result=false}if(!I&&L[K]&&!M.isDefaultPrevented()&&!(r.nodeName(L,"a")&&K=="click")){this.triggered=true;try{L[K]()}catch(P){}}this.triggered=false;if(!M.isPropagationStopped()){var J=L.parentNode||L.ownerDocument;if(J){r.event.trigger(M,O,J,true)}}},handle:function(O){var N,I;O=arguments[0]=r.event.fix(O||n.event);O.currentTarget=this;var P=O.type.split(".");O.type=P.shift();N=!P.length&&!O.exclusive;var M=RegExp("(^|\\.)"+P.slice().sort().join(".*\\.")+"(\\.|$)");I=(r.data(this,"events")||{})[O.type];for(var K in I){var L=I[K];if(N||M.test(L.type)){O.handler=L;O.data=L.data;var J=L.apply(this,arguments);if(J!==g){O.result=J;if(J===false){O.preventDefault();O.stopPropagation()}}if(O.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(L){if(L[h]){return L}var J=L;L=r.Event(J);for(var K=this.props.length,N;K;){N=this.props[--K];L[N]=J[N]}if(!L.target){L.target=L.srcElement||document}if(L.target.nodeType==3){L.target=L.target.parentNode}if(!L.relatedTarget&&L.fromElement){L.relatedTarget=L.fromElement==L.target?L.toElement:L.fromElement}if(L.pageX==null&&L.clientX!=null){var M=document.documentElement,I=document.body;L.pageX=L.clientX+(M&&M.scrollLeft||I&&I.scrollLeft||0)-(M.clientLeft||0);L.pageY=L.clientY+(M&&M.scrollTop||I&&I.scrollTop||0)-(M.clientTop||0)}if(!L.which&&((L.charCode||L.charCode===0)?L.charCode:L.keyCode)){L.which=L.charCode||L.keyCode}if(!L.metaKey&&L.ctrlKey){L.metaKey=L.ctrlKey}if(!L.which&&L.button){L.which=(L.button&1?1:(L.button&2?3:(L.button&4?2:0)))}return L},proxy:function(J,I){I=I||function(){return J.apply(this,arguments)};I.guid=J.guid=J.guid||I.guid||this.guid++;return I},special:{ready:{setup:F,teardown:function(){}}},specialAll:{live:{setup:function(I,J){r.event.add(this,J[0],c)},teardown:function(K){if(K.length){var I=0,J=RegExp("(^|\\.)"+K[0]+"(\\.|$)");r.each((r.data(this,"events").live||{}),function(){if(J.test(this.type)){I++}});if(I<1){r.event.remove(this,K[0],c)}}}}}};r.Event=function(I){if(!this.preventDefault){return new r.Event(I)}if(I&&I.type){this.originalEvent=I;this.type=I.type}else{this.type=I}this.timeStamp=e();this[h]=true};function m(){return false}function y(){return true}r.Event.prototype={preventDefault:function(){this.isDefaultPrevented=y;var I=this.originalEvent;if(!I){return}if(I.preventDefault){I.preventDefault()}I.returnValue=false},stopPropagation:function(){this.isPropagationStopped=y;var I=this.originalEvent;if(!I){return}if(I.stopPropagation){I.stopPropagation()}I.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=y;this.stopPropagation()},isDefaultPrevented:m,isPropagationStopped:m,isImmediatePropagationStopped:m};var a=function(J){var I=J.relatedTarget;while(I&&I!=this){try{I=I.parentNode}catch(K){I=this}}if(I!=this){J.type=J.data;r.event.handle.apply(this,arguments)}};r.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(J,I){r.event.special[I]={setup:function(){r.event.add(this,J,a,I)},teardown:function(){r.event.remove(this,J,a)}}});r.fn.extend({bind:function(J,K,I){return J=="unload"?this.one(J,K,I):this.each(function(){r.event.add(this,J,I||K,I&&K)})},one:function(K,L,J){var I=r.event.proxy(J||L,function(M){r(this).unbind(M,I);return(J||L).apply(this,arguments)});return this.each(function(){r.event.add(this,K,I,J&&L)})},unbind:function(J,I){return this.each(function(){r.event.remove(this,J,I)})},trigger:function(I,J){return this.each(function(){r.event.trigger(I,J,this)})},triggerHandler:function(I,K){if(this[0]){var J=r.Event(I);J.preventDefault();J.stopPropagation();r.event.trigger(J,K,this[0]);return J.result}},toggle:function(K){var I=arguments,J=1;while(J<I.length){r.event.proxy(K,I[J++])}return this.click(r.event.proxy(K,function(L){this.lastToggle=(this.lastToggle||0)%J;L.preventDefault();return I[this.lastToggle++].apply(this,arguments)||false}))},hover:function(I,J){return this.mouseenter(I).mouseleave(J)},ready:function(I){F();if(r.isReady){I.call(document,r)}else{r.readyList.push(I)}return this},live:function(K,J){var I=r.event.proxy(J);I.guid+=this.selector+K;r(document).bind(j(K,this.selector),this.selector,I);return this},die:function(J,I){r(document).unbind(j(J,this.selector),I?{guid:I.guid+this.selector+J}:null);return this}});function c(L){var I=RegExp("(^|\\.)"+L.type+"(\\.|$)"),K=true,J=[];r.each(r.data(this,"events").live||[],function(M,N){if(I.test(N.type)){var O=r(L.target).closest(N.data)[0];if(O){J.push({elem:O,fn:N})}}});J.sort(function(N,M){return r.data(N.elem,"closest")-r.data(M.elem,"closest")});r.each(J,function(){if(this.fn.call(this.elem,L,this.fn.data)===false){return(K=false)}});return K}function j(J,I){return["live",J,I.replace(/\./g,"`").replace(/ /g,"|")].join(".")}r.extend({isReady:false,readyList:[],ready:function(){if(!r.isReady){r.isReady=true;if(r.readyList){r.each(r.readyList,function(){this.call(document,r)});r.readyList=null}r(document).triggerHandler("ready")}}});var B=false;function F(){if(B){return}B=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);r.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);r.ready()}});if(document.documentElement.doScroll&&n==n.top){(function(){if(r.isReady){return}try{document.documentElement.doScroll("left")}catch(I){setTimeout(arguments.callee,0);return}r.ready()})()}}}r.event.add(n,"load",r.ready)}r.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(J,I){r.fn[I]=function(K){return K?this.bind(I,K):this.trigger(I)}});r(n).bind("unload",function(){for(var I in r.cache){if(I!=1&&r.cache[I].handle){r.event.remove(r.cache[I].handle.elem)}}});(function(){r.support={};var J=document.documentElement,K=document.createElement("script"),O=document.createElement("div"),N="script"+(new Date).getTime();O.style.display="none";O.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 L=O.getElementsByTagName("*"),I=O.getElementsByTagName("a")[0];if(!L||!L.length||!I){return}r.support={leadingWhitespace:O.firstChild.nodeType==3,tbody:!O.getElementsByTagName("tbody").length,objectAll:!!O.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!O.getElementsByTagName("link").length,style:/red/.test(I.getAttribute("style")),hrefNormalized:I.getAttribute("href")==="/a",opacity:I.style.opacity==="0.5",cssFloat:!!I.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};K.type="text/javascript";try{K.appendChild(document.createTextNode("window."+N+"=1;"))}catch(M){}J.insertBefore(K,J.firstChild);if(n[N]){r.support.scriptEval=true;delete n[N]}J.removeChild(K);if(O.attachEvent&&O.fireEvent){O.attachEvent("onclick",function(){r.support.noCloneEvent=false;O.detachEvent("onclick",arguments.callee)});O.cloneNode(true).fireEvent("onclick")}r(function(){var P=document.createElement("div");P.style.width=P.style.paddingLeft="1px";document.body.appendChild(P);r.boxModel=r.support.boxModel=P.offsetWidth===2;document.body.removeChild(P).style.display="none"})})();var A=r.support.cssFloat?"cssFloat":"styleFloat";r.props={"for":"htmlFor","class":"className","float":A,cssFloat:A,styleFloat:A,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};r.fn.extend({_load:r.fn.load,load:function(K,N,O){if(typeof K!=="string"){return this._load(K)}var M=K.indexOf(" ");if(M>=0){var I=K.slice(M,K.length);K=K.slice(0,M)}var L="GET";if(N){if(r.isFunction(N)){O=N;N=null}else{if(typeof N==="object"){N=r.param(N);L="POST"}}}var J=this;r.ajax({url:K,type:L,dataType:"html",data:N,complete:function(Q,P){if(P=="success"||P=="notmodified"){J.html(I?r("<div/>").append(Q.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(I):Q.responseText)}if(O){J.each(O,[Q.responseText,P,Q])}}});return this},serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?r.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(I,J){var K=r(this).val();return K==null?null:r.isArray(K)?r.map(K,function(M,L){return{name:J.name,value:M}}):{name:J.name,value:K}}).get()}});r.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(I,J){r.fn[J]=function(K){return this.bind(J,K)}});var v=e();r.extend({get:function(I,K,L,J){if(r.isFunction(K)){L=K;K=null}return r.ajax({type:"GET",url:I,data:K,success:L,dataType:J})},getScript:function(I,J){return r.get(I,null,J,"script")},getJSON:function(I,J,K){return r.get(I,J,K,"json")},post:function(I,K,L,J){if(r.isFunction(K)){L=K;K={}}return r.ajax({type:"POST",url:I,data:K,success:L,dataType:J})},ajaxSetup:function(I){r.extend(r.ajaxSettings,I)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return n.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(Q){Q=r.extend(true,Q,r.extend(true,{},r.ajaxSettings,Q));var aa,J=/=\?(&|$)/g,V,Z,K=Q.type.toUpperCase();if(Q.data&&Q.processData&&typeof Q.data!=="string"){Q.data=r.param(Q.data)}if(Q.dataType=="jsonp"){if(K=="GET"){if(!Q.url.match(J)){Q.url+=(Q.url.match(/\?/)?"&":"?")+(Q.jsonp||"callback")+"=?"}}else{if(!Q.data||!Q.data.match(J)){Q.data=(Q.data?Q.data+"&":"")+(Q.jsonp||"callback")+"=?"}}Q.dataType="json"}if(Q.dataType=="json"&&(Q.data&&Q.data.match(J)||Q.url.match(J))){aa="jsonp"+v++;if(Q.data){Q.data=(Q.data+"").replace(J,"="+aa+"$1")}Q.url=Q.url.replace(J,"="+aa+"$1");Q.dataType="script";n[aa]=function(ab){Z=ab;M();P();n[aa]=g;try{delete n[aa]}catch(ac){}if(L){L.removeChild(X)}}}if(Q.dataType=="script"&&Q.cache==null){Q.cache=false}if(Q.cache===false&&K=="GET"){var I=e();var Y=Q.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+I+"$2");Q.url=Y+((Y==Q.url)?(Q.url.match(/\?/)?"&":"?")+"_="+I:"")}if(Q.data&&K=="GET"){Q.url+=(Q.url.match(/\?/)?"&":"?")+Q.data;Q.data=null}if(Q.global&&!r.active++){r.event.trigger("ajaxStart")}var U=/^(\w+:)?\/\/([^\/?#]+)/.exec(Q.url);if(Q.dataType=="script"&&K=="GET"&&U&&(U[1]&&U[1]!=location.protocol||U[2]!=location.host)){var L=document.getElementsByTagName("head")[0];var X=document.createElement("script");X.src=Q.url;if(Q.scriptCharset){X.charset=Q.scriptCharset}if(!aa){var S=false;X.onload=X.onreadystatechange=function(){if(!S&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){S=true;M();P();X.onload=X.onreadystatechange=null;L.removeChild(X)}}}L.appendChild(X);return g}var O=false;var N=Q.xhr();if(Q.username){N.open(K,Q.url,Q.async,Q.username,Q.password)}else{N.open(K,Q.url,Q.async)}try{if(Q.data){N.setRequestHeader("Content-Type",Q.contentType)}if(Q.ifModified){N.setRequestHeader("If-Modified-Since",r.lastModified[Q.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}N.setRequestHeader("X-Requested-With","XMLHttpRequest");N.setRequestHeader("Accept",Q.dataType&&Q.accepts[Q.dataType]?Q.accepts[Q.dataType]+", */*":Q.accepts._default)}catch(W){}if(Q.beforeSend&&Q.beforeSend(N,Q)===false){if(Q.global&&!--r.active){r.event.trigger("ajaxStop")}N.abort();return false}if(Q.global){r.event.trigger("ajaxSend",[N,Q])}var R=function(ab){if(N.readyState==0){if(T){clearInterval(T);T=null;if(Q.global&&!--r.active){r.event.trigger("ajaxStop")}}}else{if(!O&&N&&(N.readyState==4||ab=="timeout")){O=true;if(T){clearInterval(T);T=null}V=ab=="timeout"?"timeout":!r.httpSuccess(N)?"error":Q.ifModified&&r.httpNotModified(N,Q.url)?"notmodified":"success";if(V=="success"){try{Z=r.httpData(N,Q.dataType,Q)}catch(ad){V="parsererror"}}if(V=="success"){var ac;try{ac=N.getResponseHeader("Last-Modified")}catch(ad){}if(Q.ifModified&&ac){r.lastModified[Q.url]=ac}if(!aa){M()}}else{r.handleError(Q,N,V)}P();if(ab){N.abort()}if(Q.async){N=null}}}};if(Q.async){var T=setInterval(R,13);if(Q.timeout>0){setTimeout(function(){if(N&&!O){R("timeout")}},Q.timeout)}}try{N.send(Q.data)}catch(W){r.handleError(Q,N,null,W)}if(!Q.async){R()}function M(){if(Q.success){Q.success(Z,V)}if(Q.global){r.event.trigger("ajaxSuccess",[N,Q])}}function P(){if(Q.complete){Q.complete(N,V)}if(Q.global){r.event.trigger("ajaxComplete",[N,Q])}if(Q.global&&!--r.active){r.event.trigger("ajaxStop")}}return N},handleError:function(J,L,I,K){if(J.error){J.error(L,I,K)}if(J.global){r.event.trigger("ajaxError",[L,J,K])}},active:0,httpSuccess:function(J){try{return !J.status&&location.protocol=="file:"||(J.status>=200&&J.status<300)||J.status==304||J.status==1223}catch(I){}return false},httpNotModified:function(K,I){try{var L=K.getResponseHeader("Last-Modified");return K.status==304||L==r.lastModified[I]}catch(J){}return false},httpData:function(N,L,K){var J=N.getResponseHeader("content-type"),I=L=="xml"||!L&&J&&J.indexOf("xml")>=0,M=I?N.responseXML:N.responseText;if(I&&M.documentElement.tagName=="parsererror"){throw"parsererror"}if(K&&K.dataFilter){M=K.dataFilter(M,L)}if(typeof M==="string"){if(L=="script"){r.globalEval(M)}if(L=="json"){M=n["eval"]("("+M+")")}}return M},param:function(I){var K=[];function L(M,N){K[K.length]=encodeURIComponent(M)+"="+encodeURIComponent(N)}if(r.isArray(I)||I.jquery){r.each(I,function(){L(this.name,this.value)})}else{for(var J in I){if(r.isArray(I[J])){r.each(I[J],function(){L(J,this)})}else{L(J,r.isFunction(I[J])?I[J]():I[J])}}}return K.join("&").replace(/%20/g,"+")}});var p={},q,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function x(J,I){var K={};r.each(d.concat.apply([],d.slice(0,I)),function(){K[this]=J});return K}r.fn.extend({show:function(N,P){if(N){return this.animate(x("show",3),N,P)}else{for(var L=0,J=this.length;L<J;L++){var I=r.data(this[L],"olddisplay");this[L].style.display=I||"";if(r.css(this[L],"display")==="none"){var K=this[L].tagName,O;if(p[K]){O=p[K]}else{var M=r("<"+K+" />").appendTo("body");O=M.css("display");if(O==="none"){O="block"}M.remove();p[K]=O}r.data(this[L],"olddisplay",O)}}for(var L=0,J=this.length;L<J;L++){this[L].style.display=r.data(this[L],"olddisplay")||""}return this}},hide:function(L,M){if(L){return this.animate(x("hide",3),L,M)}else{for(var K=0,J=this.length;K<J;K++){var I=r.data(this[K],"olddisplay");if(!I&&I!=="none"){r.data(this[K],"olddisplay",r.css(this[K],"display"))}}for(var K=0,J=this.length;K<J;K++){this[K].style.display="none"}return this}},_toggle:r.fn.toggle,toggle:function(K,J){var I=typeof K==="boolean";return r.isFunction(K)&&r.isFunction(J)?this._toggle.apply(this,arguments):K==null||I?this.each(function(){var L=I?K:r(this).is(":hidden");r(this)[L?"show":"hide"]()}):this.animate(x("toggle",3),K,J)},fadeTo:function(I,K,J){return this.animate({opacity:K},I,J)},animate:function(M,J,L,K){var I=r.speed(J,L,K);return this[I.queue===false?"each":"queue"](function(){var O=r.extend({},I),Q,P=this.nodeType==1&&r(this).is(":hidden"),N=this;for(Q in M){if(M[Q]=="hide"&&P||M[Q]=="show"&&!P){return O.complete.call(this)}if((Q=="height"||Q=="width")&&this.style){O.display=r.css(this,"display");O.overflow=this.style.overflow}}if(O.overflow!=null){this.style.overflow="hidden"}O.curAnim=r.extend({},M);r.each(M,function(S,W){var V=new r.fx(N,O,S);if(/toggle|show|hide/.test(W)){V[W=="toggle"?P?"show":"hide":W](M)}else{var U=W.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),X=V.cur(true)||0;if(U){var R=parseFloat(U[2]),T=U[3]||"px";if(T!="px"){N.style[S]=(R||1)+T;X=((R||1)/V.cur(true))*X;N.style[S]=X+T}if(U[1]){R=((U[1]=="-="?-1:1)*R)+X}V.custom(X,R,T)}else{V.custom(X,W,"")}}});return true})},stop:function(J,I){var K=r.timers;if(J){this.queue([])}this.each(function(){for(var L=K.length-1;L>=0;L--){if(K[L].elem==this){if(I){K[L](true)}K.splice(L,1)}}});if(!I){this.dequeue()}return this}});r.each({slideDown:x("show",1),slideUp:x("hide",1),slideToggle:x("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(I,J){r.fn[I]=function(K,L){return this.animate(J,K,L)}});r.extend({speed:function(K,L,J){var I=typeof K==="object"?K:{complete:J||!J&&L||r.isFunction(K)&&K,duration:K,easing:J&&L||L&&!r.isFunction(L)&&L};I.duration=r.fx.off?0:typeof I.duration==="number"?I.duration:r.fx.speeds[I.duration]||r.fx.speeds._default;I.old=I.complete;I.complete=function(){if(I.queue!==false){r(this).dequeue()}if(r.isFunction(I.old)){I.old.call(this)}};return I},easing:{linear:function(K,L,I,J){return I+J*K},swing:function(K,L,I,J){return((-Math.cos(K*Math.PI)/2)+0.5)*J+I}},timers:[],fx:function(J,I,K){this.options=I;this.elem=J;this.prop=K;if(!I.orig){I.orig={}}}});r.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(r.fx.step[this.prop]||r.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(J){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var I=parseFloat(r.css(this.elem,this.prop,J));return I&&I>-10000?I:parseFloat(r.curCSS(this.elem,this.prop))||0},custom:function(M,L,K){this.startTime=e();this.start=M;this.end=L;this.unit=K||this.unit||"px";this.now=this.start;this.pos=this.state=0;var I=this;function J(N){return I.step(N)}J.elem=this.elem;if(J()&&r.timers.push(J)&&!q){q=setInterval(function(){var O=r.timers;for(var N=0;N<O.length;N++){if(!O[N]()){O.splice(N--,1)}}if(!O.length){clearInterval(q);q=g}},13)}},show:function(){this.options.orig[this.prop]=r.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());r(this.elem).show()},hide:function(){this.options.orig[this.prop]=r.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(L){var K=e();if(L||K>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var I=true;for(var J in this.options.curAnim){if(this.options.curAnim[J]!==true){I=false}}if(I){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(r.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){r(this.elem).hide()}if(this.options.hide||this.options.show){for(var M in this.options.curAnim){r.attr(this.elem.style,M,this.options.orig[M])}}this.options.complete.call(this.elem)}return false}else{var N=K-this.startTime;this.state=N/this.options.duration;this.pos=r.easing[this.options.easing||(r.easing.swing?"swing":"linear")](this.state,N,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};r.extend(r.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(I){r.attr(I.elem.style,"opacity",I.now)},_default:function(I){if(I.elem.style&&I.elem.style[I.prop]!=null){I.elem.style[I.prop]=I.now+I.unit}else{I.elem[I.prop]=I.now}}}});if(document.documentElement.getBoundingClientRect){r.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return r.offset.bodyOffset(this[0])}var K=this[0].getBoundingClientRect(),N=this[0].ownerDocument,J=N.body,I=N.documentElement,P=I.clientTop||J.clientTop||0,O=I.clientLeft||J.clientLeft||0,M=K.top+(self.pageYOffset||r.boxModel&&I.scrollTop||J.scrollTop)-P,L=K.left+(self.pageXOffset||r.boxModel&&I.scrollLeft||J.scrollLeft)-O;return{top:M,left:L}}}else{r.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return r.offset.bodyOffset(this[0])}r.offset.initialized||r.offset.initialize();var N=this[0],K=N.offsetParent,J=N,S=N.ownerDocument,Q,L=S.documentElement,O=S.body,P=S.defaultView,I=P.getComputedStyle(N,null),R=N.offsetTop,M=N.offsetLeft;while((N=N.parentNode)&&N!==O&&N!==L){Q=P.getComputedStyle(N,null);R-=N.scrollTop,M-=N.scrollLeft;if(N===K){R+=N.offsetTop,M+=N.offsetLeft;if(r.offset.doesNotAddBorder&&!(r.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(N.tagName))){R+=parseInt(Q.borderTopWidth,10)||0,M+=parseInt(Q.borderLeftWidth,10)||0}J=K,K=N.offsetParent}if(r.offset.subtractsBorderForOverflowNotVisible&&Q.overflow!=="visible"){R+=parseInt(Q.borderTopWidth,10)||0,M+=parseInt(Q.borderLeftWidth,10)||0}I=Q}if(I.position==="relative"||I.position==="static"){R+=O.offsetTop,M+=O.offsetLeft}if(I.position==="fixed"){R+=Math.max(L.scrollTop,O.scrollTop),M+=Math.max(L.scrollLeft,O.scrollLeft)}return{top:R,left:M}}}r.offset={initialize:function(){if(this.initialized){return}var P=document.body,J=document.createElement("div"),L,K,R,M,Q,I,N=P.style.marginTop,O='<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>';Q={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(I in Q){J.style[I]=Q[I]}J.innerHTML=O;P.insertBefore(J,P.firstChild);L=J.firstChild,K=L.firstChild,M=L.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(K.offsetTop!==5);this.doesAddBorderForTableAndCells=(M.offsetTop===5);L.style.overflow="hidden",L.style.position="relative";this.subtractsBorderForOverflowNotVisible=(K.offsetTop===-5);P.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(P.offsetTop===0);P.style.marginTop=N;P.removeChild(J);this.initialized=true},bodyOffset:function(I){r.offset.initialized||r.offset.initialize();var K=I.offsetTop,J=I.offsetLeft;if(r.offset.doesNotIncludeMarginInBodyOffset){K+=parseInt(r.curCSS(I,"marginTop",true),10)||0,J+=parseInt(r.curCSS(I,"marginLeft",true),10)||0}return{top:K,left:J}}};r.fn.extend({position:function(){var M=0,L=0,J;if(this[0]){var K=this.offsetParent(),N=this.offset(),I=/^body|html$/i.test(K[0].tagName)?{top:0,left:0}:K.offset();N.top-=l(this,"marginTop");N.left-=l(this,"marginLeft");I.top+=l(K,"borderTopWidth");I.left+=l(K,"borderLeftWidth");J={top:N.top-I.top,left:N.left-I.left}}return J},offsetParent:function(){var I=this[0].offsetParent||document.body;while(I&&(!/^body|html$/i.test(I.tagName)&&r.css(I,"position")=="static")){I=I.offsetParent}return r(I)}});r.each(["Left","Top"],function(J,I){var K="scroll"+I;r.fn[K]=function(L){if(!this[0]){return null}return L!==g?this.each(function(){this==n||this==document?n.scrollTo(!J?L:r(n).scrollLeft(),J?L:r(n).scrollTop()):this[K]=L}):this[0]==n||this[0]==document?self[J?"pageYOffset":"pageXOffset"]||r.boxModel&&document.documentElement[K]||document.body[K]:this[0][K]}});r.each(["Height","Width"],function(M,K){var I=M?"Left":"Top",L=M?"Right":"Bottom",J=K.toLowerCase();r.fn["inner"+K]=function(){return this[0]?r.css(this[0],J,false,"padding"):null};r.fn["outer"+K]=function(O){return this[0]?r.css(this[0],J,false,O?"margin":"border"):null};var N=K.toLowerCase();r.fn[N]=function(O){return this[0]==n?document.compatMode=="CSS1Compat"&&document.documentElement["client"+K]||document.body["client"+K]:this[0]==document?Math.max(document.documentElement["client"+K],document.body["scroll"+K],document.documentElement["scroll"+K],document.body["offset"+K],document.documentElement["offset"+K]):O===g?(this.length?r.css(this[0],N):null):this.css(N,typeof O==="string"?O:O+"px")}})})();function tmpl(b){var a="var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+document.getElementById(b).innerHTML.replace(/[\r\t\n]/g," ").split("<%").join("\t").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');} return p.join('');";return new Function("obj",a)}(function(b){b.ui={plugin:{add:function(d,e,g){var f=b.ui[d].prototype;for(var c in g){f.plugins[c]=f.plugins[c]||[];f.plugins[c].push([e,g[c]])}},call:function(c,e,d){var g=c.plugins[e];if(!g){return}for(var f=0;f<g.length;f++){if(c.options[g[f][0]]){g[f][1].apply(c.element,d)}}}},cssCache:{},css:function(c){if(b.ui.cssCache[c]){return b.ui.cssCache[c]}var d=b('<div class="ui-gen">').addClass(c).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");b.ui.cssCache[c]=!!((!(/auto|default/).test(d.css("cursor"))||(/^[1-9]/).test(d.css("height"))||(/^[1-9]/).test(d.css("width"))||!(/none/).test(d.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(d.css("backgroundColor"))));try{b("body").get(0).removeChild(d.get(0))}catch(f){}return b.ui.cssCache[c]},disableSelection:function(c){b(c).attr("unselectable","on").css("MozUserSelect","none")},enableSelection:function(c){b(c).attr("unselectable","off").css("MozUserSelect","")},hasScroll:function(g,d){var c=/top/.test(d||"top")?"scrollTop":"scrollLeft",f=false;if(g[c]>0){return true}g[c]=1;f=g[c]>0?true:false;g[c]=0;return f}};var a=b.fn.remove;b.fn.remove=function(){b("*",this).add(this).triggerHandler("remove");return a.apply(this,arguments)};getter=function(d,e,f){var c=b[d][e].getter||[];c=(typeof c=="string"?c.split(/,?\s+/):c);c.splice(0,0,"getId","getParams","serialize","get","getData","isShow");return(b.inArray(f,c)!=-1)};b.widget=function(d,c){var e=d.split(".")[0];d=d.split(".")[1];b.fn[d]=function(j){var g=(typeof j=="string"),h=Array.prototype.slice.call(arguments,1);if(g&&getter(e,d,j)){var f=b.data(this[0],d);return(f?f[j].apply(f,h):undefined)}return this.each(function(){var l=b.data(this,d);if(g&&l&&b.isFunction(l[j])){l[j].apply(l,h)}else{if(!g){b.data(this,d,new b[e][d](this,j))}}})};b[e][d]=function(h,g){var f=this;this.widgetName=d;this.widgetBaseClass=e+"-"+d;this.options=b.extend({},b.widget.defaults,b[e][d].defaults,g);this.element=b(h).bind("setData."+d,function(m,j,l){return f.setData(j,l)}).bind("getData."+d,function(l,j){return f.getData(j)}).bind("remove",function(){return f.destroy()});this.init()};b[e][d].prototype=b.extend({},b.widget.prototype,c)};b.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName)},getData:function(c){return this.options[c]},setData:function(c,d){this.options[c]=d;if(c=="disabled"){this.element[d?"addClass":"removeClass"](this.widgetBaseClass+"-disabled")}},enable:function(){this.setData("disabled",false)},disable:function(){this.setData("disabled",true)}};b.widget.defaults={disabled:false};b.ui.mouse={mouseInit:function(){var c=this;this.element.bind("mousedown."+this.widgetName,function(d){return c.mouseDown(d)});if(b.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},mouseDestroy:function(){this.element.unbind("."+this.widgetName);(b.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},mouseDown:function(f){(this._mouseStarted&&this.mouseUp(f));this._mouseDownEvent=f;var d=this,g=(f.which==1),c=(typeof this.options.cancel=="string"?b(f.target).parents().add(f.target).filter(this.options.cancel).length:false);if(!g||c||!this.mouseCapture(f)){return true}this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){d._mouseDelayMet=true},this.options.delay)}if(this.mouseDistanceMet(f)&&this.mouseDelayMet(f)){this._mouseStarted=(this.mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}this._mouseMoveDelegate=function(h){return d.mouseMove(h)};this._mouseUpDelegate=function(h){return d.mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);return false},mouseMove:function(c){if(b.browser.msie&&!c.button){return this.mouseUp(c)}if(this._mouseStarted){this.mouseDrag(c);return false}if(this.mouseDistanceMet(c)&&this.mouseDelayMet(c)){this._mouseStarted=(this.mouseStart(this._mouseDownEvent,c)!==false);(this._mouseStarted?this.mouseDrag(c):this.mouseUp(c))}return !this._mouseStarted},mouseUp:function(c){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this.mouseStop(c)}return false},mouseDistanceMet:function(c){return(Math.max(Math.abs(this._mouseDownEvent.pageX-c.pageX),Math.abs(this._mouseDownEvent.pageY-c.pageY))>=this.options.distance)},mouseDelayMet:function(c){return this._mouseDelayMet},mouseStart:function(c){},mouseDrag:function(c){},mouseStop:function(c){},mouseCapture:function(c){return true}};b.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);$.extend($.widget.prototype,{getId:function(){return this.element[0].id},getParams:function(b){var a=this.get();if(!a&&a!==0){return}b[this.getId()]=a.join?a.join("-"):a}});floatWidget={_active:[],getOpenActive:function(){var a=this._active[this._active.length-1];if(!a){return}if(!a.$container||!a.$container.isShow()){return}return a},closeActive:function(a){var b=this.getOpenActive();if(!b){return}if(!a){if(b.cancel){b.cancel()}else{b.close()}}if(a){if(b.accept){b.accept()}else{b.close()}}},setEscapeEnterHandler:function(){var a=this;$(document).keyup(function(b){if(b==null){keycode=event.keyCode}else{keycode=b.which}if(keycode!=27&&keycode!=13){return}a.closeActive(keycode==13)})},activePush:function(a){this._active.push(a)},activePop:function(c){for(var b=0;b<this._active.length;b++){var a=this._active[b];if(a===c){this._active.splice(b,1);break}}}};floatWidgetMixin={setHiders:function(a){this.setHideIfClickOutside(a)},setHideIfClickOutside:function(a){var b=this;if(!this.hideIfClickOutsideHandler){this.hideIfClickOutsideHandler=function(c){if(!b.$container||!b.$container.isShow()){return}var d=c.target;while(d.tagName!="BODY"&&d!=b.element[0]){d=d.parentNode}if(d!=b.element[0]&&!b.insideSelector(c)){b.close()}}}$(document.body)[a?"bind":"unbind"]("click",this.hideIfClickOutsideHandler)},insideSelector:function(a){var b=this.$container.offset();b.right=b.left+this.$container.outerWidth();b.bottom=b.top+this.$container.outerHeight();return a.pageY<b.bottom&&a.pageY>b.top&&a.pageX<b.right&&a.pageX>b.left}};function AjaxController(d,b,e){var c=function(f){d.isLoading=f;d.showLoading&&d.showLoading(f)};var a=function(f){if(d.onLoadError){d.onLoadError(f);return}var g="Извините, произошла ошибка. Код:"+f.errcode;alert(g)};this.sendRequest=function(l,h){var m=typeof l.data=="string"?l.data:$.param(l.data);var g=l.url+"/"+m;var f=this;if(!h&&sendRequestCache[g]){setTimeout(function(){d.onLoaded(sendRequestCache[g])},0);return}c(true);var n=function(p){if(!p.errcode){sendRequestCache[g]=p;d.onLoaded(p);c(false)}else{c(false);a(p)}};var j=function(r,p,q){c(false);a({errcode:p,xhr:r,event:q})};$.ajax({type:l.type||"GET",url:(b||"")+l.url+(e||""),data:m,success:n,dataType:"json",error:j})}}stringLoadingWidgetMixin={showLoading:function(a){this.isLoading=a;if(a){this.element.hide();this.element.parent().addClass("loading");if(this.element.parent().find(".loading_alert").length==0){this.element.before('<span class="loading_alert">Загрузка...</span>')}}else{this.element.parent().removeClass("loading");$(".loading_alert",this.element.parent()).remove();this.element.show()}}};classLoadingWidgetMixin={showLoading:function(a){if(a){this.element.addClass("loading")}else{this.element.removeClass("loading")}}};$.fn.isShow=function(){if(this.length>0){return this.css("display")!="none"}return null};$.fn.autohelp=function(b,d){d=d||this;var a;var c;this.hover(function(){a=$(b,$(d).parent().parent());c=a.html();a.html(this.title)},function(){a.html(c)});return this};Date.toStringFormat=function(a){return(a.getDate()<10?"0":"")+a.getDate()+"."+(a.getMonth()<9?"0":"")+(a.getMonth()+1)+"."+a.getFullYear()};Date.fromStringFormat=function(a){var b=a.split(".");return new Date(b[2],b[1]-1,b[0])};Date.shortMonthNames=["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек"];Date.dayNames=["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"];Date.shortDayNames=["Вс","Пн","Вт","Ср","Чт","Пт","Сб"];Date.monthNames=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];Date.monthNames1=["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"];Date.monthNames2=["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"];$.widget("ui.dateInput",$.extend({init:function(){console.log("dateInput.init");this.build();this.selectDate(this.getData("selectedValue"));var a=this;this.setHiders(true)},isShow:function(){return this.$container.isShow()},close:function(){floatWidget.activePop(this);this.$container.hide()},getMonthFirstDay:function(b){var a=new Date(b);a.setDate(1);a=a.getDay()||7;return a},fillMonthTable:function(d){console.log("dateInput.fillMonthTable");var h=["<table> 			<thead><tr><th>Пн</th><th>Вт</th><th>Ср</th><th>Чт</th><th>Пт</th><th>Сб</th><th>Вс</th></tr></thead><tbody>"];var m=new Date();var e=this.getMonthFirstDay(d);h.push("<tr>");if(e>1){h.push('<td colspan="'+(e-1)+'"></td>')}var n=new Date(d);n.setMonth(n.getMonth()+1);n.setDate(0);var a=n.getDate();var l=a+e-1;var j;var g="."+d.getMonth()+"."+d.getFullYear();var c=null;if(d.getMonth()==m.getMonth()&&d.getFullYear()==m.getFullYear()){c=m.getDate()}var b=null;if(this.selectedDate&&d.getMonth()==this.selectedDate.getMonth()&&d.getFullYear()==this.selectedDate.getFullYear()){b=this.selectedDate.getDate()}var p=-1;if(d.getFullYear()<m.getFullYear()||(d.getFullYear()==m.getFullYear()&&d.getMonth()==m.getMonth())){var p=m.getDate()}for(j=e;j<=l;j++){var f=j-e+1;h.push('<td class="dayCell day'+(j%7||7)+(f<p?" past":"")+(f===c?" today":"")+(f===b?" selected":"")+'" date="'+f+g+'"> 				<a href="javascript:void(0)">'+f+"</a></td>");if(j%7==0){h.push("</tr><tr>")}}var q=7-(l%7);if(q<7){h.push('<td colspan="'+q+'"></td>')}if(l<=35){h.push('<tr><td colspan="7">&nbsp;</td></tr>')}h.push("</tr></tbody></table>");return h},build:function(){var a=this;console.log("dateInput.build "+this.getId());this.$container=$('<div style="display:none" class="date_wrapper"><div class="date_selector close"></div></div>').appendTo(document.body);var c=this.realContainer=$(this.$container[0].firstChild);var b='<table>			<tr class="month_nav"> 				<td><span class="dateInput-prev">&laquo;</span><span class="month_name month_name1"></span></td> 				<td><span class="month_name month_name2"></span><span class="dateInput-next">&raquo;</span></td>			</tr> 			<tr><td class="dateInput-month-holder"></td><td class="dateInput-month-holder"></td></tr></table> 			<div class="stringCheckbox-close"></div>';c.html(b);$(c[0].lastChild).click(function(){a.close()});this.monthPrevSpan=$("span.dateInput-prev",c).click(function(){a.prevMonth()});$("span.dateInput-next",c).click(function(){a.nextMonth()});this.monthNameSpan1=$("span.month_name1",c);this.monthNameSpan2=$("span.month_name2",c);this.monthHolder1=$($("td.dateInput-month-holder",c)[0]);this.monthHolder2=$($("td.dateInput-month-holder",c)[1]);$("td.dateInput-month-holder",c).click(function(d){if(d.target&&d.target.tagName=="A"){d.target.blur()}var f=d.target;while(f.tagName!="TBODY"){if(f.tagName=="TD"){if(!f.getAttribute("date")){return}if($(f).hasClass("past")){return}a.selectDate(a.stringToDate(f.getAttribute("date")));a.close();d.stopPropagation();break}else{f=f.parentNode}}})},stringToDate:function(b){var a=b.split(".");return new Date(a[2],a[1],a[0])},buildMonths:function(d){console.log("buildMonths "+d);var b=new Date();if(d.getFullYear()==b.getFullYear()&&d.getMonth()<=b.getMonth()){this.monthPrevSpan.hide()}else{this.monthPrevSpan.show()}var c=this.getData("monthNames")[d.getMonth()];if(b.getFullYear()!=d.getFullYear()){c=c+" "+d.getFullYear()}this.monthHolder1.html(this.fillMonthTable(d).join(""));this.monthNameSpan1.html(c);var e=new Date(d);e.setMonth(e.getMonth()+1);var a=this.getData("monthNames")[e.getMonth()];if(b.getFullYear()!=e.getFullYear()){a=a+" "+e.getFullYear()}this.monthHolder2.html(this.fillMonthTable(e).join(""));this.monthNameSpan2.html(a);this.currentMonth=d},nextMonth:function(){var a=new Date(this.currentMonth);a.setMonth(a.getMonth()+1);this.buildMonths(a)},prevMonth:function(){var a=new Date(this.currentMonth);a.setMonth(a.getMonth()-1);this.buildMonths(a)},buildMonthsForDate:function(c){var b=new Date(c.getFullYear(),c.getMonth(),1);var a=new Date();if(a.getFullYear()!=c.getFullYear()||a.getMonth()!=c.getMonth()){b.setMonth(b.getMonth()-1)}this.buildMonths(b)},set:function(c){if(!c){alert("date_input.set without date");return}var b=this.currentMonth;if(b){var d=new Date(b.getFullYear(),b.getMonth(),1);var a=new Date(b.getFullYear(),b.getMonth()+2,1);if(c<d||c>a){this.buildMonthsForDate(c)}}else{this.buildMonthsForDate(c)}if(this.selectedDate){$("td[date="+this.dateToString(this.selectedDate)+"]",this.$container).removeClass("selected")}this.selectedDate=c;$("td[date="+this.dateToString(c)+"]",this.$container).addClass("selected")},dateToString:function(a){return a.getDate()+"."+a.getMonth()+"."+a.getFullYear()},selectDate:function(a){this.set(a);this.element.triggerHandler("select",[a])},open:function(){this.$container.show();floatWidget.activePush(this);this.setPosition()},setPosition:function(){var a=this.element.offset();this.$container.css({top:a.top+this.element.outerHeight()-7,left:a.left})}},floatWidgetMixin));$.ui.dateInput.defaults=Date.defaults={dayNames:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],shortDayNames:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],monthNames:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthNames1:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"],monthNames2:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"],shortMonthNames:["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек"]};for(var prop in Date.defaults){Date[prop]=Date.defaults[prop]}(function(b){b.dimensions={version:"@VERSION"};b.each(["Height","Width"],function(d,c){b.fn["inner"+c]=function(){if(!this[0]){return}var f=c=="Height"?"Top":"Left",e=c=="Height"?"Bottom":"Right";return this.css("display")!="none"?this[0]["client"+c]:a(this,c.toLowerCase())+a(this,"padding"+f)+a(this,"padding"+e)};b.fn["outer"+c]=function(f){if(!this[0]){return}var h=c=="Height"?"Top":"Left",e=c=="Height"?"Bottom":"Right";f=b.extend({margin:false},f||{});var g=this.css("display")!="none"?this[0]["offset"+c]:a(this,c.toLowerCase())+a(this,"border"+h+"Width")+a(this,"border"+e+"Width")+a(this,"padding"+h)+a(this,"padding"+e);return g+(f.margin?(a(this,"margin"+h)+a(this,"margin"+e)):0)}});b.each(["Left","Top"],function(d,c){b.fn["scroll"+c]=function(e){if(!this[0]){return}return e!=undefined?this.each(function(){this==window||this==document?window.scrollTo(c=="Left"?e:b(window)["scrollLeft"](),c=="Top"?e:b(window)["scrollTop"]()):this["scroll"+c]=e}):this[0]==window||this[0]==document?self[(c=="Left"?"pageXOffset":"pageYOffset")]||b.boxModel&&document.documentElement["scroll"+c]||document.body["scroll"+c]:this[0]["scroll"+c]}});b.fn.extend({position:function(){var h=0,g=0,f=this[0],j,c,e,d;if(f){e=this.offsetParent();j=this.offset();c=e.offset();j.top-=a(f,"marginTop");j.left-=a(f,"marginLeft");c.top+=a(e,"borderTopWidth");c.left+=a(e,"borderLeftWidth");d={top:j.top-c.top,left:j.left-c.left}}return d},offsetParent:function(){var c=this[0].offsetParent;while(c&&(!/^body|html$/i.test(c.tagName)&&b.css(c,"position")=="static")){c=c.offsetParent}return b(c)}});function a(c,d){return parseInt(b.curCSS(c.jquery?c[0]:c,d,true))||0}})(jQuery);jQuery.trunc=function(b,a,d){s=b.split(/ /);var e="";var c=0;while(c<s.length&&e.length+s[c].length<a){e+=s[c]+" ";c++}return c<s.length?e+"...":e};jQuery.trunc_simply=function(b,a){a=Math.max(a,3);return b.length<=a?b:b.substr(0,a-3)+"..."};(function(c){var a=c.scrollTo=function(f,e,d){a.win().scrollTo(f,e,d)};a.defaults={axis:"y",duration:1};a.win=function(){return c(c.browser.safari?"body":"html")};c.fn.scrollTo=function(f,e,d){if(typeof e=="object"){d=e;e=0}d=c.extend({},a.defaults,d);e=e||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){e/=2}d.offset=b(d.offset);d.over=b(d.over);return this.each(function(){var p=this,m=c(p),n=f,l,h={},q=m.is("html,body");switch(typeof n){case"number":case"string":if(/^([+-]=)?\d+(px)?$/.test(n)){n=b(n);break}n=c(n,this);case"object":if(n.is||n.style){l=(n=c(n)).offset()}}c.each(d.axis.split(""),function(v,w){var x=w=="x"?"Left":"Top",z=x.toLowerCase(),u="scroll"+x,r=p[u],t=w=="x"?"Width":"Height",y=t.toLowerCase();if(l){h[u]=l[z]+(q?0:r-m.offset()[z]);if(d.margin){h[u]-=parseInt(n.css("margin"+x))||0;h[u]-=parseInt(n.css("border"+x+"Width"))||0}h[u]+=d.offset[z]||0;if(d.over[z]){h[u]+=n[y]()*d.over[z]}}else{h[u]=n[z]}if(/^\d+$/.test(h[u])){h[u]=h[u]<=0?0:Math.min(h[u],g(t))}if(!v&&d.queue){if(r!=h[u]){j(d.onAfterFirst)}delete h[u]}});j(d.onAfter);function j(r){m.animate(h,e,d.easing,r&&function(){r.call(this,f)})}function g(r){var t=q?c.browser.opera?document.body:document.documentElement:p;return t["scroll"+r]-t["client"+r]}})};function b(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);(function(a){a.fn.corner=function(g){var l=a.browser.msie&&/MSIE 6.0/.test(navigator.userAgent);function p(u,v){return parseInt(a.css(u,v))||0}function q(u){var u=parseInt(u).toString(16);return(u.length<2)?"0"+u:u}function f(x){for(;x&&x.nodeName.toLowerCase()!="html";x=x.parentNode){var u=a.css(x,"backgroundColor");if(u.indexOf("rgb")>=0){if(a.browser.safari&&u=="rgba(0, 0, 0, 0)"){continue}var w=u.match(/\d+/g);return"#"+q(w[0])+q(w[1])+q(w[2])}if(u&&u!="transparent"){return u}}return"#ffffff"}function t(u){switch(j){case"round":return Math.round(e*(1-Math.cos(Math.asin(u/e))));case"cool":return Math.round(e*(1+Math.cos(Math.asin(u/e))));case"sharp":return Math.round(e*(1-Math.cos(Math.acos(u/e))));case"bite":return Math.round(e*(Math.cos(Math.asin((e-u-1)/e))));case"slide":return Math.round(e*(Math.atan2(u,e/u)));case"jut":return Math.round(e*(Math.atan2(e,(e-u-1))));case"curl":return Math.round(e*(Math.atan(u)));case"tear":return Math.round(e*(Math.cos(u)));case"wicked":return Math.round(e*(Math.tan(u)));case"long":return Math.round(e*(Math.sqrt(u)));case"sculpt":return Math.round(e*(Math.log((e-u-1),e)));case"dog":return(u&1)?(u+1):e;case"dog2":return(u&2)?(u+1):e;case"dog3":return(u&3)?(u+1):e;case"fray":return(u%2)*e;case"notch":return e;case"bevel":return u+1}}g=(g||"").toLowerCase();var c=/keep/.test(g);var h=((g.match(/cc:(#[0-9a-f]+)/)||[])[1]);var n=((g.match(/sc:(#[0-9a-f]+)/)||[])[1]);var e=parseInt((g.match(/(\d+)px/)||[])[1])||10;var r=/round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/;var j=((g.match(r)||["round"])[0]);var m={T:0,B:1};var b={TL:/top|tl/.test(g),TR:/top|tr/.test(g),BL:/bottom|bl/.test(g),BR:/bottom|br/.test(g)};if(!b.TL&&!b.TR&&!b.BL&&!b.BR){b={TL:1,TR:1,BL:1,BR:1}}var d=document.createElement("div");d.style.overflow="hidden";d.style.height="1px";d.style.backgroundColor=n||"transparent";d.style.borderStyle="solid";return this.each(function(z){var v={T:parseInt(a.css(this,"paddingTop"))||0,R:parseInt(a.css(this,"paddingRight"))||0,B:parseInt(a.css(this,"paddingBottom"))||0,L:parseInt(a.css(this,"paddingLeft"))||0};if(a.browser.msie){this.style.zoom=1}if(!c){this.style.border="none"}d.style.borderColor=h||f(this.parentNode);var B=a.curCSS(this,"height");for(var x in m){var C=m[x];if((C&&(b.BL||b.BR))||(!C&&(b.TL||b.TR))){d.style.borderStyle="none "+(b[x+"R"]?"solid":"none")+" none "+(b[x+"L"]?"solid":"none");var D=document.createElement("div");a(D).addClass("jquery-corner");var u=D.style;C?this.appendChild(D):this.insertBefore(D,this.firstChild);if(C&&B!="auto"){if(a.css(this,"position")=="static"){this.style.position="relative"}u.position="absolute";u.bottom=u.left=u.padding=u.margin="0";if(a.browser.msie){u.setExpression("width","this.parentNode.offsetWidth")}else{u.width="100%"}}else{if(!C&&a.browser.msie){if(a.css(this,"position")=="static"){this.style.position="relative"}u.position="absolute";u.top=u.left=u.right=u.padding=u.margin="0";var E=0;if(l||!a.boxModel){E=p(this,"borderLeftWidth")+p(this,"borderRightWidth")}l?u.setExpression("width","this.parentNode.offsetWidth - "+E+'+ "px"'):u.width="100%"}else{u.margin=!C?"-"+v.T+"px -"+v.R+"px "+(v.T-e)+"px -"+v.L+"px":(v.B-e)+"px -"+v.R+"px -"+v.B+"px -"+v.L+"px"}}for(var y=0;y<e;y++){var F=Math.max(0,t(y));var A=d.cloneNode(false);A.style.borderWidth="0 "+(b[x+"R"]?F:0)+"px 0 "+(b[x+"L"]?F:0)+"px";C?D.appendChild(A):D.insertBefore(A,D.firstChild)}}}})};a.fn.uncorner=function(b){return a(".jquery-corner",this).remove()}})(jQuery);$.widget("ui.stringSelect",$.extend({get:function(){return this.value},setPendingValue:function(a){this.pendingValue=a},set:function(b){var a=this.value;if(!this.getData("options").data[b]){for(var c in this.getData("options").data){b=c;break}}this.value=b;this.renderValue();this.element.triggerHandler("select",[b,a])},renderValue:function(){this.element.html(this.getOptionLabel(this.value))},loadOptions:function(a){this.ajaxController.sendRequest(a)},onLoaded:function(a){if(a){this.setData("options",a);this.lazyRefreshOptionsDone=false;this.set(this.pendingValue);this.element.triggerHandler("ready")}this.pendingValue=null},lazyRefreshOptions:function(){this.refreshOptions();this.lazyRefreshOptionsDone=true},getOptionLabel:function(a){return this.getData("options").data[a]},refreshOptions:function(){var g=this.element[0];var e=this.getData("options");$("#"+g.id+"_list").remove();var d=['<div class="select_list_wrap hide" id="'+g.id+'_list">             <ul class="select_list">'];var b=0,j=0;if(!e.best_idx){e.best_idx=999}for(var h in e.data){if(b==e.best_idx){d.push('<li class="'+(j++%2==0?"even":"odd")+'"><a href="javascript:void(0)" id="'+this.getId()+'-left">...остальные...</a></li>')}d.push('<li value="'+h+'" class="'+(j++%2==0?"even":"odd")+'"'+(b>=e.best_idx?' style="display:none"':"")+">"+this.getOptionLabel(h)+"</li>");b++}d.push("</ul></div>");$(d.join("")).appendTo("body");var f=this.$container=$(document.getElementById(g.id+"_list"));var a=this;$("li",f).each(function(c,l){if(!l.getAttribute("value")){return}$(l).click(function(m){a.select(m.tagName===undefined?this:m)}).hover(function(){$("li.over",f).removeClass("over");$(this).addClass("over")},function(){$(this).removeClass("over")})});this.leftLink=$("#"+this.getId()+"-left");this.leftLink.parent().click(function(c){a.showLeft();a.leftLink.blur();$("ul",f).stop().scrollTo(this,100)});var b=0;for(var h in this.getData("options").data){if(h==this.value){if(b>this.getData("options").best_idx){this.showLeft()}break}b++}},showLeft:function(){if(this.leftShown){return}o=this.leftLink.parent();o.nextAll().each(function(b,a){a.style.display=""});this.leftLink.html("остальные:");this.leftShown=true},open:function(){if(this.$container.isShow()){return}var a=this;$("li",this.$container).each(function(c,b){if(b.value==a.value){a.selectedIndex=c}});this.moveSelect(0);floatWidget.activePush(this);this.$container.css("left",this.element.offset().left).css("top",this.element.offset().top+this.element.outerHeight()).show();this.scrollToOver()},select:function(a){this.close();if(a.value!=this.value){this.set(a.value)}},scrollToOver:function(){$list=$("ul",this.$container);var a=$("li.over",$list);if(a.length>0){$list.stop().scrollTo(a.get(0),100)}},moveSelect:function(b){var a=$("li",this.$container);if(!a.length){return}this.selectedIndex+=b;if(this.selectedIndex<0){this.selectedIndex=0}else{if(this.selectedIndex>=a.size()){this.selectedIndex=a.length-1}}a.removeClass("over");$(a[this.selectedIndex]).addClass("over")},close:function(){this.$container.hide();floatWidget.activePop(this)},init:function(){this.ajaxController=new AjaxController(this,this.getData("sendRequestPrefix"),this.getData("sendRequestPostfix"));this.selectedIndex=0;this.is_focus=false;this.lazyInited=false;var a=this;this.element.click(function(){this.blur();if(!a.lazyRefreshOptionsDone){a.lazyRefreshOptions()}if(a.$container.isShow()){a.close()}else{a.open()}}).keydown(function(c){if(!a.lazyRefreshOptionsDone){a.lazyRefreshOptions()}switch(c.keyCode){case 38:c.preventDefault();a.moveSelect(-1);a.scrollToOver();break;case 40:c.preventDefault();a.moveSelect(1);a.scrollToOver();break;case 9:case 13:var b=$("li.over",a.$container);if(b.length>0){a.select(b.get(0));c.preventDefault()}break;default:a.selectedIndex=-1;break}});if(this.getData("options")){this.set(this.getData("selectedValue"))}this.setHiders(true)},hasPendingValue:function(){return !!this.pendingValue}},floatWidgetMixin,stringLoadingWidgetMixin));$.widget("ui.RoSiSelect",$.extend({},$.ui.stringSelect.prototype,{renderValue:function(){var a=this.getData("options").data[this.value];if(a.match("ребен")){a=a.replace(/ взр\S+/," взр.")}this.element.html(a)}}));$.widget("ui.CoSelect",$.extend({},$.ui.stringSelect.prototype,{getOptionLabel:function(e){var c=this.getData("options").data[e];var d=this.getData("options").main_regions;var a=d&&d[e];if(a){var b=(e==74)?"Канары":a.name;c=b+" ("+c+")"}return c},renderValue:function(){this.element.html(this.getData("options").data[this.value])}}));$.ui.RoSiSelect.getter=$.ui.CoSelect.getter=$.ui.stringSelect.getter="hasPendingValue";$.widget("ui.stringDateInput",{get:function(){return this.value},lazyInit:function(){var a=this;this.calendarElem=$(document.createElement("span"));this.calendarElem.id=this.getId()+"-dateInput";this.element.after(this.calendarElem);this.element.appendTo(this.calendarElem);this.calendarElem.dateInput({selectedValue:this.value});this.calendarElem.bind("select",function(c,b){a.set(new Date(b+""));a.element.triggerHandler("select",[b])});a.lazyInited=true},init:function(){var b=this;this.lazyInited=false;this.element.click(function(){this.blur();if(!b.lazyInited){b.lazyInit()}if(b.calendarElem.dateInput("isShow")){b.calendarElem.dateInput("close")}else{b.calendarElem.dateInput("open")}});var c=this.getData("value");if(!c){c=new Date()}if(typeof c=="string"){c=Date.fromStringFormat(c)}var a=new Date();var d=new Date(a.getFullYear(),a.getMonth(),a.getDate());if(d>c){c=d}this.set(c)},set:function(a){this.value=a;this.renderValue();if(this.lazyInited){this.calendarElem.dateInput("set",a)}},getParams:function(b){var a=this.value;if(a instanceof Date){a=Date.toStringFormat(a)}b[this.getId()]=a},renderDate:function(){var a=this.value;return a.getDate()+" "+Date.shortMonthNames[a.getMonth()]},renderValue:function(){this.element.html(this.renderDate())}});$.widget("ui.stringInput",{get:function(){return this.$input.val()},set:function(a){if(a){this.$input.val(a)}else{this.$input[0].value=""}this.renderValue();this.element.triggerHandler("select",[a])},renderValue:function(){this.$input.hide();var a=this.$input.val();this.element.html(a.length?a:"&nbsp;&nbsp;&nbsp;");this.element.show()},showInput:function(a){this.element.hide();this.$input.show();if(a){this.focus()}},focus:function(){this.$input.focus();this.$input.select()},init:function(){var c=this.element[0];this.element.after('<input class="inb1 hide" type="text" value="" name="'+c.id+'_input" id="'+c.id+'_input" maxlength="10" /">');this.$input=$(document.getElementById(c.id+"_input"));var a=this;this.$input.focus(function(){a.inputFocused=true;a.selectInput()}).change(function(){a.blurInput()}).blur(function(){a.inputFocused=false;a.blurInput()}).keydown(function(d){switch(d.keyCode){case 9:case 13:a.blurInput()}});var b=false;this.element.click(function(){if(b){b=false;return}a.showInput(true);b=false}).focus(function(){b=true;a.showInput(true)});this.set(this.getData("value"))},numeric:function(){this.$input.bind("contextmenu",function(){return false});this.$input.keypress(function(a){if(!a.charCode){k=String.fromCharCode(a.which)}else{k=String.fromCharCode(a.charCode)}if(isNaN(+k)){a.preventDefault()}if(a.ctrlKey&&k=="v"){a.preventDefault()}})},selectInput:function(){var b=this.element[0];if(b.setSelectionRange){b.setSelectionRange(0,b.value.length)}else{if(typeof(Selection)!="undefined"&&Selection.isSupported){var a=b.createTextRange();a.move("character",0);a.moveEnd("character",b.value.length);a.select()}}},blurInput:function(){this.set(this.$input.val())},hasInputFocus:function(){return this.inputFocused}});$.ui.stringInput.getter="hasInputFocus";$.widget("ui.tourSearchForm",{init_Co:function(){var b=this.controls.city;var a=this.controls.Co=$("#Co").CoSelect({sendRequestPrefix:"/tour/",sendRequestPostfix:".php"});b.bind("select",function(f,c){var d=a.CoSelect("get");a.CoSelect("loadOptions",{url:"countries",data:{city:c}});if(!a.CoSelect("hasPendingValue")){a.CoSelect("setPendingValue",d)}})},init_city:function(){this.controls.city=$("#city").stringSelect({options:formDefaults.city,sendRequestPrefix:"/tour/",sendRequestPostfix:".php"})},init_PrT:function(a){this.controls.PrT=$("#PrT").stringInput({value:a.PrT}).stringInput("numeric")},init_AlCa:function(a){this.controls.AlCa=$("#AlCa").stringSelect({options:formDefaults.AlCa,selectedValue:a.AlCa})},init_Da:function(b){var c=this.controls.DaF=$("#DaF").stringDateInput({value:b.DaF});var a=this.controls.DaT=$("#DaT").stringDateInput({value:b.DaT});c.bind("select",function(h,f){var d=a.stringDateInput("get");if(f>d){var g=new Date(f.getFullYear(),f.getMonth(),f.getDate()+3);a.stringDateInput("set",g)}});a.bind("select",function(h,d){var f=c.stringDateInput("get");if(f>d){var g=new Date(d.getFullYear(),d.getMonth(),d.getDate()-3);c.stringDateInput("set",g)}})},init_Len:function(c){var d={};for(var e=2;e<=21;e++){d[e]=e}d={data:d};var b=this.controls.len_begin=$("#len_begin").stringSelect({options:d,selectedValue:c.len_begin});var a=this.controls.len_end=$("#len_end").stringSelect({options:d,selectedValue:c.len_end});b.bind("select",function(j,h){var g=a.stringSelect("get");if(h>g){a.stringSelect("set",h)}});a.bind("select",function(j,g){var h=b.stringSelect("get");if(h>g){b.stringSelect("set",g)}});function f(h){var g;switch(h){case 1:g="ночь";break;case 2:case 3:case 4:g="ночи";break;default:g="ночей"}$("#tsf-days").html(g)}$("#len_end").bind("select",function(g,h){f(h)});f(a.stringSelect("get"))},init_RoSi:function(b){var e=this.controls.RoSi=$("#RoSi").RoSiSelect({options:formDefaults.RoSi,selectedValue:b.RoSi});e.bind("select",function(j,h){if($.inArray(h,[20,21,18,19,27,31])!=-1){$("#Ch1-ctrl").show()}else{$("#Ch1-ctrl").hide()}if($.inArray(h,[21,19,31])!=-1){$("#Ch2-ctrl").show()}else{$("#Ch2-ctrl").hide()}g()});var d={};for(var c=1;c<=14;c++){d[c]=c}d={data:d};function g(){var l;if($("#Ch1-ctrl").isShow()){l=a}if($("#Ch2-ctrl").isShow()){l=f}if(!l){return}var h=+l.stringSelect("get");var j;switch(h){case 1:j="год";break;case 2:case 3:case 4:j="года";break;default:j="лет"}$("#ChYear").html(j)}b.Ch1&&$("#Ch1-ctrl").show();b.Ch2&&$("#Ch2-ctrl").show();var a=this.controls.Ch1=$("#Ch1").stringSelect({options:d,selectedValue:b.Ch1});var f=this.controls.Ch2=$("#Ch2").stringSelect({options:d,selectedValue:b.Ch2});$("#Ch1").bind("select",g);$("#Ch2").bind("select",g);g()},getParams:function(){var a={};this.controls.city.stringSelect("getParams",a);this.controls.RoSi.RoSiSelect("getParams",a);if($("#Ch1-ctrl").isShow()){this.controls.Ch1.stringSelect("getParams",a)}if($("#Ch2-ctrl").isShow()){this.controls.Ch2.stringSelect("getParams",a)}this.controls.Co.CoSelect("getParams",a);this.controls.DaF.stringDateInput("getParams",a);this.controls.DaT.stringDateInput("getParams",a);this.controls.AlCa.stringSelect("getParams",a);this.controls.len_begin.stringSelect("getParams",a);this.controls.len_end.stringSelect("getParams",a);this.controls.RoSi.RoSiSelect("getParams",a);return a},search:function(){window.location.href="/tour/#tsf="+makeQuery(this.getParams())+";tsr=page=1";hash=""+location.hash},init_tsf:function(){var c=this.tsf=parseQuery(parseHash().tsf||this.getData("last_tsf"));var d=parseHash().tsf2;if(d){var a=["city","Co","DaF","DaT","len_begin","len_end","RoSi","AlCa"];var e={};for(var b=0;b<a.length;b++){var f=a[b];if(this.tsf[f]){e[f]=this.tsf[f]}}d=parseQuery(d);for(var f in d){if(!d.hasOwnProperty(f)){continue}e[f]=d[f]}this.tsf=e}},init:function(){this.init_tsf();var b=this.tsf;this.controls={};this.init_city();this.init_Co();this.controls.city.stringSelect("set",b.city);this.controls.Co.CoSelect("setPendingValue",b.Co);this.init_PrT(b);this.init_Da(b);this.init_AlCa(b);this.init_Len(b);this.init_RoSi(b);var a=this;$("#submit-btn-table").click(function(){a.search()})}});function parseHash(){var d=""+location.hash;if(d.charAt(0)=="#"){d=d.substring(1)}var a=d.split(";");var e={};for(var b=0;b<a.length;b++){var c=a[b].indexOf("=");if(c<=0){continue}e[a[b].substring(0,c)]=a[b].substring(c+1)}return e}function parseQuery(b){var a={};if(!b){return a}$(b.split("&")).each(function(d,e){var c=e.split("=");if(c.length>0){a[c[0]]=c.length>1?c[1]:""}});return a}function makeQuery(c){var a=[];for(var d in c){if(!c.hasOwnProperty(d)){continue}var b=c[d]+"";if(b&&b.length){a.push(d+"="+b)}}return a.join("&")}var cssFix=function(){var a=navigator.userAgent.toLowerCase();var b=function(c){return(a.indexOf(c)!=-1)};$(document.getElementsByTagName("html")[0]).addClass([(!(/opera|webtv/i.test(a))&&/msie (\d)/.test(a))?("ie ie"+RegExp.$1):b("firefox/2")?"gecko ff2":b("firefox/3")?"gecko ff3":b("gecko/")?"gecko":b("opera/9")?"opera opera9":/opera (\d)/.test(a)?"opera opera"+RegExp.$1:b("konqueror")?"konqueror":b("applewebkit/")?"webkit safari":b("mozilla/")?"gecko":"",(b("x11")||b("linux"))?" linux":b("mac")?" mac":b("win")?" win":""].join(" "))}();if(!("console" in window)||!("firebug" in console)){var names=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];window.console={};for(var i=0;i<names.length;++i){window.console[names[i]]=function(){}}};