(function(Ap,y){function A1(){if(!AH.isReady){try{z.documentElement.doScroll("left")}catch(A){setTimeout(A1,1);return }AH.ready()}}function v(F,A){A.src?AH.ajax({url:A.src,async:false,dataType:"script"}):AH.globalEval(A.text||A.textContent||A.innerHTML||"");A.parentNode&&A.parentNode.removeChild(A)}function AP(F,A,O,K,L,G){var J=F.length;if(typeof A==="object"){for(var N in A){AP(F,N,A[N],K,L,O)}return F}if(O!==y){K=!G&&K&&AH.isFunction(O);for(N=0;N<J;N++){L(F[N],A,K?O.call(F[N],N,L(F[N],A)):O,G)}return F}return J?L(F[0],A):y}function Ag(){return(new Date).getTime()}function AO(){return false}function AM(){return true}function Al(F,A,G){G[0].type=F;return AH.event.handle.apply(A,G)}function AG(R){var Q,P=[],N=[],O=arguments,K,L,F,J,G,A;L=AH.data(this,"events");if(!(R.liveFired===this||!L||!L.live||R.button&&R.type==="click")){R.liveFired=this;var T=L.live.slice(0);for(J=0;J<T.length;J++){L=T[J];L.origType.replace(AY,"")===R.type?N.push(L.selector):T.splice(J--,1)}K=AH(R.target).closest(N,R.currentTarget);G=0;for(A=K.length;G<A;G++){for(J=0;J<T.length;J++){L=T[J];if(K[G].selector===L.selector){F=K[G].elem;N=null;if(L.preType==="mouseenter"||L.preType==="mouseleave"){N=AH(R.relatedTarget).closest(L.selector)[0]}if(!N||N!==F){P.push({elem:F,handleObj:L})}}}}G=0;for(A=P.length;G<A;G++){K=P[G];R.currentTarget=K.elem;R.data=K.handleObj.data;R.handleObj=K.handleObj;if(K.handleObj.origHandler.apply(K.elem,O)===false){Q=false;break}}return Q}}function q(F,A){return"live."+(F&&F!=="*"?F+".":"")+A.replace(/\./g,"`").replace(/ /g,"&")}function b(A){return !A||!A.parentNode||A.parentNode.nodeType===11}function BI(F,A){var G=0;A.each(function(){if(this.nodeName===(F[G]&&F[G].nodeName)){var L=AH.data(F[G++]),N=AH.data(this,L);if(L=L&&L.events){delete N.handle;N.events={};for(var J in L){for(var K in L[J]){AH.event.add(this,J,L[J][K],L[J][K].data)}}}}})}function A4(F,A,L){var J,K,G;A=A&&A[0]?A[0].ownerDocument||A[0]:z;if(F.length===1&&typeof F[0]==="string"&&F[0].length<512&&A===z&&!Aq.test(F[0])&&(AH.support.checkClone||!AK.test(F[0]))){K=true;if(G=AH.fragments[F[0]]){if(G!==1){J=G}}}if(!J){J=A.createDocumentFragment();AH.clean(F,A,J,L)}if(K){AH.fragments[F[0]]=G?J:1}return{fragment:J,cacheable:K}}function Ad(F,A){var G={};AH.each(u.concat.apply([],u.slice(0,A)),function(){G[this]=F});return G}function g(A){return"scrollTo" in A&&A.document?A:A.nodeType===9?A.defaultView||A.parentWindow:false}var AH=function(F,A){return new AH.fn.init(F,A)},h=Ap.jQuery,D=Ap.$,z=Ap.document,AS,A8=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Au=/^.[^:#\[\.,]*$/,AN=/\S/,x=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,j=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,AW=navigator.userAgent,C=false,AU=[],Ac,A2=Object.prototype.toString,Aw=Object.prototype.hasOwnProperty,AX=Array.prototype.push,AT=Array.prototype.slice,A7=Array.prototype.indexOf;AH.fn=AH.prototype={init:function(F,A){var J,G;if(!F){return this}if(F.nodeType){this.context=this[0]=F;this.length=1;return this}if(F==="body"&&!A){this.context=z;this[0]=z.body;this.selector="body";this.length=1;return this}if(typeof F==="string"){if((J=A8.exec(F))&&(J[1]||!A)){if(J[1]){G=A?A.ownerDocument||A:z;if(F=j.exec(F)){if(AH.isPlainObject(A)){F=[z.createElement(F[1])];AH.fn.attr.call(F,A,true)}else{F=[G.createElement(F[1])]}}else{F=A4([J[1]],[G]);F=(F.cacheable?F.fragment.cloneNode(true):F.fragment).childNodes}return AH.merge(this,F)}else{if(A=z.getElementById(J[2])){if(A.id!==J[2]){return AS.find(F)}this.length=1;this[0]=A}this.context=z;this.selector=F;return this}}else{if(!A&&/^\w+$/.test(F)){this.selector=F;this.context=z;F=z.getElementsByTagName(F);return AH.merge(this,F)}else{return !A||A.jquery?(A||AS).find(F):AH(A).find(F)}}}else{if(AH.isFunction(F)){return AS.ready(F)}}if(F.selector!==y){this.selector=F.selector;this.context=F.context}return AH.makeArray(F,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return AT.call(this,0)},get:function(A){return A==null?this.toArray():A<0?this.slice(A)[0]:this[A]},pushStack:function(F,A,J){var G=AH();AH.isArray(F)?AX.apply(G,F):AH.merge(G,F);G.prevObject=this;G.context=this.context;if(A==="find"){G.selector=this.selector+(this.selector?" ":"")+J}else{if(A){G.selector=this.selector+"."+A+"("+J+")"}}return G},each:function(F,A){return AH.each(this,F,A)},ready:function(A){AH.bindReady();if(AH.isReady){A.call(z,AH)}else{AU&&AU.push(A)}return this},eq:function(A){return A===-1?this.slice(A):this.slice(A,+A+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(AT.apply(this,arguments),"slice",AT.call(arguments).join(","))},map:function(A){return this.pushStack(AH.map(this,function(F,G){return A.call(F,G,F)}))},end:function(){return this.prevObject||AH(null)},push:AX,sort:[].sort,splice:[].splice};AH.fn.init.prototype=AH.fn;AH.extend=AH.fn.extend=function(){var F=arguments[0]||{},A=1,O=arguments.length,K=false,L,G,J,N;if(typeof F==="boolean"){K=F;F=arguments[1]||{};A=2}if(typeof F!=="object"&&!AH.isFunction(F)){F={}}if(O===A){F=this;--A}for(;A<O;A++){if((L=arguments[A])!=null){for(G in L){J=F[G];N=L[G];if(F!==N){if(K&&N&&(AH.isPlainObject(N)||AH.isArray(N))){J=J&&(AH.isPlainObject(J)||AH.isArray(J))?J:AH.isArray(N)?[]:{};F[G]=AH.extend(K,J,N)}else{if(N!==y){F[G]=N}}}}}}return F};AH.extend({noConflict:function(A){Ap.$=D;if(A){Ap.jQuery=h}return AH},isReady:false,ready:function(){if(!AH.isReady){if(!z.body){return setTimeout(AH.ready,13)}AH.isReady=true;if(AU){for(var F,A=0;F=AU[A++];){F.call(z,AH)}AU=null}AH.fn.triggerHandler&&AH(z).triggerHandler("ready")}},bindReady:function(){if(!C){C=true;if(z.readyState==="complete"){return AH.ready()}if(z.addEventListener){z.addEventListener("DOMContentLoaded",Ac,false);Ap.addEventListener("load",AH.ready,false)}else{if(z.attachEvent){z.attachEvent("onreadystatechange",Ac);Ap.attachEvent("onload",AH.ready);var F=false;try{F=Ap.frameElement==null}catch(A){}z.documentElement.doScroll&&F&&A1()}}}},isFunction:function(A){return A2.call(A)==="[object Function]"},isArray:function(A){return A2.call(A)==="[object Array]"},isPlainObject:function(F){if(!F||A2.call(F)!=="[object Object]"||F.nodeType||F.setInterval){return false}if(F.constructor&&!Aw.call(F,"constructor")&&!Aw.call(F.constructor.prototype,"isPrototypeOf")){return false}var A;for(A in F){}return A===y||Aw.call(F,A)},isEmptyObject:function(F){for(var A in F){return false}return true},error:function(A){throw A},parseJSON:function(A){if(typeof A!=="string"||!A){return null}A=AH.trim(A);if(/^[\],:{}\s]*$/.test(A.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){return Ap.JSON&&Ap.JSON.parse?Ap.JSON.parse(A):(new Function("return "+A))()}else{AH.error("Invalid JSON: "+A)}},noop:function(){},globalEval:function(F){if(F&&AN.test(F)){var A=z.getElementsByTagName("head")[0]||z.documentElement,G=z.createElement("script");G.type="text/javascript";if(AH.support.scriptEval){G.appendChild(z.createTextNode(F))}else{G.text=F}A.insertBefore(G,A.firstChild);A.removeChild(G)}},nodeName:function(F,A){return F.nodeName&&F.nodeName.toUpperCase()===A.toUpperCase()},each:function(F,A,N){var K,L=0,G=F.length,J=G===y||AH.isFunction(F);if(N){if(J){for(K in F){if(A.apply(F[K],N)===false){break}}}else{for(;L<G;){if(A.apply(F[L++],N)===false){break}}}}else{if(J){for(K in F){if(A.call(F[K],K,F[K])===false){break}}}else{for(N=F[0];L<G&&A.call(N,L,N)!==false;N=F[++L]){}}}return F},trim:function(A){return(A||"").replace(x,"")},makeArray:function(F,A){A=A||[];if(F!=null){F.length==null||typeof F==="string"||AH.isFunction(F)||typeof F!=="function"&&F.setInterval?AX.call(A,F):AH.merge(A,F)}return A},inArray:function(F,A){if(A.indexOf){return A.indexOf(F)}for(var J=0,G=A.length;J<G;J++){if(A[J]===F){return J}}return -1},merge:function(F,A){var K=F.length,G=0;if(typeof A.length==="number"){for(var J=A.length;G<J;G++){F[K++]=A[G]}}else{for(;A[G]!==y;){F[K++]=A[G++]}}F.length=K;return F},grep:function(F,A,L){for(var J=[],K=0,G=F.length;K<G;K++){!L!==!A(F[K],K)&&J.push(F[K])}return J},map:function(F,A,N){for(var K=[],L,G=0,J=F.length;G<J;G++){L=A(F[G],G,N);if(L!=null){K[K.length]=L}}return K.concat.apply([],K)},guid:1,proxy:function(F,A,G){if(arguments.length===2){if(typeof A==="string"){G=F;F=G[A];A=y}else{if(A&&!AH.isFunction(A)){G=A;A=y}}}if(!A&&F){A=function(){return F.apply(G||this,arguments)}}if(F){A.guid=F.guid=F.guid||A.guid||AH.guid++}return A},uaMatch:function(A){A=A.toLowerCase();A=/(webkit)[ \/]([\w.]+)/.exec(A)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(A)||/(msie) ([\w.]+)/.exec(A)||!/compatible/.test(A)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(A)||[];return{browser:A[1]||"",version:A[2]||"0"}},browser:{}});AW=AH.uaMatch(AW);if(AW.browser){AH.browser[AW.browser]=true;AH.browser.version=AW.version}if(AH.browser.webkit){AH.browser.safari=true}if(A7){AH.inArray=function(F,A){return A7.call(A,F)}}AS=AH(z);if(z.addEventListener){Ac=function(){z.removeEventListener("DOMContentLoaded",Ac,false);AH.ready()}}else{if(z.attachEvent){Ac=function(){if(z.readyState==="complete"){z.detachEvent("onreadystatechange",Ac);AH.ready()}}}}(function(){AH.support={};var P=z.documentElement,O=z.createElement("script"),N=z.createElement("div"),K="script"+Ag();N.style.display="none";N.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var L=N.getElementsByTagName("*"),G=N.getElementsByTagName("a")[0];if(!(!L||!L.length||!G)){AH.support={leadingWhitespace:N.firstChild.nodeType===3,tbody:!N.getElementsByTagName("tbody").length,htmlSerialize:!!N.getElementsByTagName("link").length,style:/red/.test(G.getAttribute("style")),hrefNormalized:G.getAttribute("href")==="/a",opacity:/^0.55$/.test(G.style.opacity),cssFloat:!!G.style.cssFloat,checkOn:N.getElementsByTagName("input")[0].value==="on",optSelected:z.createElement("select").appendChild(z.createElement("option")).selected,parentNode:N.removeChild(N.appendChild(z.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};O.type="text/javascript";try{O.appendChild(z.createTextNode("window."+K+"=1;"))}catch(J){}P.insertBefore(O,P.firstChild);if(Ap[K]){AH.support.scriptEval=true;delete Ap[K]}try{delete O.test}catch(A){AH.support.deleteExpando=false}P.removeChild(O);if(N.attachEvent&&N.fireEvent){N.attachEvent("onclick",function F(){AH.support.noCloneEvent=false;N.detachEvent("onclick",F)});N.cloneNode(true).fireEvent("onclick")}N=z.createElement("div");N.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";P=z.createDocumentFragment();P.appendChild(N.firstChild);AH.support.checkClone=P.cloneNode(true).cloneNode(true).lastChild.checked;AH(function(){var Q=z.createElement("div");Q.style.width=Q.style.paddingLeft="1px";z.body.appendChild(Q);AH.boxModel=AH.support.boxModel=Q.offsetWidth===2;z.body.removeChild(Q).style.display="none"});P=function(Q){var T=z.createElement("div");Q="on"+Q;var R=Q in T;if(!R){T.setAttribute(Q,"return;");R=typeof T[Q]==="function"}return R};AH.support.submitBubbles=P("submit");AH.support.changeBubbles=P("change");P=O=N=L=G=null}})();AH.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var Ai="jQuery"+Ag(),E=0,At={};AH.extend({cache:{},expando:Ai,noData:{embed:true,object:true,applet:true},data:function(F,A,K){if(!(F.nodeName&&AH.noData[F.nodeName.toLowerCase()])){F=F==Ap?At:F;var G=F[Ai],J=AH.cache;if(!G&&typeof A==="string"&&K===y){return null}G||(G=++E);if(typeof A==="object"){F[Ai]=G;J[G]=AH.extend(true,{},A)}else{if(!J[G]){F[Ai]=G;J[G]={}}}F=J[G];if(K!==y){F[A]=K}return typeof A==="string"?F[A]:F}},removeData:function(F,A){if(!(F.nodeName&&AH.noData[F.nodeName.toLowerCase()])){F=F==Ap?At:F;var K=F[Ai],G=AH.cache,J=G[K];if(A){if(J){delete J[A];AH.isEmptyObject(J)&&AH.removeData(F)}}else{if(AH.support.deleteExpando){delete F[AH.expando]}else{F.removeAttribute&&F.removeAttribute(AH.expando)}delete G[K]}}}});AH.fn.extend({data:function(F,A){if(typeof F==="undefined"&&this.length){return AH.data(this[0])}else{if(typeof F==="object"){return this.each(function(){AH.data(this,F)})}}var J=F.split(".");J[1]=J[1]?"."+J[1]:"";if(A===y){var G=this.triggerHandler("getData"+J[1]+"!",[J[0]]);if(G===y&&this.length){G=AH.data(this[0],F)}return G===y&&J[1]?this.data(J[0]):G}else{return this.trigger("setData"+J[1]+"!",[J[0],A]).each(function(){AH.data(this,F,A)})}},removeData:function(A){return this.each(function(){AH.removeData(this,A)})}});AH.extend({queue:function(F,A,J){if(F){A=(A||"fx")+"queue";var G=AH.data(F,A);if(!J){return G||[]}if(!G||AH.isArray(J)){G=AH.data(F,A,AH.makeArray(J))}else{G.push(J)}return G}},dequeue:function(F,A){A=A||"fx";var J=AH.queue(F,A),G=J.shift();if(G==="inprogress"){G=J.shift()}if(G){A==="fx"&&J.unshift("inprogress");G.call(F,function(){AH.dequeue(F,A)})}}});AH.fn.extend({queue:function(F,A){if(typeof F!=="string"){A=F;F="fx"}if(A===y){return AH.queue(this[0],F)}return this.each(function(){var G=AH.queue(this,F,A);F==="fx"&&G[0]!=="inprogress"&&AH.dequeue(this,F)})},dequeue:function(A){return this.each(function(){AH.dequeue(this,A)})},delay:function(F,A){F=AH.fx?AH.fx.speeds[F]||F:F;A=A||"fx";return this.queue(A,function(){var G=this;setTimeout(function(){AH.dequeue(G,A)},F)})},clearQueue:function(A){return this.queue(A||"fx",[])}});var BD=/[\n\t]/g,AB=/\s+/,A9=/\r/g,An=/href|src|style/,Av=/(button|input)/i,AV=/(button|input|object|select|textarea)/i,AA=/^(a|area)$/i,Az=/radio|checkbox/;AH.fn.extend({attr:function(F,A){return AP(this,F,A,true,AH.attr)},removeAttr:function(A){return this.each(function(){AH.attr(this,A,"");this.nodeType===1&&this.removeAttribute(A)})},addClass:function(P){if(AH.isFunction(P)){return this.each(function(R){var Q=AH(this);Q.addClass(P.call(this,R,Q.attr("class")))})}if(P&&typeof P==="string"){for(var O=(P||"").split(AB),N=0,K=this.length;N<K;N++){var L=this[N];if(L.nodeType===1){if(L.className){for(var G=" "+L.className+" ",J=L.className,A=0,F=O.length;A<F;A++){if(G.indexOf(" "+O[A]+" ")<0){J+=" "+O[A]}}L.className=AH.trim(J)}else{L.className=P}}}}return this},removeClass:function(F){if(AH.isFunction(F)){return this.each(function(P){var Q=AH(this);Q.removeClass(F.call(this,P,Q.attr("class")))})}if(F&&typeof F==="string"||F===y){for(var A=(F||"").split(AB),O=0,K=this.length;O<K;O++){var L=this[O];if(L.nodeType===1&&L.className){if(F){for(var G=(" "+L.className+" ").replace(BD," "),J=0,N=A.length;J<N;J++){G=G.replace(" "+A[J]+" "," ")}L.className=AH.trim(G)}else{L.className=""}}}}return this},toggleClass:function(F,A){var J=typeof F,G=typeof A==="boolean";if(AH.isFunction(F)){return this.each(function(L){var K=AH(this);K.toggleClass(F.call(this,L,K.attr("class"),A),A)})}return this.each(function(){if(J==="string"){for(var O,L=0,N=AH(this),P=A,K=F.split(AB);O=K[L++];){P=G?P:!N.hasClass(O);N[P?"addClass":"removeClass"](O)}}else{if(J==="undefined"||J==="boolean"){this.className&&AH.data(this,"__className__",this.className);this.className=this.className||F===false?"":AH.data(this,"__className__")||""}}})},hasClass:function(F){F=" "+F+" ";for(var A=0,G=this.length;A<G;A++){if((" "+this[A].className+" ").replace(BD," ").indexOf(F)>-1){return true}}return false},val:function(F){if(F===y){var A=this[0];if(A){if(AH.nodeName(A,"option")){return(A.attributes.value||{}).specified?A.value:A.text}if(AH.nodeName(A,"select")){var O=A.selectedIndex,K=[],L=A.options;A=A.type==="select-one";if(O<0){return null}var G=A?O:0;for(O=A?O+1:L.length;G<O;G++){var J=L[G];if(J.selected){F=AH(J).val();if(A){return F}K.push(F)}}return K}if(Az.test(A.type)&&!AH.support.checkOn){return A.getAttribute("value")===null?"on":A.value}return(A.value||"").replace(A9,"")}return y}var N=AH.isFunction(F);return this.each(function(P){var T=AH(this),R=F;if(this.nodeType===1){if(N){R=F.call(this,P,T.val())}if(typeof R==="number"){R+=""}if(AH.isArray(R)&&Az.test(this.type)){this.checked=AH.inArray(T.val(),R)>=0}else{if(AH.nodeName(this,"select")){var Q=AH.makeArray(R);AH("option",this).each(function(){this.selected=AH.inArray(AH(this).val(),Q)>=0});if(!Q.length){this.selectedIndex=-1}}else{this.value=R}}}})}});AH.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(F,A,L,J){if(!F||F.nodeType===3||F.nodeType===8){return y}if(J&&A in AH.attrFn){return AH(F)[A](L)}J=F.nodeType!==1||!AH.isXMLDoc(F);var K=L!==y;A=J&&AH.props[A]||A;if(F.nodeType===1){var G=An.test(A);if(A in F&&J&&!G){if(K){A==="type"&&Av.test(F.nodeName)&&F.parentNode&&AH.error("type property can't be changed");F[A]=L}if(AH.nodeName(F,"form")&&F.getAttributeNode(A)){return F.getAttributeNode(A).nodeValue}if(A==="tabIndex"){return(A=F.getAttributeNode("tabIndex"))&&A.specified?A.value:AV.test(F.nodeName)||AA.test(F.nodeName)&&F.href?0:y}return F[A]}if(!AH.support.style&&J&&A==="style"){if(K){F.style.cssText=""+L}return F.style.cssText}K&&F.setAttribute(A,""+L);F=!AH.support.hrefNormalized&&J&&G?F.getAttribute(A,2):F.getAttribute(A);return F===null?y:F}return AH.style(F,A,L)}});var AY=/\.(.*)$/,k=function(A){return A.replace(/[^\w\s\.\|`]/g,function(F){return"\\"+F})};AH.event={add:function(T,R,P,N){if(!(T.nodeType===3||T.nodeType===8)){if(T.setInterval&&T!==Ap&&!T.frameElement){T=Ap}var O,K;if(P.handler){O=P;P=O.handler}if(!P.guid){P.guid=AH.guid++}if(K=AH.data(T)){var L=K.events=K.events||{},F=K.handle;if(!F){K.handle=F=function(){return typeof AH!=="undefined"&&!AH.event.triggered?AH.event.handle.apply(F.elem,arguments):y}}F.elem=T;R=R.split(" ");for(var J,G=0,A;J=R[G++];){K=O?AH.extend({},O):{handler:P,data:N};if(J.indexOf(".")>-1){A=J.split(".");J=A.shift();K.namespace=A.slice(0).sort().join(".")}else{A=[];K.namespace=""}K.type=J;K.guid=P.guid;var V=L[J],Q=AH.event.special[J]||{};if(!V){V=L[J]=[];if(!Q.setup||Q.setup.call(T,N,A,F)===false){if(T.addEventListener){T.addEventListener(J,F,false)}else{T.attachEvent&&T.attachEvent("on"+J,F)}}}if(Q.add){Q.add.call(T,K);if(!K.handler.guid){K.handler.guid=P.guid}}V.push(K);AH.event.global[J]=true}T=null}}},global:{},remove:function(W,V,R,P){if(!(W.nodeType===3||W.nodeType===8)){var Q,N=0,O,J,L,K,A,X,T=AH.data(W),F=T&&T.events;if(T&&F){if(V&&V.type){R=V.handler;V=V.type}if(!V||typeof V==="string"&&V.charAt(0)==="."){V=V||"";for(Q in F){AH.event.remove(W,Q+V)}}else{for(V=V.split(" ");Q=V[N++];){K=Q;O=Q.indexOf(".")<0;J=[];if(!O){J=Q.split(".");Q=J.shift();L=new RegExp("(^|\\.)"+AH.map(J.slice(0).sort(),k).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=F[Q]){if(R){K=AH.event.special[Q]||{};for(G=P||0;G<A.length;G++){X=A[G];if(R.guid===X.guid){if(O||L.test(X.namespace)){P==null&&A.splice(G--,1);K.remove&&K.remove.call(W,X)}if(P!=null){break}}}if(A.length===0||P!=null&&A.length===1){if(!K.teardown||K.teardown.call(W,J)===false){Ah(W,Q,T.handle)}delete F[Q]}}else{for(var G=0;G<A.length;G++){X=A[G];if(O||L.test(X.namespace)){AH.event.remove(W,K,X.handler,G);A.splice(G--,1)}}}}}if(AH.isEmptyObject(F)){if(V=T.handle){V.elem=null}delete T.events;delete T.handle;AH.isEmptyObject(T)&&AH.removeData(W)}}}}},trigger:function(Q,P,O,L){var N=Q.type||Q;if(!L){Q=typeof Q==="object"?Q[Ai]?Q:AH.extend(AH.Event(N),Q):AH.Event(N);if(N.indexOf("!")>=0){Q.type=N=N.slice(0,-1);Q.exclusive=true}if(!O){Q.stopPropagation();AH.event.global[N]&&AH.each(AH.cache,function(){this.events&&this.events[N]&&AH.event.trigger(Q,P,this.handle.elem)})}if(!O||O.nodeType===3||O.nodeType===8){return y}Q.result=y;Q.target=O;P=AH.makeArray(P);P.unshift(Q)}Q.currentTarget=O;(L=AH.data(O,"handle"))&&L.apply(O,P);L=O.parentNode||O.ownerDocument;try{if(!(O&&O.nodeName&&AH.noData[O.nodeName.toLowerCase()])){if(O["on"+N]&&O["on"+N].apply(O,P)===false){Q.result=false}}}catch(J){}if(!Q.isPropagationStopped()&&L){AH.event.trigger(Q,P,L,true)}else{if(!Q.isDefaultPrevented()){L=Q.target;var K,A=AH.nodeName(L,"a")&&N==="click",G=AH.event.special[N]||{};if((!G._default||G._default.call(O,Q)===false)&&!A&&!(L&&L.nodeName&&AH.noData[L.nodeName.toLowerCase()])){try{if(L[N]){if(K=L["on"+N]){L["on"+N]=null}AH.event.triggered=true;L[N]()}}catch(F){}if(K){L["on"+N]=K}AH.event.triggered=false}}}},handle:function(F){var A,N,K,L;F=arguments[0]=AH.event.fix(F||Ap.event);F.currentTarget=this;A=F.type.indexOf(".")<0&&!F.exclusive;if(!A){N=F.type.split(".");F.type=N.shift();K=new RegExp("(^|\\.)"+N.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}L=AH.data(this,"events");N=L[F.type];if(L&&N){N=N.slice(0);L=0;for(var G=N.length;L<G;L++){var J=N[L];if(A||K.test(J.namespace)){F.handler=J.handler;F.data=J.data;F.handleObj=J;J=J.handler.apply(this,arguments);if(J!==y){F.result=J;if(J===false){F.preventDefault();F.stopPropagation()}}if(F.isImmediatePropagationStopped()){break}}}}return F.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(F){if(F[Ai]){return F}var A=F;F=AH.Event(A);for(var J=this.props.length,G;J;){G=this.props[--J];F[G]=A[G]}if(!F.target){F.target=F.srcElement||z}if(F.target.nodeType===3){F.target=F.target.parentNode}if(!F.relatedTarget&&F.fromElement){F.relatedTarget=F.fromElement===F.target?F.toElement:F.fromElement}if(F.pageX==null&&F.clientX!=null){A=z.documentElement;J=z.body;F.pageX=F.clientX+(A&&A.scrollLeft||J&&J.scrollLeft||0)-(A&&A.clientLeft||J&&J.clientLeft||0);F.pageY=F.clientY+(A&&A.scrollTop||J&&J.scrollTop||0)-(A&&A.clientTop||J&&J.clientTop||0)}if(!F.which&&(F.charCode||F.charCode===0?F.charCode:F.keyCode)){F.which=F.charCode||F.keyCode}if(!F.metaKey&&F.ctrlKey){F.metaKey=F.ctrlKey}if(!F.which&&F.button!==y){F.which=F.button&1?1:F.button&2?3:F.button&4?2:0}return F},guid:100000000,proxy:AH.proxy,special:{ready:{setup:AH.bindReady,teardown:AH.noop},live:{add:function(A){AH.event.add(this,A.origType,AH.extend({},A,{handler:AG}))},remove:function(F){var A=true,G=F.origType.replace(AY,"");AH.each(AH.data(this,"events").live||[],function(){if(G===this.origType.replace(AY,"")){return A=false}});A&&AH.event.remove(this,F.origType,AG)}},beforeunload:{setup:function(F,A,G){if(this.setInterval){this.onbeforeunload=G}return false},teardown:function(F,A){if(this.onbeforeunload===A){this.onbeforeunload=null}}}}};var Ah=z.removeEventListener?function(F,A,G){F.removeEventListener(A,G,false)}:function(F,A,G){F.detachEvent("on"+A,G)};AH.Event=function(A){if(!this.preventDefault){return new AH.Event(A)}if(A&&A.type){this.originalEvent=A;this.type=A.type}else{this.type=A}this.timeStamp=Ag();this[Ai]=true};AH.Event.prototype={preventDefault:function(){this.isDefaultPrevented=AM;var A=this.originalEvent;if(A){A.preventDefault&&A.preventDefault();A.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=AM;var A=this.originalEvent;if(A){A.stopPropagation&&A.stopPropagation();A.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=AM;this.stopPropagation()},isDefaultPrevented:AO,isPropagationStopped:AO,isImmediatePropagationStopped:AO};var AE=function(F){var A=F.relatedTarget;try{for(;A&&A!==this;){A=A.parentNode}if(A!==this){F.type=F.data;AH.event.handle.apply(this,arguments)}}catch(G){}},o=function(A){A.type=A.data;AH.event.handle.apply(this,arguments)};AH.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(F,A){AH.event.special[F]={setup:function(G){AH.event.add(this,A,G&&G.selector?o:AE,F)},teardown:function(G){AH.event.remove(this,A,G&&G.selector?o:AE)}}});if(!AH.support.submitBubbles){AH.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!=="form"){AH.event.add(this,"click.specialSubmit",function(F){var A=F.target,G=A.type;if((G==="submit"||G==="image")&&AH(A).closest("form").length){return Al("submit",this,arguments)}});AH.event.add(this,"keypress.specialSubmit",function(F){var A=F.target,G=A.type;if((G==="text"||G==="password")&&AH(A).closest("form").length&&F.keyCode===13){return Al("submit",this,arguments)}})}else{return false}},teardown:function(){AH.event.remove(this,".specialSubmit")}}}if(!AH.support.changeBubbles){var l=/textarea|input|select/i,I,U=function(F){var A=F.type,G=F.value;if(A==="radio"||A==="checkbox"){G=F.checked}else{if(A==="select-multiple"){G=F.selectedIndex>-1?AH.map(F.options,function(J){return J.selected}).join("-"):""}else{if(F.nodeName.toLowerCase()==="select"){G=F.selectedIndex}}}return G},BC=function(F,A){var K=F.target,G,J;if(!(!l.test(K.nodeName)||K.readOnly)){G=AH.data(K,"_change_data");J=U(K);if(F.type!=="focusout"||K.type!=="radio"){AH.data(K,"_change_data",J)}if(!(G===y||J===G)){if(G!=null||J){F.type="change";return AH.event.trigger(F,A,K)}}}};AH.event.special.change={filters:{focusout:BC,click:function(F){var A=F.target,G=A.type;if(G==="radio"||G==="checkbox"||A.nodeName.toLowerCase()==="select"){return BC.call(this,F)}},keydown:function(F){var A=F.target,G=A.type;if(F.keyCode===13&&A.nodeName.toLowerCase()!=="textarea"||F.keyCode===32&&(G==="checkbox"||G==="radio")||G==="select-multiple"){return BC.call(this,F)}},beforeactivate:function(A){A=A.target;AH.data(A,"_change_data",U(A))}},setup:function(){if(this.type==="file"){return false}for(var A in I){AH.event.add(this,A+".specialChange",I[A])}return l.test(this.nodeName)},teardown:function(){AH.event.remove(this,".specialChange");return l.test(this.nodeName)}};I=AH.event.special.change.filters}z.addEventListener&&AH.each({focus:"focusin",blur:"focusout"},function(F,A){function G(J){J=AH.event.fix(J);J.type=A;return AH.event.handle.call(this,J)}AH.event.special[A]={setup:function(){this.addEventListener(F,G,true)},teardown:function(){this.removeEventListener(F,G,true)}}});AH.each(["bind","one"],function(F,A){AH.fn[A]=function(O,K,L){if(typeof O==="object"){for(var G in O){this[A](G,K,O[G],L)}return this}if(AH.isFunction(K)){L=K;K=y}var J=A==="one"?AH.proxy(L,function(P){AH(this).unbind(P,J);return L.apply(this,arguments)}):L;if(O==="unload"&&A!=="one"){this.one(O,K,L)}else{G=0;for(var N=this.length;G<N;G++){AH.event.add(this[G],O,J,K)}}return this}});AH.fn.extend({unbind:function(F,A){if(typeof F==="object"&&!F.preventDefault){for(var J in F){this.unbind(J,F[J])}}else{J=0;for(var G=this.length;J<G;J++){AH.event.remove(this[J],F,A)}}return this},delegate:function(F,A,J,G){return this.live(A,J,G,F)},undelegate:function(F,A,G){return arguments.length===0?this.unbind("live"):this.die(A,null,G,F)},trigger:function(F,A){return this.each(function(){AH.event.trigger(F,A,this)})},triggerHandler:function(F,A){if(this[0]){F=AH.Event(F);F.preventDefault();F.stopPropagation();AH.event.trigger(F,A,this[0]);return F.result}},toggle:function(F){for(var A=arguments,G=1;G<A.length;){AH.proxy(F,A[G++])}return this.click(AH.proxy(F,function(J){var K=(AH.data(this,"lastToggle"+F.guid)||0)%G;AH.data(this,"lastToggle"+F.guid,K+1);J.preventDefault();return A[K].apply(this,arguments)||false}))},hover:function(F,A){return this.mouseenter(F).mouseleave(A||F)}});var BG={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};AH.each(["live","die"],function(F,A){AH.fn[A]=function(R,P,Q,N){var O,J=0,L,K,G=N||this.selector,T=N?this:AH(this.context);if(AH.isFunction(P)){Q=P;P=y}for(R=(R||"").split(" ");(O=R[J++])!=null;){N=AY.exec(O);L="";if(N){L=N[0];O=O.replace(AY,"")}if(O==="hover"){R.push("mouseenter"+L,"mouseleave"+L)}else{K=O;if(O==="focus"||O==="blur"){R.push(BG[O]+L);O+=L}else{O=(BG[O]||O)+L}A==="live"?T.each(function(){AH.event.add(this,q(O,G),{data:P,selector:G,handler:Q,origType:O,origHandler:Q,preType:K})}):T.unbind(q(O,G),Q)}}return this}});AH.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(F,A){AH.fn[A]=function(G){return G?this.bind(A,G):this.trigger(A)};if(AH.attrFn){AH.attrFn[A]=true}});Ap.attachEvent&&!Ap.addEventListener&&Ap.attachEvent("onunload",function(){for(var F in AH.cache){if(AH.cache[F].handle){try{AH.event.remove(AH.cache[F].handle.elem)}catch(A){}}}});(function(){function Z(Ab){for(var Aa="",w,s=0;Ab[s];s++){w=Ab[s];if(w.nodeType===3||w.nodeType===4){Aa+=w.nodeValue}else{if(w.nodeType!==8){Aa+=Z(w.childNodes)}}}return Aa}function Y(BL,BK,Ab,Aa,s,w){s=0;for(var BN=Aa.length;s<BN;s++){var BO=Aa[s];if(BO){BO=BO[BL];for(var BM=false;BO;){if(BO.sizcache===Ab){BM=Aa[BO.sizset];break}if(BO.nodeType===1&&!w){BO.sizcache=Ab;BO.sizset=s}if(BO.nodeName.toLowerCase()===BK){BM=BO;break}BO=BO[BL]}Aa[s]=BM}}}function X(BL,BK,Ab,Aa,s,w){s=0;for(var BN=Aa.length;s<BN;s++){var BO=Aa[s];if(BO){BO=BO[BL];for(var BM=false;BO;){if(BO.sizcache===Ab){BM=Aa[BO.sizset];break}if(BO.nodeType===1){if(!w){BO.sizcache=Ab;BO.sizset=s}if(typeof BK!=="string"){if(BO===BK){BM=true;break}}else{if(Q.filter(BK,[BO]).length>0){BM=BO;break}}}BO=BO[BL]}Aa[s]=BM}}}var V=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,W=0,R=Object.prototype.toString,T=false,O=true;[0,0].sort(function(){O=false;return 0});var Q=function(BN,BM,BK,Ab){BK=BK||[];var w=BM=BM||z;if(BM.nodeType!==1&&BM.nodeType!==9){return[]}if(!BN||typeof BN!=="string"){return BK}for(var Aa=[],BS,BT,BP,BL,BR=true,BO=F(BM),BQ=BN;(V.exec(""),BS=V.exec(BQ))!==null;){BQ=BS[3];Aa.push(BS[1]);if(BS[2]){BL=BS[3];break}}if(Aa.length>1&&L.exec(BN)){if(Aa.length===2&&P.relative[Aa[0]]){BT=c(Aa[0]+Aa[1],BM)}else{for(BT=P.relative[Aa[0]]?[BM]:Q(Aa.shift(),BM);Aa.length;){BN=Aa.shift();if(P.relative[BN]){BN+=Aa.shift()}BT=c(BN,BT)}}}else{if(!Ab&&Aa.length>1&&BM.nodeType===9&&!BO&&P.match.ID.test(Aa[0])&&!P.match.ID.test(Aa[Aa.length-1])){BS=Q.find(Aa.shift(),BM,BO);BM=BS.expr?Q.filter(BS.expr,BS.set)[0]:BS.set[0]}if(BM){BS=Ab?{expr:Aa.pop(),set:A(Ab)}:Q.find(Aa.pop(),Aa.length===1&&(Aa[0]==="~"||Aa[0]==="+")&&BM.parentNode?BM.parentNode:BM,BO);BT=BS.expr?Q.filter(BS.expr,BS.set):BS.set;if(Aa.length>0){BP=A(BT)}else{BR=false}for(;Aa.length;){var s=Aa.pop();BS=s;if(P.relative[s]){BS=Aa.pop()}else{s=""}if(BS==null){BS=BM}P.relative[s](BP,BS,BO)}}else{BP=[]}}BP||(BP=BT);BP||Q.error(s||BN);if(R.call(BP)==="[object Array]"){if(BR){if(BM&&BM.nodeType===1){for(BN=0;BP[BN]!=null;BN++){if(BP[BN]&&(BP[BN]===true||BP[BN].nodeType===1&&J(BM,BP[BN]))){BK.push(BT[BN])}}}else{for(BN=0;BP[BN]!=null;BN++){BP[BN]&&BP[BN].nodeType===1&&BK.push(BT[BN])}}}else{BK.push.apply(BK,BP)}}else{A(BP,BK)}if(BL){Q(BL,w,BK,Ab);Q.uniqueSort(BK)}return BK};Q.uniqueSort=function(w){if(N){T=O;w.sort(N);if(T){for(var s=1;s<w.length;s++){w[s]===w[s-1]&&w.splice(s--,1)}}}return w};Q.matches=function(w,s){return Q(w,null,null,s)};Q.find=function(BL,BK,Ab){var Aa,s;if(!BL){return[]}for(var w=0,BN=P.order.length;w<BN;w++){var BO=P.order[w];if(s=P.leftMatch[BO].exec(BL)){var BM=s[1];s.splice(1,1);if(BM.substr(BM.length-1)!=="\\"){s[1]=(s[1]||"").replace(/\\/g,"");Aa=P.find[BO](s,BK,Ab);if(Aa!=null){BL=BL.replace(P.match[BO],"");break}}}}Aa||(Aa=BK.getElementsByTagName("*"));return{set:Aa,expr:BL}};Q.filter=function(BO,BN,BL,Ab){for(var w=BO,Aa=[],BU=BN,BV,BR,BM=BN&&BN[0]&&F(BN[0]);BO&&BN.length;){for(var BT in P.filter){if((BV=P.leftMatch[BT].exec(BO))!=null&&BV[2]){var BP=P.filter[BT],BS,s;s=BV[1];BR=false;BV.splice(1,1);if(s.substr(s.length-1)!=="\\"){if(BU===Aa){Aa=[]}if(P.preFilter[BT]){if(BV=P.preFilter[BT](BV,BU,BL,Aa,Ab,BM)){if(BV===true){continue}}else{BR=BS=true}}if(BV){for(var BK=0;(s=BU[BK])!=null;BK++){if(s){BS=BP(s,BV,BK,BU);var BQ=Ab^!!BS;if(BL&&BS!=null){if(BQ){BR=true}else{BU[BK]=false}}else{if(BQ){Aa.push(s);BR=true}}}}}if(BS!==y){BL||(BU=Aa);BO=BO.replace(P.match[BT],"");if(!BR){return[]}break}}}}if(BO===w){if(BR==null){Q.error(BO)}else{break}}w=BO}return BU};Q.error=function(s){throw"Syntax error, unrecognized expression: "+s};var P=Q.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\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(s){return s.getAttribute("href")}},relative:{"+":function(Ab,Aa){var w=typeof Aa==="string",s=w&&!/\W/.test(Aa);w=w&&!s;if(s){Aa=Aa.toLowerCase()}s=0;for(var BK=Ab.length,BL;s<BK;s++){if(BL=Ab[s]){for(;(BL=BL.previousSibling)&&BL.nodeType!==1;){}Ab[s]=w||BL&&BL.nodeName.toLowerCase()===Aa?BL||false:BL===Aa}}w&&Q.filter(Aa,Ab,true)},">":function(Ab,Aa){var w=typeof Aa==="string";if(w&&!/\W/.test(Aa)){Aa=Aa.toLowerCase();for(var s=0,BK=Ab.length;s<BK;s++){var BL=Ab[s];if(BL){w=BL.parentNode;Ab[s]=w.nodeName.toLowerCase()===Aa?w:false}}}else{s=0;for(BK=Ab.length;s<BK;s++){if(BL=Ab[s]){Ab[s]=w?BL.parentNode:BL.parentNode===Aa}}w&&Q.filter(Aa,Ab,true)}},"":function(Ab,Aa,w){var s=W++,BK=X;if(typeof Aa==="string"&&!/\W/.test(Aa)){var BL=Aa=Aa.toLowerCase();BK=Y}BK("parentNode",Aa,s,Ab,BL,w)},"~":function(Ab,Aa,w){var s=W++,BK=X;if(typeof Aa==="string"&&!/\W/.test(Aa)){var BL=Aa=Aa.toLowerCase();BK=Y}BK("previousSibling",Aa,s,Ab,BL,w)}},find:{ID:function(Aa,w,s){if(typeof w.getElementById!=="undefined"&&!s){return(Aa=w.getElementById(Aa[1]))?[Aa]:[]}},NAME:function(Ab,Aa){if(typeof Aa.getElementsByName!=="undefined"){var w=[];Aa=Aa.getElementsByName(Ab[1]);for(var s=0,BK=Aa.length;s<BK;s++){Aa[s].getAttribute("name")===Ab[1]&&w.push(Aa[s])}return w.length===0?null:w}},TAG:function(w,s){return s.getElementsByTagName(w[1])}},preFilter:{CLASS:function(BK,Ab,w,s,BL,BM){BK=" "+BK[1].replace(/\\/g,"")+" ";if(BM){return BK}BM=0;for(var Aa;(Aa=Ab[BM])!=null;BM++){if(Aa){if(BL^(Aa.className&&(" "+Aa.className+" ").replace(/[\t\n]/g," ").indexOf(BK)>=0)){w||s.push(Aa)}else{if(w){Ab[BM]=false}}}}return false},ID:function(s){return s[1].replace(/\\/g,"")},TAG:function(s){return s[1].toLowerCase()},CHILD:function(w){if(w[1]==="nth"){var s=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(w[2]==="even"&&"2n"||w[2]==="odd"&&"2n+1"||!/\D/.test(w[2])&&"0n+"+w[2]||w[2]);w[2]=s[1]+(s[2]||1)-0;w[3]=s[3]-0}w[0]=W++;return w},ATTR:function(Ab,Aa,w,s,BK,BL){Aa=Ab[1].replace(/\\/g,"");if(!BL&&P.attrMap[Aa]){Ab[1]=P.attrMap[Aa]}if(Ab[2]==="~="){Ab[4]=" "+Ab[4]+" "}return Ab},PSEUDO:function(Ab,Aa,w,s,BK){if(Ab[1]==="not"){if((V.exec(Ab[3])||"").length>1||/^\w/.test(Ab[3])){Ab[3]=Q(Ab[3],null,null,Aa)}else{Ab=Q.filter(Ab[3],Aa,w,true^BK);w||s.push.apply(s,Ab);return false}}else{if(P.match.POS.test(Ab[0])||P.match.CHILD.test(Ab[0])){return true}}return Ab},POS:function(s){s.unshift(true);return s}},filters:{enabled:function(s){return s.disabled===false&&s.type!=="hidden"},disabled:function(s){return s.disabled===true},checked:function(s){return s.checked===true},selected:function(s){return s.selected===true},parent:function(s){return !!s.firstChild},empty:function(s){return !s.firstChild},has:function(Aa,w,s){return !!Q(s[3],Aa).length},header:function(s){return/h\d/i.test(s.nodeName)},text:function(s){return"text"===s.type},radio:function(s){return"radio"===s.type},checkbox:function(s){return"checkbox"===s.type},file:function(s){return"file"===s.type},password:function(s){return"password"===s.type},submit:function(s){return"submit"===s.type},image:function(s){return"image"===s.type},reset:function(s){return"reset"===s.type},button:function(s){return"button"===s.type||s.nodeName.toLowerCase()==="button"},input:function(s){return/input|select|textarea|button/i.test(s.nodeName)}},setFilters:{first:function(w,s){return s===0},last:function(Ab,Aa,w,s){return Aa===s.length-1},even:function(w,s){return s%2===0},odd:function(w,s){return s%2===1},lt:function(Aa,w,s){return w<s[3]-0},gt:function(Aa,w,s){return w>s[3]-0},nth:function(Aa,w,s){return s[3]-0===w},eq:function(Aa,w,s){return s[3]-0===w}},filter:{PSEUDO:function(Ab,Aa,w,s){var BK=Aa[1],BL=P.filters[BK];if(BL){return BL(Ab,w,Aa,s)}else{if(BK==="contains"){return(Ab.textContent||Ab.innerText||Z([Ab])||"").indexOf(Aa[3])>=0}else{if(BK==="not"){Aa=Aa[3];w=0;for(s=Aa.length;w<s;w++){if(Aa[w]===Ab){return false}}return true}else{Q.error("Syntax error, unrecognized expression: "+BK)}}}},CHILD:function(BK,Ab){var w=Ab[1],s=BK;switch(w){case"only":case"first":for(;s=s.previousSibling;){if(s.nodeType===1){return false}}if(w==="first"){return true}s=BK;case"last":for(;s=s.nextSibling;){if(s.nodeType===1){return false}}return true;case"nth":w=Ab[2];var BL=Ab[3];if(w===1&&BL===0){return true}Ab=Ab[0];var BM=BK.parentNode;if(BM&&(BM.sizcache!==Ab||!BK.nodeIndex)){var Aa=0;for(s=BM.firstChild;s;s=s.nextSibling){if(s.nodeType===1){s.nodeIndex=++Aa}}BM.sizcache=Ab}BK=BK.nodeIndex-BL;return w===0?BK===0:BK%w===0&&BK/w>=0}},ID:function(w,s){return w.nodeType===1&&w.getAttribute("id")===s},TAG:function(w,s){return s==="*"&&w.nodeType===1||w.nodeName.toLowerCase()===s},CLASS:function(w,s){return(" "+(w.className||w.getAttribute("class"))+" ").indexOf(s)>-1},ATTR:function(Ab,Aa){var w=Aa[1];Ab=P.attrHandle[w]?P.attrHandle[w](Ab):Ab[w]!=null?Ab[w]:Ab.getAttribute(w);w=Ab+"";var s=Aa[2];Aa=Aa[4];return Ab==null?s==="!=":s==="="?w===Aa:s==="*="?w.indexOf(Aa)>=0:s==="~="?(" "+w+" ").indexOf(Aa)>=0:!Aa?w&&Ab!==false:s==="!="?w!==Aa:s==="^="?w.indexOf(Aa)===0:s==="$="?w.substr(w.length-Aa.length)===Aa:s==="|="?w===Aa||w.substr(0,Aa.length+1)===Aa+"-":false},POS:function(Ab,Aa,w,s){var BK=P.setFilters[Aa[2]];if(BK){return BK(Ab,w,Aa,s)}}}},L=P.match.POS;for(var G in P.match){P.match[G]=new RegExp(P.match[G].source+/(?![^\[]*\])(?![^\(]*\))/.source);P.leftMatch[G]=new RegExp(/(^(?:.|\r|\n)*?)/.source+P.match[G].source.replace(/\\(\d+)/g,function(w,s){return"\\"+(s-0+1)}))}var A=function(w,s){w=Array.prototype.slice.call(w,0);if(s){s.push.apply(s,w);return s}return w};try{Array.prototype.slice.call(z.documentElement.childNodes,0)}catch(K){A=function(Ab,Aa){Aa=Aa||[];if(R.call(Ab)==="[object Array]"){Array.prototype.push.apply(Aa,Ab)}else{if(typeof Ab.length==="number"){for(var w=0,s=Ab.length;w<s;w++){Aa.push(Ab[w])}}else{for(w=0;Ab[w];w++){Aa.push(Ab[w])}}}return Aa}}var N;if(z.documentElement.compareDocumentPosition){N=function(w,s){if(!w.compareDocumentPosition||!s.compareDocumentPosition){if(w==s){T=true}return w.compareDocumentPosition?-1:1}w=w.compareDocumentPosition(s)&4?-1:w===s?0:1;if(w===0){T=true}return w}}else{if("sourceIndex" in z.documentElement){N=function(w,s){if(!w.sourceIndex||!s.sourceIndex){if(w==s){T=true}return w.sourceIndex?-1:1}w=w.sourceIndex-s.sourceIndex;if(w===0){T=true}return w}}else{if(z.createRange){N=function(Ab,Aa){if(!Ab.ownerDocument||!Aa.ownerDocument){if(Ab==Aa){T=true}return Ab.ownerDocument?-1:1}var w=Ab.ownerDocument.createRange(),s=Aa.ownerDocument.createRange();w.setStart(Ab,0);w.setEnd(Ab,0);s.setStart(Aa,0);s.setEnd(Aa,0);Ab=w.compareBoundaryPoints(Range.START_TO_END,s);if(Ab===0){T=true}return Ab}}}}(function(){var Aa=z.createElement("div"),w="script"+(new Date).getTime();Aa.innerHTML="<a name='"+w+"'/>";var s=z.documentElement;s.insertBefore(Aa,s.firstChild);if(z.getElementById(w)){P.find.ID=function(Ab,BK,BL){if(typeof BK.getElementById!=="undefined"&&!BL){return(BK=BK.getElementById(Ab[1]))?BK.id===Ab[1]||typeof BK.getAttributeNode!=="undefined"&&BK.getAttributeNode("id").nodeValue===Ab[1]?[BK]:y:[]}};P.filter.ID=function(Ab,BK){var BL=typeof Ab.getAttributeNode!=="undefined"&&Ab.getAttributeNode("id");return Ab.nodeType===1&&BL&&BL.nodeValue===BK}}s.removeChild(Aa);s=Aa=null})();(function(){var s=z.createElement("div");s.appendChild(z.createComment(""));if(s.getElementsByTagName("*").length>0){P.find.TAG=function(Ab,Aa){Aa=Aa.getElementsByTagName(Ab[1]);if(Ab[1]==="*"){Ab=[];for(var w=0;Aa[w];w++){Aa[w].nodeType===1&&Ab.push(Aa[w])}Aa=Ab}return Aa}}s.innerHTML="<a href='#'></a>";if(s.firstChild&&typeof s.firstChild.getAttribute!=="undefined"&&s.firstChild.getAttribute("href")!=="#"){P.attrHandle.href=function(w){return w.getAttribute("href",2)}}s=null})();z.querySelectorAll&&function(){var Aa=Q,w=z.createElement("div");w.innerHTML="<p class='TEST'></p>";if(!(w.querySelectorAll&&w.querySelectorAll(".TEST").length===0)){Q=function(Ab,BM,BN,BK){BM=BM||z;if(!BK&&BM.nodeType===9&&!F(BM)){try{return A(BM.querySelectorAll(Ab),BN)}catch(BL){}}return Aa(Ab,BM,BN,BK)};for(var s in Aa){Q[s]=Aa[s]}w=null}}();(function(){var s=z.createElement("div");s.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!s.getElementsByClassName||s.getElementsByClassName("e").length===0)){s.lastChild.className="e";if(s.getElementsByClassName("e").length!==1){P.order.splice(1,0,"CLASS");P.find.CLASS=function(Ab,Aa,w){if(typeof Aa.getElementsByClassName!=="undefined"&&!w){return Aa.getElementsByClassName(Ab[1])}};s=null}}})();var J=z.compareDocumentPosition?function(w,s){return !!(w.compareDocumentPosition(s)&16)}:function(w,s){return w!==s&&(w.contains?w.contains(s):true)},F=function(s){return(s=(s?s.ownerDocument||s:0).documentElement)?s.nodeName!=="HTML":false},c=function(Ab,Aa){var w=[],s="",BK;for(Aa=Aa.nodeType?[Aa]:Aa;BK=P.match.PSEUDO.exec(Ab);){s+=BK[0];Ab=Ab.replace(P.match.PSEUDO,"")}Ab=P.relative[Ab]?Ab+"*":Ab;BK=0;for(var BL=Aa.length;BK<BL;BK++){Q(Ab,Aa[BK],w)}return Q.filter(s,w)};AH.find=Q;AH.expr=Q.selectors;AH.expr[":"]=AH.expr.filters;AH.unique=Q.uniqueSort;AH.text=Z;AH.isXMLDoc=F;AH.contains=J})();var H=/Until$/,BA=/^(?:parents|prevUntil|prevAll)/,Ax=/,/;AT=Array.prototype.slice;var Am=function(F,A,J){if(AH.isFunction(A)){return AH.grep(F,function(L,K){return !!A.call(L,K,L)===J})}else{if(A.nodeType){return AH.grep(F,function(K){return K===A===J})}else{if(typeof A==="string"){var G=AH.grep(F,function(K){return K.nodeType===1});if(Au.test(A)){return AH.filter(A,G,!J)}else{A=AH.filter(A,G)}}}}return AH.grep(F,function(K){return AH.inArray(K,A)>=0===J})};AH.fn.extend({find:function(F){for(var A=this.pushStack("","find",F),N=0,K=0,L=this.length;K<L;K++){N=A.length;AH.find(F,this[K],A);if(K>0){for(var G=N;G<A.length;G++){for(var J=0;J<N;J++){if(A[J]===A[G]){A.splice(G--,1);break}}}}}return A},has:function(F){var A=AH(F);return this.filter(function(){for(var J=0,G=A.length;J<G;J++){if(AH.contains(this,A[J])){return true}}})},not:function(A){return this.pushStack(Am(this,A,false),"not",A)},filter:function(A){return this.pushStack(Am(this,A,true),"filter",A)},is:function(A){return !!A&&AH.filter(A,this).length>0},closest:function(P,O){if(AH.isArray(P)){var N=[],K=this[0],L,G={},J;if(K&&P.length){L=0;for(var A=P.length;L<A;L++){J=P[L];G[J]||(G[J]=AH.expr.match.POS.test(J)?AH(J,O||this.context):J)}for(;K&&K.ownerDocument&&K!==O;){for(J in G){L=G[J];if(L.jquery?L.index(K)>-1:AH(K).is(L)){N.push({selector:J,elem:K});delete G[J]}}K=K.parentNode}}return N}var F=AH.expr.match.POS.test(P)?AH(P,O||this.context):null;return this.map(function(R,Q){for(;Q&&Q.ownerDocument&&Q!==O;){if(F?F.index(Q)>-1:AH(Q).is(P)){return Q}Q=Q.parentNode}return null})},index:function(A){if(!A||typeof A==="string"){return AH.inArray(this[0],A?AH(A):this.parent().children())}return AH.inArray(A.jquery?A[0]:A,this)},add:function(F,A){F=typeof F==="string"?AH(F,A||this.context):AH.makeArray(F);A=AH.merge(this.get(),F);return this.pushStack(b(F[0])||b(A[0])?A:AH.unique(A))},andSelf:function(){return this.add(this.prevObject)}});AH.each({parent:function(A){return(A=A.parentNode)&&A.nodeType!==11?A:null},parents:function(A){return AH.dir(A,"parentNode")},parentsUntil:function(F,A,G){return AH.dir(F,"parentNode",G)},next:function(A){return AH.nth(A,2,"nextSibling")},prev:function(A){return AH.nth(A,2,"previousSibling")},nextAll:function(A){return AH.dir(A,"nextSibling")},prevAll:function(A){return AH.dir(A,"previousSibling")},nextUntil:function(F,A,G){return AH.dir(F,"nextSibling",G)},prevUntil:function(F,A,G){return AH.dir(F,"previousSibling",G)},siblings:function(A){return AH.sibling(A.parentNode.firstChild,A)},children:function(A){return AH.sibling(A.firstChild)},contents:function(A){return AH.nodeName(A,"iframe")?A.contentDocument||A.contentWindow.document:AH.makeArray(A.childNodes)}},function(F,A){AH.fn[F]=function(K,G){var J=AH.map(this,A,K);H.test(F)||(G=K);if(G&&typeof G==="string"){J=AH.filter(G,J)}J=this.length>1?AH.unique(J):J;if((this.length>1||Ax.test(G))&&BA.test(F)){J=J.reverse()}return this.pushStack(J,F,AT.call(arguments).join(","))}});AH.extend({filter:function(F,A,G){if(G){F=":not("+F+")"}return AH.find.matches(F,A)},dir:function(F,A,J){var G=[];for(F=F[A];F&&F.nodeType!==9&&(J===y||F.nodeType!==1||!AH(F).is(J));){F.nodeType===1&&G.push(F);F=F[A]}return G},nth:function(F,A,J){A=A||1;for(var G=0;F;F=F[J]){if(F.nodeType===1&&++G===A){break}}return F},sibling:function(F,A){for(var G=[];F;F=F.nextSibling){F.nodeType===1&&F!==A&&G.push(F)}return G}});var AI=/ jQuery\d+="(?:\d+|null)"/g,AR=/^\s+/,r=/(<([\w:]+)[^>]*?)\/>/g,Ae=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,d=/<([\w:]+)/,AC=/<tbody/i,m=/<|&#?\w+;/,Aq=/<script|<object|<embed|<option|<style/i,AK=/checked\s*(?:[^=]|=\s*.checked.)/i,BJ=function(F,A,G){return Ae.test(G)?F:A+"></"+G+">"},Ak={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};Ak.optgroup=Ak.option;Ak.tbody=Ak.tfoot=Ak.colgroup=Ak.caption=Ak.thead;Ak.th=Ak.td;if(!AH.support.htmlSerialize){Ak._default=[1,"div<div>","</div>"]}AH.fn.extend({text:function(A){if(AH.isFunction(A)){return this.each(function(F){var G=AH(this);G.text(A.call(this,F,G.text()))})}if(typeof A!=="object"&&A!==y){return this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(A))}return AH.text(this)},wrapAll:function(F){if(AH.isFunction(F)){return this.each(function(G){AH(this).wrapAll(F.call(this,G))})}if(this[0]){var A=AH(F,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&A.insertBefore(this[0]);A.map(function(){for(var G=this;G.firstChild&&G.firstChild.nodeType===1;){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(A){if(AH.isFunction(A)){return this.each(function(F){AH(this).wrapInner(A.call(this,F))})}return this.each(function(){var F=AH(this),G=F.contents();G.length?G.wrapAll(A):F.append(A)})},wrap:function(A){return this.each(function(){AH(this).wrapAll(A)})},unwrap:function(){return this.parent().each(function(){AH.nodeName(this,"body")||AH(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(A){this.nodeType===1&&this.appendChild(A)})},prepend:function(){return this.domManip(arguments,true,function(A){this.nodeType===1&&this.insertBefore(A,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(F){this.parentNode.insertBefore(F,this)})}else{if(arguments.length){var A=AH(arguments[0]);A.push.apply(A,this.toArray());return this.pushStack(A,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(F){this.parentNode.insertBefore(F,this.nextSibling)})}else{if(arguments.length){var A=this.pushStack(this,"after",arguments);A.push.apply(A,AH(arguments[0]).toArray());return A}}},remove:function(F,A){for(var J=0,G;(G=this[J])!=null;J++){if(!F||AH.filter(F,[G]).length){if(!A&&G.nodeType===1){AH.cleanData(G.getElementsByTagName("*"));AH.cleanData([G])}G.parentNode&&G.parentNode.removeChild(G)}}return this},empty:function(){for(var F=0,A;(A=this[F])!=null;F++){for(A.nodeType===1&&AH.cleanData(A.getElementsByTagName("*"));A.firstChild;){A.removeChild(A.firstChild)}}return this},clone:function(F){var A=this.map(function(){if(!AH.support.noCloneEvent&&!AH.isXMLDoc(this)){var J=this.outerHTML,G=this.ownerDocument;if(!J){J=G.createElement("div");J.appendChild(this.cloneNode(true));J=J.innerHTML}return AH.clean([J.replace(AI,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(AR,"")],G)[0]}else{return this.cloneNode(true)}});if(F===true){BI(this,A);BI(this.find("*"),A.find("*"))}return A},html:function(F){if(F===y){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(AI,""):null}else{if(typeof F==="string"&&!Aq.test(F)&&(AH.support.leadingWhitespace||!AR.test(F))&&!Ak[(d.exec(F)||["",""])[1].toLowerCase()]){F=F.replace(r,BJ);try{for(var A=0,J=this.length;A<J;A++){if(this[A].nodeType===1){AH.cleanData(this[A].getElementsByTagName("*"));this[A].innerHTML=F}}}catch(G){this.empty().append(F)}}else{AH.isFunction(F)?this.each(function(N){var K=AH(this),L=K.html();K.empty().append(function(){return F.call(this,N,L)})}):this.empty().append(F)}}return this},replaceWith:function(A){if(this[0]&&this[0].parentNode){if(AH.isFunction(A)){return this.each(function(F){var J=AH(this),G=J.html();J.replaceWith(A.call(this,F,G))})}if(typeof A!=="string"){A=AH(A).detach()}return this.each(function(){var F=this.nextSibling,G=this.parentNode;AH(this).remove();F?AH(F).before(A):AH(G).append(A)})}else{return this.pushStack(AH(AH.isFunction(A)?A():A),"replaceWith",A)}},detach:function(A){return this.remove(A,true)},domManip:function(R,Q,P){function N(T){return AH.nodeName(T,"table")?T.getElementsByTagName("tbody")[0]||T.appendChild(T.ownerDocument.createElement("tbody")):T}var O,K,L=R[0],F=[],J;if(!AH.support.checkClone&&arguments.length===3&&typeof L==="string"&&AK.test(L)){return this.each(function(){AH(this).domManip(R,Q,P,true)})}if(AH.isFunction(L)){return this.each(function(T){var V=AH(this);R[0]=L.call(this,T,Q?V.html():y);V.domManip(R,Q,P)})}if(this[0]){O=L&&L.parentNode;O=AH.support.parentNode&&O&&O.nodeType===11&&O.childNodes.length===this.length?{fragment:O}:A4(R,this,F);J=O.fragment;if(K=J.childNodes.length===1?(J=J.firstChild):J.firstChild){Q=Q&&AH.nodeName(K,"tr");for(var G=0,A=this.length;G<A;G++){P.call(Q?N(this[G],K):this[G],G>0||O.cacheable||this.length>1?J.cloneNode(true):J)}}F.length&&AH.each(F,v)}return this}});AH.fragments={};AH.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(F,A){AH.fn[F]=function(N){var K=[];N=AH(N);var L=this.length===1&&this[0].parentNode;if(L&&L.nodeType===11&&L.childNodes.length===1&&N.length===1){N[A](this[0]);return this}else{L=0;for(var G=N.length;L<G;L++){var J=(L>0?this.clone(true):this).get();AH.fn[A].apply(AH(N[L]),J);K=K.concat(J)}return this.pushStack(K,F,N.selector)}}});AH.extend({clean:function(R,Q,P,N){Q=Q||z;if(typeof Q.createElement==="undefined"){Q=Q.ownerDocument||Q[0]&&Q[0].ownerDocument||z}for(var O=[],K=0,L;(L=R[K])!=null;K++){if(typeof L==="number"){L+=""}if(L){if(typeof L==="string"&&!m.test(L)){L=Q.createTextNode(L)}else{if(typeof L==="string"){L=L.replace(r,BJ);var F=(d.exec(L)||["",""])[1].toLowerCase(),J=Ak[F]||Ak._default,G=J[0],A=Q.createElement("div");for(A.innerHTML=J[1]+L+J[2];G--;){A=A.lastChild}if(!AH.support.tbody){G=AC.test(L);F=F==="table"&&!G?A.firstChild&&A.firstChild.childNodes:J[1]==="<table>"&&!G?A.childNodes:[];for(J=F.length-1;J>=0;--J){AH.nodeName(F[J],"tbody")&&!F[J].childNodes.length&&F[J].parentNode.removeChild(F[J])}}!AH.support.leadingWhitespace&&AR.test(L)&&A.insertBefore(Q.createTextNode(AR.exec(L)[0]),A.firstChild);L=A.childNodes}}if(L.nodeType){O.push(L)}else{O=AH.merge(O,L)}}}if(P){for(K=0;O[K];K++){if(N&&AH.nodeName(O[K],"script")&&(!O[K].type||O[K].type.toLowerCase()==="text/javascript")){N.push(O[K].parentNode?O[K].parentNode.removeChild(O[K]):O[K])}else{O[K].nodeType===1&&O.splice.apply(O,[K+1,0].concat(AH.makeArray(O[K].getElementsByTagName("script"))));P.appendChild(O[K])}}}return O},cleanData:function(P){for(var O,N,K=AH.cache,L=AH.event.special,G=AH.support.deleteExpando,J=0,A;(A=P[J])!=null;J++){if(N=A[AH.expando]){O=K[N];if(O.events){for(var F in O.events){L[F]?AH.event.remove(A,F):Ah(A,F,O.handle)}}if(G){delete A[AH.expando]}else{A.removeAttribute&&A.removeAttribute(AH.expando)}delete K[N]}}}});var M=/z-?index|font-?weight|opacity|zoom|line-?height/i,A5=/alpha\([^)]*\)/,Ar=/opacity=([^)]*)/,Af=/float/i,AD=/-([a-z])/ig,BE=/([A-Z])/g,A0=/^-?\d+(?:px)?$/i,Aj=/^-?\d/,AF={position:"absolute",visibility:"hidden",display:"block"},p=["Left","Right"],a=["Top","Bottom"],BH=z.defaultView&&z.defaultView.getComputedStyle,AL=AH.support.cssFloat?"cssFloat":"styleFloat",n=function(F,A){return A.toUpperCase()};AH.fn.css=function(F,A){return AP(this,F,A,true,function(K,G,J){if(J===y){return AH.curCSS(K,G)}if(typeof J==="number"&&!M.test(G)){J+="px"}AH.style(K,G,J)})};AH.extend({style:function(F,A,K){if(!F||F.nodeType===3||F.nodeType===8){return y}if((A==="width"||A==="height")&&parseFloat(K)<0){K=y}var G=F.style||F,J=K!==y;if(!AH.support.opacity&&A==="opacity"){if(J){G.zoom=1;A=parseInt(K,10)+""==="NaN"?"":"alpha(opacity="+K*100+")";F=G.filter||AH.curCSS(F,"filter")||"";G.filter=A5.test(F)?F.replace(A5,A):A}return G.filter&&G.filter.indexOf("opacity=")>=0?parseFloat(Ar.exec(G.filter)[1])/100+"":""}if(Af.test(A)){A=AL}A=A.replace(AD,n);if(J){G[A]=K}return G[A]},css:function(F,A,N,K){if(A==="width"||A==="height"){var L,G=A==="width"?p:a;function J(){L=A==="width"?F.offsetWidth:F.offsetHeight;K!=="border"&&AH.each(G,function(){K||(L-=parseFloat(AH.curCSS(F,"padding"+this,true))||0);if(K==="margin"){L+=parseFloat(AH.curCSS(F,"margin"+this,true))||0}else{L-=parseFloat(AH.curCSS(F,"border"+this+"Width",true))||0}})}F.offsetWidth!==0?J():AH.swap(F,AF,J);return Math.max(0,Math.round(L))}return AH.curCSS(F,A,N)},curCSS:function(F,A,L){var J,K=F.style;if(!AH.support.opacity&&A==="opacity"&&F.currentStyle){J=Ar.test(F.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return J===""?"1":J}if(Af.test(A)){A=AL}if(!L&&K&&K[A]){J=K[A]}else{if(BH){if(Af.test(A)){A="float"}A=A.replace(BE,"-$1").toLowerCase();K=F.ownerDocument.defaultView;if(!K){return null}if(F=K.getComputedStyle(F,null)){J=F.getPropertyValue(A)}if(A==="opacity"&&J===""){J="1"}}else{if(F.currentStyle){L=A.replace(AD,n);J=F.currentStyle[A]||F.currentStyle[L];if(!A0.test(J)&&Aj.test(J)){A=K.left;var G=F.runtimeStyle.left;F.runtimeStyle.left=F.currentStyle.left;K.left=L==="fontSize"?"1em":J||0;J=K.pixelLeft+"px";K.left=A;F.runtimeStyle.left=G}}}}return J},swap:function(F,A,K){var G={};for(var J in A){G[J]=F.style[J];F.style[J]=A[J]}K.call(F);for(J in A){F.style[J]=G[J]}}});if(AH.expr&&AH.expr.filters){AH.expr.filters.hidden=function(F){var A=F.offsetWidth,J=F.offsetHeight,G=F.nodeName.toLowerCase()==="tr";return A===0&&J===0&&!G?true:A>0&&J>0&&!G?false:AH.curCSS(F,"display")==="none"};AH.expr.filters.visible=function(A){return !AH.expr.filters.hidden(A)}}var A3=Ag(),Ao=/<script(.|\s)*?\/script>/gi,AJ=/select|textarea/i,t=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,AZ=/=\?(&|$)/,S=/\?/,f=/(\?|&)_=.*?(&|$)/,B=/^(\w+:)?\/\/([^\/?#]+)/,A6=/%20/g,As=AH.fn.load;AH.fn.extend({load:function(F,A,L){if(typeof F!=="string"){return As.call(this,F)}else{if(!this.length){return this}}var J=F.indexOf(" ");if(J>=0){var K=F.slice(J,F.length);F=F.slice(0,J)}J="GET";if(A){if(AH.isFunction(A)){L=A;A=null}else{if(typeof A==="object"){A=AH.param(A,AH.ajaxSettings.traditional);J="POST"}}}var G=this;AH.ajax({url:F,type:J,dataType:"html",data:A,complete:function(N,O){if(O==="success"||O==="notmodified"){G.html(K?AH("<div />").append(N.responseText.replace(Ao,"")).find(K):N.responseText)}L&&G.each(L,[N.responseText,O,N])}});return this},serialize:function(){return AH.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?AH.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||AJ.test(this.nodeName)||t.test(this.type))}).map(function(F,A){F=AH(this).val();return F==null?null:AH.isArray(F)?AH.map(F,function(G){return{name:A.name,value:G}}):{name:A.name,value:F}}).get()}});AH.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(F,A){AH.fn[A]=function(G){return this.bind(A,G)}});AH.extend({get:function(F,A,J,G){if(AH.isFunction(A)){G=G||J;J=A;A=null}return AH.ajax({type:"GET",url:F,data:A,success:J,dataType:G})},getScript:function(F,A){return AH.get(F,null,A,"script")},getJSON:function(F,A,G){return AH.get(F,A,G,"json")},post:function(F,A,J,G){if(AH.isFunction(A)){G=G||J;J=A;A={}}return AH.ajax({type:"POST",url:F,data:A,success:J,dataType:G})},ajaxSetup:function(A){AH.extend(AH.ajaxSettings,A)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:Ap.XMLHttpRequest&&(Ap.location.protocol!=="file:"||!Ap.ActiveXObject)?function(){return new Ap.XMLHttpRequest}:function(){try{return new Ap.ActiveXObject("Microsoft.XMLHTTP")}catch(A){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(Aa){function w(){c.success&&c.success.call(T,O,W,F);c.global&&Z("ajaxSuccess",[F,c])}function s(){c.complete&&c.complete.call(T,F,W);c.global&&Z("ajaxComplete",[F,c]);c.global&&!--AH.active&&AH.event.trigger("ajaxStop")}function Z(BK,BL){(c.context?AH(c.context):AH.event).trigger(BK,BL)}var c=AH.extend(true,{},AH.ajaxSettings,Aa),V,W,O,T=Aa&&Aa.context||c,P=c.type.toUpperCase();if(c.data&&c.processData&&typeof c.data!=="string"){c.data=AH.param(c.data,c.traditional)}if(c.dataType==="jsonp"){if(P==="GET"){AZ.test(c.url)||(c.url+=(S.test(c.url)?"&":"?")+(c.jsonp||"callback")+"=?")}else{if(!c.data||!AZ.test(c.data)){c.data=(c.data?c.data+"&":"")+(c.jsonp||"callback")+"=?"}}c.dataType="json"}if(c.dataType==="json"&&(c.data&&AZ.test(c.data)||AZ.test(c.url))){V=c.jsonpCallback||"jsonp"+A3++;if(c.data){c.data=(c.data+"").replace(AZ,"="+V+"$1")}c.url=c.url.replace(AZ,"="+V+"$1");c.dataType="script";Ap[V]=Ap[V]||function(BK){O=BK;w();s();Ap[V]=y;try{delete Ap[V]}catch(BL){}A&&A.removeChild(K)}}if(c.dataType==="script"&&c.cache===null){c.cache=false}if(c.cache===false&&P==="GET"){var L=Ag(),G=c.url.replace(f,"$1_="+L+"$2");c.url=G+(G===c.url?(S.test(c.url)?"&":"?")+"_="+L:"")}if(c.data&&P==="GET"){c.url+=(S.test(c.url)?"&":"?")+c.data}c.global&&!AH.active++&&AH.event.trigger("ajaxStart");L=(L=B.exec(c.url))&&(L[1]&&L[1]!==location.protocol||L[2]!==location.host);if(c.dataType==="script"&&P==="GET"&&L){var A=z.getElementsByTagName("head")[0]||z.documentElement,K=z.createElement("script");K.src=c.url;if(c.scriptCharset){K.charset=c.scriptCharset}if(!V){var N=false;K.onload=K.onreadystatechange=function(){if(!N&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){N=true;w();s();K.onload=K.onreadystatechange=null;A&&K.parentNode&&A.removeChild(K)}}}A.insertBefore(K,A.firstChild);return y}var J=false,F=c.xhr();if(F){c.username?F.open(P,c.url,c.async,c.username,c.password):F.open(P,c.url,c.async);try{if(c.data||Aa&&Aa.contentType){F.setRequestHeader("Content-Type",c.contentType)}if(c.ifModified){AH.lastModified[c.url]&&F.setRequestHeader("If-Modified-Since",AH.lastModified[c.url]);AH.etag[c.url]&&F.setRequestHeader("If-None-Match",AH.etag[c.url])}L||F.setRequestHeader("X-Requested-With","XMLHttpRequest");F.setRequestHeader("Accept",c.dataType&&c.accepts[c.dataType]?c.accepts[c.dataType]+", */*":c.accepts._default)}catch(Ab){}if(c.beforeSend&&c.beforeSend.call(T,F,c)===false){c.global&&!--AH.active&&AH.event.trigger("ajaxStop");F.abort();return false}c.global&&Z("ajaxSend",[F,c]);var Y=F.onreadystatechange=function(BL){if(!F||F.readyState===0||BL==="abort"){J||s();J=true;if(F){F.onreadystatechange=AH.noop}}else{if(!J&&F&&(F.readyState===4||BL==="timeout")){J=true;F.onreadystatechange=AH.noop;W=BL==="timeout"?"timeout":!AH.httpSuccess(F)?"error":c.ifModified&&AH.httpNotModified(F,c.url)?"notmodified":"success";var BM;if(W==="success"){try{O=AH.httpData(F,c.dataType,c)}catch(BK){W="parsererror";BM=BK}}if(W==="success"||W==="notmodified"){V||w()}else{AH.handleError(c,F,W,BM)}s();BL==="timeout"&&F.abort();if(c.async){F=null}}}};try{var X=F.abort;F.abort=function(){F&&X.call(F);Y("abort")}}catch(R){}c.async&&c.timeout>0&&setTimeout(function(){F&&!J&&Y("timeout")},c.timeout);try{F.send(P==="POST"||P==="PUT"||P==="DELETE"?c.data:null)}catch(Q){AH.handleError(c,F,null,Q);s()}c.async||Y();return F}},handleError:function(F,A,J,G){if(F.error){F.error.call(F.context||F,A,J,G)}if(F.global){(F.context?AH(F.context):AH.event).trigger("ajaxError",[A,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol==="file:"||F.status>=200&&F.status<300||F.status===304||F.status===1223||F.status===0}catch(A){}return false},httpNotModified:function(F,A){var J=F.getResponseHeader("Last-Modified"),G=F.getResponseHeader("Etag");if(J){AH.lastModified[A]=J}if(G){AH.etag[A]=G}return F.status===304||F.status===0},httpData:function(F,A,K){var G=F.getResponseHeader("content-type")||"",J=A==="xml"||!A&&G.indexOf("xml")>=0;F=J?F.responseXML:F.responseText;J&&F.documentElement.nodeName==="parsererror"&&AH.error("parsererror");if(K&&K.dataFilter){F=K.dataFilter(F,A)}if(typeof F==="string"){if(A==="json"||!A&&G.indexOf("json")>=0){F=AH.parseJSON(F)}else{if(A==="script"||!A&&G.indexOf("javascript")>=0){AH.globalEval(F)}}}return F},param:function(F,A){function L(N,O){if(AH.isArray(O)){AH.each(O,function(P,Q){A||/\[\]$/.test(N)?J(N,Q):L(N+"["+(typeof Q==="object"||AH.isArray(Q)?P:"")+"]",Q)})}else{!A&&O!=null&&typeof O==="object"?AH.each(O,function(P,Q){L(N+"["+P+"]",Q)}):J(N,O)}}function J(N,O){O=AH.isFunction(O)?O():O;K[K.length]=encodeURIComponent(N)+"="+encodeURIComponent(O)}var K=[];if(A===y){A=AH.ajaxSettings.traditional}if(AH.isArray(F)||F.jquery){AH.each(F,function(){J(this.name,this.value)})}else{for(var G in F){L(G,F[G])}}return K.join("&").replace(A6,"+")}});var BF={},BB=/toggle|show|hide/,Ay=/^([+-]=)?([\d+-.]+)(.*)$/,AQ,u=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];AH.fn.extend({show:function(F,A){if(F||F===0){return this.animate(Ad("show",3),F,A)}else{F=0;for(A=this.length;F<A;F++){var K=AH.data(this[F],"olddisplay");this[F].style.display=K||"";if(AH.css(this[F],"display")==="none"){K=this[F].nodeName;var G;if(BF[K]){G=BF[K]}else{var J=AH("<"+K+" />").appendTo("body");G=J.css("display");if(G==="none"){G="block"}J.remove();BF[K]=G}AH.data(this[F],"olddisplay",G)}}F=0;for(A=this.length;F<A;F++){this[F].style.display=AH.data(this[F],"olddisplay")||""}return this}},hide:function(F,A){if(F||F===0){return this.animate(Ad("hide",3),F,A)}else{F=0;for(A=this.length;F<A;F++){var G=AH.data(this[F],"olddisplay");!G&&G!=="none"&&AH.data(this[F],"olddisplay",AH.css(this[F],"display"))}F=0;for(A=this.length;F<A;F++){this[F].style.display="none"}return this}},_toggle:AH.fn.toggle,toggle:function(F,A){var G=typeof F==="boolean";if(AH.isFunction(F)&&AH.isFunction(A)){this._toggle.apply(this,arguments)}else{F==null||G?this.each(function(){var J=G?F:AH(this).is(":hidden");AH(this)[J?"show":"hide"]()}):this.animate(Ad("toggle",3),F,A)}return this},fadeTo:function(F,A,G){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:A},F,G)},animate:function(F,A,K,G){var J=AH.speed(A,K,G);if(AH.isEmptyObject(F)){return this.each(J.complete)}return this[J.queue===false?"each":"queue"](function(){var N=AH.extend({},J),O,P=this.nodeType===1&&AH(this).is(":hidden"),L=this;for(O in F){var Q=O.replace(AD,n);if(O!==Q){F[Q]=F[O];delete F[O];O=Q}if(F[O]==="hide"&&P||F[O]==="show"&&!P){return N.complete.call(this)}if((O==="height"||O==="width")&&this.style){N.display=AH.css(this,"display");N.overflow=this.style.overflow}if(AH.isArray(F[O])){(N.specialEasing=N.specialEasing||{})[O]=F[O][1];F[O]=F[O][0]}}if(N.overflow!=null){this.style.overflow="hidden"}N.curAnim=AH.extend({},F);AH.each(F,function(T,R){var X=new AH.fx(L,N,T);if(BB.test(R)){X[R==="toggle"?P?"show":"hide":R](F)}else{var W=Ay.exec(R),Y=X.cur(true)||0;if(W){R=parseFloat(W[2]);var V=W[3]||"px";if(V!=="px"){L.style[T]=(R||1)+V;Y=(R||1)/X.cur(true)*Y;L.style[T]=Y+V}if(W[1]){R=(W[1]==="-="?-1:1)*R+Y}X.custom(Y,R,V)}else{X.custom(Y,R,"")}}});return true})},stop:function(F,A){var G=AH.timers;F&&this.queue([]);this.each(function(){for(var J=G.length-1;J>=0;J--){if(G[J].elem===this){A&&G[J](true);G.splice(J,1)}}});A||this.dequeue();return this}});AH.each({slideDown:Ad("show",1),slideUp:Ad("hide",1),slideToggle:Ad("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(F,A){AH.fn[F]=function(J,G){return this.animate(A,J,G)}});AH.extend({speed:function(F,A,J){var G=F&&typeof F==="object"?F:{complete:J||!J&&A||AH.isFunction(F)&&F,duration:F,easing:J&&A||A&&!AH.isFunction(A)&&A};G.duration=AH.fx.off?0:typeof G.duration==="number"?G.duration:AH.fx.speeds[G.duration]||AH.fx.speeds._default;G.old=G.complete;G.complete=function(){G.queue!==false&&AH(this).dequeue();AH.isFunction(G.old)&&G.old.call(this)};return G},easing:{linear:function(F,A,J,G){return J+G*F},swing:function(F,A,J,G){return(-Math.cos(F*Math.PI)/2+0.5)*G+J}},timers:[],fx:function(F,A,G){this.options=A;this.elem=F;this.prop=G;if(!A.orig){A.orig={}}}});AH.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(AH.fx.step[this.prop]||AH.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(A){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}return(A=parseFloat(AH.css(this.elem,this.prop,A)))&&A>-10000?A:parseFloat(AH.curCSS(this.elem,this.prop))||0},custom:function(F,A,K){function G(L){return J.step(L)}this.startTime=Ag();this.start=F;this.end=A;this.unit=K||this.unit||"px";this.now=this.start;this.pos=this.state=0;var J=this;G.elem=this.elem;if(G()&&AH.timers.push(G)&&!AQ){AQ=setInterval(AH.fx.tick,13)}},show:function(){this.options.orig[this.prop]=AH.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());AH(this.elem).show()},hide:function(){this.options.orig[this.prop]=AH.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(F){var A=Ag(),K=true;if(F||A>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var G in this.options.curAnim){if(this.options.curAnim[G]!==true){K=false}}if(K){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;F=AH.data(this.elem,"olddisplay");this.elem.style.display=F?F:this.options.display;if(AH.css(this.elem,"display")==="none"){this.elem.style.display="block"}}this.options.hide&&AH(this.elem).hide();if(this.options.hide||this.options.show){for(var J in this.options.curAnim){AH.style(this.elem,J,this.options.orig[J])}}this.options.complete.call(this.elem)}return false}else{J=A-this.startTime;this.state=J/this.options.duration;F=this.options.easing||(AH.easing.swing?"swing":"linear");this.pos=AH.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||F](this.state,J,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};AH.extend(AH.fx,{tick:function(){for(var F=AH.timers,A=0;A<F.length;A++){F[A]()||F.splice(A--,1)}F.length||AH.fx.stop()},stop:function(){clearInterval(AQ);AQ=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(A){AH.style(A.elem,"opacity",A.now)},_default:function(A){if(A.elem.style&&A.elem.style[A.prop]!=null){A.elem.style[A.prop]=(A.prop==="width"||A.prop==="height"?Math.max(0,A.now):A.now)+A.unit}else{A.elem[A.prop]=A.now}}}});if(AH.expr&&AH.expr.filters){AH.expr.filters.animated=function(A){return AH.grep(AH.timers,function(F){return A===F.elem}).length}}AH.fn.offset="getBoundingClientRect" in z.documentElement?function(F){var A=this[0];if(F){return this.each(function(K){AH.offset.setOffset(this,F,K)})}if(!A||!A.ownerDocument){return null}if(A===A.ownerDocument.body){return AH.offset.bodyOffset(A)}var J=A.getBoundingClientRect(),G=A.ownerDocument;A=G.body;G=G.documentElement;return{top:J.top+(self.pageYOffset||AH.support.boxModel&&G.scrollTop||A.scrollTop)-(G.clientTop||A.clientTop||0),left:J.left+(self.pageXOffset||AH.support.boxModel&&G.scrollLeft||A.scrollLeft)-(G.clientLeft||A.clientLeft||0)}}:function(Q){var P=this[0];if(Q){return this.each(function(R){AH.offset.setOffset(this,Q,R)})}if(!P||!P.ownerDocument){return null}if(P===P.ownerDocument.body){return AH.offset.bodyOffset(P)}AH.offset.initialize();var O=P.offsetParent,L=P,N=P.ownerDocument,J,K=N.documentElement,A=N.body;L=(N=N.defaultView)?N.getComputedStyle(P,null):P.currentStyle;for(var G=P.offsetTop,F=P.offsetLeft;(P=P.parentNode)&&P!==A&&P!==K;){if(AH.offset.supportsFixedPosition&&L.position==="fixed"){break}J=N?N.getComputedStyle(P,null):P.currentStyle;G-=P.scrollTop;F-=P.scrollLeft;if(P===O){G+=P.offsetTop;F+=P.offsetLeft;if(AH.offset.doesNotAddBorder&&!(AH.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(P.nodeName))){G+=parseFloat(J.borderTopWidth)||0;F+=parseFloat(J.borderLeftWidth)||0}L=O;O=P.offsetParent}if(AH.offset.subtractsBorderForOverflowNotVisible&&J.overflow!=="visible"){G+=parseFloat(J.borderTopWidth)||0;F+=parseFloat(J.borderLeftWidth)||0}L=J}if(L.position==="relative"||L.position==="static"){G+=A.offsetTop;F+=A.offsetLeft}if(AH.offset.supportsFixedPosition&&L.position==="fixed"){G+=Math.max(K.scrollTop,A.scrollTop);F+=Math.max(K.scrollLeft,A.scrollLeft)}return{top:G,left:F}};AH.offset={initialize:function(){var F=z.body,A=z.createElement("div"),L,J,K,G=parseFloat(AH.curCSS(F,"marginTop",true))||0;AH.extend(A.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});A.innerHTML="<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>";F.insertBefore(A,F.firstChild);L=A.firstChild;J=L.firstChild;K=L.nextSibling.firstChild.firstChild;this.doesNotAddBorder=J.offsetTop!==5;this.doesAddBorderForTableAndCells=K.offsetTop===5;J.style.position="fixed";J.style.top="20px";this.supportsFixedPosition=J.offsetTop===20||J.offsetTop===15;J.style.position=J.style.top="";L.style.overflow="hidden";L.style.position="relative";this.subtractsBorderForOverflowNotVisible=J.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=F.offsetTop!==G;F.removeChild(A);AH.offset.initialize=AH.noop},bodyOffset:function(F){var A=F.offsetTop,G=F.offsetLeft;AH.offset.initialize();if(AH.offset.doesNotIncludeMarginInBodyOffset){A+=parseFloat(AH.curCSS(F,"marginTop",true))||0;G+=parseFloat(AH.curCSS(F,"marginLeft",true))||0}return{top:A,left:G}},setOffset:function(F,A,N){if(/static/.test(AH.curCSS(F,"position"))){F.style.position="relative"}var K=AH(F),L=K.offset(),G=parseInt(AH.curCSS(F,"top",true),10)||0,J=parseInt(AH.curCSS(F,"left",true),10)||0;if(AH.isFunction(A)){A=A.call(F,N,L)}N={top:A.top-L.top+G,left:A.left-L.left+J};"using" in A?A.using.call(F,N):K.css(N)}};AH.fn.extend({position:function(){if(!this[0]){return null}var F=this[0],A=this.offsetParent(),J=this.offset(),G=/^body|html$/i.test(A[0].nodeName)?{top:0,left:0}:A.offset();J.top-=parseFloat(AH.curCSS(F,"marginTop",true))||0;J.left-=parseFloat(AH.curCSS(F,"marginLeft",true))||0;G.top+=parseFloat(AH.curCSS(A[0],"borderTopWidth",true))||0;G.left+=parseFloat(AH.curCSS(A[0],"borderLeftWidth",true))||0;return{top:J.top-G.top,left:J.left-G.left}},offsetParent:function(){return this.map(function(){for(var A=this.offsetParent||z.body;A&&!/^body|html$/i.test(A.nodeName)&&AH.css(A,"position")==="static";){A=A.offsetParent}return A})}});AH.each(["Left","Top"],function(F,A){var G="scroll"+A;AH.fn[G]=function(K){var L=this[0],J;if(!L){return null}if(K!==y){return this.each(function(){if(J=g(this)){J.scrollTo(!F?K:AH(J).scrollLeft(),F?K:AH(J).scrollTop())}else{this[G]=K}})}else{return(J=g(L))?"pageXOffset" in J?J[F?"pageYOffset":"pageXOffset"]:AH.support.boxModel&&J.document.documentElement[G]||J.document.body[G]:L[G]}}});AH.each(["Height","Width"],function(F,A){var G=A.toLowerCase();AH.fn["inner"+A]=function(){return this[0]?AH.css(this[0],G,false,"padding"):null};AH.fn["outer"+A]=function(J){return this[0]?AH.css(this[0],G,false,J?"margin":"border"):null};AH.fn[G]=function(J){var K=this[0];if(!K){return J==null?null:this}if(AH.isFunction(J)){return this.each(function(L){var N=AH(this);N[G](J.call(this,L,N[G]()))})}return"scrollTo" in K&&K.document?K.document.compatMode==="CSS1Compat"&&K.document.documentElement["client"+A]||K.document.body["client"+A]:K.nodeType===9?Math.max(K.documentElement["client"+A],K.body["scroll"+A],K.documentElement["scroll"+A],K.body["offset"+A],K.documentElement["offset"+A]):J===y?AH.css(K,G):this.css(G,typeof J==="string"?J:J+"px")}});Ap.jQuery=Ap.$=AH})(window);jQuery.ui||(function(C){var I=C.fn.remove,D=C.browser.mozilla&&(parseFloat(C.browser.version)<1.9);C.ui={version:"1.7.2",plugin:{add:function(K,L,N){var M=C.ui[K].prototype;for(var J in N){M.plugins[J]=M.plugins[J]||[];M.plugins[J].push([L,N[J]])}},call:function(J,L,K){var N=J.plugins[L];if(!N||!J.element[0].parentNode){return }for(var M=0;M<N.length;M++){if(J.options[N[M][0]]){N[M][1].apply(J.element,K)}}}},contains:function(K,J){return document.compareDocumentPosition?K.compareDocumentPosition(J)&16:K!==J&&K.contains(J)},hasScroll:function(M,K){if(C(M).css("overflow")=="hidden"){return false}var J=(K&&K=="left")?"scrollLeft":"scrollTop",L=false;if(M[J]>0){return true}M[J]=1;L=(M[J]>0);M[J]=0;return L},isOverAxis:function(K,J,L){return(K>J)&&(K<(J+L))},isOver:function(O,K,N,M,J,L){return C.ui.isOverAxis(O,N,J)&&C.ui.isOverAxis(K,M,L)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(D){var F=C.attr,E=C.fn.removeAttr,H="http://www.w3.org/2005/07/aaa",A=/^aria-/,B=/^wairole:/;C.attr=function(K,J,L){var M=L!==undefined;return(J=="role"?(M?F.call(this,K,J,"wairole:"+L):(F.apply(this,arguments)||"").replace(B,"")):(A.test(J)?(M?K.setAttributeNS(H,J.replace(A,"aaa:"),L):F.call(this,K,J.replace(A,"aaa:"))):F.apply(this,arguments)))};C.fn.removeAttr=function(J){return(A.test(J)?this.each(function(){this.removeAttributeNS(H,J.replace(A,""))}):E.call(this,J))}}C.fn.extend({remove:function(){C("*",this).add(this).each(function(){C(this).triggerHandler("remove")});return I.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var J;if((C.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){J=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(C.curCSS(this,"position",1))&&(/(auto|scroll)/).test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))}).eq(0)}else{J=this.parents().filter(function(){return(/(auto|scroll)/).test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!J.length?C(document):J}});C.extend(C.expr[":"],{data:function(L,K,J){return !!C.data(L,J[3])},focusable:function(K){var L=K.nodeName.toLowerCase(),J=C.attr(K,"tabindex");return(/input|select|textarea|button|object/.test(L)?!K.disabled:"a"==L||"area"==L?K.href||!isNaN(J):!isNaN(J))&&!C(K)["area"==L?"parents":"closest"](":hidden").length},tabbable:function(K){var J=C.attr(K,"tabindex");return(isNaN(J)||J>=0)&&C(K).is(":focusable")}});function G(M,N,O,L){function K(Q){var P=C[M][N][Q]||[];return(typeof P=="string"?P.split(/,?\s+/):P)}var J=K("getter");if(L.length==1&&typeof L[0]=="string"){J=J.concat(K("getterSetter"))}return(C.inArray(O,J)!=-1)}C.widget=function(K,J){var L=K.split(".")[0];K=K.split(".")[1];C.fn[K]=function(P){var N=(typeof P=="string"),O=Array.prototype.slice.call(arguments,1);if(N&&P.substring(0,1)=="_"){return this}if(N&&G(L,K,P,O)){var M=C.data(this[0],K);return(M?M[P].apply(M,O):undefined)}return this.each(function(){var Q=C.data(this,K);(!Q&&!N&&C.data(this,K,new C[L][K](this,P))._init());(Q&&N&&C.isFunction(Q[P])&&Q[P].apply(Q,O))})};C[L]=C[L]||{};C[L][K]=function(O,N){var M=this;this.namespace=L;this.widgetName=K;this.widgetEventPrefix=C[L][K].eventPrefix||K;this.widgetBaseClass=L+"-"+K;this.options=C.extend({},C.widget.defaults,C[L][K].defaults,C.metadata&&C.metadata.get(O)[K],N);this.element=C(O).bind("setData."+K,function(Q,P,R){if(Q.target==O){return M._setData(P,R)}}).bind("getData."+K,function(Q,P){if(Q.target==O){return M._getData(P)}}).bind("remove",function(){return M.destroy()})};C[L][K].prototype=C.extend({},C.widget.prototype,J);C[L][K].getterSetter="option"};C.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(L,M){var K=L,J=this;if(typeof L=="string"){if(M===undefined){return this._getData(L)}K={};K[L]=M}C.each(K,function(N,O){J._setData(N,O)})},_getData:function(J){return this.options[J]},_setData:function(J,K){this.options[J]=K;if(J=="disabled"){this.element[K?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",K)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(L,M,N){var P=this.options[L],J=(L==this.widgetEventPrefix?L:this.widgetEventPrefix+L);M=C.Event(M);M.type=J;if(M.originalEvent){for(var K=C.event.props.length,O;K;){O=C.event.props[--K];M[O]=M.originalEvent[O]}}this.element.trigger(M,N);return !(C.isFunction(P)&&P.call(this.element[0],M,N)===false||M.isDefaultPrevented())}};C.widget.defaults={disabled:false};C.ui.mouse={_mouseInit:function(){var J=this;this.element.bind("mousedown."+this.widgetName,function(K){return J._mouseDown(K)}).bind("click."+this.widgetName,function(K){if(J._preventClickEvent){J._preventClickEvent=false;K.stopImmediatePropagation();return false}});if(C.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(C.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(L){L.originalEvent=L.originalEvent||{};if(L.originalEvent.mouseHandled){return }(this._mouseStarted&&this._mouseUp(L));this._mouseDownEvent=L;var K=this,M=(L.which==1),J=(typeof this.options.cancel=="string"?C(L.target).parents().add(L.target).filter(this.options.cancel).length:false);if(!M||J||!this._mouseCapture(L)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){K.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(L)&&this._mouseDelayMet(L)){this._mouseStarted=(this._mouseStart(L)!==false);if(!this._mouseStarted){L.preventDefault();return true}}this._mouseMoveDelegate=function(N){return K._mouseMove(N)};this._mouseUpDelegate=function(N){return K._mouseUp(N)};C(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(C.browser.safari||L.preventDefault());L.originalEvent.mouseHandled=true;return true},_mouseMove:function(J){if(C.browser.msie&&!J.button){return this._mouseUp(J)}if(this._mouseStarted){this._mouseDrag(J);return J.preventDefault()}if(this._mouseDistanceMet(J)&&this._mouseDelayMet(J)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,J)!==false);(this._mouseStarted?this._mouseDrag(J):this._mouseUp(J))}return !this._mouseStarted},_mouseUp:function(J){C(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(J.target==this._mouseDownEvent.target);this._mouseStop(J)}return false},_mouseDistanceMet:function(J){return(Math.max(Math.abs(this._mouseDownEvent.pageX-J.pageX),Math.abs(this._mouseDownEvent.pageY-J.pageY))>=this.options.distance)},_mouseDelayMet:function(J){return this.mouseDelayMet},_mouseStart:function(J){},_mouseDrag:function(J){},_mouseStop:function(J){},_mouseCapture:function(J){return true}};C.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);(function(A){A.widget("ui.smart_input",{_def_value:function(){if(!this.element.val()){this.element.hide();if(this.options._fake.filter("textarea").length){this.options._fake.text(this.options.label)}else{this.options._fake.val(this.options.label)}this.options._fake.css(this.options.emptyCss).show()}else{this.options._fake.hide();this.element.show().css(this.options.filledCss)}},_onBlur:function(C){var B=this.element,D=this.options,E=this;this._def_value();if(typeof (D.onBlur)=="function"){D.onBlur.call(B,C)}},_onFocus:function(C){var B=this.element,D=this.options,E=this,G=B.val();try{if(G==D.label){B.val("")}B.css(D.filledCss);if(typeof (D.onFocus)=="function"){D.onFocus.call(B,C)}}catch(F){}},init:function(){this._init.apply(this,arguments)},_init:function(){var B=this;this.options._isPasswd=true;if(this.element.filter("textarea").length){this.options._fake=A("<textarea />").text(this.element.val())}else{this.options._fake=A('<input type="text" />').attr("value",this.element.val())}this.options._fake.attr("style",this.element.attr("style"));if(this.element.attr("class")){this.options._fake.attr("class",this.element.attr("class"))}if(this.element.attr("size")){this.options._fake.attr("size",this.element.attr("size"))}if(this.element.attr("tabindex")){this.options._fake.attr("tabindex",this.element.attr("tabindex"))}this.options._fake.attr({id:"",name:""}).insertAfter(this.element).hide().bind("click focus",function(){A(this).hide();B.element.show().focus()});this.element.addClass(this.options.element_class).blur(function(C){B._onBlur.call(B,C)}).focus(function(C){B._onFocus.call(B,C)});this._def_value()},value:function(){var B=this.element.val();return B=this.options.label==B?"":this.element.val()},focus:function(){this.options._fake.trigger("click")},empty:function(){this.element.val("").trigger("blur")}});A.extend(A.ui.smart_input,{defaults:{element_class:"ui-smart-input",filledCss:{},emptyCss:{},onBlur:undefined,onFocus:undefined,label:"..."},getter:"value"})})(jQuery);(function(A){A.widget("ui.modalbox",{_init:function(){var B=this.options;var C=this;C.current_url=false;C.popup=A("<div />").attr("id","modal_popup").addClass(B.popup_class).appendTo(A(document.body)).end().hide();C.close_button=A(B.close_button).attr("id","modal_close_button").appendTo(C.popup);C.close_button.click(function(D){D.preventDefault();D.stopPropagation();C.close();return false});C.container=A("<div />").attr("id","modal_container").addClass(B.container_class).appendTo(C.popup).end();C.tint=A("<div />").attr("id","modal_tint").addClass(B.tint_class).appendTo(A(document.body)).end().hide();A(document).keydown(function(D){if((D.which&&D.which==27)||(D.keyCode&&D.keyCode==27)){C.close()}})},open:function(C){var E=this;var B=A.extend({},E.options,C);if(B.callbacks&&typeof (B.callbacks.preOpen)=="function"){var D=B.callback.preOpen(E);B.callbacks.preOpen=false;if(D){return }}E.tint.show();if(!A.support.boxModel){A(document).scrollTop(0)}if(E.popup.attr("class")!=B.popup_class){E.popup.attr("class",B.popup_class)}if(B.ajax_url){if(!(E.options.cache&&E.current_url==C.ajax_url)){E.popup.slideUp("fast");E.container.html(B.content_html.replace("%%content%%",B.content));E.popup.slideDown("fast");E.container.sleep({"shroud_css":{"z-index":200,"background-color":false}});A.ajax({url:C.ajax_url,success:function(F){E.container.wakeup().end().hide();if(B.hint){F=B.hint_html.replace("%%hint%%",B.hint)+F}E.container.html(F);E.container.slideDown("fast");E.current_url=C.ajax_url},error:function(H,F,G){E.container.html('<div class="substance">Произошла ошибка, попробуйте повторить позднее.<i class="bottom"></i></div>')}})}else{E.popup.slideDown("fast")}}else{if(B.content){E.current_url=false;E.container.html(B.content_html.replace("%%content%%",B.content));E.popup.slideDown("fast")}}if(B.callbacks&&typeof (B.callbacks.postOpen)=="function"){B.callbacks.postOpen(E);E.options.callbacks.postOpen=false}},close:function(C){var E=this;var B=A.extend({},E.options,C);if(C!==undefined&&typeof (C.onClosing)=="function"&&!C.onClosing(E)){return }if(B.callbacks&&typeof (B.callbacks.preClose)=="function"){var D=B.callbacks.preClose(E);B.callbacks.preClose=false;if(D){return }}E.popup.slideUp("fast",function(){E.container.wakeup();E.tint.hide();if(C!==undefined){if(typeof (C.complete)=="function"){C.complete()}}});if(B.callbacks&&typeof (B.callbacks.postClose)=="function"){B.callbacks.postClose(E);E.options.callbacks.postClose=false}},setCallback:function(C){var B=this.options;if(this.options.callbacks){A.extend(B.callbacks,C)}else{B.callbacks=C}}});A.extend(A.ui.modalbox,{defaults:{close_button:'<a href="javascript:void(0);" class="close">Закрыть</a>',hint_html:'<div class="hint"><p>%%hint%%</p><i class="bottom"></i></div>',hint:false,content_html:'<div class="substance">%%content%%<i class="bottom"></i></div>',content:"<br /><br /><br />",popup_class:"popup",container_class:"",tint_class:"l-tint",cache:false,callbacks:false}})})(jQuery);(function(A){A.sleep=function(B){return A.sleep.issue.init(B)};A.fn.sleep=function(B){return A.sleep.issue.init(this,B)};A.wakeup=function(B){return A.sleep.issue.destroy()};A.fn.wakeup=function(B){return A.sleep.issue.destroy(this)};A.sleep.defaults={idle_icon:"/sf/progress.gif",shroud_css:{"opacity":"0.5","position":"absolute","background-color":"#FFFFFF","vertical-align":"middle","text-align":"center"},vertical_offset:null};A.sleep.issue={config:null,init:function(I,D){if(typeof (D)!="undefined"){D.shroud_css=A.extend({},A.sleep.defaults.shroud_css,D.shroud_css)}this.config=A.extend({},A.sleep.defaults,D);this.z_index=this.config.z_index;I=I instanceof jQuery?I:A(I);if(I.position()==undefined){return I}var H=I.position().left+parseInt(I.css("margin-left")),G=I.position().top+parseInt(I.css("margin-top")),G=I.position().top+parseInt(I.css("margin-top")),F=I.width()+parseInt(I.css("padding-left"))+parseInt(I.css("padding-right")),B=I.height()+parseInt(I.css("padding-top"))+parseInt(I.css("padding-bottom")),E=I.parent(),C=(D!==undefined&&D.vertical_offset!==undefined)?parseInt(D.vertical_offset,10):(Math.round(B/2)-16);shroud=A("<div/>").css({left:H,top:G,width:F,height:B}).css(this.config.shroud_css).addClass("jq-idle-shroud").append(A("<img/>").addClass("jq-idle-icon").attr("src",this.config.idle_icon).css({"top":C,"position":"relative"})).appendTo(E);return I},destroy:function(B){B=B instanceof jQuery?B:A(B);B.parent().children(".jq-idle-shroud").remove();return B}}})(jQuery);(function(A){A.fn.silent_submit=function(C){var D=A(this);var B={url:"",method:"POST",data:{},processingClass:"_processing_",getValue:{},submitToNowhere:false};var C=A.extend(B,C);if(C.submitToNowhere){var E="form-silent-submit-nowhere-place",G="form_silent_submit_nowhere_place",F=A('<iframe style="width: 0; height: 0; display: none;" name="'+G+'" id="'+E+'"></iframe>');D.attr("target",G).attr("action","/");F.insertAfter(D)}D.submit(function(H){if(!C.submitToNowhere){H.preventDefault();H.stopPropagation()}if(D.hasClass(C.processingClass)){return false}D.addClass(C.processingClass);var K=A(this).find("input, select, textarea");var J=B.data;A.each(K,function(L,M){M=A(M);if(M.filter("input:checkbox").length&&!M.filter(":checked").length){return }if(typeof (C.getValue[M.attr("name")])=="function"){J[M.attr("name")]=C.getValue[M.attr("name")].call(M)}else{J[M.attr("name")]=M.val()}});var I=(C.container==undefined)?D.parent():C.container;I=(I instanceof jQuery)?I:A(I);I.sleep({"shroud_css":{"z-index":200}});A.ajax({type:B.method,url:B.url,data:J,complete:function(){D.removeClass(C.processingClass)},success:function(L){I.html(L);I.wakeup()}})});D.keypress(function(H){if(H.keyCode==13){A(this).submit()}});return D}})(jQuery);var config_wwwdomain="http://"+document.domain;var expecting_callback=null;(function(B){var A=this;A._is_authorized=false;B.fn.authBind=function(D,C,E){return B._auth_bind.init(this,D,C,E)};B._auth_bind={init:function(E,D,C,F){E=E instanceof jQuery?E:B(E);E.bind(D,function(G){var I=B(this);if(A._is_authorized){C.call(I,G)}else{G.stopImmediatePropagation();G.preventDefault();var H=(function(J){return function(){A._is_authorized=true;var K=new jQuery.Event(D);J.trigger(K)}})(I);B.getJSON(config_wwwdomain+"/ajax/userservice/?cmd=islogged",function(J){if(J.status==1){H()}else{expecting_callback=H;B(document).modalbox();B(document).modalbox("open",{ajax_url:"/user/login/?silent=1",hint:F,popup_class:"popup enter_site"})}})}});return E}}})(jQuery);var expecting_callback=null;var expecting_callback=null;(function(B){var C=false;var A="http://"+document.domain;B.authJacket=function(D,E,F){if(E===undefined){E=(window===undefined)?window:document.window}if(C){D.call(E)}else{B.getJSON(A+"/ajax/userservice/?cmd=islogged",function(G){if(G!==undefined){if(G.status==1){C=true;D.call(E)}else{expecting_callback=function(){C=true;D.call(E)};B(document).modalbox();B(document).modalbox("open",{ajax_url:"/user/login/?silent=1",hint:F,popup_class:"popup enter_site"})}}})}}})(jQuery);(function(C){var A=C.scrollTo=function(D,E,F){C(window).scrollTo(D,E,F)};A.defaults={axis:"xy",duration:parseFloat(C.fn.jquery)>=1.3?0:1};A.window=function(D){return C(window)._scrollable()};C.fn._scrollable=function(){return this.map(function(){var D=this,E=!D.nodeName||C.inArray(D.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!E){return D}var F=(D.contentWindow||D).document||D.ownerDocument||D;return C.browser.safari||F.compatMode=="BackCompat"?F.body:F.documentElement})};C.fn.scrollTo=function(F,E,D){if(typeof E=="object"){D=E;E=0}if(typeof D=="function"){D={onAfter:D}}if(F=="max"){F=9000000000}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._scrollable().each(function(){var M=this,K=C(M),L=F,I,J={},G=K.is("html,body");switch(typeof L){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(L)){L=B(L);break}L=C(L,this);case"object":if(L.is||L.style){I=(L=C(L)).offset()}}C.each(D.axis.split(""),function(P,Q){var S=Q=="x"?"Left":"Top",R=S.toLowerCase(),U="scroll"+S,O=M[U],N=A.max(M,Q);if(I){J[U]=I[R]+(G?0:O-K.offset()[R]);if(D.margin){J[U]-=parseInt(L.css("margin"+S))||0;J[U]-=parseInt(L.css("border"+S+"Width"))||0}J[U]+=D.offset[R]||0;if(D.over[R]){J[U]+=L[Q=="x"?"width":"height"]()*D.over[R]}}else{var T=L[R];J[U]=T.slice&&T.slice(-1)=="%"?parseFloat(T)/100*N:T}if(/^\d+$/.test(J[U])){J[U]=J[U]<=0?0:Math.min(J[U],N)}if(!P&&D.queue){if(O!=J[U]){H(D.onAfterFirst)}delete J[U]}});H(D.onAfter);function H(N){K.animate(J,E,D.easing,N&&function(){N.call(this,F,D)})}}).end()};A.max=function(F,G){var I=G=="x"?"Width":"Height",H="scroll"+I;if(!C(F).is("html,body")){return F[H]-C(F)[I.toLowerCase()]()}var J="client"+I,E=F.ownerDocument.documentElement,D=F.ownerDocument.body;return Math.max(E[H],D[H])-Math.min(E[J],D[J])};function B(D){return typeof D=="object"?D:{top:D,left:D}}})(jQuery);jQuery.cookie=function(B,I,L){if(typeof I!="undefined"){L=L||{};if(I===null){I="";L.expires=-1}var E="";if(L.expires&&(typeof L.expires=="number"||L.expires.toUTCString)){var F;if(typeof L.expires=="number"){F=new Date();F.setTime(F.getTime()+(L.expires*24*60*60*1000))}else{F=L.expires}E="; expires="+F.toUTCString()}var K=L.path?"; path="+(L.path):"";var G=L.domain?"; domain="+(L.domain):"";var A=L.secure?"; secure":"";document.cookie=[B,"=",encodeURIComponent(I),E,K,G,A].join("")}else{var D=null;if(document.cookie&&document.cookie!=""){var J=document.cookie.split(";");for(var H=0;H<J.length;H++){var C=jQuery.trim(J[H]);if(C.substring(0,B.length+1)==(B+"=")){D=decodeURIComponent(C.substring(B.length+1));break}}}return D}};if(!this.JSON){JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}})();var JSONRequest=function(A){if(typeof (A)!="object"){console.dir(A);throw ("Error: Invalid options data type.")}if(typeof (A.method)=="undefined"){throw ("Error: No method argument given.")}if(typeof (A.params)!="undefined"&&!(A.params instanceof Array)){throw ("Error: Invalid parameters data type given.")}var C={method:A.method,params:A.params,id:Math.round(Math.random()*1000000)};C=JSON.stringify(C,function(D,E){return E});var B="/JSON/";if(A.url!==undefined){B=A.url}$.ajax({url:B,data:C,dataType:"json",type:"POST",cache:false,success:function(F){if(typeof (F)!="undefined"){var D=F.result;var E=F.error;var G=F.id;if(typeof (E)!="undefined"&&E!=null){if(typeof (A.failure)=="function"){A.failure(E)}}else{if(typeof (A.success)=="function"){A.success(D)}}}},error:function(F,E,D){if(typeof (A.error)=="function"){A.error(F,E,D)}},dataType:"json"})};onHistoryChange=function(){};(function(A){if(typeof console==="undefined"){console=typeof window.console!=="undefined"?window.console:{}}console.log=console.log||function(){};console.debug=console.debug||console.log;console.warn=console.warn||console.log;console.error=console.error||function(){var B=[];for(var C=0;C<arguments.length;C++){B.push(arguments[C])}alert(B.join("\n"))};console.trace=console.trace||console.log;console.group=console.group||console.log;console.groupEnd=console.groupEnd||console.log;console.profile=console.profile||console.log;console.profileEnd=console.profileEnd||console.log;A.History={options:{debug:false},state:"",$window:null,$iframe:null,handlers:{generic:[],specific:{}},format:function(B){B=B.replace(/^.+?#/g,"").replace(/^#?\/?|\/?$/g,"");return B},getState:function(){var B=A.History;return B.state},setState:function(C){var B=A.History;C=B.format(C);B.state=C;return B.state},getHash:function(){var B=A.History;var C=window.location.hash||location.hash;C=B.format(C);return C},setHash:function(C){var B=A.History;C=A.History.format(C);C=C.replace(/^\/?|\/?(\?)|\/?$/g,"/$1");if(typeof window.location.hash!=="undefined"){window.location.hash=C}else{location.hash=C}if(A.browser.msie&&parseInt(A.browser.version,10)<8){A.History.$iframe.contentWindow.document.open();A.History.$iframe.contentWindow.document.close();A.History.$iframe.contentWindow.document.location.hash=C}},go:function(C){var B=A.History;C=B.format(C);var D=B.getHash();if(D!==C){B.setHash(C)}else{B.setState(C);B.trigger()}return true},hashchange:function(E){var B=A.History;if(B.options.debug){console.debug("History.hashchange",this,arguments)}var D=B.getHash();var C=B.getState();if((!B.$iframe&&C===D)||(B.$iframe&&B.hash===B.$iframe.contentWindow.document.location.hash)){return false}if(C===D){return false}B.setState(D);B.trigger();return true},bind:function(D,B){var C=A.History;if(B){if(typeof C.handlers.specific[D]==="undefined"){C.handlers.specific[D]=[]}C.handlers.specific[D].push(B)}else{B=D;C.handlers.generic.push(B)}return true},trigger:function(F){var D=A.History;if(typeof F==="undefined"){F=D.getState()}var B,G,C,E;if(typeof D.handlers.specific[F]!=="undefined"){E=D.handlers.specific[F];for(B=0,G=E.length;B<G;++B){C=E[B];C(F)}}E=D.handlers.generic;for(B=0,G=E.length;B<G;++B){C=E[B];C(F)}return true},construct:function(){var B=A.History;A(document).ready(function(){B.domReady()});return true},configure:function(B){var C=A.History;C.options=A.extend(C.options,B);return true},domReadied:false,domReady:function(){var B=A.History;if(B.domRedied){return }B.domRedied=true;B.$window=A(window);B.$window.bind("hashchange",this.hashchange);setTimeout(B.hashchangeLoader,200);return true},hashchangeLoader:function(){var C=A.History;if(!(A.browser.msie&&parseInt(A.browser.version)>=8)){var B;if(A.browser.msie){C.$iframe=A('<iframe id="jquery-history-iframe" style="display: none;"></$iframe>').prependTo(document.body)[0];try{C.$iframe.contentWindow.document.open();C.$iframe.contentWindow.document.close()}catch(E){}var D=C.getHash();if(D){C.$iframe.contentWindow.document.location.hash=D}B=function(){var F=C.format(C.$iframe.contentWindow.document.location.hash);if(C.getState()!==F){C.setHash(C.$iframe.contentWindow.document.location.hash)}var G=C.getHash();if(C.getState()!==G){C.go(G)}}}else{B=function(){var F=C.getHash();if(C.getState()!==F){C.go(F)}}}setInterval(B,200)}else{var D=C.getHash();if(D){C.$window.trigger("hashchange")}}return true}};A.History.construct()})(jQuery);(function(B){B.fn.__bind__=B.fn.bind;B.fn.__unbind__=B.fn.unbind;B.fn.__find__=B.fn.find;var A={version:"0.7.8",override:/keydown|keypress|keyup/g,triggersMap:{},specialKeys:{27:"esc",9:"tab",32:"space",13:"return",8:"backspace",145:"scroll",20:"capslock",144:"numlock",19:"pause",45:"insert",36:"home",46:"del",35:"end",33:"pageup",34:"pagedown",37:"left",38:"up",39:"right",40:"down",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"},newTrigger:function(E,D,F){var C={};C[E]={};C[E][D]={cb:F,disableInInput:false};return C}};if(B.browser.mozilla){A.specialKeys=B.extend(A.specialKeys,{96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"})}B.fn.find=function(C){this.query=C;return B.fn.__find__.apply(this,arguments)};B.fn.unbind=function(H,E,G){if(B.isFunction(E)){G=E;E=null}if(E&&typeof E==="string"){var F=((this.prevObject&&this.prevObject.query)||(this[0].id&&this[0].id)||this[0]).toString();var D=H.split(" ");for(var C=0;C<D.length;C++){delete A.triggersMap[F][D[C]][E]}}return this.__unbind__(H,G)};B.fn.bind=function(J,F,K){var H=J.match(A.override);if(B.isFunction(F)||!H){return this.__bind__(J,F,K)}else{var N=null,I=B.trim(J.replace(A.override,""));if(I){N=this.__bind__(I,F,K)}if(typeof F==="string"){F={"combi":F}}if(F.combi){for(var M=0;M<H.length;M++){var D=H[M];var G=F.combi.toLowerCase(),E=A.newTrigger(D,G,K),L=((this.prevObject&&this.prevObject.query)||(this[0].id&&this[0].id)||this[0]).toString();E[D][G].disableInInput=F.disableInInput;if(!A.triggersMap[L]){A.triggersMap[L]=E}else{if(!A.triggersMap[L][D]){A.triggersMap[L][D]=E[D]}}var C=A.triggersMap[L][D][G];if(!C){A.triggersMap[L][D][G]=[E[D][G]]}else{if(C.constructor!==Array){A.triggersMap[L][D][G]=[C]}else{A.triggersMap[L][D][G][C.length]=E[D][G]}}this.each(function(){var O=B(this);if(O.attr("hkId")&&O.attr("hkId")!==L){L=O.attr("hkId")+";"+L}O.attr("hkId",L)});N=this.__bind__(H.join(" "),F,A.handler)}}return N}};A.findElement=function(C){if(!B(C).attr("hkId")){if(B.browser.opera||B.browser.safari){while(!B(C).attr("hkId")&&C.parentNode){C=C.parentNode}}}return C};A.handler=function(E){var O=A.findElement(E.currentTarget),I=B(O),D=I.attr("hkId");if(D){D=D.split(";");var G=E.which,Q=E.type,P=A.specialKeys[G],N=!P&&String.fromCharCode(G).toLowerCase(),H=E.shiftKey,C=E.ctrlKey,M=E.altKey||E.originalEvent.altKey,F=null;for(var R=0;R<D.length;R++){if(A.triggersMap[D[R]][Q]){F=A.triggersMap[D[R]][Q];break}}if(F){var J;if(!H&&!C&&!M){J=F[P]||(N&&F[N])}else{var L="";if(M){L+="alt+"}if(C){L+="ctrl+"}if(H){L+="shift+"}J=F[L+P];if(!J){if(N){J=F[L+N]||F[L+A.shiftNums[N]]||(L==="shift+"&&F[A.shiftNums[N]])}}}if(J){var S=false;for(var R=0;R<J.length;R++){if(J[R].disableInInput){var K=B(E.target);if(I.is("input")||I.is("textarea")||K.is("input")||K.is("textarea")){return true}}S=S||J[R].cb.apply(this,[E])}return S}}}};window.hotkeys=A;return B})(jQuery);var rocon=(function(){var Ar=/\.rc(\d+)\b/,Af=/\brc(\d+)\b/,AP=/\brc-shape\b/,AY="rocon__",Az="rocon",AF=[],Am={update:function(){},bindProperties:function(){var A=1;return function(D,B,C){AF.push({"id":A++,"rule":D,"bg":Ad(Ax(B),function(E){if(E.charAt(0)!="#"){E="#"+E}return AM(E)}),"border_width":C||0})}}(),process:function(A){Ai(A)}},Ak=null,Al={},AS=[],Ap=[],AN=false,A5=false,AQ=navigator.userAgent.toLowerCase(),A1={},A2={version:(AQ.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(AQ),opera:/opera/.test(AQ),msie:/msie/.test(AQ)&&!/opera/.test(AQ),mozilla:/mozilla/.test(AQ)&&!/(compatible|webkit)/.test(AQ)};function Aa(){if(!AN){AN=true;if(Ap.length){for(var A=0;A<Ap.length;A++){Ap[A].call(document)}Ap=null}}}function Ab(A){Ap.push(A)}function AL(){if(A5){return }A5=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);Aa()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);Aa()}});if(document.documentElement.doScroll&&!window.frameElement){(function(){if(AN){return }try{document.documentElement.doScroll("left")}catch(A){setTimeout(arguments.callee,0);return }Aa()})()}}}}function AO(A,D,F){if(F){for(var E=0,B=A.length;E<B;E++){if(D.call(A[E],E)===false){break}}}else{for(var E=A.length-1,C;E>=0;E--){if(D.call(A[E],E)===false){break}}}}function Ad(D,C){var B=[];for(var A=0,F=D.length;A<F;A++){var E=C(D[A],A);if(E!=null){B[B.length]=E}}return B.concat.apply([],B)}function AB(){return }function AM(B){var C;function A(F){var E=parseInt(F,10).toString(16);return(E.length==1)?E+E:E}function D(E){return A(Math.round(E*2.55))}if(C=/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/.exec(B)){return"#"+A(C[1])+A(C[2])+A(C[3])}if(C=/rgb\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*\)/.exec(B)){return"#"+D(C[1])+D(C[2])+D(C[3])}if(C=/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/i.exec(B)){return"#"+C[1]+C[2]+C[3]}if(C=/#([a-f0-9])([a-f0-9])([a-f0-9])/i.exec(B)){return"#"+C[1]+C[1]+C[2]+C[2]+C[3]+C[3]}A=null;D=null;return B}function AR(C,A){var B=document.createElement(C);if(A){B.className=A}return B}function AJ(B,A){var C=new RegExp("\\b"+A+"\\b");return B.nodeType==1&&C.test(B.className||"")}function AK(D,B){var E,C={},A=function(F,G){return G.toUpperCase()};AO(B instanceof Array?B:[B],function(){var F=this,G=F.replace(/\-(\w)/g,A);if(D.style[G]){C[G]=D.style[G]}else{if(A2.msie){C[G]=D.currentStyle[G]}else{if(document.defaultView&&document.defaultView.getComputedStyle){if(!E){E=document.defaultView.getComputedStyle(D,"")}C[G]=E&&E.getPropertyValue(F)}}}});return B instanceof Array?C:C[B.replace(/\-(\w)/g,A)]}function Ax(A){var B=(A||"").split("_");switch(B.length){case 1:return[B[0],B[0],B[0],B[0]];case 2:return[B[0],B[1],B[0],B[1]];case 3:return[B[0],B[1],B[2],B[1]];case 4:return B}return null}var Ay=(function(){var B=[],A="#ffffff";function D(F){var E;do{if(F.nodeType!=1){break}if(F.rocon_bg){return F.rocon_bg}else{B.push(F);E=AK(F,"background-color");if(E!="transparent"){return AM(E)}}}while(F=F.parentNode);return A}function C(F){var E;do{if(F.nodeType!=1){break}E=AK(F,"background-color");if(E!="transparent"){return AM(E)}}while(F=F.parentNode);return A}return function(E,F){var I=E.className,G=null;var J=/\brcbg([a-f0-9_]+)\b/i.exec(I);if(J){G=Ad(Ax(J[1]),function(K){return AM("#"+K)});return G}var H=AT(E);if(H){return H.bg}if(!F){E=E.parentNode}if(Ay.use_cache){B=[];G=D(E);AO(B,function(){this.rocon_bg=G;Ay.processed_elems.push(this)});B=null}else{G=C(E)}return Ax(G)}})();Ay.use_cache=true;Ay.processed_elems=[];function AT(A){var B=A.className,C=null;AO(AF,function(){if((typeof (this.rule)=="string"&&B.indexOf(this.rule)!=-1)||B.search(this.rule)!=-1){C=this;return false}},true);return C}function Av(B,A){Ak.insertRule(B+" {"+A+"}",Ak.cssRules.length)}function AZ(A){var B;AO(document.styleSheets,function(){AO(this.cssRules||this.rules,function(){if(B=Ar.exec(this.selectorText)){A(this,parseInt(B[1],10))}})})}function AX(A,B){var C=(A.className||"").replace(new RegExp("\\s*"+Az+"[-_].+?\\b","ig"),"");if(B){C+=" "+B}A.className=C;return A}function As(A,B){AS.push(A.selectorText.substr(1))}function AV(){if(!Ak){if(document.createStyleSheet){Ak=document.createStyleSheet()}else{var A=AR("style");A.rel="rocon";document.getElementsByTagName("head")[0].appendChild(A);AO(document.styleSheets,function(){if(this.ownerNode.rel=="rocon"){Ak=this;return false}})}}return Ak}function A3(A){var B=[],C;AO((A||document).getElementsByTagName("*"),function(){if(C=Af.exec(this.className||"")){B.push({node:this,radius:parseInt(C[1],10)})}});return B}function Ai(A){var B=A3(A);if(B.length){AV();AO(B,function(){AB(this.node,this.radius)})}}function Aq(A){return A1[A]?true:false}function AG(C,B){var A=C.className||"";B=B||parseInt(A.match(Af)[1],10);var F=AP.test(A),E=AT(C);var D="";var G=E?E.border_width:(parseInt(AK(C,"border-left-width"))||0);if(G){D=AM(AK(C,"border-left-color")||"#000")}return{"radius":B,"bg_color":Ay(C,F),"border_width":(G>B)?B:G,"real_border_width":G,"border_color":D,"use_shape":F}}function AW(B,A){AO(B,function(){AO((this instanceof Array)?this:[this],A)})}function Au(A){var C={};for(var B in A){if(A.hasOwnProperty(B)){C[B]=A[B]}}return C}function AH(J,I,A){var H=AK(J,["padding-top","padding-bottom","margin-top","margin-bottom"]);function G(K){return parseInt(H[K],10)||0}var F=Math.max(G("paddingTop")-A.radius+A.border_width,0),B=Math.max(G("paddingBottom")-A.radius+A.border_width,0),E=G("marginTop")+A.radius,C=G("marginBottom")+A.radius,D=A.real_border_width-A.border_width;Av("."+I,"border-top-width:"+D+"px;border-bottom-width:"+D+"px;padding-top:"+F+"px;padding-bottom:"+B+"px;margin-top:"+E+"px;margin-bottom:"+C+"px")}Ab(Ai);Ab(function(){AO(Ay.processed_elems,function(){this.removeAttribute("rocon_bg")});Ay.use_cache=false});AL();if(A2.safari){AB=function(A,B){var C=".rc"+B;if(!Aq(C)){Av(C,"-webkit-border-radius:"+B+"px; -khtml-border-radius:"+B);A1[C]=true}};Am.update=function(){AW(arguments,function(){var A=Af.exec(this.className||"");if(A){AB(this,parseInt(A[1]))}})}}if(A2.mozilla){AB=function(A,B){var C=".rc"+B;if(!Aq(C)){Av(C,"-moz-border-radius:"+B+"px");A1[C]=true}};Am.update=function(){AW(arguments,function(){var A=Af.exec(this.className||"");if(A){AB(this,parseInt(A[1]))}})}}if(A2.opera){AV();Av("."+Az,"position:absolute;background-repeat:no-repeat;z-index:1;display:none");Av("."+Az+"-init","position:relative;");Av("."+Az+"-init>."+Az,"display:inline-block;");Av("."+Az+"-tl","top:0;left:0;background-position:100% 100%;");Av("."+Az+"-tr","top:0;right:0;background-position:0 100%;");Av("."+Az+"-bl","bottom:0;left:0;background-position:100% 0;");Av("."+Az+"-br","bottom:0;right:0;");var Aj=AR("canvas");function AU(A){A.border_width=(A.border_width>A.radius)?A.radius:A.border_width;if(A.border_width>1){A.radius-=A.border_width/2}var D=A.radius*2+A.border_width,C=D;if(A.use_shape){D=2000;if(A.border_width<A.real_border_width){C+=(A.real_border_width-A.border_width)*2}}if(A.border_width==1){D--;C--}Aj.width=A.width=D;Aj.height=A.height=C;var B=Aj.getContext("2d");B.strokeStyle=A.border_color;B.lineWidth=A.border_width;B.lineJoin="miter";B.lineCap="square";B.fillStyle=A.bg_color[0];B.clearRect(0,0,D,C);return B}function AD(C,A){var E=Math.PI/2,B=(A.border_width>1)?A.border_width:0,D=A.radius*2+B;C.beginPath();C.arc(0,0,A.radius,E,0,true);C.stroke();C.beginPath();C.arc(D,0,A.radius,E*2,E,true);C.stroke();C.beginPath();C.arc(D,D,A.radius,-E,E*2,true);C.stroke();C.beginPath();C.arc(0,D,A.radius,0,-E,true);C.stroke()}function Aw(A){A=Au(A);var B=AU(A),I=Math.PI/2,G=Math.PI*2,E=A.border_width,D=(E>1)?E:0,H=A.radius*2+D,C=0,J=(A.border_width<A.real_border_width);var F=function(L,K){B.beginPath();B.arc(L,K,A.radius,0,G,true);B.closePath();B.fill()};if(J){C=A.real_border_width-A.border_width;B.save();B.translate(0,C)}F(0,0);F(H,0);F(H,H);F(0,H);B.fillRect(H,0,A.width,A.height);if(E){AD(B,A);B.fillStyle=B.strokeStyle;B.fillRect(H,A.radius-(E>1?E/2:E),A.width,E*2);if(J){B.restore();B.fillStyle=A.border_color;B.fillRect(0,0,A.width,C);B.fillRect(0,A.height-C,A.width,C);B.fillStyle=A.bg_color}}return B.canvas.toDataURL()}function An(H){var C=H;H=Au(H);var B=AU(H),F=H.radius,A=(H.border_width>1)?H.border_width:0,D=F*2+A,E=C.radius,G=Math.PI/2;B.save();B.beginPath();B.arc(0,0,F,G,0,true);B.arc(D,0,F,G*2,G,true);B.arc(D,D,F,-G,G*2,true);B.arc(0,D,F,0,-G,true);B.closePath();B.clip();B.fillStyle=H.bg_color[2];B.fillRect(0,0,E,E);B.fillStyle=H.bg_color[3];B.fillRect(E,0,E,E);B.fillStyle=H.bg_color[0];B.fillRect(E,E,E,E);B.fillStyle=H.bg_color[1];B.fillRect(0,E,E,E);B.restore();if(H.border_width){AD(B,H)}return B.canvas.toDataURL()}function A4(C,A){var B=AT(A);return[C.radius,C.bg_color.join("-"),C.real_border_width,C.border_color,C.use_shape,B?B.id:0].join(":")}function AI(F,G){var D=A4(F,G),C=F.radius,B=F.real_border_width||0,A=(F.use_shape)?B-F.border_width:0;if(!Al[D]){var H=AY+Ak.cssRules.length;Al[D]=H;Av("."+H+">."+Az,'background-image: url("'+(F.use_shape?Aw(F):An(F))+'");width: '+C+"px;height: "+(C+A)+"px;");var E=-B,I=-B;if(F.use_shape){I=-C-A;AH(G,H,F);Av("."+H+">."+Az+"-tl, ."+H+">."+Az+"-bl","width:auto;left:0;right:"+(C-B)+"px;background-position:-"+C+"px 100%;");Av("."+H+">."+Az+"-bl","background-position:-"+C+"px 0;")}if(E||I){Av("."+H+">."+Az+"-tl","top:"+I+"px; left:"+E+"px");Av("."+H+">."+Az+"-tr","top:"+I+"px; right:"+E+"px");Av("."+H+">."+Az+"-bl","bottom:"+I+"px; left:"+E+"px");Av("."+H+">."+Az+"-br","bottom:"+I+"px; right:"+E+"px")}}return Al[D]}AB=function(D,C){if(!D.className){return }var B=false;AO(D.childNodes,function(){if(AJ(this,Az)){B=true;return false}});var A=AI(AG(D,C),D);if(!B){AO(["tl","tr","bl","br"],function(){D.appendChild(AR("span",Az+" "+Az+"-"+this))})}AX(D,A+" "+Az+"-init")};Ab(function(){document.documentElement.style.outline="none"});Am.update=function(){AW(arguments,function(){AB(AX(this))})}}if(A2.msie){Al.ix=0;Al.created={};var Ae="",At={tl:0,tr:1,br:2,bl:3};var Ao="vml-"+Az;try{if(!document.namespaces["v"]){document.namespaces.add("v","urn:schemas-microsoft-com:vml")}}catch(Ag){}AV();var AA="."+Az;Ak.cssText="."+Ao+" {behavior:url(#default#VML);display:inline-block;position:absolute}"+AA+"-init {position:relative;zoom:1;}"+AA+" {position:absolute; display:inline-block; zoom: 1; overflow:hidden}"+AA+"-tl ."+Ao+"{flip: 'y'}"+AA+"-tr ."+Ao+"{rotation: 180;right:1px;}"+AA+"-br ."+Ao+"{flip: 'x'; right:1px;}";if(A2.version<7){Ak.cssText+=AA+"-tr, "+AA+"-br {margin-left: 100%;}"}Av=function(B,A){Ae+=B+"{"+A+"}"};function AC(A){var K=A.radius,I=A.border_width,N=K+":"+I+":"+A.use_shape;if(!AC._cache[N]){var E=10;var M=AR("v:shape");M.className=Ao;M.strokeweight=I+"px";M.stroked=(I)?true:false;var D=AR("v:stroke");D.className=Ao;D.joinstyle="miter";M.appendChild(D);var G=K,L=G;M.style.width=G+"px";M.style.height=L+"px";K-=I/2;K*=E;var J=I/2*E;var H=Math.round((K+J)/G);var F=K+J;M.coordorigin=Math.round(H/2)+" "+Math.round(H/2);M.coordsize=F+" "+F;var B="";var C=F+H;if(A.use_shape){C=2000*E;B="m"+C+",0 ns l"+J+",0  qy"+F+","+K+" l"+C+","+K+" e "}else{B="m0,0 ns l"+J+",0  qy"+F+","+K+" l"+F+","+F+" l0,"+F+" e "}B+="m"+J+","+(-H)+" nf l"+J+",0 qy"+F+","+K+" l "+(C)+","+K+" e x";M.path=B;AC._cache[N]=M}return AC._cache[N].cloneNode(true)}AC._cache={};function Ah(B,A){var C=AC(B);C.fillcolor=B.bg_color[At[A]]||"#000";C.strokecolor=B.border_color||"#000";var D=AR("span",Az+" "+Az+"-"+A);D.appendChild(C);return D}function AE(A){AO(A.childNodes,function(){if(AJ(this,Az)){A.removeChild(this)}});AX(A)}function Ac(B){var A=B.radius+":"+(B.real_border_width||0)+":"+B.use_shape;if(!Al[A]){Al[A]=AY+Al.ix++}return Al[A]}function A0(A,M){var F=A.radius,E=A.real_border_width||0,D=(A.use_shape)?A.real_border_width-A.border_width:0;var K=Ac(A);if(!Al.created[K]){var H=(A2.version<7)?"."+K+" ."+Az:"."+K+">."+Az;var L=-E,J=-1-E;Av(H,"width:"+(F+E+1)+"px;height:"+(F+1)+"px");if(A.use_shape){J=-F-1-D;var C=F+A.border_width*2+D;AH(M,K,A);var G=Math.max(F-E*2,0),B=Math.min(F-E*2,0)*-1;if(A2.version<7){B+=parseInt(AK(M,"padding-left")||0)+parseInt(AK(M,"padding-right")||0)}var I="width:100%;clip:rect(auto auto auto "+G+"px);padding-right:"+B+"px;left:"+(-E-G)+"px;";Av(H+"-tl",I+"top:"+J+"px;");Av(H+"-tl ."+Ao,"left:"+G+"px");Av(H+"-bl",I+"bottom:"+J+"px;");Av(H+"-bl ."+Ao,"left:"+G+"px")}else{Av(H+"-tl","left:"+L+"px;top:"+J+"px;");Av(H+"-bl","left:"+L+"px;bottom:"+J+"px;")}if(A2.version<7){L=-F+(E?F%2-E%2:-F%2);Av(H+"-tr","left:"+L+"px;top:"+J+"px;");Av(H+"-br","left:"+L+"px;bottom:"+J+"px;")}else{Av(H+"-tr","right:"+L+"px;top:"+J+"px;");Av(H+"-br","right:"+L+"px;bottom:"+J+"px;")}Al.created[K]=true}}AB=function(A,C){var B=AG(A,C);A0(B,A);AO(["tl","tr","bl","br"],function(){A.appendChild(Ah(B,this))});A.className+=" "+Ac(B)+" "+Az+"-init"};Am.update=function(){AW(arguments,function(){AE(this);AB(this)})};Ab(function(){Ak.cssText+=Ae;Ae="";Av=Ak.addRule})}return Am})();$(function(){$("#menu li").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")})});(function(A){A.widget("ui.autocomplete",{_init:function(){var C=this.element,D=this.options,B=this;C.addClass("ui-autocomplete-input").bind("blur",function(){if(!A(".ui-autocomplete-active","#ui_autocomplete_container").length){A("#ui_autocomplete_container").remove()}}).keyup(function(E){B._onKeyPress(E,C,D)}).attr("autocomplete","off");C.bind("keydown","up",function(E){B._upArrowPress(E)}).bind("keydown","down",function(E){B._downArrowPress(E)}).bind("keydown","return",function(E){if(A(".ui-autocomplete-container").length){E.stopPropagation();E.stopImmediatePropagation();if(A(".ui-autocomplete-active").find("a").length==0){B._selectActive(C,D,A("#ui_autocomplete_container a").first())}else{B._selectActive(C,D,A(".ui-autocomplete-active a","#ui_autocomplete_container"))}}})},_markActive:function(C,B){A(".ui-autocomplete-active",C).removeClass("ui-autocomplete-active");B.addClass("ui-autocomplete-active")},_selectActive:function(C,B,D){var E=D.html();if(typeof (B.select)=="function"){E=B.select.call(C,D)}if(D.length){this._setValue(C,B,E)}A("#ui_autocomplete_container").remove();if(typeof (B.user_complete)=="function"){B.user_complete.call(C)}},_onArrowKeyPress:function(E){var B=A("#ui_autocomplete_container");var C=this;if(!B.length){return }var F=false;var D=B.find("li");D.each(function(G,I){I=A(I);if(F){return }if(I.hasClass("ui-autocomplete-active")){var H=(E=="down")?((G<D.length-1)?G+1:0):((G>0)?G-1:D.length-1);C._markActive(B,D.eq(H));F=true}});if(!F){C._markActive(B,D.eq(0))}},_upArrowPress:function(B){this._onArrowKeyPress("up")},_downArrowPress:function(B){this._onArrowKeyPress("down")},_onKeyPress:function(C,D,F){window.clearTimeout(this.interval);var B=this;if(typeof (F.keypress)=="function"){F.keypress.call(D,C)}var E=F.parser(D.val());if(E&&this.val!=E){this.val=E;this.interval=window.setTimeout(function(){B._loadVariants(D,F,function(G){if(G.length==1&&E==G[0]){return }var H=F.visualize.call(D,G);B._constructVisualize(D,F,H)})},F.timeout)}},_setValue:function(D,C,F){var B=D.val();replace_val=C.parser(B);var E=new RegExp(replace_val+"$","g");B=B.replace(E,F+(C.multiple?", ":""));D.val(B)},_constructVisualize:function(G,F,I){var E=this;A("#ui_autocomplete_container").remove();if(!I.children().length){return }var D=A("<div />");D.append(I).appendTo(G.parent());D.addClass("ui-autocomplete-container").attr("id","ui_autocomplete_container");D.css("left",G.position().left);var H=G.position().top+18;D.css("top",H);var B=I.find("li");B.bind("mouseover",function(J){E._markActive(I,A(this))});var C=I.find("a");C.bind("click",function(J){E._selectActive(G,F,A(this))});A(document).bind("keydown","esc",function(){D.remove()})},_loadVariants:function(B,C,D){C.getter.call(B,C.parser(B.val()),D)},disable:function(){this.element.addClass("ui-autocomplete-disabled")},enable:function(){this.element.removeClass("ui-autocomplete-disabled")}});A.extend(A.ui.autocomplete,{defaults:{getter:function(B,C){A.ajax({url:"/ajax",type:"GET",params:{q:B},success:C})},select:function(B){return B},parser:function(B){return B.toString()},keypress:null,timeout:350,visualize:function(B){return A(B)},multiple:true,user_complete:function(){}},getter:""})})(jQuery);function places_search_form(A){$(function(){$("#name").smart_input($.extend(_def_style,{label:A}));$("#placessearch a").click(function(B){B.preventDefault();B.stopPropagation();if($("#name").val()){$("#error_empty_name").hide();$("#placessearch input[name=]").remove();$("#placessearch").submit()}else{if($("#error_no_places").length==0){$("#error_empty_name").show()}}});$("#placessearch input").keydown(function(B){$("#error_empty_name").hide();if(B.keyCode=="13"&&$("#name").val()){$("#placessearch input[name=]").remove();$("#placessearch").submit()}else{if(B.keyCode=="13"&&$("#error_no_places").length==0){$("#error_empty_name").show()}}})})}try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}var current,_init=false,_stop=function(A){A.preventDefault();A.stopPropagation()},_black_color="#000000",_grey_color="#999999",_lightgrey_color="#b9b9b9",_def_style={filledCss:{color:_black_color},emptyCss:{color:_grey_color}},_light_def_style={filledCss:{color:_black_color},emptyCss:{color:_lightgrey_color}},_monthLabels=["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"],_monthLabelsShort=["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек"],_monthLabelsShortRp=["янв.","февр.","марта","апр.","мая","июня","июля","авг.","сент.","окт.","нояб.","дек."];$.fn.hideOnClckOutside=function(A){var E=$(this),B=function(F){_stop(F)},D=function(){E.hide()},C=function(){E.show()};A.click(function(F){B(F);E.filter(":hidden").length?C():D()});$(document).click(D);return E.click(B)};function _getNumerableStringRu(C,B,A,D){if(C<10||C>20){if((C%10)==1){return B}else{if((C%10)>=2&&(C%10)<=4){return A}else{return D}}}else{return D}}function countrysearch_002(A,B){$(function(){$("#country_filter").smart_input({label:B["input_label"],filledCss:{color:_black_color},emptyCss:{color:"#666666"}});$("#country_filter").simple_autocomplete({data:A,onFound:function(){$("#search_error").hide()},onSearch:function(){$("#search_error").hide()},onNotFound:function(){$("#search_error").show()},onConfirm:function(){var C=$("#ui_autocomplete_container .ui-autocomplete-active a").eq(0).attr("href");if(C){window.location.href=C}},onOpen:function(){$("#country_sort, #countries").fadeTo(0,0.5)},onClose:function(){$("#country_sort, #countries").fadeTo(0,1)},min_len:1});$("#country_filter_execute").click(function(C){if($("#country_filter").val().length){$("#country_filter").simple_autocomplete("search",$("#country_filter").val())}$("#country_filter").focus();C.stopPropagation();C.preventDefault()})})}function countrysearch_001(B){var A=["popularity","down"];var C=function(F,H){var G=$("#countries");var D;var E=B[F][H];$.each(E,function(){var J=$("#country_"+this);J.removeClass("last");if(F=="name"){var I=$.trim(J.text()).substr(0,1);if(D&&D!=I){J.addClass("last")}D=I}$(G).prepend(J)})};$("#country_sort a").click(function(D){var E=A;if(A[0]==$(this).attr("order")){if(A[1]=="down"){E[1]="up"}else{E[1]="down"}}else{E[0]=$(this).attr("order");E[1]="down";$("#country_sort a").attr("class","")}$(this).attr("class",E[1]);C(E[0],E[1]);A=E})}function init_form_mini(){$(function(){var C=$("#tour_search_mini").formMini(),A=new Date(),B=A.getFullYear()+"-"+(A.getMonth()+1)+"-"+A.getDate();_max_date=new Date();_max_date.setFullYear(_max_date.getFullYear()+1);_max_date_label=_max_date.getFullYear()+"-"+(_max_date.getMonth()+1)+"-"+_max_date.getDate();_widgetCity=$("#link-drop-from").formWidgetCollapsable(),_widgetRoSi=$("#link-drop-room-size-ext").formWidgetCollapsable(),_widgetCo=$("#link-drop-to").formWidgetCollapsable(),_widgetLenBegin=$("#link-drop-len-from").formWidgetCollapsable();_widgetAlCa=$("#link-drop-class").formWidgetCollapsable();_widgetAlCaB=$("#link-drop-class-better").formWidgetHidden();_widgetDaF=$("#link-drop-departure-from").formWidgetCalendar({todayDate:A,minDateLabel:A,maxDateLabel:_max_date_label,intermediateClass:"",activeDateClass:"selected_dates",disabledClass:"none"}),_widgetRe=$("#link-drop-region-mini").formWidgetCollapsable(),_widgetCoMini=$("#link-drop-to-mini").formWidgetHidden();C.formMini("addWidget","city",_widgetCity.formWidgetCollapsable("asPublisher"));C.formMini("addWidget","RoSi",_widgetRoSi.formWidgetCollapsable("asPublisher"));C.formMini("addWidget","len_begin",_widgetLenBegin.formWidgetCollapsable("asPublisher"));C.formMini("addWidget","AlCa",_widgetAlCa.formWidgetCollapsable("asPublisher"));C.formMini("addWidget","AlCaB",_widgetAlCaB.formWidgetHidden("asPublisher"));C.formMini("addWidget","DaF",_widgetDaF.formWidgetCalendar("asPublisher"));if(_widgetCoMini.length){C.formMini("addWidget","Re",_widgetRe.formWidgetCollapsable("asPublisher"));C.formMini("addWidget","Co",_widgetCoMini.formWidgetHidden("asPublisher"))}else{C.formMini("addWidget","Co",_widgetCo.formWidgetCollapsable("asPublisher"))}$("#tour_search_mini_submit").click(function(D){_stop(D);C.formMini("submit")})})}function tourstanok_tour_details(){$(function(){$("#select-city-dropdown").formWidgetCollapsable({getValue:function(D){return{phone:D.attr("phone"),city:D.attr("city")}}});var C=new subscriber({}),B=$("#tour_info_block"),A=B.children("div");C.addSubscribeHandler($("#select-city-dropdown").formWidgetCollapsable("asPublisher"),"valueChange",function(D,F){$("#phone-number-span").html(F.phone);var E=$("#tourstanok_offices").children("div").hide().filter('[city="'+F.city+'"]').show();$("#address_to_buy_block").children("div").html(E.html())});$("#address_to_buy").click(function(D){_stop(D);var E=$("#address_to_buy_block",B);E.children("div").html($("#tourstanok_offices").children("div:visible").html());if(A.filter("div:visible").length){A.hide();E.show()}else{A.hide();E.slideDown(500)}});$("#what_are_you_talking_about").click(function(D){_stop(D);if(A.filter("div:visible").length){A.hide();$("#what_are_you_talking_about_block",B).show()}else{A.hide();$("#what_are_you_talking_about_block",B).slideDown(500)}});$("#how_to_order_tour").click(function(D){_stop(D);if(A.filter("div:visible").length){A.hide();$("#how_to_order_tour_block",B).show()}else{A.hide();$("#how_to_order_tour_block",B).slideDown(500)}})})}function region_info_001(){$('a[rel="region_photo"]').lightBox({fixedNavigation:true,imageLoading:"/images/lightbox-ico-loading.gif",imageBtnPrev:"/images/lightbox-btn-prev.gif",imageBtnNext:"/images/lightbox-btn-next.gif",imageBtnClose:"/images/lightbox-btn-close.gif",imageBlank:"/images/lightbox-blank.gif",txtImage:"Фото",txtOf:"из"})}function country_info_001(){$(document).ready(function(){$("#info_navigation a").each(function(){if($(this).attr("href").search("#")){$(this).attr("href",$(this).attr("href").replace("#","#j"))}})});$.History.bind(function(A){$("#info_content h2 span").removeClass("active");if(A){$.scrollTo($("#"+A.slice(1)),{offset:-100,duration:800});$("#"+A.slice(1)+" span").addClass("active");$("#info_navigation a").removeClass("active");$("#info_navigation a[href="+window.location.href+"]").addClass("active")}})}function country_currency_001(E){var D=$("#currency_selector"),C=E,B="left";function F(G){if(G!=undefined){B=G}if(B=="left"&&$("#left_currency").val()==parseFloat($("#left_currency").val())){$("#right_currency").val(parseFloat(($("#left_currency").val())/C).toFixed(2))}else{if(B=="right"&&$("#right_currency").val()==parseFloat($("#right_currency").val())){$("#left_currency").val(parseFloat(($("#right_currency").val())*C).toFixed(2))}}}function A(H){var G;if(H.charCode!=undefined){G=H.charCode}else{G=H.keyCode}var I=((G>=48&&G<=57)||G==46||G==0||(G>=37&&G<=40)||G==8||G==46||G==9);return I}$("#left_currency").keypress(function(G){if(!A(G)){return false}});$("#right_currency").keypress(function(G){if(!A(G)){return false}});$("#left_currency").keyup(function(G){this.value=this.value.replace(/[^0-9\.]/g,"");F("left")});$("#right_currency").keyup(function(G){this.value=this.value.replace(/[^0-9\.]/g,"");F("right")});D.find("a.selected").click(function(G){D.toggleClass("active");G.stopPropagation()});D.find("ul").click(function(G){var H=$(G.target).closest("li");if(H.length){D.find("a strong").html(H.closest("li").html());C=H.closest("li").attr("rate");F()}});$(document).click(function(G){D.removeClass("active")})}function title_user_reviews_001(B){var A=$("#review_country_selector");A.find("a.selected").click(function(C){A.toggleClass("active");C.stopPropagation()});A.find("ul").click(function(C){var D=$(C.target).closest("li");if(D.length){A.find("a strong").html(D.closest("li").html());A.attr("country_id",D.closest("li").attr("country_id"));$("#add_country_review").attr("href",B+"&country="+A.attr("country_id"))}});$(document).click(function(C){A.removeClass("active")})}function country_review_001(A){$(function(){$(".country_reviews a.add,#add_review_text").authBind("click",function(B){_stop(B);window.location.href=A},"Чтобы добавить отзыв,<br> войдите на сайт.")})}function country_weather_001(){$(function(){var A=$(".whaters .select");A.click(function(B){_stop(B);var C=$(this);if(C.hasClass("active")){C.removeClass("active")}else{A.removeClass("active");$(this).addClass("active")}});$("li",A).click(function(B){$(this).find("a").click()});$(document).click(function(B){if(!$(B.target).closest(".whaters .select").length){A.removeClass("active")}});$("a",A).click(function(B){window.location.href=$(this).attr("href")})})}function winopen(A,B){window.open(A,"small_window","height=350,width=500,scrollbars=yes")}function reviews_success_001(){$(function(){$(".popup_bouncer").mouseenter(function(){$(".pop").hide();$("#pop_review_"+$(this).attr("id")).show()});$(".pop").mouseleave(function(){$(this).hide()})})}function activeCommentForm(E,C,B,A,D){$(function(){activeCommentFormDatePicker(A,B);var F=$("#when_selector");F.find("a.selected").click(function(G){_stop(G);F.toggleClass("active");$("#bad_date").fadeOut()}).end().click(function(G){G.preventDefault();G.stopPropagation()});$(document).click(function(){F.removeClass("active")});$("#comment_title").smart_input($.extend(_def_style,{label:C}));$("#comment_title").focus(function(){$("#bad_subject").fadeOut()});$("#comment_text").smart_input($.extend(_def_style,{label:D}));$("#comment_text").focus(function(){$("#bad_text").fadeOut()});$("#active_comment_form .add_rait").find("a").click(function(G){_stop(G);var I=$(this).attr("class"),H=I.replace("r","");$("#bad_mark").fadeOut();$("#comment_mark").attr("value",H);$("#active_comment_form i.give_rating").attr("class","give_rating select"+H)});$("#active_comment_form .add_rait").find("a").hover(function(){var H=$(this).attr("class");var G=H.replace("r","");$("#active_comment_form i.give_rating").attr("class","give_rating select"+G)},function(){var G=$("#comment_mark").attr("value");if(G){$("#active_comment_form i.give_rating").attr("class","give_rating select"+G)}else{$("#active_comment_form i.give_rating").attr("class","give_rating")}});$("#comment_submit").click(function(G){G.preventDefault();G.stopPropagation();if(!$("#tour_year").val()||!$("#tour_month").val()){$("#bad_date").fadeIn();return false}if(!$("#comment_mark").val()){$("#bad_mark").fadeIn();return false}if(!$("#comment_title").attr("value")){$("#bad_subject").fadeIn();return false}if(!$("#comment_text").val()){$("#bad_text").fadeIn();return false}$("#active_comment_form").sleep();$.ajax({data:{commentable_model:$("#active_comment_form").attr("commentable_model"),commentable_id:$("#active_comment_form").attr("commentable_id"),mark:$("#comment_mark").val(),text:$("#comment_text").val(),title:$("#comment_title").val(),tour_month:$("#tour_month").val(),tour_year:$("#tour_year").val()},url:E,cache:false,type:"POST",success:function(I){var H=$("<div>");$("#active_comments").prepend($(H));$(H).hide();$(H).append(I);$(H).slideDown(function(){$.scrollTo($("#active_comments"),"normal")});$("#comment_title").val("");$("#comment_text").val("");$("#comment_mark").val("");$("#tour_month").val("");$("#tour_year").attr("value","");$("#active_comment_form i.give_rating").attr("class","give_rating");$("#when_selector a.selected strong").html(B);$("#active_comment_form").slideUp();$("#add_post").slideDown()},complete:function(){$("#active_comment_form").wakeup()},error:function(){alert("Извините, произошла ошибка, попробуйте позже.")}})})})}function activeCommentFormLoged_01(){$(function(){$("#add_post").find("a").add($("#top_add_post")).click(function(A){_stop(A);$("#add_post").slideUp();$("#active_comment_form").slideDown()})})}function activeCommentFormGuest_01(E,D,C,B,A){$(function(){$("#add_post").find("a").add($("#top_add_post")).authBind("click",function(F){_stop(F);$("#add_post").sleep();$.ajax({url:E,type:"GET",data:{commentable_model:$("#active_comment_form").attr("commentable_model")},success:function(G){$("#active_comment_form").html(G);$("#add_post").slideUp();$("#active_comment_form").slideDown()},complete:function(){$("#add_post").wakeup()}})},A)})}function activeCommentFormDatePicker(A,B){$("#review-visit-calendar").month_calendar({onSelect:function(C){var F=C.getFullYear(),E=C.getMonth()+1,D=C.getDate(),G=A+_monthLabels[E-1]+" "+F;ys=new String(F);ms=new String(E);if(ms.length==1){ms="0"+ms}$("#tour_month").val(ms);$("#tour_year").val(ys);$(this).closest("div.select").find("a.selected").find("strong").html(G);$("#when_selector").removeClass("active")},minDate:"1990-01-01",disabledClass:"none"})}function activeCommentsDetails_01(){$(function(){$('a[rel="active_photos"]').lightBox({fixedNavigation:true,imageLoading:"/images/lightbox-ico-loading.gif",imageBtnPrev:"/images/lightbox-btn-prev.gif",imageBtnNext:"/images/lightbox-btn-next.gif",imageBtnClose:"/images/lightbox-btn-close.gif",imageBlank:"/images/lightbox-blank.gif",txtImage:"Фото",txtOf:"из"});$("#option_exscurs").find("a.add_responce_button").click(function(A){_stop(A);$.scrollTo($("#active_comment_form"),"fast");$(this).blur()})})}function formatUrlHash(A){return A.replace(/^.+?#/g,"").replace(/^#?\/?|\/?$/g,"")}function setUrlHash(A){A=formatUrlHash(A);A=A.replace(/^\/?|\/?(\?)|\/?$/g,"/$1");if(typeof window.location.hash!=="undefined"){window.location.hash=A}else{location.hash=A}return true}function getUrlHash(){var A=window.location.hash||location.hash;return formatUrlHash(A)}function contacts_managers_js_01(){$(function(){$("#managers img").each(function(){$(this).mouseenter(function(){function B(D){$(D).css("z-index",1);var C=$(D).find("img");$(C).animate({width:"69px",height:"69px",left:"0",top:"0"},100,function(){$(D).remove()})}if($("div.manager_popup").length!=0){$("div.manager_popup").each(function(){B($(this))})}A($(this));function A(D){var E=$('<div class="manager_popup" style="position: absolute; z-index: 1001;" />');var C=$('<img src="'+$(D).attr("src")+'" style="border: 2px solid #fff; width: 69px; height: 69px; position: relative; left: 0; top: 0;" />');$(E).append($(C));$(D).before($(E));$(C).animate({width:"118px",height:"118px",left:"-17px",top:"-17px"},150);$(E).mouseleave(function(){B($(this))})}})})})}function news_filter_001(){$(function(){var A=$("#news-filter");A.find("a.selected.roll-up").click(function(B){_stop(B);A.addClass("active")}).end().find("a.selected.roll-back").click(function(B){_stop(B);A.removeClass("active")}).end().find("ul li a").click(function(B){$(this).closest("ul").sleep()});$(document).click(function(B){if(!$(B.target).closest("#news-filter").length){A.removeClass("active")}})})}function vacancy_filter_001(){$(function(){var A=$("#vacancy-filter");A.find("a.selected.roll-up").click(function(B){_stop(B);A.addClass("active")}).end().find("a.selected.roll-back").click(function(B){_stop(B);A.removeClass("active")}).end().find("ul li a").click(function(B){$(this).closest("ul").sleep()});$(document).click(function(B){if(!$(B.target).closest("#vacancy-filter").length){A.removeClass("active")}})})}function vacancy_form_001(F,H,B,C,E,G,A,D){$(function(){var L=$("#respondvacancy-form"),J=$("#respondvacancy_name"),N=$("#respondvacancy_email"),M=$("#respondvacancy_additional"),I=$("#respondvacancy_details"),K=$("#respondvacancy_attachment");$("#send_resume").click(function(O){_stop(O);L.fadeIn("slow")});J.smart_input($.extend(_def_style,{label:H}));N.smart_input($.extend(_def_style,{label:B}));M.smart_input($.extend(_def_style,{label:C}));I.smart_input($.extend(_def_style,{label:E}));$("#respondvacancy-submit-button").click(function(O){_stop(O);J.prevAll("p.error").remove();if(!J.val()){$("<p>").addClass("error").text(G).insertBefore(J).show();return }N.prevAll("p.error").remove();if(!N.val()){$("<p>").addClass("error").text(A).insertBefore(N).show();return }K.prevAll("p.error").remove();if(!(I.val()||K.val())){$("<p>").addClass("error").text(D).insertBefore(K).show();return }L.attr("action",F).sleep().submit()})})}function contacts_office_success_001(){$(function(){var A=$("#office_selector");A.find("a.selected").click(function(){A.toggleClass("active")}).end().click(function(B){B.stopPropagation()});$(document).click(function(){A.removeClass("active")})})}function team_success_001(){$(function(){var A=$("#team_city_selector");A.find("a.selected").click(function(){A.toggleClass("active")}).end().click(function(B){B.stopPropagation()});$(document).click(function(){A.removeClass("active")})})}function contacts_office_description_success_001(){$(function(){$("a.map_switcher").click(function(){if(!$(this).hasClass("map_type_active")){$("#o_map .o_map").hide();if($(this).attr("id")=="map_type_yandex"){$("#o_map_yandex").show()}else{if($(this).attr("id")=="map_type_google"){$("#o_map_google").show()}else{$("#o_map_schema").show()}}if(!$(this).hasClass("clicked")){$(this).addClass("clicked");if($(this).attr("id")=="map_type_yandex"){contacts_yandex_map_init()}else{if($(this).attr("id")=="map_type_google"){contacts_google_map_init()}}}$(".map_type_active").toggleClass("map_type").toggleClass("map_type_active");$(this).toggleClass("map_type").toggleClass("map_type_active")}return false})})}function popular_countries_001(){$(function(){$("#popular_country_block").find("li").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")})})}function bhead_js_001(A){$(function(){$("#login-link").click(function(F){_stop(F);$(document).modalbox();$(document).modalbox("open",{ajax_url:"/user/login/",popup_class:"popup enter_site"})});$("#register-link").click(function(F){_stop(F);$(document).modalbox();$(document).modalbox("open",{ajax_url:"/user/register/",popup_class:"popup registartion_site"})});var E=$("#drop_down-city-list"),C=$("#b-smallchoiser-form"),D=$("#select-city-link");D.click(function(F){_stop(F);$(this).parent().addClass("active")});$("#deselect-city-link").click(function(F){_stop(F);D.parent().removeClass("active")});$(document).click(function(F){if(!$(F.target).closest("#drop_down-city-list").length){$("#select-city-link").parent().removeClass("active")}});$("#b-smallchoiser-ul li").click(function(F){F.preventDefault();var G=$(this).attr("c");$("#b-smallchoiser-input",C).val(G);if(G!==undefined){$("#b-smallchoiser-form").sleep();$.ajax({url:A,type:"GET",data:{c:G},complete:function(){window.location.href=window.location.href},success:function(){window.location.reload(false)},error:function(){$("#b-smallchoiser").wakeup()}})}});$(".select li").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")});var B=$(".last");if(!B.filter(".current").length){B.hover(function(){$(this).parents(".select").addClass("hover_last")},function(){$(this).parents(".select").removeClass("hover_last")})}})}function review_card_01(A,B){$(function(){var C=$("#review_info .select");C.click(function(D){_stop(D);var E=$(this);if(E.hasClass("active")){E.removeClass("active")}else{C.removeClass("active");$(this).addClass("active")}});$(document).click(function(D){if(!$(D.target).closest("#review_info .select").length){C.removeClass("active")}});$(".review_info .select.duration ul, .review_info .select.goal ul, .review_info .select.follower ul").each(function(){$(this).find("li").click(function(){var D=$(this).text(),F=$(this).attr("val"),E=$(this).closest("div.select");E.find("a.selected strong").html(D).end().find("input:hidden").val(F).end().removeClass("hover")})});$("#review-visit-calendar").month_calendar({onSelect:function(D){var G=D.getFullYear(),F=D.getMonth()+1,E=D.getDate(),H=A+B[F-1]+" "+G;ys=new String(G);ms=new String(F);ds=new String(E);if(ms.length==1){ms="0"+ms}if(ds.length==1){ds="0"+ds}_value=ys+"-"+ms+"-"+ds;$(this).closest("div.select").find("a.selected").find("strong").html(H);$("#event-date").val(_value);$("#bag_date").fadeOut()},currentDate:$("#event-date").val(),minDate:"1990-01-01",disabledClass:"none"})})}function add_review_form_js(E,D,J,G,B,F,C,H,A,I){$(function(){var N=$("#span_average_rating"),Q=$("i",N.parent()),M=$("#add-review-text-form"),P=$(".marks-mark-input:input",M);var K=function(){var T=0,U=0;P.each(function(Y,Z){var a=parseInt($(Z).val(),10);if(a>0){U=U+parseInt(a);T++}});var S=T?U/T:0;S=Math.round(S*100)/100;N.text(S);var X=Math.floor(S),V=Math.abs(S-X),W=80*(5-X);if(V<0.125){W=W+0}else{if(V<0.375){W=W-20}else{if(V<0.625){W=W-40}else{if(V<0.875){W=W-60}}}}Q.css("background-position","0 -"+W+"px")};$(".give_rating",M).review_markable({averageMark:"#add-review-mark-overall-mark-label",onUpdate:K});var O={"#marks-comment-dest":J,"#marks-comment-service":G,"#marks-comment-food":B,"#marks-comment-territor":F,"#marks-comment-beach":C,"#marks-comment-animation":H,"#marks-comment-room":A,"#marks-comment-price":I};$.each(O,function(S,T){$(S).smart_input($.extend(_def_style,{label:T}))});$("#marks-username").click(function(){$("#bag_name").fadeOut()});$("#review_subject, #review_text").click(function(){$("#bag_story").fadeOut()});var L=function(S){var T=$(S).parent();$(T).find("input.marks-comment-input").attr("value","");$(T).find("i.give_rating").attr("class","give_rating");$(T).find("div").css("display","none")};$("a.marks-field-clear").click(function(S){_stop(S);L($(this))});var R=function(X){_stop(X);var a=$("#add-review-text-form"),V="",h=-1,T=0,U=[],f=[],g=$("#marks-username"),Z=g.val(),W=$("#review_text_review").val(),Y=$("#review_subject").val(),d=$("#review_text").val(),c=new Array(),S=$("#span_average_rating"),j="normal",b={top:-200};if($("#manager").length!=1){if(g.length&&!Z){$.scrollTo($("#bag_name_anchor"),j,{offset:b,onAfter:function(){$("#bag_name").show()}});return false}else{if(!$("#event-date").val()){$.scrollTo($("#bag_date_anchor"),j,{offset:b,onAfter:function(){$("#bag_date").show()}});return false}else{if(S.text()=="0"){$("#help").hide();$.scrollTo($("#bag_rait_anchor"),j,{offset:b,onAfter:function(){$("#bag_rait").show()}});return false}else{if(!d&&!Y){$.scrollTo($("#bag_story_anchor"),j,{offset:b,onAfter:function(){$("#bag_story").show()}});return false}}}}}else{if(!W){if(!$("#event-date").val()){$.scrollTo($("#bag_date_anchor"),j,{offset:b,onAfter:function(){$("#bag_date").show()}});return false}else{if(!d&&!Y){$.scrollTo($("#bag_story_anchor"),j,{offset:b,onAfter:function(){$("#bag_story").show()}});return false}}}}a.sleep();$("#vote_hotel-div li").each(function(k){c[++h]=new Array();$(".marks-review-input, .marks-mark-input, .marks-field-input, .marks-comment-input.ui-smart-input",$(this)).each(function(n,o){var l=$(this).attr("name"),m=$(this).attr("value");c[h][n]=l+"="+m});c[h]=c[h].join("&")});$(".file",$("#upload-user-foto-container")).each(function(l,m){var k=$(m).attr("item_id");if(k){U.push(k)}});$(".file",$("#upload-user-video-container")).each(function(l,m){var k=$(m).attr("item_id");if(k){f.push(k)}});c[++h]="review_text="+d;c[++h]="review_subject="+Y;c[++h]="cotraveler[departure_date]="+$("#event-date").val();c[++h]="cotraveler[followers]="+$("#event-follower").val();c[++h]="cotraveler[goal]="+$("#event-goal").val();c[++h]="cotraveler[id]="+$("#event-id").val();c[++h]="photos="+U.join(",");c[++h]="videos="+f.join(",");c[++h]="username="+Z;c[++h]="dog_id="+$("#review_text_dog_id").val();c[++h]="desktop_id="+$("#review_text_desktop_id").val();if(W){c[++h]="review_id="+W}V=c.join("&");$.ajax({url:E,type:"POST",data:V,success:function(k){if(k&&k.error!==undefined){modal_error(k.error);a.wakeup();return false}window.location.href=D}})};if($(".assessment div:visible").length==0){$(".help").show()}$("a.save_review_new").click(R)})}function add_review_media_002(I,H,G,F,C,J,L,A,E,N,D,M,K,B){$(function(){var S=$("#upload-user-foto-container"),X=null,O=null,P={"upload_url":I,"file_post_name":"file","file_types":"*.jpg;*.jpeg;*.JPG;*.JPEG;*.Jpeg;*.Jpg;*.png;*.gif;*.PNG;*.GIF;*.Png;*.Gif","button_placeholder_id":"add_foto_review","button_image_url":"/images/2.7.4/button/add_review_photo.png","button_width":121,"button_height":118,"post_params":{"extravars":H},"button_action":SWFUpload.BUTTON_ACTION.SELECT_FILES,"file_queue_limit":0,"upload_start_handler":function(c){$("#media-waitnig-div").wakeup();var Z=$('<div class="file" id="'+c.id+'"><div></div></div>').insertBefore(S.children(":last"));S.find("#"+c.id).children("div").sleep();try{W()}catch(a){}var Y=$(".file",S).length,b=K.replace("%n",Y);S.find("h2").eq(0).html(b)},"file_dialog_complete_handler":function(Y){if(Y){$("#media-waitnig-div").sleep();$.authJacket(function(){X.refreshCookies();S.show();X.startUpload()},undefined,N)}},"upload_success_handler":function(a,Z){var Y=S.find("#"+a.id);new JSONRequest({method:"reloadReviewMedia",params:[C,G,"foto"],success:function(b){try{if(b.item!==undefined){$(b.item).insertAfter(Y);Y.children("div").wakeup().end().remove()}}catch(c){}}})},"upload_complete_handler":function(Y){if(Y){this.startUpload()}}},X=init_uploader(P),W=function(){O=init_uploader($.extend(P,{"button_placeholder_id":"add_more_photo","button_width":196,"button_height":249,"button_image_url":"/images/2.7.4/button/add_more_review_photo.png","file_dialog_complete_handler":function(Y){if(Y){$.authJacket(function(){O.refreshCookies();O.startUpload()},undefined,N)}}}))};if(!DetectFlashVer(9,0,0)){$("#add_review_files").css("display","none");$("#add_review_title").css("margin-left","0");$("#add_review_text").css("margin-left","0")}var U={"card":"div.file","img":"a.wrap_img","remove":"a.delite","editTitle":"a.edit_title","editTitleDiv":"div.edit_title_div","editTitleSave":"a.edit_title_div_save","defaultEditTitleLabel":A,"defaultEditTagsLabel":E,"editTags":"a.edit_tags","editTagsDiv":"div.edit_tags_div","editTagsSave":"a.edit_tags_div_save","onTitleSave":function(Z,Y){new JSONRequest({"params":[{"item_type":"foto","item_id":this.attr("item_id"),"data_type":"title","data":Z}],"method":"editMediaData","success":function(){}});Y()},"onTagsSave":function(Z,Y){new JSONRequest({"params":[{"item_type":"foto","item_id":this.attr("item_id"),"data_type":"tags","data":Z}],"method":"editMediaData","success":function(){}});Y()},"onCardRemove":function(Z){if(confirm(L)){var Y=this.attr("item_id");JSONRequest({params:[Y,G],method:"removeUserFoto",success:function(a){}});Z()}}};S.cardManager(U);$(document).keydown(function(Y){if(Y.keyCode==27){if(X){X.stopUpload()}if(O){O.stopUpload()}}});var Q=$("#upload-user-video-container"),R=function(){var Y=this;new JSONRequest({method:"getFarmSlot",success:function(Z){if(Z==undefined){return }try{Y.addPostParam("video[server_id]",Z.result["server_id"]);Y.addPostParam("video[user_id]",Z.result["user_id"]);Y.setUploadURL("http://"+Z.result["upload_url"]+"/upload?X-Progress-ID="+Z.result["slot_id"])}catch(a){throw a;return }Q.show();Y.startUpload()}})},T={"upload_url":"","file_post_name":"video[file]","file_types":"*.mov;*.avi;*.mpeg;*.flv;*.mp4;*.wmv","button_placeholder_id":"add_video_review","button_image_url":"/images/2.7.4/button/add_review_video.png","button_width":121,"button_height":118,"post_params":{"video[extra_vars]":H},"button_action":SWFUpload.BUTTON_ACTION.SELECT_FILES,"file_queue_limit":0,"file_dialog_complete_handler":function(Z){if(Z){$("#media-waitnig-div").sleep();var Y=this;$.authJacket(function(){Y.refreshCookies();R.call(Y)},undefined,M)}},"upload_success_handler":function(a,Z){var Y=Q.find("#"+a.id);new JSONRequest({method:"reloadReviewMedia",params:[C,G,"single_video"],success:function(b){try{if(b.item!==undefined){$(b.item).insertAfter(Y);Y.remove()}}catch(c){throw c}}})},"upload_start_handler":function(c){$("#media-waitnig-div").wakeup();var Z=$('<div class="file" id="'+c.id+'"></div>').insertBefore(Q.children(":last"));try{_initAdditionalVideoUploader()}catch(a){}var Y=$(".file",Q).length,b=B.replace("%n",Y);Q.find("h2").eq(0).html(b)},"upload_complete_handler":function(Y){if(Y){R.call(this)}},"upload_progress_handler":function(b,a,Y){var Z=Y?Math.round(100*a/Y):0;$("#"+b.id).html('<span style="font-size: 62px; color: #B9B9B9;">'+Z+"%<span>")}},V=init_uploader(T);_initAdditionalVideoUploader=function(){_video_upl_additional=init_uploader($.extend(T,{"button_placeholder_id":"add_more_video","button_width":196,"button_height":249,"button_image_url":"/images/2.7.4/button/add_more_review_video.png"}))};Q.cardManager($.extend(U,{"onTitleSave":function(Z,Y){new JSONRequest({"params":[{"item_type":"video","item_id":this.attr("item_id"),"data_type":"title","data":Z}],"method":"editMediaData","success":function(){}});Y()},"onTagsSave":function(Z,Y){new JSONRequest({"params":[{"item_type":"video","item_id":this.attr("item_id"),"data_type":"tags","data":Z}],"method":"editMediaData","success":function(){}});Y()},"onCardRemove":function(Z){if(confirm(L)){var Y=this.attr("item_id");JSONRequest({params:[Y,G],method:"removeUserVideo",success:function(a){}});Z()}}}))})}function add_review_text_edit_js_01(B,A){$(function(){$("#review_subject").smart_input({label:B,filledCss:{color:_black_color},emptyCss:{color:_lightgrey_color}});$("#review_text").smart_input({label:A,filledCss:{color:_black_color},emptyCss:{color:_lightgrey_color}});var C=$("#add-review-text-form");C.silent_submit({url:C.attr("action"),container:"#add-review-text-form-holder"})})}function b_all_photo_js(E,C,A,D){if(A.button_image_url!==undefined){var B=new Image();B.src=A.button_image_url}$(function(){var I=$("#b-all-photo");if(DetectFlashVer(9,0,0)){var G=init_uploader(A),H=function(K){if(K){$.authJacket(function(){G.refreshCookies();G.startUpload()},undefined,D)}modal_error(_message)}}else{replaceFlashUploader(A["upload_url"],"b-emptybox__profilecomm-addphoto",C,A["post_params"]["extravars"],E,"b-all-photo",D)}var J=function(){$.ajax({url:E,cache:false,complete:function(){I.wakeup()},success:function(K){I.html(K);$("#show_user_foto_only").trigger("click")}})};if(DetectFlashVer(9,0,0)){G.uploadError=onUploadPhotoError;G.uploadSuccess=function(L,K){onUploadPhotoSuccess(L,K,C,J)};G.fileDialogComplete=H}var F=$("#add_comment");$("#scroll-to-add-comment").click(function(K){K.preventDefault();$.scrollTo(F,300);F.find("textarea").focus()});$(".switch_photo_view").click(function(K){K.preventDefault();var L=$(".all_photo .select .check").attr("filter");if($(".photo_blog_view").length>0){window.location.href=$(this).attr("href")+"#"+L}else{window.location.href=$(this).attr("href")+"&filter="+L}})})}function b_all_photo_js_marks(A){$(function(){var F=$(".give1, .give2, .give3, .give4, .give5"),C=null,E=null,B=$(".give_help"),D="<i></i>";F.hover(function(G){if(B&&B.is(":visible")){B.fadeOut()}var H=$(this),I=H.parent().find(".raitings");C=I.attr("class");E=I.html();I.html(D+H.attr("mark"));I.removeClass().addClass("raitings r"+H.attr("mark")+"0")},function(G){var H=$(this),I=H.parent().find(".raitings");I.removeClass().addClass(C);I.html(E)});F.click(function(G){G.preventDefault();G.stopPropagation();var H=$(G.target),L=H.parent().find(".raitings"),I=L.parent().attr("foto_id"),K=H.attr("mark"),J=L.siblings().filter(".rating_info");C=L.attr("class");J.html(A+K);L.html(D);new JSONRequest({method:"markFoto",params:[I,K],success:function(M){L.removeClass().addClass("raitings r"+M.result.style);L.html(D+M.result.rating);C=L.attr("class");E=L.html()}})})})}function b_all_video_js_01(H,E,G,J,F,C,D){var A=$("#multimedia_hotel"),I=null;if(H.button_image_url!==undefined){var B=new Image();B.src=H.button_image_url}$(function(){if(!DetectFlashVer(9,0,0)&&H.button_width>160){$("#"+H.button_placeholder_id).html(D)}else{var L=init_uploader(H);L=bind_video_uploader(L);L.uploadComplete=function(N,M){$(document).modalbox();$(document).modalbox("setCallback",{postClose:modal_success(_well_done)});$(document).modalbox("open",{ajax_url:E,popup_class:"add_file_popup"})};L.uploadError=function(O,M,N){if(N==406){modal_error(J)}else{if(N==500){modal_error(F)}else{if(N==404){modal_error(C)}}}}}var K=$("#add_comment");$("#scroll-to-add-comment").click(function(M){M.preventDefault();$.scrollTo(K,300);K.find("textarea").focus()})})}function b_photo_js_01(_param_01,_param_02,_param_03,_param_04,holder,img,_auth_first,dimx,dimy){var _img=new Image();_img.src=_param_04+"/i/fresh/new_photo_big.png";if(img){_img.src=_param_04+img}if(!holder){holder="b-emptybox__profilecomm-addphoto"}if(!dimx){dimx=144}if(!dimy){dimy=115}$(function(){if($("#"+holder).length){var _holder=$("#hotel_photo");if(DetectFlashVer(9,0,0)){var _upl=init_uploader({"upload_url":_param_01,"post_params":{"extravars":_param_02},"button_image_url":_img.src,"button_placeholder_id":holder,"button_width":dimx,"button_height":dimy})}else{eval("var ex_vars = "+_param_02);$("#"+holder).replaceWith('<a href="/hotels/'+ex_vars.hotel_id+'/pics/" style="display:inline-block;"><div style="background-image: url('+img+"); width: "+dimx+"px; height: "+dimy+'px; display:inline-block; font-size:1px;" /></a>')}var _onFileDialogComplete=function(_cnt){if(_cnt){$.authJacket(function(){_upl.refreshCookies();_upl.startUpload()},undefined,_auth_first)}};if(DetectFlashVer(9,0,0)){_upl.uploadError=onUploadPhotoError;_upl.uploadSuccess=function(_f,_d){onUploadPhotoSuccess(_f,_d,_param_03)};_upl.fileDialogComplete=_onFileDialogComplete}}})}function replaceFlashUploader(F,J,H,B,G,I,K){var L=$('<form action="'+F+'" method="post" target="upload_'+J+'" enctype="multipart/form-data"></form>'),D=$('<iframe name="upload_'+J+'" src="" style="display: none;"></iframe>'),E=$('<input name="file" type="file" class="preudo_ajax_upload" />'),A=$('<input id="upload_'+J+'" name="sbmt" type="submit" style="display: none;" />'),N=$('<input type="hidden" value="1" name="native" />'),C=$('<input type="hidden" value="'+H+'" name="ajxurl" />'),B=$("<input type='hidden' value='"+B+"' name='extravars' />");if(G!=undefined){var M=$('<input type="hidden" value="'+G+'" name="callback_url" />'),I=$('<input type="hidden" value="'+I+'" name="callback_holder" />');$(L).append(M).append(I)}$("#"+J).append(L);$(L).append(E).append(N).append(C).append(B).append(A).append(D);$(E).change(function(O){var P=$(this).parent().parent();$.authJacket(function(){$("#upload_"+J).trigger("click")},undefined,K)});$(E).customFile()}function onUploadPhotoError(B,A,C){$(function(){if(C===undefined){C=B}modal_error("Ошибка при сохранении фото: "+C)})}function onUploadPhotoSuccess(_f,_d,ajxurl,call_back){$(function(){try{eval("var _resp = "+_d);if(typeof (_resp)=="object"){if(_resp.foto_id){if(_resp.ajxurl!=undefined){ajxurl=_resp.ajxurl}$(document).modalbox({});if(_resp.callback_url!=undefined){var _holder=$("#"+_resp.callback_holder);$(document).modalbox("setCallback",{postClose:function(){$.ajax({url:_resp.callback_url,cache:false,complete:function(){_holder.wakeup()},success:function(_data){_holder.html(_data);$("#show_user_foto_only").trigger("click")}})}})}else{$(document).modalbox("setCallback",{postClose:function(){window.location.reload(true)}})}$(document).modalbox("open",{ajax_url:ajxurl+_resp.foto_id+"/",popup_class:"add_file_popup"})}else{if(_resp.error!==""){onUploadPhotoError(_resp.error)}}}}catch(e){}})}function b_sideusers_js_01(B,A){$(function(){$("div.right_column ul.tabs li a[name]").click(function(){var F=$(this);var H=F.attr("name");var D=$("li",F.parent().parent());D.removeClass("active");F.parent().addClass("active");for(var C=0;C<D.length;C++){var E=$("a",D[C]);var G=$("#"+E.attr("name"));if(E.attr("name")==H){G.show()}else{G.hide()}}return false});$("#b-sideusers__ctrls-metoo, #b-bigbtn_gofirst2").authBind("click",function(C){C.preventDefault();C.stopPropagation();$.modal({"loadUrl":B,"template":A,placeInCenter:true,noScroll:true})})})}function cotraveler_card_edit_js_01(A){$(function(){$("#edit-cotraveler-card-form").silent_submit({url:A})})}function cotraveler_card_static_js_01(D,C,B,A){$(function(){$("#edit-cotraveler-card-link").click(function(E){E.preventDefault();$.ajax({url:D,type:"POST",success:function(F){$("#user-cotraveler-card-holder").html(F).wakeup()},beforeSend:function(){$("#user-cotraveler-card-holder").sleep()}})});$("#edit-review-text-link").attr("hidden_href",C);$("#add-review-text-form").attr("action",B);$("input.marks-review-input").val(A)})}function foto_init_js_js_01(E,D,C){var F=E;function B(H){var G=_foto_comments.hide().eq(H);if(G.find("#comments_wrapper div").length>0){G.show();$("h2.new-comment").show();$("h2.first-comment").hide()}else{$("h2.new-comment").hide();$("h2.first-comment").show()}initializeCommentForm(F,H)}function A(G){var H=_foto_author;H.children().filter(":visible").hide();H.children().filter("[pic_id="+G+"]").show()}$(function(){initializeCommentForm(F,D);_foto_comments=$("div.comments_js");_foto_author=$("#photo_author");B(D);A(D);var H=$("div.wrap_img");var K=H.find("img");K.load(function(){H.fadeTo("slow",1)});$("#fotoslider").fotoslider({scrollbar:"div.scroll",owner:H,frame:$("#foto-frame"),nextArrow:"#next-button",prevArrow:"#prev-button",onSelect:function(P){var O=this,N=O.attr("hidden_href");if(getUrlHash()!==O.attr("urlhash")){setUrlHash("/")}A(P);B(P);K.attr("src",N);var L=O.next("a");if(L.length){var M=new Image();M.src=L.attr("hidden_href")}},startStep:D});var J=function(M){var L=$("#fotoslider").find("div").children("a").filter(":visible").length;$("#foto-counter").html(L)};var G=function(){var O=$("#fotoslider").find("div").children("a:visible");var M=parseInt(O.eq("0").css("margin-right"),10)+parseInt(O.eq("0").css("margin-left"),10);var L=775+120*O.length;$("#foto-counter").html(O.length);$("#sliderback").css("width",L);O.eq(0).trigger("click");var N=(O.length-1)?1/(O.length-1):null;$("div.scroll").scrollbar("updateDiscreteStep",N)};$(".all_photo .select").click(function(L){_stop(L);var M=$(this);if(M.hasClass("active")){M.removeClass("active")}else{M.addClass("active")}});$(document).click(function(L){if(!$(L.target).closest(".all_photo .select").length){$(".all_photo .select").removeClass("active")}});$("#show_all_foto, #show_catalog_foto_only, #show_user_foto_only").click(function(L){_stop(L);var M=$(this).text(),N=$(this).attr("id");var P=$(this).closest("div.select");P.find("a.selected").find("strong").html(M);$(P).removeClass("hover");$(P).find("li").removeClass("check");$(this).addClass("check");$(".all_photo .select").removeClass("active");if(N=="show_all_foto"){$("#fotoslider").find("a.pic-user, a.pic-catalog").show();J($(this));G()}else{if(N=="show_user_foto_only"){var O=$("#fotoslider").find("div").children("a");O.filter(".pic-user").show();O.filter(".pic-catalog").hide();J($(this));G()}else{if(N=="show_catalog_foto_only"){var O=$("#fotoslider").find("div").children("a");O.filter(".pic-user").hide();O.filter(".pic-catalog").show();J($(this));G()}}}});var I=window.location.hash;if(I=="#user"){$("#show_user_foto_only").click()}else{if(I=="#catalog"){$("#show_catalog_foto_only").click()}else{if(I.indexOf("&comment")>0){$("#scroll-to-add-comment").click();window.location.hash=window.location.hash.replace("&comment","")}}}media_slider_history_bind();$(".wrap_img img").css("cursor","pointer");$(".wrap_img img").click(function(){$("#next-button").click()})})}function media_slider_history_bind(){$.History.bind(function(B){if(B&&B.match(/\w+/)){var A=$("#fotoslider").find("a[urlhash="+B+"]");if(A.length){if(!A.filter(":visible").length){$("#show_all_foto").trigger("click")}A.trigger("click")}}})}function media_listing_history_bind(){$.History.bind(function(A){if(A&&A.match(/\w+/)){var B=$("#hash_"+A);if(B.length){$.scrollTo(B,700)}}})}function b_main_video_js_01(E,A,B,D,C){$(function(){if(DetectFlashVer(9,0,0)){if(E){var F=new SWFObject("/js/mediaplayer/player.swf","player","590","444","9");F.addParam("allowfullscreen","true");F.addParam("allowscriptaccess","always");F.addParam("autostart","false");F.addParam("wmode","opaque");F.addVariable("id","player");F.addVariable("title","");F.addVariable("file",E);F.addVariable("image",A);F.addVariable("resizing","true");F.write("preview")}else{if(D){var F=new SWFObject("http://www.youtube.com/v/"+D+"?enablejsapi=1&playerapiid=ytplayer","player","590","444","9");F.addParam("allowfullscreen","true");F.addParam("allowscriptaccess","always");F.addParam("wmode","opaque");F.addVariable("id","player");F.addVariable("resizing","true");F.write("preview")}}}else{$("#preview").html(C)}})}function video_init_js_js_01(M,K,H,F,E,D,O){var P=M;var J="postHotelVideoComment";var L=K;var B=H;var N=F;function C(X){var W=$("#sliderback").find("a"),U=W.eq(X),T=U.attr("video_url"),V=U.attr("youtube_id"),R=U.attr("video_thmb"),S=U.attr("video_id");$("#preview").fadeTo(0,600,function(){$(this).html("");if(!T&&!V){T=L;R=B;S=N}if(DetectFlashVer(9,0,0)){if(T){var Y=new SWFObject("/js/mediaplayer/player.swf","player","712","444","9");Y.addParam("allowfullscreen","true");Y.addParam("allowscriptaccess","always");Y.addParam("autostart","false");Y.addParam("wmode","opaque");Y.addVariable("id","player");Y.addVariable("title","");Y.addVariable("file",T);Y.addVariable("image",R);Y.addVariable("resizing","true");Y.write("preview");$("#download-video-button").show()}else{if(V){var Y=new SWFObject("http://www.youtube.com/v/"+V+"?enablejsapi=1&playerapiid=ytplayer","player","712","444","9");Y.addParam("allowfullscreen","true");Y.addParam("allowscriptaccess","always");Y.addParam("wmode","opaque");Y.addVariable("id","player");Y.addVariable("resizing","true");Y.write("preview");$("#download-video-button").hide()}}}else{$("#preview").html(O)}$("#download-video-button").attr("href",T);$("#add-to-blog-video-button").unbind("click").click(function(Z){Z.preventDefault();if(!S){S=V}$(document).modalbox();$(document).modalbox("open",{ajax_url:"/getVideoEmbedTags/"+S+"/",popup_class:"add_file_popup"})});I(X);A(X)})}function A(S){var R=_foto_comments.hide().eq(S);if(R.find("#comments_wrapper div").length>0){R.show();$("h2.new-comment").show();$("h2.first-comment").hide()}else{$("h2.new-comment").hide();$("h2.first-comment").show()}initializeCommentForm(P,S)}function I(R){var S=_video_author;S.children().filter(":visible").hide();S.children().filter("[video_id="+R+"]").show()}var G=function(S){var T=$(".all_video ul").find("li");T.each(function(U,V){$(V).removeClass("check")});$(S).addClass("check");var R=$("#sliderback").children("a").filter(":visible").length;$("#foto-counter").html(R);$(".all_video .selected_current").html($(S).children("a").html())};var Q=function(){var U=$("#sliderback").children("a:visible");var S=parseInt(U.eq("0").css("margin-right"),10)+parseInt(U.eq("0").css("margin-left"),10);var R=775+120*U.length;$("#foto-counter").html(U.length);$("#sliderback").css("width",R);U.eq(0).trigger("click");var T=(U.length-1)?1/(U.length-1):null;$("div.scroll").scrollbar("updateDiscreteStep",T)};$(".all_video .select").click(function(R){_stop(R);var S=$(this);if(S.hasClass("active")){S.removeClass("active")}else{S.addClass("active")}});$(document).click(function(){$(".all_video .select").removeClass("active")});$("#show_catalog_foto_only").click(function(R){R.preventDefault();R.stopPropagation();var S=$("#sliderback").children("a");S.filter(".video-user").hide();S.filter(".video-catalog").show();G($(this));Q()});$("#show_user_foto_only").click(function(R){R.preventDefault();R.stopPropagation();var S=$("#sliderback").children("a");S.filter(".video-user").show();S.filter(".video-catalog").hide();G($(this));Q()});$("#show_all_foto").click(function(R){R.preventDefault();R.stopPropagation();$("#sliderback").find("a.video-user, a.video-catalog").show();G($(this));Q()});$(function(){_foto_comments=$("div.comments_js");_video_author=$("div#video_author");$("#fotoslider").fotoslider({scrollbar:"div.scroll",owner:$("#preview"),frame:$("#foto-frame"),nextArrow:"#next-button",prevArrow:"#prev-button",onSelect:function(T){var S=this,R=S.attr("hidden_href");if(getUrlHash()!==S.attr("urlhash")){setUrlHash("/")}C(T)}});C(D);media_slider_history_bind()})}function startUpload(B){if(!$("#file").val()){alert(B);return false}$(".holder-right").sleep();var A=getUniqId();$("#uploadform").attr("action","/my/uploadImage/?X-Progress-ID="+A)}function getUniqId(){var A="";for(i=0;i<32;i++){A+=Math.floor(Math.random()*16).toString(16)}return A}function personal_images_success_js_01(E,B,C){var D=undefined;var A=E;$("#uploadform").submit(function(){return startUpload(C)});$(".setactive_button").live("click",function(I){if((!$.browser.msie&&I.button==0)||($.browser.msie&&I.button==1)){var G=undefined;$(".holder-left").sleep();$(".avatars-gallery-element").children().children().children().filter("input").attr("checked",0);$(this).children().filter("input").attr("checked",1);var H=$(this).attr("id").replace(/setactive_/g,"");var F=$(this);$.ajax({type:"POST",url:"/my/setActive/",data:"user_id="+A+"&image="+H,success:function(J){G=$(F).parent().parent().children().children().filter("img").attr("src").replace("/small/","/medium/");$("#big_avatar").attr("src",G);$(".holder-left").wakeup()}})}});$(".delete_button").live("click",function(J){if((!$.browser.msie&&J.button==0)||($.browser.msie&&J.button==1)){if(!confirm(B)){return false}var G=undefined;$(".holder-right").sleep();$(".avatars-gallery-element").children().children().children().filter("input").attr("checked",0);$(this).children().filter("input").attr("checked",1);var I=$(this).attr("id").replace(/delete_/g,"");G=$(this).parent().parent().children().children().filter("img").attr("src").replace("/small/","/medium/");var F=$(this);$.ajax({type:"POST",url:"/my/deleteAvatar/",data:"user_id="+A+"&image="+I,success:function(K){$(F).parent().parent().remove();G=$(F).parent().parent().children().children().filter("img").attr("src").replace("/small/","/medium/");$(".holder-right").wakeup()},error:function(K){modal_error(K);$(".holder-right").wakeup()}});if($("#big_avatar").attr("src")==G){$(".holder-left").sleep();var H=$(".delete_button:last").attr("id").replace(/delete_/g,"");if(H){$.ajax({type:"POST",url:"/my/setActive/",data:"user_id="+A+"&image="+H,success:function(K){if($(".avatars-gallery-element-image:last").size()){G=$(".avatars-gallery-element-image:last").children().filter("img").attr("src").replace("/small/","/medium/");$("#big_avatar").attr("src",G)}else{$("#big_avatar").attr("src","/img/nofoto.gif")}}})}$("#big_avatar").attr("src","/img/nofoto.gif");$(".holder-left").wakeup()}}})}function review_success_js_01(){$(function(){$("#btn-submit-addreview").click(function(){$("#frm-addreview").submit();return false})})}function hotel_info_bind_why_love_01(){$("#reason_love").hideOnClckOutside($("#why_love"));$("#reason_love").click(function(){return false})}function hotel_info_01(H,A,C,E,I,D,G,B,F){$(function(){hotel_info_favorite_click(H,undefined,undefined,undefined,undefined,A,C,E,I,D,G,B,F);hotel_info_bind_why_love_01();$("#add_vk").click(function(J){new JSONRequest({method:"logVkFavorite",params:[H]})})})}function search_params_selected_001(){$(function(){$("#params_selected").find("a").mouseenter(function(){$("#params_selected").addClass("sp_param_clear")}).mouseleave(function(){$("#params_selected").removeClass("sp_param_clear")})})}function search_results_sorting_001(){$(function(){$("#send_love").hideOnClckOutside($("#show_favs"));$("#show_favs").click(function(){$("#send_love input").focus().select()})})}function search_results_001(G,J,A,C,E,I,D,H,B,F){$(function(){var K=0;$.getJSON("http://"+document.domain+"/ajax/userservice/?cmd=islogged",function(L){if(L.status==1){K=1}$("#hotel_search_result .add_hotel_to_favorite").each(function(){var M=$(this);var N=$(this).parent();var P=String($(N).attr("id")).split("add_hotel_to_favorite_").join("");var O={"yes_html":G,"no_html":J};hotel_info_favorite_click(P,N,M,O,K,A,C,E,I,D,H,B,F);search_results_001_hover_binder(N,B,F)})})})}function hotel_search_index_guest(){$(function(){$("#login_pliz a").authBind("click",function(A){window.location.reload(true)})})}function hotel_info_favorite_click(L,I,A,F,J,H,O,E,M,D,K,C,G){var N=$("#toggle-favorite-hotel-link"),B=$("#favorite_buttons");if(A){N=A}if(I){B=I}if(F!==undefined){if(F.yes_html){H=F.yes_html}if(F.no_html){O=F.no_html}}$(N).authBind("click",function(P){_stop(P);var R=$(this).sleep();var Q=$(B);if(F!==undefined){if(J==0){$("#hotelsearch_settings").append(E)}}new JSONRequest({method:"toggleFavoriteHotel",params:[L],success:function(T){if(T&&T.active!==undefined){if(T.active==1){Q.html(H)}else{Q.html(O)}if(F){var S=$(I).find("a");hotel_info_favorite_click(L,I,S,F,J,H,O,E,M,D,K,C,G);search_results_001_hover_binder(I,C,G);if(!$(S).hasClass("yes_l")){$(I).find("span").html(D);$(I).find("span").attr("class","red_span")}else{$(I).find("span").html(M);$(I).find("span").attr("class","green_span")}}else{hotel_info_bind_why_love_01();hotel_info_favorite_click(L,I,S,F,J,H,O,E,M,D,K,C,G)}}}})},K)}function search_results_001_hover_binder(B,C,A){$(function(){$(B).find("a").hover(function(){if(!$(this).hasClass("yes_l")){var E=C;var D="green_span"}else{var E=A;var D="red_span"}$(B).find("span").html(E);$(B).find("span").attr("class",D)},function(){$(B).find("span").html("")})})}function choose_city_01(B,A){$(function(){$("#select_city a.city_link, #select_city a.close").click(function(C){C.preventDefault();C.stopPropagation();$("#select_city").hide("slow");var D=$(this),E=null;if(D.filter(".close").length){E={"data":{"c":A}}}else{E={"data":{"c":D.attr("c")},"complete":function(){window.location.href=window.location.href},"success":function(){window.location.reload(false)}}}E=$.extend({"url":B,"type":"GET","cache":true},E);$.ajax(E)});$("#select_city a.selected").click(function(C){C.preventDefault();C.stopPropagation();$("#select_city div.o_fix").show()});$("#select_city div.drop_down a.selected").click(function(C){C.preventDefault();C.stopPropagation();$("#select_city div.o_fix").hide()})})}function review_media_01(){$(function(){$("div.review_files.fotos a").lightBox({fixedNavigation:true,imageLoading:"/images/lightbox-ico-loading.gif",imageBtnPrev:"/images/lightbox-btn-prev.gif",imageBtnNext:"/images/lightbox-btn-next.gif",imageBtnClose:"/images/lightbox-btn-close.gif",imageBlank:"/images/lightbox-blank.gif",txtImage:"Фото",txtOf:"из"})})}function change_state(B){var A=$(B).siblings("label");if($(A).attr("class")=="checked-tag"){$(A).removeClass("checked-tag")}else{$(A).addClass("checked-tag")}}function perl_user_article_form(A){$("#user-article-form-submit").authBind("click",function(B){$("#add-user-article-form").attr("action",A);$("#add-user-article-form").submit()})}function login_form_001(D,C,A,B){$(function(){var E="";if(D){E="?silent=1"}$("#email").smart_input($.extend(_light_def_style,{label:A}));$("#password").smart_input($.extend(_light_def_style,{label:B}));$("#ui-modal-login-form").silent_submit({url:C+"/"+E,container:$("#modal_container"),submitToNowhere:true});$("#modal-submit-link").click(function(F){_stop(F);$("#ui-modal-login-form").submit()});$("#modal-register-link").click(function(F){_stop(F);$(document).modalbox("open",{ajax_url:"/user/register/"+E,popup_class:"popup registartion_site"})});$("#modal-recovery-link").click(function(F){_stop(F);$(document).modalbox("open",{ajax_url:"/user/recovery/"+E,popup_class:"popup enter_site remember_pass"})})})}function register_form_001(D,E,A,C,B){$(function(){var F="";if(D){F="?silent=1"}$("#ui-modal-name").smart_input($.extend(_light_def_style,{label:E}));$("#ui-modal-email").smart_input($.extend(_light_def_style,{label:A}));$("#ui-modal-password").smart_input($.extend(_light_def_style,{label:C}));$("#ui-modal-re-password").smart_input($.extend(_light_def_style,{label:B}));$("#ui-modal-register-form").silent_submit({url:"/user/register/"+F,container:"#modal_container"});$("#modal-submit-link").click(function(G){G.preventDefault();G.stopPropagation();$("#ui-modal-register-form").submit()});$("#modal-login-link").click(function(G){G.preventDefault();G.stopPropagation();$(document).modalbox("open",{ajax_url:"/user/login/"+F,popup_class:"popup enter_site"})});$("#modal-rcap-link").click(function(G){G.preventDefault();G.stopPropagation();$("#imgcap").attr("src","/captcha?"+Math.random()+"&amp;reload=1")});if($("#ui-modal-email").val()){$("#ui-modal-password").smart_input("focus")}})}function recovery_form_001(A,B){$(function(){var C="";if(A){C="?silent=1"}$("#ui-modal-recovery").smart_input($.extend(_light_def_style,{label:B}));$("#ui-modal-recovery-form").silent_submit({url:"/user/recovery/",container:"#modal_container"});$("#modal-submit-link").click(function(D){D.preventDefault();D.stopPropagation();$("#ui-modal-recovery-form").submit()});$("#modal-register-link").click(function(D){D.preventDefault();D.stopPropagation();$(document).modalbox("open",{ajax_url:"/user/register/",popup_class:"popup registration_site"})})})}function js_iframe_001(){$.modal("close",{complete:function(){if(typeof (expecting_callback)=="function"){expecting_callback()}}})}function remove_review(B,C,D,A){if(!confirm(D)){return }JSONRequest({params:[C],method:"deleteHotelReview",success:function(E){if(A){window.location.href=A}else{$(B).closest("div.box").slideUp()}}});return false}function remove_comment(C,D,A,F,B){var E=confirm(A);if(!E){return }if(B){window.location.href=B}else{$(C).parent().parent().slideUp("normal")}JSONRequest({params:[D],method:"deleteComment",success:function(G){if(!G.success){alert(F)}}});return false}function remove_photo(E,A,G,F){var B="";var C=$(E).closest("div.active");C.sleep();JSONRequest({params:[A],method:"deleteHotelUserFoto",success:function(J){if(!J.success){C.wakeup();alert(F+J.error+"("+J.error_code+")");return }}});var I=$("a.pic-user").filter("[index="+G+"]");I.fadeTo("fast",0.1);I.attr("hidden_href","/i/fresh/tourstanok/no-photo.png");$("#photo_author").find("[pic_id="+G+"]").remove();var H=I.next("a.pic-user");if(!H.length){H=I.prev("a.pic-user")}if(H.length){B=H.attr("urlhash")}var D=String(window.location).replace(/#.*$/,"#"+B+"/");C.wakeup();window.location=D;return false}function remove_photo_list(B,E,D){var C="";var A=$(B).closest("tr");A.sleep();JSONRequest({params:[E],method:"deleteHotelUserFoto",success:function(F){if(!F.success){A.wakeup();alert(D+F.error+"("+F.error_code+")");return }}});A.wakeup();A.slideUp();if($(B).closest("table").find("tr:visible").length==1){window.location.reload()}return false}function remove_video(D,E,G,F,H){var A="";var B=$(D).closest("div.active");B.sleep();JSONRequest({params:[E],method:"deleteHotelUserVideo",success:function(K){if(!K.success){B.wakeup();alert(F+K.error+"("+K.error_code+")");return }}});var J=$("[index="+G+"]");J.fadeTo("fast",0.1);J.attr("video_url","/i/fresh/tourstanok/no-photo.png");$("#video_author").find("[video_id="+G+"]").html('<span style="color:red">'+H+"</span>");var I=J.next("div#fotoslider a");if(!I.length){I=J.prev("div#fotoslider a")}if(I.length){A=I.attr("urlhash")}var C=String(window.location).replace(/#.*$/,"#"+A+"/");B.wakeup();window.location=C;return false}function please_register(A,B){$(function(){$.authJacket(function(){window.location.reload(true)},undefined,B)})}function b_all_reviews_admin(A){$(function(){$(".post2").each(function(B,D){var C=A;_id=0;_id=$(".pop",D).attr("id").substr(11);C=C.replace("$review_id",_id).replace("%24review_id",_id);$(".post_end",D).before(C)})})}function b_all_photo_admin(A){$(function(){$("#comments_wrapper .box").each(function(B,E){var D=A,C=0;C=$(E).attr("comment_id");D=D.replace("$comment_id",C);$("p",E).after(D)})})}function b_all_video_admin(A){$(function(){$(".b-feed-comments .comment_item").each(function(B,E){var D=A,C=0;C=$(E).attr("comment_id");D=D.replace("$comment_id",C);$("p",E).after(D)})})}function modal_success(A){$(document).modalbox();$(document).modalbox("open",{content:'<table class="com"><tr><td><img src="/images/2.5.4/yes.png" /></td><td>'+A+"</td></tr></table>"});return true}function modal_error(A){$(document).modalbox();$(document).modalbox("open",{content:'<table class="com"><tr><td><img src="/images/2.5.4/no.png" /></td><td>'+A+"</td></tr></table>"});return true}function modal_wait(A){$(document).modalbox();$(document).modalbox("open",{content:'<table class="com"><tr><td><img src="/images/2.5.4/POP_UPgif.gif" /></td><td>'+A+"</td></tr></table>"});return true}function replace_legacy_auth(C,D,B){var A=$(C);if(A.length){A.authBind("click",function(E){E.preventDefault();E.stopPropagation();if(B==undefined){B=A.attr("href")}if(B){document.location=B;modal_wait("Выполняется вход на сайт")}},D)}}function replace_legacy_register(B){var A=$(B);if(A.length){A.click(function(C){C.preventDefault();C.stopPropagation();$(document).modalbox();$(document).modalbox("open",{ajax_url:"/user/register/",popup_class:"popup registartion_site"});return false})}}function replace_legacy_forgot(B){var A=$(B);if(A.length){A.click(function(C){C.preventDefault();$(document).modalbox();$(document).modalbox("open",{ajax_url:"/user/recovery/",popup_class:"popup enter_site remember_pass"})})}}function details_tour_01(H,D,B,F,G,C,A,E){$(function(){var L=function(){$("#error_"+$(this).attr("id")).hide()};function M(O,P){var N=$("#error_"+O.attr("id"));if(N.length==0){N=$('<p id="error_'+O.attr("id")+'">'+P+"</p>").hide();O.after(N)}N.slideDown()}var J=$("#buy_tour"),I=$("#site_order_client_name"),K=$("#site_order_client_phone");_email=$("#site_order_client_email"),_more=$("#site_order_client_more"),_error=$(".error",J),_global_error=$("#error_site_order_global"),_emailRegexp=/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i;I.smart_input($.extend(_def_style,{label:H,onFocus:L}));K.smart_input($.extend(_def_style,{label:D,onFocus:L})).phone_number();_email.smart_input($.extend(_def_style,{label:B,onFocus:L}));_more.smart_input($.extend(_def_style,{label:F,onFocus:L}));$("#send",J).click(function(N){N.preventDefault();var O=true;var S=I.val();if(!S){M(I,G);O=false}var P=K.val();var Q=_email.val();if(O&&!Q==""&&!Q.match(/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i)){M(_email,"Неверный формат email");O=false}if(O&&!P&&!Q){M(_global_error,C);O=false}if(O){var R=$(".contact");R.silent_submit({url:R.attr("action"),container:"#buy_tour .contact"});R.submit()}})})}function tour_details_01(A){$.each(A,function(C,D){var B=new Image();B.src=D});$(function(){var F=$("#hotel-images-holder"),D=F.find("img"),E=F.find("a.prev"),C=F.find("a.next"),B=0,G=function(H){if(A[B]!==undefined){D.attr("src",A[B]);if(B==0){E.hide()}else{E.show()}if(B==(A.length-1)){C.hide()}else{C.show()}}};if(A.length){E.click(function(){if(B>0){G(--B)}});C.click(function(){if(B<(A.length-1)){G(++B)}});G(B)}else{F.hide()}})}function tour_search_admin(A,B,C){$(".aa2").click(function(){var D=$(this),E=D.attr("tour_id");if(confirm(A)){$.ajax({url:"/ajax/tourDelete/"+E+"/",success:function(F){if(F=="done"){D.parent().parent().find("a.x").each(function(H,G){if($(this).attr("tour_id")==E){$(this).slideUp()}});alert(B)}else{alert(C)}},error:function(F,H,G){alert(C)}})}})}function hotel_photo_list(){$(function(){var A=$(".all_photo .select");A.click(function(B){B.preventDefault();B.stopPropagation();var C=$(this);if(C.hasClass("active")){C.removeClass("active")}else{C.addClass("active")}});$(document).click(function(B){if(!$(B.target).closest(".all_photo .select").length){A.removeClass("active")}});$("#show_all_foto, #show_catalog_foto_only, #show_user_foto_only").click(function(B){_stop(B);var C=$(this).text(),E=$(this).attr("id"),G=$(this).attr("filter"),D=window.location.href;var F=$(this).closest("div.select");F.find("a.selected").find("strong").html(C);$(F).removeClass("hover");$(F).find("li").removeClass("check");$(this).addClass("check");A.removeClass("active");D=D.replace(/page=[0-9]+&/g,"").replace(/#[0-9a-z]+/,"");if(D.indexOf("filter")>0){D=D.replace(/filter=[a-z]+/g,"filter="+G)}else{if(D.indexOf("?")>0){D+="&filter="+G}else{D+="?filter="+G}}window.location.href=D});media_listing_history_bind();$("table.photo_blog_view").find("img").click(function(B){$(".give_help").hide();var D=$(this).closest("td"),C=D.parent().next().children("td").eq(0).filter(".big_big_big_photo");if(D.is(".big_big_big_photo")){D.parent().hide().prev().show()}else{if(C.length){D.parent().hide().next().show()}}})})}function regions_content_left_01(C,B,A){$(function(){var D=$("#regions_list .box").length;$("#regions_search").smart_input($.extend(_def_style,{label:A}));$("#regions_search").keyup(function(E){var F=$("#regions_search").val().toLowerCase(),G=new RegExp(F,"gi");if(!F){$("#regions_list .box:hidden").slideDown();D=$("#regions_list .box").length;return }$("#regions_list .box").each(function(I,J){var H=$("a.region",J).text().toLowerCase();if(G.exec(H)){if($(J).is(":hidden")){$(J).slideDown();D++}}else{if($(J).is(":visible")){$(J).slideUp();D--}}});if(D==0&&$("#not_found").is(":hidden")){$("#not_found").slideDown()}else{if(D>0&&$("#not_found").is(":visible")){$("#not_found").slideUp()}}});$(".sorting").click(function(E){E.preventDefault();E.stopPropagation();var F=$(E.target),G=F.attr("sorting_type");if(!G){return }F.siblings("a").removeClass("active");F.addClass("active");$("#regions_list").sleep();$.ajax({url:C,type:"GET",data:{sorting:G,country:B},success:function(H){$("#regions_list").html(H);$("#regions_list").wakeup()},error:function(){$("#regions_list").wakeup()}})})})}function interesting_places_01(A){$(function(){$(".worth_seeing a.add, .worth_seeing a.add_responce_button").authBind("click",function(B){_stop(B);window.location.href=A},"Чтобы добавить достопримечательность, войдите на сайт.")})}function search_form_alphabet(){$(function(){$(".switch_lang a").click(function(A){A.preventDefault();A.stopPropagation();var B=$(A.target);if(B.parent().hasClass("eng")){$(".switch_lang.eng").hide();$(".switch_lang.rus").show();$(".letters.eng").hide();$(".letters.rus").show()}else{$(".switch_lang.rus").hide();$(".switch_lang.eng").show();$(".letters.rus").hide();$(".letters.eng").show()}})})}function hotels_search_form(A){$(function(){$("#name").smart_input($.extend(_def_style,{label:A}));$("#hotelsearch a").click(function(B){B.preventDefault();B.stopPropagation();if($("#name").val()){$("#error_empty_name").hide();$("#hotelsearch input[name=]").remove();$("#hotelsearch").submit()}else{if($("#error_no_hotels").length==0){$("#error_empty_name").show()}}});$("#hotelsearch input").keydown(function(B){$("#error_empty_name").hide();if(B.keyCode=="13"&&$("#name").val()){$("#hotelsearch input[name=]").remove();$("#hotelsearch").submit()}else{if(B.keyCode=="13"&&$("#error_no_hotels").length==0){$("#error_empty_name").show()}}})})}function region_weather_01(){$(function(){var A=$("#weather_region_selector");A.find("a.selected").click(function(){A.toggleClass("active")}).end().click(function(B){B.stopPropagation()});$(document).click(function(){A.removeClass("active")})})}function region_selector_01(){$(function(){var A=$("#region_selector");A.find("a.selected").click(function(){A.toggleClass("active")}).end().click(function(B){B.stopPropagation()});$(document).click(function(){A.removeClass("active")})})}function region_weather_02(){$("#weather_switch").find("li").click(function(){$("#weather_switch").find("li").removeClass("active");$(this).addClass("active");var A=$(this).find("a").attr("day");$("#weather_map").simple_map("switchDay",{day:A})})}function review_comments_js_01(B,A){initializeCommentForm(B,0);_foto_comments=$("div.response_comments");$(_foto_comments).find("a.delete_comment").each(function(){$(this).click(function(){remove_comment($(this),$(this).attr("comment_id"),A);return false})});$("#add_comment_button").click(function(C){C.preventDefault();C.stopPropagation();$.scrollTo($("#add_comment"),"normal");$("#foto_comment_text").focus()})}function main_page_foto_01(A){$(function(){$(".country_photo a.add").authBind("click",function(B){_stop(B);window.location.href=A},"Чтобы добавить фотографию, войдите на сайт.")})}function main_page_region_01(A,B){$(function(){var C=false;$(".section_more.regions_list").click(function(D){var E=$(D.target);if(!C){E.text(A);C=true;$("#regions_list_other").slideDown()}else{E.text(B);C=false;$("#regions_list_other").slideUp()}});$(".regions_list li").hover(function(D){$(this).addClass("hover")},function(D){$(this).removeClass("hover")})})}function regions_content_right_01(C,A,B){$(function(){var D=$("#regions_list .box").length;$("#regions_search").smart_input($.extend(_def_style,{label:B}));$("#regions_search").keyup(function(E){var F=$("#regions_search").val().toLowerCase(),G=new RegExp(F,"gi");if(!F){$("#regions_list .box:hidden").slideDown();D=$("#regions_list .box").length;$("#not_found").slideUp();$("#error_not_found").hide();$(".sort").slideDown();return }$("#regions_list .box").each(function(I,J){var H=$("a.region",J).text().toLowerCase();if(G.exec(H)){if($(J).is(":hidden")){$(J).slideDown();D++}}else{if($(J).is(":visible")){$(J).slideUp();D--}}});if(D==0&&$("#not_found").is(":hidden")){$("#not_found").slideDown();$("#error_not_found").show();$(".sort").slideUp()}else{if(D>0&&$("#not_found").is(":visible")){$("#not_found").slideUp();$("#error_not_found").hide();$(".sort").slideDown()}}});$(".sort").click(function(E){_stop(E);var F=$(E.target),H=F.attr("sorting_type");if(!H){return }F.siblings("a").removeClass("up").removeClass("down");var G=F.attr("class");if(G){G=(G=="up")?"down":"up"}else{G=F.attr("default_sorting")}F.removeClass("up").removeClass("down");F.addClass(G);$("#regions_list").sleep();$.ajax({url:C,type:"GET",data:{sorting:H,type:G,country:A},success:function(I){$("#regions_list").html(I);$("#regions_list").wakeup()},error:function(){$("#regions_list").wakeup()}})})})}function user_video_tags_01(B,A){$(function(){var C=$("#add-user-video-tags-form");$("#modal-submit-link").click(function(D){D.preventDefault();$("#add-user-video-tags-form").submit()});$("#add-user-video-tags-form").submit(function(E){E.preventDefault();var H=$("div.name input",C).val();var D="";var G="";$(":checkbox",C).each(function(){if(this.checked){D+=(D.length>0)?",":"";D+=this.value;var I=$(this).siblings("label");G+=(G.length>0)?", ":"";G+=$(I).text()}});var F=$("#add-user-video-tags-form").attr("el_id");C.sleep();$.post(B+F+"/",{tags:D,title:H},function(){C.wakeup();changed_photo=$("#video_item_"+F+" ul");$(changed_photo).html(G);$(document).modalbox("close")});changed_video=$("#vido_item_"+F+" span");$(changed_video).html(G)});$("#modal-delete-link").click(function(D){$("#modal-delete-link").sleep();JSONRequest({params:[$("#add-user-video-tags-form").attr("el_id")],method:"deleteHotelUserVideo",success:function(E){$(document).modalbox("setCallback",{preClose:undefined});if(!E.success){alert(A+E.error+"("+E.error_code+")")}else{$(document).modalbox("close")}}})})})}function user_photo_tags_01(D,B,A,C){$(function(){var E=$("#add-user-foto-tags-form");$("#modal-submit-link").click(function(F){F.preventDefault();$("#add-user-foto-tags-form").submit()});$("#add-user-foto-tags-form").submit(function(G){_stop(G);$("#add-user-foto-tags-form").sleep();var J=$("div.name input",E).val(),F="",I="";$("input:checkbox",E).each(function(){if(this.checked){F+=(F.length>0)?",":"";F+=this.value;var K=$(this).siblings("label");I+=(I.length>0)?", ":"";I+=$(K).text()}});var H=$("#add-user-foto-tags-form").attr("el_id");$.post(D+H+"/",{tags:F,title:J},function(K){if(A){window.location.href=B+"#"+K}$("#add-user-foto-tags-form").wakeup();$(document).modalbox("close")});changed_photo=$("#item_"+H+" span");$(changed_photo).html(I)});$("#modal-delete-link").click(function(F){$("#modal-delete-link").sleep();JSONRequest({params:[$("#add-user-foto-tags-form").attr("el_id")],method:"deleteHotelUserFoto",success:function(G){if(!G.success){modal_error(C+G.error+"("+G.error_code+")")}else{$(document).modalbox("close")}}})})})}(function(A){A.widget("ui.month_calendar",{_getDay:function(B){var C=B.getDay();return(--C)<0?(C+7):C},_strToDate:function(G){var F=/(\d{4})\-(\d{1,2})\-(\d{1,2})/.exec(G);var B=new Date();if(F&&F.length==4){var E=parseInt(F[1],10),D=parseInt(F[2],10),C=parseInt(F[3],10);B.setFullYear(E);B.setMonth(D-1);B.setDate(C)}else{var F=/(\d{1,2})\.(\d{1,2})\.(\d{4})/.exec(G);if(F&&F.length==4){var E=parseInt(F[3],10),D=parseInt(F[2],10),C=parseInt(F[1],10);B.setFullYear(E);B.setMonth(D-1);B.setDate(C)}}return B},_constructYearDiv:function(F){var H=this.element,B=this.options,I=this;var J=new Date();var C=A("<div />").addClass("year");var E="<h3>"+F+"</h3>";E+="<ul>";for(var D=0;D<12;D++){var G=new Date(F,D,1);E+="<li";E+=(J-G<0)?' class="'+B.disabledClass+'"':"";E+=' date="'+F+"-"+(D+1)+'-1"';E+=">";E+=B.monthLabels[D];E+="</li>"}E+="</ul>";return C.html(E)},_fillContent:function(L,K,D){var G=this.element,B=this.options,J=this;var I=G.find("div.year");var H=[];for(var F=0;F<B.yearSimultaneously;F++){var E=J._constructYearDiv(L.getFullYear());E.hide();H.push(E);G.append(E)}if(B.animation&&typeof (D)!="undefined"){var C=-50;if(D<0){C*=-1}removed_months.eq(0).animate({marginLeft:C+"px"},100,"linear",function(){removed_months.remove();G.find("div.year").fadeIn()})}else{I.remove();G.find("div.year").show()}if(this.options._active_date.getFullYear()==this.options._current_date.getFullYear()){this.options.next_year.css("visibility","hidden")}else{this.options.next_year.css("visibility","visible")}if(typeof (B.onDisplay)=="function"){B.onDisplay.call(J)}},_selectYear:function(B){this.options._active_date.setFullYear(this.options._active_date.getFullYear()+B);this._fillContent(this.options._active_date,this.options._current_date,B)},_init:function(){var B=this.element,C=this.options,D=this;this.options._current_date=D._strToDate(C.currentDate);B.addClass(C.calendarClass).append(this.options.prev_year).append(this.options.next_year);this.options._active_date=new Date(this.options._current_date.getFullYear(),this.options._current_date.getMonth(),this.options._current_date.getDate());this.options.next_year.click(function(E){E.preventDefault();E.stopPropagation();D._selectYear(1)});this.options.prev_year.click(function(E){E.preventDefault();E.stopPropagation();D._selectYear(-1)});this.goNextYear=function(){D._selectYear(1)};this.goPrevYear=function(){D._selectYear(-1)};this.options.onSelectStack=[];if(typeof (C.onSelect=="function")){this.options.onSelectStack.push(C.onSelect)}B.click(function(E){var H=A(E.target);if(!H.filter("li:not(."+C.disabledClass+")").length){return }if(C.readOnly){return }var F=D._strToDate(H.attr("date"));D.options._current_date=F;A("li."+C.activeClass,B).removeClass(C.activeClass);H.addClass(C.activeClass);if(D.options.onSelectStack.length){for(var G=0;G<D.options.onSelectStack.length;G++){D.options.onSelectStack[G].call(H,F)}}});D._fillContent(D.options._active_date,D.options._current_date)},setMinDate:function(B){this.options.minDate=B;var D=this._strToDate(B);if(D instanceof Date&&D>this.options._current_date){this.options._active_date=this.options._current_date=D;if(this.options.onSelectStack.length){for(var C=0;C<this.options.onSelectStack.length;C++){this.options.onSelectStack[C].call(this.element,this.options._current_date)}}}this._fillContent(this.options._active_date,this.options._current_date)},setMaxDate:function(B){this.options.maxDate=B;var D=this._strToDate(B);if(D instanceof Date&&D<this.options._current_date){this.options._active_date=this.options._current_date=new Date(D.getFullYear(),D.getMonth(),D.getDate());if(this.options.onSelectStack.length){for(var C=0;C<this.options.onSelectStack.length;C++){this.options.onSelectStack[C].call(this.element,this.options._current_date)}}}this._fillContent(this.options._active_date,this.options._current_date)},addEventOnSelect:function(B){if(typeof (B)=="function"){this.options.onSelectStack.push(B)}},redraw:function(){this.options._active_date=new Date(this.options._current_date.getFullYear(),this.options._current_date.getMonth(),this.options._current_date.getDate());this._fillContent(this.options._active_date,this.options._current_date)}})})(jQuery);$.extend($.ui.month_calendar,{defaults:{minDate:null,maxDate:null,monthLabels:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],daysPlate:"",activeClass:"active",disabledClass:"disabled",onSelect:null,onDisplay:null,currentDate:null,calendarClass:"b-calendar",yearSimultaneously:1,readOnly:false,animation:false,prev_year:$('<a href="#" class="prev"/>'),next_year:$('<a href="#" class="next"/>')}});(function(A){A.widget("ui.calendar",{_parityDate:null,_getDay:function(B){var C=B.getDay();return(--C)<0?(C+7):C},_strToDate:function(G){var F=/(\d{4})\-(\d{1,2})\-(\d{1,2})/.exec(G);var B=new Date();if(F&&F.length==4){var E=parseInt(F[1],10),D=parseInt(F[2],10),C=parseInt(F[3],10);B.setFullYear(E);B.setMonth(D-1,1);B.setDate(C)}else{var F=/(\d{1,2})\.(\d{1,2})\.(\d{4})/.exec(G);if(F&&F.length==4){var E=parseInt(F[3],10),D=parseInt(F[2],10),C=parseInt(F[1],10);B.setFullYear(E);B.setMonth(D-1,1);B.setDate(C)}}B.setHours(0);B.setMinutes(0);B.setSeconds(0);B.setMilliseconds(0);return B},_getLastDayOfMonth:function(C){if(!(C instanceof Date)){return null}var D=C.getMonth(),B=new C.constructor(C);for(var E=28;E<=31;E++){B.setDate(E+1);if(B.getMonth()!=D){return E}}return null},_constructMonthDiv:function(U,Y){var H=this.element,c=this.options,R=this;var W=A("<div />").addClass("month");var X=R._getDay(U);var Z="<h3>"+c.monthLabels[parseInt(U.getMonth())]+"</h3>";Z+=c.daysPlate;Z+="<ul>";var G=null;var F=U.getFullYear(),M=U.getMonth()+1;var P=false,O=false,J=false;if(c.minDate){var K=R._strToDate(c.minDate),C=K.getFullYear(),D=K.getMonth()+1;if(C==F&&D==M){P=true;var N=K.getDate()}else{if(C>F||(C==F&&D>M)){J=true}}}if(c.maxDate){var S=R._strToDate(c.maxDate),B=S.getFullYear(),b=S.getMonth()+1;if(B==F&&b==M){O=true;var V=S.getDate()}else{if(B<F||(B==F&&b<M)){J=true}}}if((Y instanceof Date)&&((Y.getMonth()+1)==M)&&(Y.getFullYear()==F)){G=parseInt(Y.getDate(),10)}var I=new Date();var L=null;if((I.getFullYear()==F)&&((I.getMonth()+1)==M)){L=I.getDate()}var S=parseInt(R._getLastDayOfMonth(U))+X;for(var E=0;E<S;E++){var Q=((E-X)<0)?"":(1+E-X);_class="";if(Q===G){_class=c.activeDateClass}else{if(Q===L){_class=c.todayClass}else{if(Q===""||J||(P&&parseInt(Q,10)<N)||(O&&parseInt(Q,10)>V)){_class=c.disabledClass}}}Z+="<li";Z+=' class="'+_class+'"';Z+=(Q!="")?' date="'+F+"-"+M+"-"+Q+'"':"";Z+=">";Z+=Q;Z+="</li>"}Z+="</ul>";W.html(Z);if(typeof (c.onHoverIn)=="function"&&typeof (c.onHoverOut)=="function"){var a=function(){c.onHoverIn.call(R,A(this),R.options.parityDate)};var T=function(){c.onHoverOut.call(R,W)};A("li",W).hover(a,T)}return W},_fillContent:function(M,L,D){var I=this.element,B=this.options,K=this;var H=I.find("div.month");var E=[];for(var G=0;G<B.monthSimultaneously;G++){var F=new Date(M.getFullYear(),M.getMonth(),1,0,0,0,0);F.setMonth(F.getMonth()+G);var J=K._constructMonthDiv(F,L);J.attr("month",F.getMonth()+1);J.hide();E.push(J);I.append(J)}if(B.animation&&typeof (D)!="undefined"){var C=-50;if(D<0){C*=-1}H.eq(0).animate({marginLeft:C+"px"},100,"linear",function(){H.remove();I.find("div.month").fadeIn()})}else{H.remove();I.find("div.month").show()}var F=new Date(M.getFullYear(),M.getMonth(),1,0,0,0,0);if(F<this._strToDate(this.options.minDate)){A(".prev",this.element).addClass("disabled")}else{A(".prev",this.element).removeClass("disabled")}K._redrawSelected();if(typeof (B.onDisplay)=="function"){B.onDisplay.call(K)}},_selectMonth:function(B){this.options._active_date.setMonth(this.options._active_date.getMonth()+B);this._fillContent(this.options._active_date,this.options._current_date,B)},_redrawSelected:function(){if(!this.options.parityDate){return }var U=this.options._current_date,M=this.options.parityDate,N=null,G=null,I=new Date(),K=this.element.find(".month").find("li[date]"),J=0,R=0,F="",E="",S=this.element.find(".month"),C=S.eq(0),B=S.eq(1);K.removeClass(this.options.intermediateClass);K.removeClass(this.options.parityDateClass);K.removeClass(this.options.activeDateClass);if(U<M){N=U;G=M;F=this.options.activeDateClass;E=this.options.parityDateClass}else{if(U>M){N=M;G=U;F=this.options.parityDateClass;E=this.options.activeDateClass}else{return }}var P=false;S.each(function(W,X){var V=A(X).attr("month")-1;P=P||N.getMonth()<=V||G.getMonth()>=V});if(!P){return }var Q=true,O=true;if(N.getMonth()<(C.attr("month")-1)){N=new N.constructor(N);N.setMonth(C.attr("month")-1);N.setDate(1);Q=false}if(G.getMonth()>(B.attr("month")-1)){G=new G.constructor(G);G.setMonth(B.attr("month")-1);G.setDate(this._getLastDayOfMonth(G));O=false}var T=N.getFullYear()+"-"+(N.getMonth()+1)+"-"+N.getDate(),D=G.getFullYear()+"-"+(G.getMonth()+1)+"-"+G.getDate(),H=K.filter("[date='"+T+"']"),L=K.filter("[date='"+D+"']");J=(G-N)/(1000*24*3600);R=N.getDate()-1;if(J&&H.closest(".month").attr("month")==L.closest(".month").attr("month")&&C.attr("month")!=L.closest(".month").attr("month")){R+=C.find("li[date]").length}if(Q){K.eq(R).addClass(F)}while(J>=0){K.eq(R++).addClass(this.options.intermediateClass);J--}if(O){K.eq(R-1).addClass(E)}},_init:function(){var B=this.element,D=this.options,E=this;this.options._current_date=E._strToDate(D.currentDate);if(D.parityDate&&!(D.parityDate instanceof Date)){D.parityDate=E._strToDate(D.parityDate)}var C=A('<a href="#" class="prev"/>');var F=A('<a href="#" class="next"/>');B.addClass(D.calendarClass).append(C).append(F);this.options._active_date=new Date(this.options._current_date.getFullYear(),this.options._current_date.getMonth(),this.options._current_date.getDate(),0,0,0);F.click(function(G){G.preventDefault();G.stopPropagation();if(A(this).hasClass("disabled")){return }E._selectMonth(E.options.monthScrollerDiff)});C.click(function(G){G.preventDefault();G.stopPropagation();if(A(this).hasClass("disabled")){return }E._selectMonth(-1*E.options.monthScrollerDiff)});this.goNextMonth=function(){E._selectMonth(1)};this.goPrevMonth=function(){E._selectMonth(-1)};this.options.onSelectStack=[];if(typeof (D.onSelect)=="function"){this.options.onSelectStack.push(D.onSelect)}B.click(function(G){var J=A(G.target);if(!J.filter("li:not(."+D.disabledClass+")").length){return }if(D.readOnly){return }var H=E._strToDate(J.attr("date"));E.options._current_date=H;A("li."+D.activeDateClass,B).removeClass(D.activeDateClass);J.addClass(D.activeDateClass);if(E.options.onSelectStack.length){for(var I=0;I<E.options.onSelectStack.length;I++){E.options.onSelectStack[I].call(J,H)}}});E._fillContent(E.options._active_date,E.options._current_date)},setMinDate:function(B){this.options.minDate=B;var D=this._strToDate(B);if(D instanceof Date&&D>this.options._current_date){this.options._active_date=this.options._current_date=D;if(this.options.onSelectStack.length){for(var C=0;C<this.options.onSelectStack.length;C++){this.options.onSelectStack[C].call(this.element,this.options._current_date)}}}this._fillContent(this.options._active_date,this.options._current_date)},setMaxDate:function(B){this.options.maxDate=B;var D=this._strToDate(B);if(D instanceof Date&&D<this.options._current_date){this.options._active_date=this.options._current_date=new Date(D.getFullYear(),D.getMonth(),D.getDate());if(this.options.onSelectStack.length){for(var C=0;C<this.options.onSelectStack.length;C++){this.options.onSelectStack[C].call(this.element,this.options._current_date)}}}this._fillContent(this.options._active_date,this.options._current_date)},moveDateUp:function(B){B=this._strToDate(B);if(B instanceof Date&&B>this.options._current_date){this.options._active_date=this.options._current_date=new Date(B.getFullYear(),B.getMonth(),B.getDate());if(this.options.onSelectStack.length){for(var C=0;C<this.options.onSelectStack.length;C++){this.options.onSelectStack[C].call(this.element,this.options._current_date)}}}this._fillContent(this.options._active_date,this.options._current_date)},moveDateDown:function(B){B=this._strToDate(B);if(B instanceof Date&&B<this.options._current_date){this.options._active_date=this.options._current_date=new Date(B.getFullYear(),B.getMonth(),B.getDate());if(this.options.onSelectStack.length){for(var C=0;C<this.options.onSelectStack.length;C++){this.options.onSelectStack[C].call(this.element,this.options._current_date)}}}this._fillContent(this.options._active_date,this.options._current_date)},setParityDate:function(B){this.options.parityDate=this._strToDate(B)},addEventOnSelect:function(B){if(typeof (B)=="function"){this.options.onSelectStack.push(B)}},redraw:function(){this.options._active_date=new Date(this.options._current_date.getFullYear(),this.options._current_date.getMonth(),this.options._current_date.getDate());this._fillContent(this.options._active_date,this.options._current_date)},goNextMonth:function(){this._selectMonth(1)}})})(jQuery);$.extend($.ui.calendar,{defaults:{minDate:null,maxDate:null,monthLabels:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],dayLabels:["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],daysPlate:"",onSelect:null,onHoverIn:null,onHoverOut:null,onDisplay:null,currentDate:null,calendarClass:"b-calendar",monthSimultaneously:2,readOnly:false,animation:false,monthScrollerDiff:1,disabledClass:"disabled",todayClass:"current_date",activeDateClass:"to_date",parityDateClass:"from_date",intermediateClass:"selected_dates",parityDate:null}});(function(A){A.widget("ui.simple_autocomplete",{last_search_term:"",last_result:[],_init:function(){var B=this;var D=this.options;var C=A.ui.keyCode;A(document).keydown(function(E){if(E.keyCode==C.ESCAPE){B.close()}});A(document).click(function(E){if(!A(E.target).closest("#ui_autocomplete_container").length){B.close()}});A(this.element).click(function(E){E.preventDefault();E.stopPropagation()});A("#ui_autocomplete_container li").click(function(){B._choose(A(this));B._confirm()});A(this.element).keyup(function(E){switch(E.keyCode){case C.ESCAPE:B.close();break;case C.UP:B._move("up");break;case C.TAB:case C.DOWN:B._move("down");break;case C.ENTER:B._confirm();break;default:search_term=A(B.element).val();if(search_term.length>=D.min_len&&B.last_search_term!=search_term){B.search.call(B,search_term)}else{if(search_term.length<D.min_len){B.close()}}B.last_search_term=search_term;break}})},open:function(){if(A("#ui_autocomplete_container:hidden").length){A("#ui_autocomplete_container").show();if(typeof this.options.onOpen=="function"){this.options.onOpen()}}},close:function(){if(A("#ui_autocomplete_container:visible").length){A("#ui_autocomplete_container").hide();if(typeof this.options.onClose=="function"){this.options.onClose()}}},search:function(D){D=D.toLowerCase();var C=[];var B=this;if(typeof this.options.onSearch=="function"){this.options.onSearch()}A.each(B.options.data,function(E,F){if(F.match(";"+D)){C.push(E);if(A.inArray(E,B.last_result)==-1){A("#ui_autocomplete_element_"+E).show()}}});A.each(B.last_result,function(E,F){if(A.inArray(F,C)==-1){A("#ui_autocomplete_element_"+F).hide().removeClass("ui-autocomplete-active")}});B.last_result=C;if(C.length){this.open();this._found()}else{this.close();this._notFound()}},_found:function(){if(typeof this.options.onFound=="function"){this.options.onFound()}},_notFound:function(){if(typeof this.options.onNotFound=="function"){this.options.onNotFound()}},_choose:function(B){if(typeof this.options.onChoose=="function"){this.options.onChoose(B)}A("#ui_autocomplete_container .ui-autocomplete-active ").removeClass("ui-autocomplete-active");B.addClass("ui-autocomplete-active")},_confirm:function(){if(typeof this.options.onConfirm=="function"){this.options.onConfirm()}},_move:function(B){if(!A("#ui_autocomplete_container .ui-autocomplete-active ").length&&B=="down"){var C=A("#ui_autocomplete_container li:visible").eq(0);this._choose(C)}else{var D=A("#ui_autocomplete_container .ui-autocomplete-active ");if(B=="up"){var C=D.prevAll("li:visible").eq(0)}else{var C=D.nextAll("li:visible").eq(0)}if(C.length){this._choose(C)}}}})})(jQuery);jQuery.extend(jQuery.ui.simple_autocomplete,{defaults:{data:[],min_len:2,onOpen:null,onClose:null,onFound:null,onNotFound:null,onChoose:null,onConfirm:null,onSearch:null}})