(function(){Function.prototype.memoize=function(){var d={};var a=this;var c=arguments.length>0?arguments[i]:null;var b=function(){var e=[];for(var f=0;f<arguments.length;f++){e[f]=arguments[f]}if(!(e in d)){d[e]=a.apply(c,arguments)}return d[e]};b.unmemoize=function(){return a};return b};if(!Function.prototype.bind){Function.prototype.bind=function(b){if(typeof b==="undefined"){return this}var a=this;return function(){return a.apply(b,arguments)}}}})();(function(){if(typeof AP==="undefined"||!AP){AP=function(e){var d=this;if(d==window){return new AP(e)}else{d._init(e);return d}}}AP.prototype={init:function(e){e=e||{};var d=(e.win)?(e.win.contentWindow):e.win||window;e.win=d;e.doc=d.document;e.envinronment={prefix:"ap",uidIndex:0,modules:{}};this.config=e;this.constructor=AP},namespace:function(){var e=arguments,k=null,g,f,h;for(g=0;g<e.length;g=g+1){h=e[g].split(".");k=this;for(f=0;f<h.length;f=f+1){k[h[f]]=k[h[f]]||{};k=k[h[f]]}}return k},project:function(d){return this.namespace("Project."+d)},lambda:function(d){return(typeof d=="function")?d:function(){return d}},log:function(){},generateUID:function(g){var f=this.config.envinronment,d=(g)||f.prefix;return d+"-"+f.uidIndex++},stamp:function(e){if(!e){return e}var d=(typeof e==="string")?e:e._uid;if(!d){d=this.generateUID();e._uid=d}return d},tryThese:function(){for(var f=0,d=arguments.length;f<d;f++){try{return arguments[f]()}catch(g){}}return null},random:function(){return(new Date()).valueOf()+"_"+Math.floor(Math.random()*1000)},add:function(d,p,n,h){var g=this.config.envinronment.modules,r,k,q={version:(function(m){var s={major:0,minor:0,micro:0};if(typeof m==="string"){m.replace(/(\d+)\.(\d+)\.(\d+)/,function(t,u,w,v){s.major=u;s.minor=w;s.micro=v})}return s})(n)};if(!!g[d]){var f=q.version,e=g[d].version;if(!((f.major>e.major)||(f.major==e.major&&f.minor>e.minor)||(f.major==e.major&&f.minor==e.minor&&f.micro>e.micro))){return this}}if(typeof h!=="undefined"&&h){k=0;while(r=h[k++]){var l=r.name,o="Module registration failure: module "+d+" requires module "+l;if(typeof l==="string"&&typeof g[l]==="undefined"){throw new Error(o)}if(typeof r.minVersion==="string"){n=r.minVersion.split(/\./),j=0,existedVersion=g[l].version;if((existedVersion.major<n[0])||(existedVersion.major==n[0]&&existedVersion.minor<n[1])||(existedVersion.major==n[0]&&existedVersion.minor==n[1]&&existedVersion.micro<n[2])){throw new Error(o+" version at least "+r.minVersion)}}if(typeof r.maxVersion==="string"){n=r.maxVersion.split(/\./),j=0,existedVersion=g[l].version;if((existedVersion.major>n[0])||(existedVersion.major==n[0]&&existedVersion.minor>n[1])||(existedVersion.major==n[0]&&existedVersion.minor==n[1]&&existedVersion.micro>n[2])){throw new Error(o+" version no greater than "+r.maxVersion)}}}}g[d]=q;p(this);return this},extend:function(f,d){for(var e in (d||{})){f[e]=d[e]}return f},merge:function(){var d={};for(var e=0,f=arguments.length;e<f;e++){a.extend(d,arguments[e])}return d}};var a=AP,c=a.prototype,b;for(b in c){a[b]=c[b]}a.init()})();AP.add("browser",function(a){a.Browser=function(){var d={trident:0,presto:0,gecko:0,webkit:0,platform:((window.orientation!=undefined)?"ipod":(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase()),plugins:{flash:(function(){var e=(AP.tryThese(function(){return navigator.plugins["Shockwave Flash"].description},function(){return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")})||"0 r0").match(/\d+/g);return{version:parseInt(e[0]||0+"."+e[1],10)||0,build:parseInt(e[2],10)||0}})()}};var c=navigator.userAgent,b;if((/KHTML/).test(c)){d.webkit=1}b=c.match(/AppleWebKit\/([^\s]*)/);if(b&&b[1]){d.webkit=parseFloat(b[1])}if(!d.webkit){b=c.match(/Opera[\s\/]([^\s]*)/);if(b&&b[1]){d.opera=parseFloat(b[1]);b=c.match(/Opera Mini[^;]*/);if(b){d.mobile=b[0]}}else{b=c.match(/MSIE\s([^;]*)/);if(b&&b[1]){d.trident=parseFloat(b[1])}else{b=c.match(/Gecko\/([^\s]*)/);if(b){d.gecko=1;b=c.match(/rv:([^\s\)]*)/);if(b&&b[1]){d.gecko=parseFloat(b[1])}}}}}return d}()},"0.0.3");AP.add("lang",function(c){c.Lang=c.Lang||{};var h=c.Lang,e="[object Array]",k="[object Function]",f="[object RegExp]",b={string:"string","boolean":"boolean",number:"number"},d="object",g="undefined",a=Object.prototype;h.isArray=function(l){return a.toString.apply(l)===e};h.isBoolean=function(l){return typeof l===b["boolean"]||l instanceof Boolean};h.isFunction=function(l){return a.toString.apply(l)===k};h.isDate=function(l){return l instanceof Date};h.isNull=function(l){return l===null};h.isNumber=function(l){return(typeof l===b.number||l instanceof Number)&&isFinite(l)};h.isObject=function(m,l){return(m&&(typeof m===d||(!l&&h.isFunction(m))))||false};h.isString=function(l){return typeof l===b.string};h.isUndefined=function(l){return typeof l===g};h.isValue=function(l){return(h.isObject(l)||h.isString(l)||h.isNumber(l)||h.isBoolean(l))};h.isRegExp=function(l){return typeof(l)===f};h.compare=function(m,l){var q,p,o;function n(r){return h.isObject(r)&&(h.isNumber(r)||h.isString(r.valueOf())||h.isBoolean(r))?r.valueOf():r}if(h.isNull(m)&&h.isNull(l)){return true}if(h.isUndefined(m)&&h.isUndefined(l)){return true}m=h.isDate(m)?m.getTime():m;l=h.isDate(l)?l.getTime():l;m=n(m);l=n(l);if(typeof m in b&&typeof l in b){return m==l}if(h.isFunction(m)&&h.isFunction(l)){return m.toString()==l.toString()}if(h.isArray(m)&&h.isArray(l)){q=m.length;if(q!=l.length){return false}while(q--){if(!h.compare(m[q],l[q])){return false}}return true}if(h.isObject(m)&&h.isObject(l)){p=o=0;for(i in m){o++;p++}if(p!=o){return false}for(i in m){if(!h.compare(m[i],l[i])){return false}}return true}return false}},"0.0.3");AP.add("array",function(b){var a=b.Lang,c=Array.prototype;b.Array=function(g,e,f){var d=(f)?2:AP.Array.test(g);if(d){return c.slice.call(g,e||0)}else{return[g]}};var b=b.Array;b.test=function(f){var e=0;if(a.isObject(f,true)){if(a.isArray(f)){e=1}else{try{if("length" in f&&!("tagName" in f)&&!("alert" in f)){e=2}}catch(d){}}}return e};b.each=(c.forEach)?function(d,e,g){c.forEach.call(d,e,g||b);return b}:function(e,h,k){var d=e.length,g;for(g=0;g<d;g=g+1){h.call(k||b,e[g],g,e)}return b};b.some=(c.some)?function(d,e,g){return d.some(e,g||AP.config.win)}:function(e,h,k){var d=e.length;for(var g=0;g<d;g=g+1){if(h.call(k||AP.config.win,e[g],g,e)){return true}}return false};b.hash=function(f,e){var m={},d=f.length,h=e&&e.length,g;for(g=0;g<d;g=g+1){m[f[g]]=(h&&h>g)?e[g]:true}return m};b.indexOf=(Array.prototype.indexOf)?function(d,e,f){return(f)?d.indexOf(e,f):d.indexOf(e)}:function(d,g,h){var f=d.length;var e=Number(h)||0;e=(e<0)?Math.ceil(e):Math.floor(e);if(e<0){e+=f}for(;e<f;e++){if(e in d&&d[e]===g){return e}}return -1};b.filter=(c.filter)?function(d,e,f){return d.filter(e,f||AP.config.win)}:function(e,k,m){var d=e.length>>>0;if(typeof k!="function"){throw new TypeError()}var h=new Array();var g=m||AP.config.win;for(var f=0;f<d;f++){if(f in e){var l=e[f];if(k.call(g,l,f,e)){h.push(l)}}}return h};b.unique=function(d){var f={},e=d.length;while(e--){if(d[e] in f){d.splice(e,1)}else{f[d[e]]=true}}return d};b.map=(c.map)?function(d,e,f){return d.map(e,f||AP.config.win)}:function(e,g,h){var d=[],f=e.length;while(f--){d[f]=g.call(h||AP.config.win,e[f])}return d};b.clean=function(d){return this.filter(d,function(e){return AP.Lang.isValue(e)},this)};b.every=(c.every)?function(d,e,f){return d.every(e,f||AP.config.win)}:function(d,g,h){var f=d.length,e=h||AP.config.win;while(f--){if(f in d&&!g.call(e,d[f],f,d)){return false}}return true};b.erase=function(d,f){var e=d.length;while(e--){if(d[e]===f){d.splice(e,1)}}return d};b.extend=function(d,e){d=d?d:[];e=e?e:[];for(var g=0,f=e.length;g<f;g++){d.push(e[g])}return d}},"1.1.0",[{name:"lang",minVersion:"0.0.3"}]);AP.add("object",function(a){a.Object=function(d){var c=function(){};c.prototype=d;return new c()};var b=a.Object;b.keys=function(e){var c=[],d;for(d in e){if(e.hasOwnProperty(d)){c.push(d)}}return c};b.each=function(k,h,l,g){var e=l||a;for(var d in k){if(g||(k.hasOwnProperty&&k.hasOwnProperty(d))){h.call(e,k[d],d,k)
}}return a};b.filter=function(g,e,h){var d={};b.each(g,function(f,c){if(e(f)){d[c]=f}},h||a);return d};b.clean=function(c){return b.filter(c,function(d){return a.Lang.isValue(d)})};b.map=function(g,e,h){var d={};b.each(g,function(f,c){d[c]=e(f)},h||a);return d};b.some=function(h,g,k){var e=k||a;for(var d in h){if(g.call(e,h[d])){return true}}return false};b.every=function(h,g,k){var e=k||a;for(var d in h){if(!g.call(e,h[d])){return false}}return true};b.indexOf=function(e,c){for(var d in e){if(e[d]==c){return d}}return null}},"0.0.1",[{name:"lang",minVersion:"0.0.2"}]);AP.add("reflection",function(b){var d=b.Reflection={},c=b.Array,a=b.Lang;b.each=function(h,g,f){if(h.each){if(f){return h.each.call(h,g,f)}else{return h.each(g)}}var e=c.test(h);switch(e){case 1:return c.each(h,g,f);case 2:return c.each(c(h,0,true),g,f);default:return b.Object.each(h,g,f)}};d.deepCopy=function(h,g,e){if(!a.isObject(h)){return h}var f;if(a.isDate(h)){return new Date(h)}else{if(a.isRegExp(h)){return new RegExp(h.source)}else{if(a.isFunction(h)){f=h.bind(e||h)}else{if(a.isArray(h)){f=[]}else{f=(g)?{}:b.Object(h)}}}}b.each(h,function(l,k){this[k]=d.deepCopy(l,g,this)},f);return f}},"0.0.1",[{name:"lang",minVersion:"0.0.3"},{name:"array",minVersion:"1.1.0"},{name:"object",minVersion:"0.0.1"}]);AP.add("string",function(b){b.String=b.String||{};var c=b.String,a=b.Lang,d;c.unescapeHTML=function(e){return e.replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&#160;/g," ").replace(/&/g,"&amp;")};c.capitalize=function(e){if(!a.isString(e)){return null}return e.replace(/\w+/g,function(f){return f.charAt(0).toUpperCase()+f.substr(1).toLowerCase()})};c.pluralize=function(h,f){var e,g=h;h=Math.abs(h)%100;e=h%10;if(h>10&&h<20){return g+" "+f[5]}if(e>1&&e<5){return g+" "+f[2]}if(h==1){return g+" "+f[1]}return g+" "+f[5]};c.trim=function(g){var h=g.replace(/^\s\s*/,""),e=/\s/,f=h.length;while(e.test(h.charAt(--f))){}return h.slice(0,f+1)};c.qualifyPath=function(e){if(!d){d=document.createElement("a")}d.href=e;return d.href};c.convertHtmlEntities=function(e){return e.replace(/&laquo;/g,"«").replace(/&raquo;/g,"»").replace(/&bdquo;/g,"„").replace(/&ldquo;/g,"“").replace(/&mdash;/g,"—").replace(/&ndash;/g,"–").replace(/&minus;/g,"−").replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&lsquo;/g,"‘").replace(/&rsquo;/g,"’").replace(/&nbsp;/g," ").replace(/&trade;/g,"™").replace(/&reg;/g,"®").replace(/&copy;/g,"©").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&apos;/g,"'").replace(/&[a-z]+;/ig,"")}},"0.0.2",[{name:"lang",minVersion:"0.0.1"}]);AP.add("stringBuffer",function(a){var b=a.Browser.trident==6;a.StringBuffer=(b)?function(){this.buffer=[];this.index=0;var d=0,c;while(c=arguments[d++]){this.buffer[this.index++]=c}}:function(){this.buffer="";var d=0,c;while(c=arguments[d++]){this.buffer+=c}};a.StringBuffer.prototype.add=(b)?function(c){this.buffer[this.index++]=c;return this}:function(c){this.buffer+=c;return this};a.StringBuffer.prototype.toString=(b)?function(){return this.buffer.join("")}:function(){return this.buffer};a.StringBuffer.prototype.empty=(b)?function(){this.buffer.length=0;this.index=0}:function(){this.buffer=""}},"1.0.3",[{name:"browser",minVersion:"0.0.2"}]);AP.add("date",function(b){b.Date=b.Date||{};var c=b.Date;var a=["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"];c.parseDate=function(e,l){var d=new Date();d.setHours(0);d.setMinutes(0);d.setSeconds(0);switch(l){case"yyyy-mm-dd hh:ii:ss":var g=e.split(" "),f=g[0].split("-"),k=g[1].split(":");d.setDate(f[2]);d.setMonth(parseInt(f[1],10)-1);d.setFullYear(f[0]);d.setHours(k[0]);d.setMinutes(k[1]?k[1]:0);d.setSeconds(k[2]?k[2]:0);break;case"yyyy-mm-dd":var f=e.split("-");d.setDate(f[2]);d.setMonth(parseInt(f[1],10)-1);d.setFullYear(f[0]);break;case"d mmmm yyyy":case"dd mmmm yyyy":var f=e.split(" ");if(f.length!=3){throw AP.Messages.Date.invalidDate}d.setDate(f[0]);var h=Array.indexOf(a,f[1]);if(h==-1){throw AP.Messages.Date.invalidMonth}d.setMonth(h);d.setFullYear(f[2]);break;case"dd.mm.yyyy":var f=e.split(".");d.setDate(f[0]);d.setMonth(parseInt(f[1],10)-1);d.setFullYear(f[2]);break}return d};c.formatDate=function(f,l){var h=f.getFullYear().toString(),k=(f.getMonth()+1).toString(),e=f.getDate().toString(),d=f.getHours().toString(),g=f.getMinutes().toString(),m=f.getSeconds().toString();switch(l){case"yyyy-mm-dd hh:ii:ss":return h+"-"+(k.length<2?"0":"")+k+"-"+(e.length<2?"0":"")+e+" "+(d.length<2?"0":"")+d+":"+(g.length<2?"0":"")+g+":"+(m.length<2?"0":"")+m;break;case"d mmmm yyyy":return e+" "+a[k-1]+" "+h;break;case"dd mmmm yyyy":return(e.length<2?"0":"")+e+" "+a[k-1]+" "+h;break;case"hh:ii":return(d.length<2?"0":"")+d+":"+(g.length<2?"0":"")+g;break;case"dd.mm.yyyy":return(e.length<2?"0":"")+e+"."+(k.length<2?"0":"")+k+"."+h;case"dd.mm.yy":return(e.length<2?"0":"")+e+"."+(k.length<2?"0":"")+k+"."+h.substr(2,2)}};c.addTime=function(d,f){if(!f){return d}var e=f.split(":");d.setHours(e[0]);d.setMinutes(e[1]?e[1]:0);return d};c.fromJson=function(d){return c.parseDate(d,"yyyy-mm-dd hh:ii:ss")};c.toJson=function(d){return c.formatDate(d,"yyyy-mm-dd hh:ii:ss")}},"0.0.1");AP.add("templateEngine",function(A){A.TemplateEngine=A.TemplateEngine||{templates:{}};var T=A.TemplateEngine,Ar=A.Array,O=A.Object;T.compileTemplate=function(templateHolder,templateName){if(this.templates[templateName]){return}templateHolder=(templateHolder.value)?templateHolder.value:((templateHolder.nodeName&&templateHolder.nodeName.toLowerCase()=="script")?templateHolder.innerHTML:templateHolder);var instructionRegex=/%\{.+?\}+/gim,rawTemplateText=templateHolder.replace(/<\!--\s*<\!\[CDATA\[\s*|\s*\]\]>\s*-->/gim,"").replace(/\s{2,}/gim," "),stringFragments=rawTemplateText.split(instructionRegex),stringFragment,instructions=[],index=0,tree=[],treeIndex=0;while((processingArray=instructionRegex.exec(rawTemplateText))!=null){var instruction=processingArray[0],node={};var fillRegex=/([^%{}]+[\w\.]+)/,includeRegex=/%include\s+([\w]+)(,\s+[\w]+|)/,evalRegex=/%eval\s+([\w\s\.%=\!\[\]']+)/,conditionalRegex=/%if\s+\(([\w\s\.%=\!\[\]']+)\)\s+\{('[^\']+'|[^\}]+)\}/,nestedConditionRegex=/%elseif\s+\(([\w\s\.%=\!\[\]']+)\)\s+\{('[^\']+'|[^\}]+)\}/,alternateConditionalRegex=/%else\s+\{('[^\']+'|[^\}]+)\}/;if(includeRegex.test(instruction)){var tempArray=includeRegex.exec(instruction);node.type="include";node.template=tempArray[1];node.data=tempArray[2]?tempArray[2].replace(/^,\s+/,""):null}else{if(evalRegex.test(instruction)){tempArray=evalRegex.exec(instruction);node.type="eval";node.expression=tempArray[1]}else{if(conditionalRegex.test(instruction)){tempArray=conditionalRegex.exec(instruction);node.type="if";node.expression=tempArray[1];node.positive={};if(/^'[\w\W]+'$/.test(tempArray[2])){node.positive.type="text";node.positive.value=tempArray[2].replace(/'/g,"")}else{node.positive.type="fill";node.positive.value=tempArray[2]}node.negative={};if(nestedConditionRegex.test(instruction)){var anotherTempArray=nestedConditionRegex.exec(instruction);node.negative.type="if";node.negative.expression=anotherTempArray[1];node.negative.positive={};if(/^'[\w\W]+'$/.test(anotherTempArray[2])){node.negative.positive.type="text";node.negative.positive.value=anotherTempArray[2].replace(/'/g,"")}else{node.negative.positive.type="fill";node.negative.positive.value=anotherTempArray[2]}node.negative.negative={};node.negative.negative.type="text";node.negative.negative.value=""}if(alternateConditionalRegex.test(instruction)){anotherTempArray=alternateConditionalRegex.exec(instruction);var nestedNode={};if(/^'[\w\W]+'$/.test(anotherTempArray[1])){nestedNode.type="text";nestedNode.value=anotherTempArray[1].replace(/'/g,"")}else{nestedNode.type="fill";nestedNode.value=anotherTempArray[1]}if(!!node.negative.negative){node.negative.negative=nestedNode}else{node.negative=nestedNode}}else{node.negative.type="text";node.negative.value=""}}else{if(fillRegex.test(instruction)){tempArray=fillRegex.exec(instruction);
node.type="fill";node.value=tempArray[1]}}}}instructions[index++]=node}index=0;while(AP.Lang.isValue(stringFragment=stringFragments[index])){tree[treeIndex++]={type:"text",value:stringFragment};if(instruction=instructions[index++]){tree[treeIndex++]=instruction}}this.templates[templateName]=tree};T.processTemplate=function(name,data){var result=new A.StringBuffer();var template=this.templates[name];if((data instanceof Object)&&O.keys(data).length>1){O.each(data,function(item){var node,i=0;while(node=template[i++]){result.add(T.processNode(node,item))}},A)}else{data=Ar(data);Ar.each(data,function(item){var node,i=0;while(node=template[i++]){result.add(T.processNode(node,item))}},A)}return result.toString()};T.processNode=function(node,data){switch(node.type){case"text":return node.value;case"fill":return T.evaluateSimpleExpression(node.value,data);case"include":return node.data?T.processTemplate(node.template,T.evaluateSimpleExpression(node.data,data)):T.processTemplate(node.template);case"if":if(T.evaluateToughExpression(node.expression,data)){return T.processNode(node.positive,data)}else{return T.processNode(node.negative,data)}case"eval":return T.evaluateToughExpression(node.expression,data)}return""};T.evaluateSimpleExpression=function(exp,data){if(!!data[exp]){return data[exp]}var sExp=exp.replace(/^\w\./,"");if(!!data[sExp]){return data[sExp]}var p=exp.split(/\./),result,i=1,prop;if(result=data[p[0]]){while(prop=p[i++]){result=result[prop]}return result}p.shift();if(result=data[p[0]]){while(prop=p[i++]){result=result[prop]}return result}return""};T.evaluateToughExpression=function(exp,data){if(/[\W\s]+/.test(exp)){var pExp=exp.replace(/(^[\w$]+[\w$\.]+)\s+|\s+([\w$]+[\w$\.]+)\s+|\s+([\w$]+[\w$\.]+)$/,function(e,a,b,c){var v=a||b||c||"";return" "+T.evaluateSimpleExpression(v,data)+" "});try{return eval(pExp)}catch(e){throw"Cannot evaluate "+pExp}}else{return T.evaluateSimpleExpression(exp,data)}}},"0.0.2",[{name:"array",minVersion:"1.0.0"},{name:"object",minVersion:"0.0.1"},{name:"stringBuffer",minVersion:"1.0.3"}]);AP.add("interface.options",function(b){var c=b.namespace("Interface"),a=b.Lang,d=b.Object;c.Options={setOptions:function(e){var f=[];function g(l,k){var h={};d.each(k,function(n,m){if(a.isValue(n)){if(a.isObject(n)&&!n.nodeType&&!("jquery" in n)&&!a.isFunction(n)){h[m]=g(l[m],n)}else{h[m]=n}f[m]=true}},this);d.each(l,function(n,m){if(!f[m]){h[m]=n}},this);delete f;return h}this.options=g(this.options,e)}}},"0.0.1",[{name:"lang",minVersion:"0.0.3"},{name:"object",minVersion:"0.0.1"}]);AP.add("interface.searchStringBuilder",function(b){var c=b.namespace("Interface"),a=b.Lang;c.SearchStringBuilder={buildSearchString:function(f,e){return d(f,e)}};function d(f,e){var g=[];AP.Object.each(f,function(m,l){if(!a.isUndefined(m)){if(e){l=e+"["+l+"]"}var k,h;if(a.isArray(m)){b.Array.each(m,function(o,n){h[n]=o},this);k=d(h,l)}else{if(a.isObject(m)){k=d(m,l)}else{k=l+"="+encodeURIComponent(m)}}g.push(k)}});return g.join("&amp;")}},"0.0.1",[{name:"array",minVersion:"1.0.0"},{name:"object",minVersion:"0.0.1"}]);AP.add("timer",function(b){b.Timer=b.Timer||{};var a=b.Lang;b.Timer.later=function(p,e,q,h,k){p=p||0;e=e||{};var g=q,n=h,l,c;if(a.isString(q)){g=e[q]}if(!g){throw new TypeError("method undefined")}if(!a.isArray(n)){n=[h]}l=function(){g.apply(e,n)};c=(k)?setInterval(l,p):setTimeout(l,p);return{interval:k,cancel:function(){if(this.interval){clearInterval(c)}else{clearTimeout(c)}}}}},"0.0.1",[{name:"lang",minVersion:"0.0.1"}]);
/*
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
(function(){var n=this,g,A=n.jQuery,r=n.$,q=n.jQuery=n.$=function(G,H){return new q.fn.init(G,H)},F=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;q.fn=q.prototype={init:function(G,J){G=G||document;if(G.nodeType){this[0]=G;this.length=1;this.context=G;return this}if(typeof G==="string"){var I=F.exec(G);if(I&&(I[1]||!J)){if(I[1]){G=q.clean([I[1]],J)}else{var K=document.getElementById(I[3]);if(K&&K.id!=I[3]){return q().find(G)}var H=q(K||[]);H.context=document;H.selector=G;return H}}else{return q(J).find(G)}}else{if(q.isFunction(G)){return q(document).ready(G)}}if(G.selector&&G.context){this.selector=G.selector;this.context=G.context}return this.setArray(q.isArray(G)?G:q.makeArray(G))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(G){return G===g?Array.prototype.slice.call(this):this[G]},pushStack:function(H,J,G){var I=q(H);I.prevObject=this;I.context=this.context;if(J==="find"){I.selector=this.selector+(this.selector?" ":"")+G}else{if(J){I.selector=this.selector+"."+J+"("+G+")"}}return I},setArray:function(G){this.length=0;Array.prototype.push.apply(this,G);return this},each:function(H,G){return q.each(this,H,G)},index:function(G){return q.inArray(G&&G.jquery?G[0]:G,this)},attr:function(H,J,I){var G=H;if(typeof H==="string"){if(J===g){return this[0]&&q[I||"attr"](this[0],H)}else{G={};G[H]=J}}return this.each(function(K){for(H in G){q.attr(I?this.style:this,H,q.prop(this,G[H],I,K,H))}})},css:function(G,H){if((G=="width"||G=="height")&&parseFloat(H)<0){H=g}return this.attr(G,H,"curCSS")},text:function(H){if(typeof H!=="object"&&H!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(H))}var G="";q.each(H||this,function(){q.each(this.childNodes,function(){if(this.nodeType!=8){G+=this.nodeType!=1?this.nodeValue:q.fn.text([this])}})});return G},wrapAll:function(G){if(this[0]){var H=q(G,this[0].ownerDocument).clone();if(this[0].parentNode){H.insertBefore(this[0])}H.map(function(){var I=this;while(I.firstChild){I=I.firstChild}return I}).append(this)}return this},wrapInner:function(G){return this.each(function(){q(this).contents().wrapAll(G)})},wrap:function(G){return this.each(function(){q(this).wrapAll(G)})},append:function(){return this.domManip(arguments,true,function(G){if(this.nodeType==1){this.appendChild(G)}})},prepend:function(){return this.domManip(arguments,true,function(G){if(this.nodeType==1){this.insertBefore(G,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(G){this.parentNode.insertBefore(G,this)})},after:function(){return this.domManip(arguments,false,function(G){this.parentNode.insertBefore(G,this.nextSibling)})},end:function(){return this.prevObject||q([])},push:[].push,sort:[].sort,splice:[].splice,find:function(G){if(this.length===1){var H=this.pushStack([],"find",G);H.length=0;q.find(G,this[0],H);return H}else{return this.pushStack(q.unique(q.map(this,function(I){return q.find(G,I)})),"find",G)}},clone:function(I){var G=this.map(function(){if(!q.support.noCloneEvent&&!q.isXMLDoc(this)){var K=this.outerHTML;if(!K){var L=this.ownerDocument.createElement("div");L.appendChild(this.cloneNode(true));K=L.innerHTML}return q.clean([K.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(I===true){var J=this.find("*").andSelf(),H=0;G.find("*").andSelf().each(function(){if(this.nodeName!==J[H].nodeName){return}var K=q.data(J[H],"events");for(var M in K){for(var L in K[M]){q.event.add(this,M,K[M][L],K[M][L].data)}}H++})}return G},filter:function(G){return this.pushStack(q.isFunction(G)&&q.grep(this,function(I,H){return G.call(I,H)})||q.multiFilter(G,q.grep(this,function(H){return H.nodeType===1})),"filter",G)},closest:function(G){var I=q.expr.match.POS.test(G)?q(G):null,H=0;return this.map(function(){var J=this;while(J&&J.ownerDocument){if(I?I.index(J)>-1:q(J).is(G)){q.data(J,"closest",H);return J}J=J.parentNode;H++}})},not:function(G){if(typeof G==="string"){if(f.test(G)){return this.pushStack(q.multiFilter(G,this,true),"not",G)}else{G=q.multiFilter(G,this)}}var H=G.length&&G[G.length-1]!==g&&!G.nodeType;return this.filter(function(){return H?q.inArray(this,G)<0:this!=G})},add:function(G){return this.pushStack(q.unique(q.merge(this.get(),typeof G==="string"?q(G):q.makeArray(G))))
},is:function(G){return !!G&&q.multiFilter(G,this).length>0},hasClass:function(G){return !!G&&this.is("."+G)},val:function(M){if(M===g){var G=this[0];if(G){if(q.nodeName(G,"option")){return(G.attributes.value||{}).specified?G.value:G.text}if(q.nodeName(G,"select")){var K=G.selectedIndex,N=[],O=G.options,J=G.type=="select-one";if(K<0){return null}for(var H=J?K:0,L=J?K+1:O.length;H<L;H++){var I=O[H];if(I.selected){M=q(I).val();if(J){return M}N.push(M)}}return N}return(G.value||"").replace(/\r/g,"")}return g}if(typeof M==="number"){M+=""}return this.each(function(){if(this.nodeType!=1){return}if(q.isArray(M)&&/radio|checkbox/.test(this.type)){this.checked=(q.inArray(this.value,M)>=0||q.inArray(this.name,M)>=0)}else{if(q.nodeName(this,"select")){var P=q.makeArray(M);q("option",this).each(function(){this.selected=(q.inArray(this.value,P)>=0||q.inArray(this.text,P)>=0)});if(!P.length){this.selectedIndex=-1}}else{this.value=M}}})},html:function(G){return G===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(G)},replaceWith:function(G){return this.after(G).remove()},eq:function(G){return this.slice(G,+G+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(G){return this.pushStack(q.map(this,function(I,H){return G.call(I,H,I)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(L,O,N){if(this[0]){var K=(this[0].ownerDocument||this[0]).createDocumentFragment(),H=q.clean(L,(this[0].ownerDocument||this[0]),K),J=K.firstChild;if(J){for(var I=0,G=this.length;I<G;I++){N.call(M(this[I],J),this.length>1||I>0?K.cloneNode(true):K)}}if(H){q.each(H,B)}}return this;function M(P,Q){return O&&q.nodeName(P,"table")&&q.nodeName(Q,"tr")?(P.getElementsByTagName("tbody")[0]||P.appendChild(P.ownerDocument.createElement("tbody"))):P}}};q.fn.init.prototype=q.fn;function B(G,H){if(H.src){q.ajax({url:H.src,async:false,dataType:"script"})}else{q.globalEval(H.text||H.textContent||H.innerHTML||"")}if(H.parentNode){H.parentNode.removeChild(H)}}function e(){return +new Date}q.extend=q.fn.extend=function(){var L=arguments[0]||{},J=1,K=arguments.length,G=false,I;if(typeof L==="boolean"){G=L;L=arguments[1]||{};J=2}if(typeof L!=="object"&&!q.isFunction(L)){L={}}if(K==J){L=this;--J}for(;J<K;J++){if((I=arguments[J])!=null){for(var H in I){var M=L[H],N=I[H];if(L===N){continue}if(G&&N&&typeof N==="object"&&!N.nodeType){L[H]=q.extend(G,M||(N.length!=null?[]:{}),N)}else{if(N!==g){L[H]=N}}}}}return L};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,s=document.defaultView||{},u=Object.prototype.toString;q.extend({noConflict:function(G){n.$=r;if(G){n.jQuery=A}return q},isFunction:function(G){return u.call(G)==="[object Function]"},isArray:function(G){return u.call(G)==="[object Array]"},isXMLDoc:function(G){return G.nodeType===9&&G.documentElement.nodeName!=="HTML"||!!G.ownerDocument&&q.isXMLDoc(G.ownerDocument)},globalEval:function(I){if(I&&/\S/.test(I)){var H=document.getElementsByTagName("head")[0]||document.documentElement,G=document.createElement("script");G.type="text/javascript";if(q.support.scriptEval){G.appendChild(document.createTextNode(I))}else{G.text=I}H.insertBefore(G,H.firstChild);H.removeChild(G)}},nodeName:function(H,G){return H.nodeName&&H.nodeName.toUpperCase()==G.toUpperCase()},each:function(I,M,H){var G,J=0,K=I.length;if(H){if(K===g){for(G in I){if(M.apply(I[G],H)===false){break}}}else{for(;J<K;){if(M.apply(I[J++],H)===false){break}}}}else{if(K===g){for(G in I){if(M.call(I[G],G,I[G])===false){break}}}else{for(var L=I[0];J<K&&M.call(L,J,L)!==false;L=I[++J]){}}}return I},prop:function(J,K,I,H,G){if(q.isFunction(K)){K=K.call(J,H)}return typeof K==="number"&&I=="curCSS"&&!b.test(G)?K+"px":K},className:{add:function(G,H){q.each((H||"").split(/\s+/),function(I,J){if(G.nodeType==1&&!q.className.has(G.className,J)){G.className+=(G.className?" ":"")+J}})},remove:function(G,H){if(G.nodeType==1){G.className=H!==g?q.grep(G.className.split(/\s+/),function(I){return !q.className.has(H,I)}).join(" "):""}},has:function(H,G){return H&&q.inArray(G,(H.className||H).toString().split(/\s+/))>-1}},swap:function(J,I,K){var G={};for(var H in I){G[H]=J.style[H];J.style[H]=I[H]}K.call(J);for(var H in I){J.style[H]=G[H]}},css:function(J,H,L,G){if(H=="width"||H=="height"){var N,I={position:"absolute",visibility:"hidden",display:"block"},M=H=="width"?["Left","Right"]:["Top","Bottom"];function K(){N=H=="width"?J.offsetWidth:J.offsetHeight;if(G==="border"){return}q.each(M,function(){if(!G){N-=parseFloat(q.curCSS(J,"padding"+this,true))||0}if(G==="margin"){N+=parseFloat(q.curCSS(J,"margin"+this,true))||0}else{N-=parseFloat(q.curCSS(J,"border"+this+"Width",true))||0}})}if(J.offsetWidth!==0){K()}else{q.swap(J,I,K)}return Math.max(0,Math.round(N))}return q.curCSS(J,H,L)},curCSS:function(K,H,I){var N,G=K.style;if(H=="opacity"&&!q.support.opacity){N=q.attr(G,"opacity");return N==""?"1":N}if(H.match(/float/i)){H=y}if(!I&&G&&G[H]){N=G[H]}else{if(s.getComputedStyle){if(H.match(/float/i)){H="float"}H=H.replace(/([A-Z])/g,"-$1").toLowerCase();var O=s.getComputedStyle(K,null);if(O){N=O.getPropertyValue(H)}if(H=="opacity"&&N==""){N="1"}}else{if(K.currentStyle){var L=H.replace(/\-(\w)/g,function(P,Q){return Q.toUpperCase()});N=K.currentStyle[H]||K.currentStyle[L];if(!/^\d+(px)?$/i.test(N)&&/^\d/.test(N)){var J=G.left,M=K.runtimeStyle.left;K.runtimeStyle.left=K.currentStyle.left;G.left=N||0;N=G.pixelLeft+"px";G.left=J;K.runtimeStyle.left=M}}}}return N},clean:function(H,M,K){M=M||document;if(typeof M.createElement==="undefined"){M=M.ownerDocument||M[0]&&M[0].ownerDocument||document}if(!K&&H.length===1&&typeof H[0]==="string"){var J=/^<(\w+)\s*\/?>$/.exec(H[0]);if(J){return[M.createElement(J[1])]}}var I=[],G=[],N=M.createElement("div");q.each(H,function(R,U){if(typeof U==="number"){U+=""}if(!U){return}if(typeof U==="string"){U=U.replace(/(<(\w+)[^>]*?)\/>/g,function(W,X,V){return V.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?W:X+"></"+V+">"});var Q=U.replace(/^\s+/,"").substring(0,10).toLowerCase();var S=!Q.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!Q.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||Q.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!Q.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!Q.indexOf("<td")||!Q.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!Q.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!q.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];N.innerHTML=S[1]+U+S[2];while(S[0]--){N=N.lastChild}if(!q.support.tbody){var T=/<tbody/i.test(U),P=!Q.indexOf("<table")&&!T?N.firstChild&&N.firstChild.childNodes:S[1]=="<table>"&&!T?N.childNodes:[];for(var O=P.length-1;O>=0;--O){if(q.nodeName(P[O],"tbody")&&!P[O].childNodes.length){P[O].parentNode.removeChild(P[O])}}}if(!q.support.leadingWhitespace&&/^\s/.test(U)){N.insertBefore(M.createTextNode(U.match(/^\s*/)[0]),N.firstChild)}U=q.makeArray(N.childNodes)}if(U.nodeType){I.push(U)}else{I=q.merge(I,U)}});if(K){for(var L=0;I[L];L++){if(q.nodeName(I[L],"script")&&(!I[L].type||I[L].type.toLowerCase()==="text/javascript")){G.push(I[L].parentNode?I[L].parentNode.removeChild(I[L]):I[L])}else{if(I[L].nodeType===1){I.splice.apply(I,[L+1,0].concat(q.makeArray(I[L].getElementsByTagName("script"))))}K.appendChild(I[L])}}return G}return I},attr:function(L,I,M){if(!L||L.nodeType==3||L.nodeType==8){return g}var J=!q.isXMLDoc(L),N=M!==g;I=J&&q.props[I]||I;if(L.tagName){var H=/href|src|style/.test(I);if(I=="selected"&&L.parentNode){L.parentNode.selectedIndex}if(I in L&&J&&!H){if(N){if(I=="type"&&q.nodeName(L,"input")&&L.parentNode){throw"type property can't be changed"}L[I]=M}if(q.nodeName(L,"form")&&L.getAttributeNode(I)){return L.getAttributeNode(I).nodeValue}if(I=="tabIndex"){var K=L.getAttributeNode("tabIndex");return K&&K.specified?K.value:L.nodeName.match(/(button|input|object|select|textarea)/i)?0:L.nodeName.match(/^(a|area)$/i)&&L.href?0:g
}return L[I]}if(!q.support.style&&J&&I=="style"){return q.attr(L.style,"cssText",M)}if(N){L.setAttribute(I,""+M)}var G=!q.support.hrefNormalized&&J&&H?L.getAttribute(I,2):L.getAttribute(I);return G===null?g:G}if(!q.support.opacity&&I=="opacity"){if(N){L.zoom=1;L.filter=(L.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(M)+""=="NaN"?"":"alpha(opacity="+M*100+")")}return L.filter&&L.filter.indexOf("opacity=")>=0?(parseFloat(L.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}I=I.replace(/-([a-z])/ig,function(O,P){return P.toUpperCase()});if(N){L[I]=M}return L[I]},trim:function(G){return(G||"").replace(/^\s+|\s+$/g,"")},makeArray:function(I){var G=[];if(I!=null){var H=I.length;if(H==null||typeof I==="string"||q.isFunction(I)||I.setInterval){G[0]=I}else{while(H){G[--H]=I[H]}}}return G},inArray:function(I,J){for(var G=0,H=J.length;G<H;G++){if(J[G]===I){return G}}return -1},merge:function(J,G){var H=0,I,K=J.length;if(!q.support.getAll){while((I=G[H++])!=null){if(I.nodeType!=8){J[K++]=I}}}else{while((I=G[H++])!=null){J[K++]=I}}return J},unique:function(M){var H=[],G={};try{for(var I=0,J=M.length;I<J;I++){var L=q.data(M[I]);if(!G[L]){G[L]=true;H.push(M[I])}}}catch(K){H=M}return H},grep:function(H,L,G){var I=[];for(var J=0,K=H.length;J<K;J++){if(!G!=!L(H[J],J)){I.push(H[J])}}return I},map:function(G,L){var H=[];for(var I=0,J=G.length;I<J;I++){var K=L(G[I],I);if(K!=null){H[H.length]=K}}return H.concat.apply([],H)}});var E=navigator.userAgent.toLowerCase();q.browser={version:(E.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(E),opera:/opera/.test(E),msie:/msie/.test(E)&&!/opera/.test(E),mozilla:/mozilla/.test(E)&&!/(compatible|webkit)/.test(E)};q.each({parent:function(G){return G.parentNode},parents:function(G){return q.dir(G,"parentNode")},next:function(G){return q.nth(G,2,"nextSibling")},prev:function(G){return q.nth(G,2,"previousSibling")},nextAll:function(G){return q.dir(G,"nextSibling")},prevAll:function(G){return q.dir(G,"previousSibling")},siblings:function(G){return q.sibling(G.parentNode.firstChild,G)},children:function(G){return q.sibling(G.firstChild)},contents:function(G){return q.nodeName(G,"iframe")?G.contentDocument||G.contentWindow.document:q.makeArray(G.childNodes)}},function(G,H){q.fn[G]=function(I){var J=q.map(this,H);if(I&&typeof I=="string"){J=q.multiFilter(I,J)}return this.pushStack(q.unique(J),G,I)}});q.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(G,H){q.fn[G]=function(I){var L=[],N=q(I);for(var M=0,J=N.length;M<J;M++){var K=(M>0?this.clone(true):this).get();q.fn[H].apply(q(N[M]),K);L=L.concat(K)}return this.pushStack(L,G,I)}});q.each({removeAttr:function(G){q.attr(this,G,"");if(this.nodeType==1){this.removeAttribute(G)}},addClass:function(G){q.className.add(this,G)},removeClass:function(G){q.className.remove(this,G)},toggleClass:function(H,G){if(typeof G!=="boolean"){G=!q.className.has(this,H)}q.className[G?"add":"remove"](this,H)},remove:function(G){if(!G||q.filter(G,[this]).length){q("*",this).add([this]).each(function(){q.event.remove(this);q.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){q(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(G,H){q.fn[G]=function(){return this.each(H,arguments)}});function l(G,H){return G[0]&&parseInt(q.curCSS(G[0],H,true),10)||0}var h="jQuery"+e(),x=0,C={};q.extend({cache:{},data:function(H,G,I){H=H==n?C:H;var J=H[h];if(!J){J=H[h]=++x}if(G&&!q.cache[J]){q.cache[J]={}}if(I!==g){q.cache[J][G]=I}return G?q.cache[J][G]:J},removeData:function(H,G){H=H==n?C:H;var J=H[h];if(G){if(q.cache[J]){delete q.cache[J][G];G="";for(G in q.cache[J]){break}if(!G){q.removeData(H)}}}else{try{delete H[h]}catch(I){if(H.removeAttribute){H.removeAttribute(h)}}delete q.cache[J]}},queue:function(H,G,J){if(H){G=(G||"fx")+"queue";var I=q.data(H,G);if(!I||q.isArray(J)){I=q.data(H,G,q.makeArray(J))}else{if(J){I.push(J)}}}return I},dequeue:function(J,I){var G=q.queue(J,I),H=G.shift();if(!I||I==="fx"){H=G[0]}if(H!==g){H.call(J)}}});q.fn.extend({data:function(G,I){var J=G.split(".");J[1]=J[1]?"."+J[1]:"";if(I===g){var H=this.triggerHandler("getData"+J[1]+"!",[J[0]]);if(H===g&&this.length){H=q.data(this[0],G)}return H===g&&J[1]?this.data(J[0]):H}else{return this.trigger("setData"+J[1]+"!",[J[0],I]).each(function(){q.data(this,G,I)})}},removeData:function(G){return this.each(function(){q.removeData(this,G)})},queue:function(G,H){if(typeof G!=="string"){H=G;G="fx"}if(H===g){return q.queue(this[0],G)}return this.each(function(){var I=q.queue(this,G,H);if(G=="fx"&&I.length==1){I[0].call(this)}})},dequeue:function(G){return this.each(function(){q.dequeue(this,G)})}});
/*
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var T=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,N=0,J=Object.prototype.toString;var H=function(aa,W,ad,ae){ad=ad||[];W=W||document;if(W.nodeType!==1&&W.nodeType!==9){return[]}if(!aa||typeof aa!=="string"){return ad}var ab=[],Y,ah,ak,V,af,X,Z=true;T.lastIndex=0;while((Y=T.exec(aa))!==null){ab.push(Y[1]);if(Y[2]){X=RegExp.rightContext;break}}if(ab.length>1&&O.exec(aa)){if(ab.length===2&&K.relative[ab[0]]){ah=L(ab[0]+ab[1],W)}else{ah=K.relative[ab[0]]?[W]:H(ab.shift(),W);while(ab.length){aa=ab.shift();if(K.relative[aa]){aa+=ab.shift()}ah=L(aa,ah)}}}else{var ag=ae?{expr:ab.pop(),set:G(ae)}:H.find(ab.pop(),ab.length===1&&W.parentNode?W.parentNode:W,S(W));ah=H.filter(ag.expr,ag.set);if(ab.length>0){ak=G(ah)}else{Z=false}while(ab.length){var aj=ab.pop(),ai=aj;if(!K.relative[aj]){aj=""}else{ai=ab.pop()}if(ai==null){ai=W}K.relative[aj](ak,ai,S(W))}}if(!ak){ak=ah}if(!ak){throw"Syntax error, unrecognized expression: "+(aj||aa)}if(J.call(ak)==="[object Array]"){if(!Z){ad.push.apply(ad,ak)}else{if(W.nodeType===1){for(var ac=0;ak[ac]!=null;ac++){if(ak[ac]&&(ak[ac]===true||ak[ac].nodeType===1&&M(W,ak[ac]))){ad.push(ah[ac])}}}else{for(var ac=0;ak[ac]!=null;ac++){if(ak[ac]&&ak[ac].nodeType===1){ad.push(ah[ac])}}}}}else{G(ak,ad)}if(X){H(X,W,ad,ae);if(I){hasDuplicate=false;ad.sort(I);if(hasDuplicate){for(var ac=1;ac<ad.length;ac++){if(ad[ac]===ad[ac-1]){ad.splice(ac--,1)}}}}}return ad};H.matches=function(V,W){return H(V,null,null,W)};H.find=function(ac,V,ad){var ab,Z;if(!ac){return[]}for(var Y=0,X=K.order.length;Y<X;Y++){var aa=K.order[Y],Z;if((Z=K.match[aa].exec(ac))){var W=RegExp.leftContext;if(W.substr(W.length-1)!=="\\"){Z[1]=(Z[1]||"").replace(/\\/g,"");ab=K.find[aa](Z,V,ad);if(ab!=null){ac=ac.replace(K.match[aa],"");break}}}}if(!ab){ab=V.getElementsByTagName("*")}return{set:ab,expr:ac}};H.filter=function(af,ae,ai,Y){var X=af,ak=[],ac=ae,aa,V,ab=ae&&ae[0]&&S(ae[0]);while(af&&ae.length){for(var ad in K.filter){if((aa=K.match[ad].exec(af))!=null){var W=K.filter[ad],aj,ah;V=false;if(ac==ak){ak=[]}if(K.preFilter[ad]){aa=K.preFilter[ad](aa,ac,ai,ak,Y,ab);if(!aa){V=aj=true}else{if(aa===true){continue}}}if(aa){for(var Z=0;(ah=ac[Z])!=null;Z++){if(ah){aj=W(ah,aa,Z,ac);var ag=Y^!!aj;if(ai&&aj!=null){if(ag){V=true}else{ac[Z]=false}}else{if(ag){ak.push(ah);V=true}}}}}if(aj!==g){if(!ai){ac=ak}af=af.replace(K.match[ad],"");if(!V){return[]}break}}}if(af==X){if(V==null){throw"Syntax error, unrecognized expression: "+af}else{break}}X=af}return ac};var K=H.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(V){return V.getAttribute("href")
}},relative:{"+":function(ac,V,ab){var Z=typeof V==="string",ad=Z&&!/\W/.test(V),aa=Z&&!ad;if(ad&&!ab){V=V.toUpperCase()}for(var Y=0,X=ac.length,W;Y<X;Y++){if((W=ac[Y])){while((W=W.previousSibling)&&W.nodeType!==1){}ac[Y]=aa||W&&W.nodeName===V?W||false:W===V}}if(aa){H.filter(V,ac,true)}},">":function(ab,W,ac){var Z=typeof W==="string";if(Z&&!/\W/.test(W)){W=ac?W:W.toUpperCase();for(var X=0,V=ab.length;X<V;X++){var aa=ab[X];if(aa){var Y=aa.parentNode;ab[X]=Y.nodeName===W?Y:false}}}else{for(var X=0,V=ab.length;X<V;X++){var aa=ab[X];if(aa){ab[X]=Z?aa.parentNode:aa.parentNode===W}}if(Z){H.filter(W,ab,true)}}},"":function(Y,W,aa){var X=N++,V=U;if(!W.match(/\W/)){var Z=W=aa?W:W.toUpperCase();V=R}V("parentNode",W,X,Y,Z,aa)},"~":function(Y,W,aa){var X=N++,V=U;if(typeof W==="string"&&!W.match(/\W/)){var Z=W=aa?W:W.toUpperCase();V=R}V("previousSibling",W,X,Y,Z,aa)}},find:{ID:function(W,X,Y){if(typeof X.getElementById!=="undefined"&&!Y){var V=X.getElementById(W[1]);return V?[V]:[]}},NAME:function(X,aa,ab){if(typeof aa.getElementsByName!=="undefined"){var W=[],Z=aa.getElementsByName(X[1]);for(var Y=0,V=Z.length;Y<V;Y++){if(Z[Y].getAttribute("name")===X[1]){W.push(Z[Y])}}return W.length===0?null:W}},TAG:function(V,W){return W.getElementsByTagName(V[1])}},preFilter:{CLASS:function(Y,W,X,V,ab,ac){Y=" "+Y[1].replace(/\\/g,"")+" ";if(ac){return Y}for(var Z=0,aa;(aa=W[Z])!=null;Z++){if(aa){if(ab^(aa.className&&(" "+aa.className+" ").indexOf(Y)>=0)){if(!X){V.push(aa)}}else{if(X){W[Z]=false}}}}return false},ID:function(V){return V[1].replace(/\\/g,"")},TAG:function(W,V){for(var X=0;V[X]===false;X++){}return V[X]&&S(V[X])?W[1]:W[1].toUpperCase()},CHILD:function(V){if(V[1]=="nth"){var W=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(V[2]=="even"&&"2n"||V[2]=="odd"&&"2n+1"||!/\D/.test(V[2])&&"0n+"+V[2]||V[2]);V[2]=(W[1]+(W[2]||1))-0;V[3]=W[3]-0}V[0]=N++;return V},ATTR:function(Z,W,X,V,aa,ab){var Y=Z[1].replace(/\\/g,"");if(!ab&&K.attrMap[Y]){Z[1]=K.attrMap[Y]}if(Z[2]==="~="){Z[4]=" "+Z[4]+" "}return Z},PSEUDO:function(Z,W,X,V,aa){if(Z[1]==="not"){if(Z[3].match(T).length>1||/^\w/.test(Z[3])){Z[3]=H(Z[3],null,null,W)}else{var Y=H.filter(Z[3],W,X,true^aa);if(!X){V.push.apply(V,Y)}return false}}else{if(K.match.POS.test(Z[0])||K.match.CHILD.test(Z[0])){return true}}return Z},POS:function(V){V.unshift(true);return V}},filters:{enabled:function(V){return V.disabled===false&&V.type!=="hidden"},disabled:function(V){return V.disabled===true},checked:function(V){return V.checked===true},selected:function(V){V.parentNode.selectedIndex;return V.selected===true},parent:function(V){return !!V.firstChild},empty:function(V){return !V.firstChild},has:function(X,W,V){return !!H(V[3],X).length},header:function(V){return/h\d/i.test(V.nodeName)},text:function(V){return"text"===V.type},radio:function(V){return"radio"===V.type},checkbox:function(V){return"checkbox"===V.type},file:function(V){return"file"===V.type},password:function(V){return"password"===V.type},submit:function(V){return"submit"===V.type},image:function(V){return"image"===V.type},reset:function(V){return"reset"===V.type},button:function(V){return"button"===V.type||V.nodeName.toUpperCase()==="BUTTON"},input:function(V){return/input|select|textarea|button/i.test(V.nodeName)}},setFilters:{first:function(W,V){return V===0},last:function(X,W,V,Y){return W===Y.length-1},even:function(W,V){return V%2===0},odd:function(W,V){return V%2===1},lt:function(X,W,V){return W<V[3]-0},gt:function(X,W,V){return W>V[3]-0},nth:function(X,W,V){return V[3]-0==W},eq:function(X,W,V){return V[3]-0==W}},filter:{PSEUDO:function(ab,X,Y,ac){var W=X[1],Z=K.filters[W];if(Z){return Z(ab,Y,X,ac)}else{if(W==="contains"){return(ab.textContent||ab.innerText||"").indexOf(X[3])>=0}else{if(W==="not"){var aa=X[3];for(var Y=0,V=aa.length;Y<V;Y++){if(aa[Y]===ab){return false}}return true}}}},CHILD:function(V,Y){var ab=Y[1],W=V;switch(ab){case"only":case"first":while(W=W.previousSibling){if(W.nodeType===1){return false}}if(ab=="first"){return true}W=V;case"last":while(W=W.nextSibling){if(W.nodeType===1){return false}}return true;case"nth":var X=Y[2],ae=Y[3];if(X==1&&ae==0){return true}var aa=Y[0],ad=V.parentNode;if(ad&&(ad.sizcache!==aa||!V.nodeIndex)){var Z=0;for(W=ad.firstChild;W;W=W.nextSibling){if(W.nodeType===1){W.nodeIndex=++Z}}ad.sizcache=aa}var ac=V.nodeIndex-ae;if(X==0){return ac==0}else{return(ac%X==0&&ac/X>=0)}}},ID:function(W,V){return W.nodeType===1&&W.getAttribute("id")===V},TAG:function(W,V){return(V==="*"&&W.nodeType===1)||W.nodeName===V},CLASS:function(W,V){return(" "+(W.className||W.getAttribute("class"))+" ").indexOf(V)>-1},ATTR:function(aa,Y){var X=Y[1],V=K.attrHandle[X]?K.attrHandle[X](aa):aa[X]!=null?aa[X]:aa.getAttribute(X),ab=V+"",Z=Y[2],W=Y[4];return V==null?Z==="!=":Z==="="?ab===W:Z==="*="?ab.indexOf(W)>=0:Z==="~="?(" "+ab+" ").indexOf(W)>=0:!W?ab&&V!==false:Z==="!="?ab!=W:Z==="^="?ab.indexOf(W)===0:Z==="$="?ab.substr(ab.length-W.length)===W:Z==="|="?ab===W||ab.substr(0,W.length+1)===W+"-":false},POS:function(Z,W,X,aa){var V=W[2],Y=K.setFilters[V];if(Y){return Y(Z,X,W,aa)}}}};var O=K.match.POS;for(var Q in K.match){K.match[Q]=RegExp(K.match[Q].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var G=function(W,V){W=Array.prototype.slice.call(W);if(V){V.push.apply(V,W);return V}return W};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(P){G=function(Z,Y){var W=Y||[];if(J.call(Z)==="[object Array]"){Array.prototype.push.apply(W,Z)}else{if(typeof Z.length==="number"){for(var X=0,V=Z.length;X<V;X++){W.push(Z[X])}}else{for(var X=0;Z[X];X++){W.push(Z[X])}}}return W}}var I;if(document.documentElement.compareDocumentPosition){I=function(W,V){var X=W.compareDocumentPosition(V)&4?-1:W===V?0:1;if(X===0){hasDuplicate=true}return X}}else{if("sourceIndex" in document.documentElement){I=function(W,V){var X=W.sourceIndex-V.sourceIndex;if(X===0){hasDuplicate=true}return X}}else{if(document.createRange){I=function(Y,W){var X=Y.ownerDocument.createRange(),V=W.ownerDocument.createRange();X.selectNode(Y);X.collapse(true);V.selectNode(W);V.collapse(true);var Z=X.compareBoundaryPoints(Range.START_TO_END,V);if(Z===0){hasDuplicate=true}return Z}}}}(function(){var W=document.createElement("form"),X="script"+(new Date).getTime();W.innerHTML="<input name='"+X+"'/>";var V=document.documentElement;V.insertBefore(W,V.firstChild);if(!!document.getElementById(X)){K.find.ID=function(Z,aa,ab){if(typeof aa.getElementById!=="undefined"&&!ab){var Y=aa.getElementById(Z[1]);return Y?Y.id===Z[1]||typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id").nodeValue===Z[1]?[Y]:g:[]}};K.filter.ID=function(aa,Y){var Z=typeof aa.getAttributeNode!=="undefined"&&aa.getAttributeNode("id");return aa.nodeType===1&&Z&&Z.nodeValue===Y}}V.removeChild(W)})();(function(){var V=document.createElement("div");V.appendChild(document.createComment(""));if(V.getElementsByTagName("*").length>0){K.find.TAG=function(W,aa){var Z=aa.getElementsByTagName(W[1]);if(W[1]==="*"){var Y=[];for(var X=0;Z[X];X++){if(Z[X].nodeType===1){Y.push(Z[X])}}Z=Y}return Z}}V.innerHTML="<a href='#'></a>";if(V.firstChild&&typeof V.firstChild.getAttribute!=="undefined"&&V.firstChild.getAttribute("href")!=="#"){K.attrHandle.href=function(W){return W.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var V=H,W=document.createElement("div");W.innerHTML="<p class='TEST'></p>";if(W.querySelectorAll&&W.querySelectorAll(".TEST").length===0){return}H=function(aa,Z,X,Y){Z=Z||document;if(!Y&&Z.nodeType===9&&!S(Z)){try{return G(Z.querySelectorAll(aa),X)}catch(ab){}}return V(aa,Z,X,Y)};H.find=V.find;H.filter=V.filter;H.selectors=V.selectors;H.matches=V.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var V=document.createElement("div");V.innerHTML="<div class='test e'></div><div class='test'></div>";if(V.getElementsByClassName("e").length===0){return}V.lastChild.className="e";if(V.getElementsByClassName("e").length===1){return}K.order.splice(1,0,"CLASS");K.find.CLASS=function(W,X,Y){if(typeof X.getElementsByClassName!=="undefined"&&!Y){return X.getElementsByClassName(W[1])
}}})()}function R(W,ab,aa,af,ac,ae){var ad=W=="previousSibling"&&!ae;for(var Y=0,X=af.length;Y<X;Y++){var V=af[Y];if(V){if(ad&&V.nodeType===1){V.sizcache=aa;V.sizset=Y}V=V[W];var Z=false;while(V){if(V.sizcache===aa){Z=af[V.sizset];break}if(V.nodeType===1&&!ae){V.sizcache=aa;V.sizset=Y}if(V.nodeName===ab){Z=V;break}V=V[W]}af[Y]=Z}}}function U(W,ab,aa,af,ac,ae){var ad=W=="previousSibling"&&!ae;for(var Y=0,X=af.length;Y<X;Y++){var V=af[Y];if(V){if(ad&&V.nodeType===1){V.sizcache=aa;V.sizset=Y}V=V[W];var Z=false;while(V){if(V.sizcache===aa){Z=af[V.sizset];break}if(V.nodeType===1){if(!ae){V.sizcache=aa;V.sizset=Y}if(typeof ab!=="string"){if(V===ab){Z=true;break}}else{if(H.filter(ab,[V]).length>0){Z=V;break}}}V=V[W]}af[Y]=Z}}}var M=document.compareDocumentPosition?function(W,V){return W.compareDocumentPosition(V)&16}:function(W,V){return W!==V&&(W.contains?W.contains(V):true)};var S=function(V){return V.nodeType===9&&V.documentElement.nodeName!=="HTML"||!!V.ownerDocument&&S(V.ownerDocument)};var L=function(V,ac){var Y=[],Z="",aa,X=ac.nodeType?[ac]:ac;while((aa=K.match.PSEUDO.exec(V))){Z+=aa[0];V=V.replace(K.match.PSEUDO,"")}V=K.relative[V]?V+"*":V;for(var ab=0,W=X.length;ab<W;ab++){H(V,X[ab],Y)}return H.filter(Z,Y)};q.find=H;q.filter=H.filter;q.expr=H.selectors;q.expr[":"]=q.expr.filters;H.selectors.filters.hidden=function(V){return V.offsetWidth===0||V.offsetHeight===0};H.selectors.filters.visible=function(V){return V.offsetWidth>0||V.offsetHeight>0};H.selectors.filters.animated=function(V){return q.grep(q.timers,function(W){return V===W.elem}).length};q.multiFilter=function(X,V,W){if(W){X=":not("+X+")"}return H.matches(X,V)};q.dir=function(X,W){var V=[],Y=X[W];while(Y&&Y!=document){if(Y.nodeType==1){V.push(Y)}Y=Y[W]}return V};q.nth=function(Z,V,X,Y){V=V||1;var W=0;for(;Z;Z=Z[X]){if(Z.nodeType==1&&++W==V){break}}return Z};q.sibling=function(X,W){var V=[];for(;X;X=X.nextSibling){if(X.nodeType==1&&X!=W){V.push(X)}}return V};return;n.Sizzle=H})();q.event={add:function(K,H,J,M){if(K.nodeType==3||K.nodeType==8){return}if(K.setInterval&&K!=n){K=n}if(!J.guid){J.guid=this.guid++}if(M!==g){var I=J;J=this.proxy(I);J.data=M}var G=q.data(K,"events")||q.data(K,"events",{}),L=q.data(K,"handle")||q.data(K,"handle",function(){return typeof q!=="undefined"&&!q.event.triggered?q.event.handle.apply(arguments.callee.elem,arguments):g});L.elem=K;q.each(H.split(/\s+/),function(O,P){var Q=P.split(".");P=Q.shift();J.type=Q.slice().sort().join(".");var N=G[P];if(q.event.specialAll[P]){q.event.specialAll[P].setup.call(K,M,Q)}if(!N){N=G[P]={};if(!q.event.special[P]||q.event.special[P].setup.call(K,M,Q)===false){if(K.addEventListener){K.addEventListener(P,L,false)}else{if(K.attachEvent){K.attachEvent("on"+P,L)}}}}N[J.guid]=J;q.event.global[P]=true});K=null},guid:1,global:{},remove:function(M,J,L){if(M.nodeType==3||M.nodeType==8){return}var I=q.data(M,"events"),H,G;if(I){if(J===g||(typeof J==="string"&&J.charAt(0)==".")){for(var K in I){this.remove(M,K+(J||""))}}else{if(J.type){L=J.handler;J=J.type}q.each(J.split(/\s+/),function(O,Q){var S=Q.split(".");Q=S.shift();var P=RegExp("(^|\\.)"+S.slice().sort().join(".*\\.")+"(\\.|$)");if(I[Q]){if(L){delete I[Q][L.guid]}else{for(var R in I[Q]){if(P.test(I[Q][R].type)){delete I[Q][R]}}}if(q.event.specialAll[Q]){q.event.specialAll[Q].teardown.call(M,S)}for(H in I[Q]){break}if(!H){if(!q.event.special[Q]||q.event.special[Q].teardown.call(M,S)===false){if(M.removeEventListener){M.removeEventListener(Q,q.data(M,"handle"),false)}else{if(M.detachEvent){M.detachEvent("on"+Q,q.data(M,"handle"))}}}H=null;delete I[Q]}}})}for(H in I){break}if(!H){var N=q.data(M,"handle");if(N){N.elem=null}q.removeData(M,"events");q.removeData(M,"handle")}}},trigger:function(K,M,J,G){var I=K.type||K;if(!G){K=typeof K==="object"?K[h]?K:q.extend(q.Event(I),K):q.Event(I);if(I.indexOf("!")>=0){K.type=I=I.slice(0,-1);K.exclusive=true}if(!J){K.stopPropagation();if(this.global[I]){q.each(q.cache,function(){if(this.events&&this.events[I]){q.event.trigger(K,M,this.handle.elem)}})}}if(!J||J.nodeType==3||J.nodeType==8){return g}K.result=g;K.target=J;M=q.makeArray(M);M.unshift(K)}K.currentTarget=J;var L=q.data(J,"handle");if(L){L.apply(J,M)}if((!J[I]||(q.nodeName(J,"a")&&I=="click"))&&J["on"+I]&&J["on"+I].apply(J,M)===false){K.result=false}if(!G&&J[I]&&!K.isDefaultPrevented()&&!(q.nodeName(J,"a")&&I=="click")){this.triggered=true;try{J[I]()}catch(N){}}this.triggered=false;if(!K.isPropagationStopped()){var H=J.parentNode||J.ownerDocument;if(H){q.event.trigger(K,M,H,true)}}},handle:function(M){var L,G;M=arguments[0]=q.event.fix(M||n.event);M.currentTarget=this;var N=M.type.split(".");M.type=N.shift();L=!N.length&&!M.exclusive;var K=RegExp("(^|\\.)"+N.slice().sort().join(".*\\.")+"(\\.|$)");G=(q.data(this,"events")||{})[M.type];for(var I in G){var J=G[I];if(L||K.test(J.type)){M.handler=J;M.data=J.data;var H=J.apply(this,arguments);if(H!==g){M.result=H;if(H===false){M.preventDefault();M.stopPropagation()}}if(M.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(J){if(J[h]){return J}var H=J;J=q.Event(H);for(var I=this.props.length,L;I;){L=this.props[--I];J[L]=H[L]}if(!J.target){J.target=J.srcElement||document}if(J.target.nodeType==3){J.target=J.target.parentNode}if(!J.relatedTarget&&J.fromElement){J.relatedTarget=J.fromElement==J.target?J.toElement:J.fromElement}if(J.pageX==null&&J.clientX!=null){var K=document.documentElement,G=document.body;J.pageX=J.clientX+(K&&K.scrollLeft||G&&G.scrollLeft||0)-(K.clientLeft||0);J.pageY=J.clientY+(K&&K.scrollTop||G&&G.scrollTop||0)-(K.clientTop||0)}if(!J.which&&((J.charCode||J.charCode===0)?J.charCode:J.keyCode)){J.which=J.charCode||J.keyCode}if(!J.metaKey&&J.ctrlKey){J.metaKey=J.ctrlKey}if(!J.which&&J.button){J.which=(J.button&1?1:(J.button&2?3:(J.button&4?2:0)))}return J},proxy:function(H,G){G=G||function(){return H.apply(this,arguments)};G.guid=H.guid=H.guid||G.guid||this.guid++;return G},special:{ready:{setup:D,teardown:function(){}}},specialAll:{live:{setup:function(G,H){q.event.add(this,H[0],c)},teardown:function(I){if(I.length){var G=0,H=RegExp("(^|\\.)"+I[0]+"(\\.|$)");q.each((q.data(this,"events").live||{}),function(){if(H.test(this.type)){G++}});if(G<1){q.event.remove(this,I[0],c)}}}}}};q.Event=function(G){if(!this.preventDefault){return new q.Event(G)}if(G&&G.type){this.originalEvent=G;this.type=G.type}else{this.type=G}this.timeStamp=e();this[h]=true};function m(){return false}function w(){return true}q.Event.prototype={preventDefault:function(){this.isDefaultPrevented=w;var G=this.originalEvent;if(!G){return}if(G.preventDefault){G.preventDefault()}G.returnValue=false},stopPropagation:function(){this.isPropagationStopped=w;var G=this.originalEvent;if(!G){return}if(G.stopPropagation){G.stopPropagation()}G.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=w;this.stopPropagation()},isDefaultPrevented:m,isPropagationStopped:m,isImmediatePropagationStopped:m};var a=function(H){var G=H.relatedTarget;while(G&&G!=this){try{G=G.parentNode}catch(I){G=this}}if(G!=this){H.type=H.data;q.event.handle.apply(this,arguments)}};q.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(H,G){q.event.special[G]={setup:function(){q.event.add(this,H,a,G)},teardown:function(){q.event.remove(this,H,a)}}});q.fn.extend({bind:function(H,I,G){return H=="unload"?this.one(H,I,G):this.each(function(){q.event.add(this,H,G||I,G&&I)})},one:function(I,J,H){var G=q.event.proxy(H||J,function(K){q(this).unbind(K,G);return(H||J).apply(this,arguments)});return this.each(function(){q.event.add(this,I,G,H&&J)})},unbind:function(H,G){return this.each(function(){q.event.remove(this,H,G)})},trigger:function(G,H){return this.each(function(){q.event.trigger(G,H,this)
})},triggerHandler:function(G,I){if(this[0]){var H=q.Event(G);H.preventDefault();H.stopPropagation();q.event.trigger(H,I,this[0]);return H.result}},toggle:function(I){var G=arguments,H=1;while(H<G.length){q.event.proxy(I,G[H++])}return this.click(q.event.proxy(I,function(J){this.lastToggle=(this.lastToggle||0)%H;J.preventDefault();return G[this.lastToggle++].apply(this,arguments)||false}))},hover:function(G,H){return this.mouseenter(G).mouseleave(H)},ready:function(G){D();if(q.isReady){G.call(document,q)}else{q.readyList.push(G)}return this},live:function(I,H){var G=q.event.proxy(H);G.guid+=this.selector+I;q(document).bind(k(I,this.selector),this.selector,G);return this},die:function(H,G){q(document).unbind(k(H,this.selector),G?{guid:G.guid+this.selector+H}:null);return this}});function c(J){var G=RegExp("(^|\\.)"+J.type+"(\\.|$)"),I=true,H=[];q.each(q.data(this,"events").live||[],function(K,L){if(G.test(L.type)){var M=q(J.target).closest(L.data)[0];if(M){H.push({elem:M,fn:L})}}});H.sort(function(L,K){return q.data(L.elem,"closest")-q.data(K.elem,"closest")});q.each(H,function(){if(this.fn.call(this.elem,J,this.fn.data)===false){return(I=false)}});return I}function k(H,G){return["live",H,G.replace(/\./g,"`").replace(/ /g,"|")].join(".")}q.extend({isReady:false,readyList:[],ready:function(){if(!q.isReady){q.isReady=true;if(q.readyList){q.each(q.readyList,function(){this.call(document,q)});q.readyList=null}q(document).triggerHandler("ready")}}});var z=false;function D(){if(z){return}z=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);q.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);q.ready()}});if(document.documentElement.doScroll&&n==n.top){(function(){if(q.isReady){return}try{document.documentElement.doScroll("left")}catch(G){setTimeout(arguments.callee,0);return}q.ready()})()}}}q.event.add(n,"load",q.ready)}q.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(H,G){q.fn[G]=function(I){return I?this.bind(G,I):this.trigger(G)}});q(n).bind("unload",function(){for(var G in q.cache){if(G!=1&&q.cache[G].handle){q.event.remove(q.cache[G].handle.elem)}}});(function(){q.support={};var H=document.documentElement,I=document.createElement("script"),M=document.createElement("div"),L="script"+(new Date).getTime();M.style.display="none";M.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var J=M.getElementsByTagName("*"),G=M.getElementsByTagName("a")[0];if(!J||!J.length||!G){return}q.support={leadingWhitespace:M.firstChild.nodeType==3,tbody:!M.getElementsByTagName("tbody").length,objectAll:!!M.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!M.getElementsByTagName("link").length,style:/red/.test(G.getAttribute("style")),hrefNormalized:G.getAttribute("href")==="/a",opacity:G.style.opacity==="0.5",cssFloat:!!G.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};I.type="text/javascript";try{I.appendChild(document.createTextNode("window."+L+"=1;"))}catch(K){}H.insertBefore(I,H.firstChild);if(n[L]){q.support.scriptEval=true;delete n[L]}H.removeChild(I);if(M.attachEvent&&M.fireEvent){M.attachEvent("onclick",function(){q.support.noCloneEvent=false;M.detachEvent("onclick",arguments.callee)});M.cloneNode(true).fireEvent("onclick")}q(function(){var N=document.createElement("div");N.style.width=N.style.paddingLeft="1px";document.body.appendChild(N);q.boxModel=q.support.boxModel=N.offsetWidth===2;document.body.removeChild(N).style.display="none"})})();var y=q.support.cssFloat?"cssFloat":"styleFloat";q.props={"for":"htmlFor","class":"className","float":y,cssFloat:y,styleFloat:y,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};q.fn.extend({_load:q.fn.load,load:function(I,L,M){if(typeof I!=="string"){return this._load(I)}var K=I.indexOf(" ");if(K>=0){var G=I.slice(K,I.length);I=I.slice(0,K)}var J="GET";if(L){if(q.isFunction(L)){M=L;L=null}else{if(typeof L==="object"){L=q.param(L);J="POST"}}}var H=this;q.ajax({url:I,type:J,dataType:"html",data:L,complete:function(O,N){if(N=="success"||N=="notmodified"){H.html(G?q("<div/>").append(O.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(G):O.responseText)}if(M){H.each(M,[O.responseText,N,O])}}});return this},serialize:function(){return q.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?q.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(G,H){var I=q(this).val();return I==null?null:q.isArray(I)?q.map(I,function(K,J){return{name:H.name,value:K}}):{name:H.name,value:I}}).get()}});q.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(G,H){q.fn[H]=function(I){return this.bind(H,I)}});var t=e();q.extend({get:function(G,I,J,H){if(q.isFunction(I)){J=I;I=null}return q.ajax({type:"GET",url:G,data:I,success:J,dataType:H})},getScript:function(G,H){return q.get(G,null,H,"script")},getJSON:function(G,H,I){return q.get(G,H,I,"json")},post:function(G,I,J,H){if(q.isFunction(I)){J=I;I={}}return q.ajax({type:"POST",url:G,data:I,success:J,dataType:H})},ajaxSetup:function(G){q.extend(q.ajaxSettings,G)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return n.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(O){O=q.extend(true,O,q.extend(true,{},q.ajaxSettings,O));var Y,H=/=\?(&|$)/g,T,X,I=O.type.toUpperCase();if(O.data&&O.processData&&typeof O.data!=="string"){O.data=q.param(O.data)}if(O.dataType=="jsonp"){if(I=="GET"){if(!O.url.match(H)){O.url+=(O.url.match(/\?/)?"&":"?")+(O.jsonp||"callback")+"=?"}}else{if(!O.data||!O.data.match(H)){O.data=(O.data?O.data+"&":"")+(O.jsonp||"callback")+"=?"}}O.dataType="json"}if(O.dataType=="json"&&(O.data&&O.data.match(H)||O.url.match(H))){Y="jsonp"+t++;if(O.data){O.data=(O.data+"").replace(H,"="+Y+"$1")}O.url=O.url.replace(H,"="+Y+"$1");O.dataType="script";n[Y]=function(Z){X=Z;K();N();n[Y]=g;try{delete n[Y]}catch(aa){}if(J){J.removeChild(V)}}}if(O.dataType=="script"&&O.cache==null){O.cache=false}if(O.cache===false&&I=="GET"){var G=e();var W=O.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+G+"$2");O.url=W+((W==O.url)?(O.url.match(/\?/)?"&":"?")+"_="+G:"")}if(O.data&&I=="GET"){O.url+=(O.url.match(/\?/)?"&":"?")+O.data;O.data=null}if(O.global&&!q.active++){q.event.trigger("ajaxStart")}var S=/^(\w+:)?\/\/([^\/?#]+)/.exec(O.url);if(O.dataType=="script"&&I=="GET"&&S&&(S[1]&&S[1]!=location.protocol||S[2]!=location.host)){var J=document.getElementsByTagName("head")[0];var V=document.createElement("script");V.src=O.url;if(O.scriptCharset){V.charset=O.scriptCharset}if(!Y){var Q=false;V.onload=V.onreadystatechange=function(){if(!Q&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){Q=true;K();N();V.onload=V.onreadystatechange=null;J.removeChild(V)}}}J.appendChild(V);return g}var M=false;var L=O.xhr();if(O.username){L.open(I,O.url,O.async,O.username,O.password)}else{L.open(I,O.url,O.async)}try{if(O.data){L.setRequestHeader("Content-Type",O.contentType)}if(O.ifModified){L.setRequestHeader("If-Modified-Since",q.lastModified[O.url]||"Thu, 01 Jan 1970 00:00:00 GMT")
}L.setRequestHeader("X-Requested-With","XMLHttpRequest");L.setRequestHeader("Accept",O.dataType&&O.accepts[O.dataType]?O.accepts[O.dataType]+", */*":O.accepts._default)}catch(U){}if(O.beforeSend&&O.beforeSend(L,O)===false){if(O.global&&!--q.active){q.event.trigger("ajaxStop")}L.abort();return false}if(O.global){q.event.trigger("ajaxSend",[L,O])}var P=function(Z){if(L.readyState==0){if(R){clearInterval(R);R=null;if(O.global&&!--q.active){q.event.trigger("ajaxStop")}}}else{if(!M&&L&&(L.readyState==4||Z=="timeout")){M=true;if(R){clearInterval(R);R=null}T=Z=="timeout"?"timeout":!q.httpSuccess(L)?"error":O.ifModified&&q.httpNotModified(L,O.url)?"notmodified":"success";if(T=="success"){try{X=q.httpData(L,O.dataType,O)}catch(ab){T="parsererror"}}if(T=="success"){var aa;try{aa=L.getResponseHeader("Last-Modified")}catch(ab){}if(O.ifModified&&aa){q.lastModified[O.url]=aa}if(!Y){K()}}else{q.handleError(O,L,T)}N();if(Z){L.abort()}if(O.async){L=null}}}};if(O.async){var R=setInterval(P,13);if(O.timeout>0){setTimeout(function(){if(L&&!M){P("timeout")}},O.timeout)}}try{L.send(O.data)}catch(U){q.handleError(O,L,null,U)}if(!O.async){P()}function K(){if(O.success){O.success(X,T)}if(O.global){q.event.trigger("ajaxSuccess",[L,O])}}function N(){if(O.complete){O.complete(L,T)}if(O.global){q.event.trigger("ajaxComplete",[L,O])}if(O.global&&!--q.active){q.event.trigger("ajaxStop")}}return L},handleError:function(H,J,G,I){if(H.error){H.error(J,G,I)}if(H.global){q.event.trigger("ajaxError",[J,H,I])}},active:0,httpSuccess:function(H){try{return !H.status&&location.protocol=="file:"||(H.status>=200&&H.status<300)||H.status==304||H.status==1223}catch(G){}return false},httpNotModified:function(I,G){try{var J=I.getResponseHeader("Last-Modified");return I.status==304||J==q.lastModified[G]}catch(H){}return false},httpData:function(L,J,I){var H=L.getResponseHeader("content-type"),G=J=="xml"||!J&&H&&H.indexOf("xml")>=0,K=G?L.responseXML:L.responseText;if(G&&K.documentElement.tagName=="parsererror"){throw"parsererror"}if(I&&I.dataFilter){K=I.dataFilter(K,J)}if(typeof K==="string"){if(J=="script"){q.globalEval(K)}if(J=="json"){K=n["eval"]("("+K+")")}}return K},param:function(G){var I=[];function J(K,L){I[I.length]=encodeURIComponent(K)+"="+encodeURIComponent(L)}if(q.isArray(G)||G.jquery){q.each(G,function(){J(this.name,this.value)})}else{for(var H in G){if(q.isArray(G[H])){q.each(G[H],function(){J(H,this)})}else{J(H,q.isFunction(G[H])?G[H]():G[H])}}}return I.join("&").replace(/%20/g,"+")}});var o={},p,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function v(H,G){var I={};q.each(d.concat.apply([],d.slice(0,G)),function(){I[this]=H});return I}q.fn.extend({show:function(L,N){if(L){return this.animate(v("show",3),L,N)}else{for(var J=0,H=this.length;J<H;J++){var G=q.data(this[J],"olddisplay");this[J].style.display=G||"";if(q.css(this[J],"display")==="none"){var I=this[J].tagName,M;if(o[I]){M=o[I]}else{var K=q("<"+I+" />").appendTo("body");M=K.css("display");if(M==="none"){M="block"}K.remove();o[I]=M}q.data(this[J],"olddisplay",M)}}for(var J=0,H=this.length;J<H;J++){this[J].style.display=q.data(this[J],"olddisplay")||""}return this}},hide:function(J,K){if(J){return this.animate(v("hide",3),J,K)}else{for(var I=0,H=this.length;I<H;I++){var G=q.data(this[I],"olddisplay");if(!G&&G!=="none"){q.data(this[I],"olddisplay",q.css(this[I],"display"))}}for(var I=0,H=this.length;I<H;I++){this[I].style.display="none"}return this}},_toggle:q.fn.toggle,toggle:function(I,H){var G=typeof I==="boolean";return q.isFunction(I)&&q.isFunction(H)?this._toggle.apply(this,arguments):I==null||G?this.each(function(){var J=G?I:q(this).is(":hidden");q(this)[J?"show":"hide"]()}):this.animate(v("toggle",3),I,H)},fadeTo:function(G,I,H){return this.animate({opacity:I},G,H)},animate:function(K,H,J,I){var G=q.speed(H,J,I);return this[G.queue===false?"each":"queue"](function(){var M=q.extend({},G),O,N=this.nodeType==1&&q(this).is(":hidden"),L=this;for(O in K){if(K[O]=="hide"&&N||K[O]=="show"&&!N){return M.complete.call(this)}if((O=="height"||O=="width")&&this.style){M.display=q.css(this,"display");M.overflow=this.style.overflow}}if(M.overflow!=null){this.style.overflow="hidden"}M.curAnim=q.extend({},K);q.each(K,function(Q,U){var T=new q.fx(L,M,Q);if(/toggle|show|hide/.test(U)){T[U=="toggle"?N?"show":"hide":U](K)}else{var S=U.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),V=T.cur(true)||0;if(S){var P=parseFloat(S[2]),R=S[3]||"px";if(R!="px"){L.style[Q]=(P||1)+R;V=((P||1)/T.cur(true))*V;L.style[Q]=V+R}if(S[1]){P=((S[1]=="-="?-1:1)*P)+V}T.custom(V,P,R)}else{T.custom(V,U,"")}}});return true})},stop:function(H,G){var I=q.timers;if(H){this.queue([])}this.each(function(){for(var J=I.length-1;J>=0;J--){if(I[J].elem==this){if(G){I[J](true)}I.splice(J,1)}}});if(!G){this.dequeue()}return this}});q.each({slideDown:v("show",1),slideUp:v("hide",1),slideToggle:v("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(G,H){q.fn[G]=function(I,J){return this.animate(H,I,J)}});q.extend({speed:function(I,J,H){var G=typeof I==="object"?I:{complete:H||!H&&J||q.isFunction(I)&&I,duration:I,easing:H&&J||J&&!q.isFunction(J)&&J};G.duration=q.fx.off?0:typeof G.duration==="number"?G.duration:q.fx.speeds[G.duration]||q.fx.speeds._default;G.old=G.complete;G.complete=function(){if(G.queue!==false){q(this).dequeue()}if(q.isFunction(G.old)){G.old.call(this)}};return G},easing:{linear:function(I,J,G,H){return G+H*I},swing:function(I,J,G,H){return((-Math.cos(I*Math.PI)/2)+0.5)*H+G}},timers:[],fx:function(H,G,I){this.options=G;this.elem=H;this.prop=I;if(!G.orig){G.orig={}}}});q.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(q.fx.step[this.prop]||q.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(H){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var G=parseFloat(q.css(this.elem,this.prop,H));return G&&G>-10000?G:parseFloat(q.curCSS(this.elem,this.prop))||0},custom:function(K,J,I){this.startTime=e();this.start=K;this.end=J;this.unit=I||this.unit||"px";this.now=this.start;this.pos=this.state=0;var G=this;function H(L){return G.step(L)}H.elem=this.elem;if(H()&&q.timers.push(H)&&!p){p=setInterval(function(){var M=q.timers;for(var L=0;L<M.length;L++){if(!M[L]()){M.splice(L--,1)}}if(!M.length){clearInterval(p);p=g}},13)}},show:function(){this.options.orig[this.prop]=q.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());q(this.elem).show()},hide:function(){this.options.orig[this.prop]=q.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(J){var I=e();if(J||I>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var G=true;for(var H in this.options.curAnim){if(this.options.curAnim[H]!==true){G=false}}if(G){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(q.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){q(this.elem).hide()}if(this.options.hide||this.options.show){for(var K in this.options.curAnim){q.attr(this.elem.style,K,this.options.orig[K])}}this.options.complete.call(this.elem)}return false}else{var L=I-this.startTime;this.state=L/this.options.duration;this.pos=q.easing[this.options.easing||(q.easing.swing?"swing":"linear")](this.state,L,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};q.extend(q.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(G){q.attr(G.elem.style,"opacity",G.now)},_default:function(G){if(G.elem.style&&G.elem.style[G.prop]!=null){G.elem.style[G.prop]=G.now+G.unit
}else{G.elem[G.prop]=G.now}}}});if(document.documentElement.getBoundingClientRect){q.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return q.offset.bodyOffset(this[0])}var I=this[0].getBoundingClientRect(),L=this[0].ownerDocument,H=L.body,G=L.documentElement,N=G.clientTop||H.clientTop||0,M=G.clientLeft||H.clientLeft||0,K=I.top+(self.pageYOffset||q.boxModel&&G.scrollTop||H.scrollTop)-N,J=I.left+(self.pageXOffset||q.boxModel&&G.scrollLeft||H.scrollLeft)-M;return{top:K,left:J}}}else{q.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return q.offset.bodyOffset(this[0])}q.offset.initialized||q.offset.initialize();var L=this[0],I=L.offsetParent,H=L,Q=L.ownerDocument,O,J=Q.documentElement,M=Q.body,N=Q.defaultView,G=N.getComputedStyle(L,null),P=L.offsetTop,K=L.offsetLeft;while((L=L.parentNode)&&L!==M&&L!==J){O=N.getComputedStyle(L,null);P-=L.scrollTop,K-=L.scrollLeft;if(L===I){P+=L.offsetTop,K+=L.offsetLeft;if(q.offset.doesNotAddBorder&&!(q.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(L.tagName))){P+=parseInt(O.borderTopWidth,10)||0,K+=parseInt(O.borderLeftWidth,10)||0}H=I,I=L.offsetParent}if(q.offset.subtractsBorderForOverflowNotVisible&&O.overflow!=="visible"){P+=parseInt(O.borderTopWidth,10)||0,K+=parseInt(O.borderLeftWidth,10)||0}G=O}if(G.position==="relative"||G.position==="static"){P+=M.offsetTop,K+=M.offsetLeft}if(G.position==="fixed"){P+=Math.max(J.scrollTop,M.scrollTop),K+=Math.max(J.scrollLeft,M.scrollLeft)}return{top:P,left:K}}}q.offset={initialize:function(){if(this.initialized){return}var N=document.body,H=document.createElement("div"),J,I,P,K,O,G,L=N.style.marginTop,M='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';O={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(G in O){H.style[G]=O[G]}H.innerHTML=M;N.insertBefore(H,N.firstChild);J=H.firstChild,I=J.firstChild,K=J.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(I.offsetTop!==5);this.doesAddBorderForTableAndCells=(K.offsetTop===5);J.style.overflow="hidden",J.style.position="relative";this.subtractsBorderForOverflowNotVisible=(I.offsetTop===-5);N.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(N.offsetTop===0);N.style.marginTop=L;N.removeChild(H);this.initialized=true},bodyOffset:function(G){q.offset.initialized||q.offset.initialize();var I=G.offsetTop,H=G.offsetLeft;if(q.offset.doesNotIncludeMarginInBodyOffset){I+=parseInt(q.curCSS(G,"marginTop",true),10)||0,H+=parseInt(q.curCSS(G,"marginLeft",true),10)||0}return{top:I,left:H}}};q.fn.extend({position:function(){var K=0,J=0,H;if(this[0]){var I=this.offsetParent(),L=this.offset(),G=/^body|html$/i.test(I[0].tagName)?{top:0,left:0}:I.offset();L.top-=l(this,"marginTop");L.left-=l(this,"marginLeft");G.top+=l(I,"borderTopWidth");G.left+=l(I,"borderLeftWidth");H={top:L.top-G.top,left:L.left-G.left}}return H},offsetParent:function(){var G=this[0].offsetParent||document.body;while(G&&(!/^body|html$/i.test(G.tagName)&&q.css(G,"position")=="static")){G=G.offsetParent}return q(G)}});q.each(["Left","Top"],function(H,G){var I="scroll"+G;q.fn[I]=function(J){if(!this[0]){return null}return J!==g?this.each(function(){this==n||this==document?n.scrollTo(!H?J:q(n).scrollLeft(),H?J:q(n).scrollTop()):this[I]=J}):this[0]==n||this[0]==document?self[H?"pageYOffset":"pageXOffset"]||q.boxModel&&document.documentElement[I]||document.body[I]:this[0][I]}});q.each(["Height","Width"],function(K,I){var G=K?"Left":"Top",J=K?"Right":"Bottom",H=I.toLowerCase();q.fn["inner"+I]=function(){return this[0]?q.css(this[0],H,false,"padding"):null};q.fn["outer"+I]=function(M){return this[0]?q.css(this[0],H,false,M?"margin":"border"):null};var L=I.toLowerCase();q.fn[L]=function(M){return this[0]==n?document.compatMode=="CSS1Compat"&&document.documentElement["client"+I]||document.body["client"+I]:this[0]==document?Math.max(document.documentElement["client"+I],document.body["scroll"+I],document.documentElement["scroll"+I],document.body["offset"+I],document.documentElement["offset"+I]):M===g?(this.length?q.css(this[0],L):null):this.css(L,typeof M==="string"?M:M+"px")}})})();if(typeof AP!=="undefined"){AP.add("query",function(a){a.Query=jQuery.noConflict()},"0.0.1",[])}(function(c){var a=c.scrollTo=function(d,f,g){c(window).scrollTo(d,f,g)};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,f=!d.nodeName||c.inArray(d.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!f){return d}var g=(d.contentWindow||d).document||d.ownerDocument||d;return c.browser.safari||g.compatMode=="BackCompat"?g.body:g.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 p=this,n=c(p),o=f,l,m={},h=n.is("html,body");switch(typeof o){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(o)){o=b(o);break}o=c(o,this);case"object":if(o.is||o.style){l=(o=c(o)).offset()}}c.each(d.axis.split(""),function(r,s){var u=s=="x"?"Left":"Top",t=u.toLowerCase(),w="scroll"+u,q=p[w],g=a.max(p,s);if(l){m[w]=l[t]+(h?0:q-n.offset()[t]);if(d.margin){m[w]-=parseInt(o.css("margin"+u))||0;m[w]-=parseInt(o.css("border"+u+"Width"))||0}m[w]+=d.offset[t]||0;if(d.over[t]){m[w]+=o[s=="x"?"width":"height"]()*d.over[t]}}else{var v=o[t];m[w]=v.slice&&v.slice(-1)=="%"?parseFloat(v)/100*g:v}if(/^\d+$/.test(m[w])){m[w]=m[w]<=0?0:Math.min(m[w],g)}if(!r&&d.queue){if(q!=m[w]){k(d.onAfterFirst)}delete m[w]}});k(d.onAfter);function k(g){n.animate(m,e,d.easing,g&&function(){g.call(this,f,d)})}}).end()};a.max=function(g,k){var o=k=="x"?"Width":"Height",n="scroll"+o;if(!c(g).is("html,body")){return g[n]-c(g)[o.toLowerCase()]()}var p="client"+o,f=g.ownerDocument.documentElement,d=g.ownerDocument.body;return Math.max(f[n],d[n])-Math.min(f[p],d[p])};function b(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);(function(d){var c={},b=new Image,a=["png","jpg","jpeg","gif"],f,e=1;d.fn.fancybox=function(g){c.settings=d.extend({},d.fn.fancybox.defaults,g);d.fn.fancybox.init();return this.each(function(){var h=d(this);var k=d.metadata?d.extend({},c.settings,h.metadata()):c.settings;h.unbind("click").click(function(){d.fn.fancybox.start(this,k);return false})})};d.fn.fancybox.start=function(l,n){if(c.animating){return false}if(n.overlayShow){d("#fancy_wrap").prepend('<div id="fancy_overlay"></div>');d("#fancy_overlay").css({width:d(window).width(),height:d(document).height(),opacity:n.overlayOpacity});if(d.browser.msie){d("#fancy_wrap").prepend('<iframe id="fancy_bigIframe" scrolling="no" frameborder="0"></iframe>');d("#fancy_bigIframe").css({width:d(window).width(),height:d(document).height(),opacity:0})}d("#fancy_overlay").click(d.fn.fancybox.close)}c.itemArray=[];c.itemNum=0;if(jQuery.isFunction(n.itemLoadCallback)){n.itemLoadCallback.apply(this,[c]);var p=d(l).children("img:first").length?d(l).children("img:first"):d(l);var k={width:p.width(),height:p.height(),pos:d.fn.fancybox.getPosition(p)};for(var h=0;h<c.itemArray.length;h++){c.itemArray[h].o=d.extend({},n,c.itemArray[h].o);if(n.zoomSpeedIn>0||n.zoomSpeedOut>0){c.itemArray[h].orig=k}}}else{if(!l.rel||l.rel==""){var m={url:l.href,title:l.title,o:n};if(n.zoomSpeedIn>0||n.zoomSpeedOut>0){var p=d(l).children("img:first").length?d(l).children("img:first"):d(l);m.orig={width:p.width(),height:p.height(),pos:d.fn.fancybox.getPosition(p)}}c.itemArray.push(m)}else{var g=d("a[@rel="+l.rel+"]").get();
for(var h=0;h<g.length;h++){var k=d.metadata?d.extend({},n,d(g[h]).metadata()):n;var m={url:g[h].href,title:g[h].title,o:k};if(n.zoomSpeedIn>0||n.zoomSpeedOut>0){var p=d(g[h]).children("img:first").length?d(g[h]).children("img:first"):d(l);m.orig={width:p.width(),height:p.height(),pos:d.fn.fancybox.getPosition(p)}}if(g[h].href==l.href){c.itemNum=h}c.itemArray.push(m)}}}d.fn.fancybox.changeItem(c.itemNum)};d.fn.fancybox.changeItem=function(k){d.fn.fancybox.showLoading();c.itemNum=k;d("#fancy_nav").empty();d("#fancy_outer").stop();d("#fancy_title").hide();d(document).unbind("keydown");imgRegExp=a.join("|");imgRegExp=new RegExp("."+imgRegExp+"$","i");var g=c.itemArray[k].url;if(g.match(/#/)){var h=window.location.href.split("#")[0];h=g.replace(h,"");d.fn.fancybox.showItem('<div id="fancy_div">'+d(h).html()+"</div>");d("#fancy_loading").hide()}else{if(g.match(imgRegExp)){d(b).unbind("load").bind("load",function(){d("#fancy_loading").hide();c.itemArray[k].o.frameWidth=b.width;c.itemArray[k].o.frameHeight=b.height;d.fn.fancybox.showItem('<img id="fancy_img" src="'+b.src+'" />')}).attr("src",g+"?rand="+Math.floor(Math.random()*999999999))}else{d.fn.fancybox.showItem('<iframe id="fancy_frame" onload="$.fn.fancybox.showIframe()" name="fancy_iframe'+Math.round(Math.random()*1000)+'" frameborder="0" hspace="0" src="'+g+'"></iframe>')}}};d.fn.fancybox.showIframe=function(){d("#fancy_loading").hide();d("#fancy_frame").show()};d.fn.fancybox.showItem=function(m){d.fn.fancybox.preloadNeighborImages();var h=d.fn.fancybox.getViewport();var l=d.fn.fancybox.getMaxSize(h[0]-50,h[1]-100,c.itemArray[c.itemNum].o.frameWidth,c.itemArray[c.itemNum].o.frameHeight);var g=h[2]+Math.round((h[0]-l[0])/2)-20;var k=h[3]+Math.round((h[1]-l[1])/2)-40;var n={left:g,top:k,width:l[0]+"px",height:l[1]+"px"};if(c.active){d("#fancy_content").fadeOut("normal",function(){d("#fancy_content").empty();d("#fancy_outer").animate(n,"normal",function(){d("#fancy_content").append(d(m)).fadeIn("normal");d.fn.fancybox.updateDetails()})})}else{c.active=true;d("#fancy_content").empty();if(d("#fancy_content").is(":animated")){}if(c.itemArray[c.itemNum].o.zoomSpeedIn>0){c.animating=true;n.opacity="show";d("#fancy_outer").css({top:c.itemArray[c.itemNum].orig.pos.top-18,left:c.itemArray[c.itemNum].orig.pos.left-18,height:c.itemArray[c.itemNum].orig.height,width:c.itemArray[c.itemNum].orig.width});d("#fancy_content").append(d(m)).show();d("#fancy_outer").animate(n,c.itemArray[c.itemNum].o.zoomSpeedIn,function(){c.animating=false;d.fn.fancybox.updateDetails()})}else{d("#fancy_content").append(d(m)).show();d("#fancy_outer").css(n).show();d.fn.fancybox.updateDetails()}}};d.fn.fancybox.updateDetails=function(){d("#fancy_bg,#fancy_close").show();if(c.itemArray[c.itemNum].title!==undefined&&c.itemArray[c.itemNum].title!==""){d("#fancy_title div").html(c.itemArray[c.itemNum].title);d("#fancy_title").show()}if(c.itemArray[c.itemNum].o.hideOnContentClick){d("#fancy_content").click(d.fn.fancybox.close)}else{d("#fancy_content").unbind("click")}if(c.itemNum!=0){d("#fancy_nav").append('<a id="fancy_left" href="javascript:;"></a>');d("#fancy_left").click(function(){d.fn.fancybox.changeItem(c.itemNum-1);return false})}if(c.itemNum!=(c.itemArray.length-1)){d("#fancy_nav").append('<a id="fancy_right" href="javascript:;"></a>');d("#fancy_right").click(function(){d.fn.fancybox.changeItem(c.itemNum+1);return false})}d(document).keydown(function(g){if(g.keyCode==27){d.fn.fancybox.close()}else{if(g.keyCode==37&&c.itemNum!=0){d.fn.fancybox.changeItem(c.itemNum-1)}else{if(g.keyCode==39&&c.itemNum!=(c.itemArray.length-1)){d.fn.fancybox.changeItem(c.itemNum+1)}}}})};d.fn.fancybox.preloadNeighborImages=function(){if((c.itemArray.length-1)>c.itemNum){preloadNextImage=new Image();preloadNextImage.src=c.itemArray[c.itemNum+1].url}if(c.itemNum>0){preloadPrevImage=new Image();preloadPrevImage.src=c.itemArray[c.itemNum-1].url}};d.fn.fancybox.close=function(){if(c.animating){return false}d(b).unbind("load");d(document).unbind("keydown");d("#fancy_loading,#fancy_title,#fancy_close,#fancy_bg").hide();d("#fancy_nav").empty();c.active=false;if(c.itemArray[c.itemNum].o.zoomSpeedOut>0){var g={top:c.itemArray[c.itemNum].orig.pos.top-18,left:c.itemArray[c.itemNum].orig.pos.left-18,height:c.itemArray[c.itemNum].orig.height,width:c.itemArray[c.itemNum].orig.width,opacity:"hide"};c.animating=true;d("#fancy_outer").animate(g,c.itemArray[c.itemNum].o.zoomSpeedOut,function(){d("#fancy_content").hide().empty();d("#fancy_overlay,#fancy_bigIframe").remove();c.animating=false})}else{d("#fancy_outer").hide();d("#fancy_content").hide().empty();d("#fancy_overlay,#fancy_bigIframe").fadeOut("fast").remove()}};d.fn.fancybox.showLoading=function(){clearInterval(f);var g=d.fn.fancybox.getViewport();d("#fancy_loading").css({left:((g[0]-40)/2+g[2]),top:((g[1]-40)/2+g[3])}).show();d("#fancy_loading").bind("click",d.fn.fancybox.close);f=setInterval(d.fn.fancybox.animateLoading,66)};d.fn.fancybox.animateLoading=function(g,h){if(!d("#fancy_loading").is(":visible")){clearInterval(f);return}d("#fancy_loading > div").css("top",(e*-40)+"px");e=(e+1)%12};d.fn.fancybox.init=function(){if(!d("#fancy_wrap").length){d('<div id="fancy_wrap"><div id="fancy_loading"><div></div></div><div id="fancy_outer"><div id="fancy_inner"><div id="fancy_nav"></div><div id="fancy_close"></div><div id="fancy_content"></div><div id="fancy_title"></div></div></div></div>').appendTo("body");d('<div id="fancy_bg"><div class="fancy_bg fancy_bg_n"></div><div class="fancy_bg fancy_bg_ne"></div><div class="fancy_bg fancy_bg_e"></div><div class="fancy_bg fancy_bg_se"></div><div class="fancy_bg fancy_bg_s"></div><div class="fancy_bg fancy_bg_sw"></div><div class="fancy_bg fancy_bg_w"></div><div class="fancy_bg fancy_bg_nw"></div></div>').prependTo("#fancy_inner");d('<table cellspacing="0" cellpadding="0" border="0"><tr><td id="fancy_title_left"></td><td id="fancy_title_main"><div></div></td><td id="fancy_title_right"></td></tr></table>').appendTo("#fancy_title")}if(d.browser.msie){d("#fancy_inner").prepend('<iframe id="fancy_freeIframe" scrolling="no" frameborder="0"></iframe>')}if(jQuery.fn.pngFix){d(document).pngFix()}d("#fancy_close").click(d.fn.fancybox.close)};d.fn.fancybox.getPosition=function(g){var h=g.offset();h.top+=d.fn.fancybox.num(g,"paddingTop");h.top+=d.fn.fancybox.num(g,"borderTopWidth");h.left+=d.fn.fancybox.num(g,"paddingLeft");h.left+=d.fn.fancybox.num(g,"borderLeftWidth");return h};d.fn.fancybox.num=function(g,h){return parseInt(d.curCSS(g.jquery?g[0]:g,h,true))||0};d.fn.fancybox.getPageScroll=function(){var h,g;if(self.pageYOffset){g=self.pageYOffset;h=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){g=document.documentElement.scrollTop;h=document.documentElement.scrollLeft}else{if(document.body){g=document.body.scrollTop;h=document.body.scrollLeft}}}return[h,g]};d.fn.fancybox.getViewport=function(){var g=d.fn.fancybox.getPageScroll();return[d(window).width(),d(window).height(),g[0],g[1]]};d.fn.fancybox.getMaxSize=function(m,l,h,g){var k=Math.min(Math.min(m,h)/h,Math.min(l,g)/g);return[Math.round(k*h),Math.round(k*g)]};d.fn.fancybox.defaults={hideOnContentClick:false,zoomSpeedIn:500,zoomSpeedOut:500,frameWidth:600,frameHeight:400,overlayShow:false,overlayOpacity:0.4,itemLoadCallback:null}})(jQuery);(function(a){jQuery.fn.pngFix=function(d){d=jQuery.extend({blankgif:"blank.gif"},d);var c=(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 5.5")!=-1);var b=(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 6.0")!=-1);if(jQuery.browser.msie&&(c||b)){jQuery(this).find("img[@src$=.png]").each(function(){jQuery(this).attr("width",jQuery(this).width());jQuery(this).attr("height",jQuery(this).height());var n="";var g="";var f=(jQuery(this).attr("id"))?'id="'+jQuery(this).attr("id")+'" ':"";var o=(jQuery(this).attr("class"))?'class="'+jQuery(this).attr("class")+'" ':"";
var k=(jQuery(this).attr("title"))?'title="'+jQuery(this).attr("title")+'" ':"";var l=(jQuery(this).attr("alt"))?'alt="'+jQuery(this).attr("alt")+'" ':"";var h=(jQuery(this).attr("align"))?"float:"+jQuery(this).attr("align")+";":"";var e=(jQuery(this).parent().attr("href"))?"cursor:hand;":"";if(this.style.border){n+="border:"+this.style.border+";";this.style.border=""}if(this.style.padding){n+="padding:"+this.style.padding+";";this.style.padding=""}if(this.style.margin){n+="margin:"+this.style.margin+";";this.style.margin=""}var m=(this.style.cssText);g+="<span "+f+o+k+l;g+='style="position:relative;white-space:pre-line;display:inline-block;background:transparent;'+h+e;g+="width:"+jQuery(this).width()+"px;height:"+jQuery(this).height()+"px;";g+="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+jQuery(this).attr("src")+"', sizingMethod='scale');";g+=m+'"></span>';if(n!=""){g='<span style="position:relative;display:inline-block;'+n+e+"width:"+jQuery(this).width()+"px;height:"+jQuery(this).height()+'px;">'+g+"</span>"}jQuery(this).hide();jQuery(this).after(g)});jQuery(this).find("*").each(function(){var f=jQuery(this).css("background-image");if(f.indexOf(".png")!=-1){var e=f.split('url("')[1].split('")')[0];jQuery(this).css("background-image","none");jQuery(this).get(0).runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+e+"',sizingMethod='scale')"}});jQuery(this).find("input[@src$=.png]").each(function(){var e=jQuery(this).attr("src");jQuery(this).get(0).runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+e+"', sizingMethod='scale');";jQuery(this).attr("src",d.blankgif)})}return jQuery}})(jQuery);AP.add("flash",function(A){var $=AP.Query,L=AP.Lang;var F=AP.Flash={create:function(options){return new flashObject(options)},remote:function(obj,fn){var rs=obj.CallFunction('<invoke name="'+fn+'" returntype="javascript">'+__flash__argumentsToXML(arguments,2)+"</invoke>");return eval(rs)},Handlers:{}};function flashObject(o){this._uid="Swiff_"+(new Date()).getTime();this.options={id:this._uid,height:1,width:1,path:null,container:null,properties:{},params:{quality:"high",allowScriptAccess:"always",wMode:"transparent",swLiveConnect:true},handlers:{},variables:{}};this.setOptions(o);var id=this.options.id,options=this.options;var container=(options.container)?$(options.container):null;A.Flash.Handlers[this._uid]={};var params=options.params,variables=options.variables,handlers=options.handlers,path=A.String.qualifyPath(options.path),properties=A.extend({height:options.height,width:options.width},options.properties);var self=this;for(var callBack in handlers){A.Flash.Handlers[this._uid][callBack]=(function(option){return function(){return option.apply(self.object,arguments)}})(handlers[callBack]);variables[callBack]="AP.Flash.Handlers."+this._uid+"."+callBack}params.flashVars=this.buildSearchString(variables);if(A.Browser.trident){properties.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";params.movie=path}else{properties.type="application/x-shockwave-flash";properties.data=path}var build='<object id="'+id+'"';for(var property in properties){build+=" "+property+'="'+properties[property]+'"'}build+=">";for(var param in params){if(params[param]){build+='<param name="'+param+'" value="'+params[param]+'" />'}}build+="</object>";this.object=$(build).appendTo((container)?container.empty():$("<div></div>"))[0]}flashObject.prototype=A.merge({toHTMLObjectElement:function(){return this.object},inject:function(el){$(this.toHTMLObjectElement()).appendTo(el);return this},remote:function(){return F.remote.apply(F,AP.Array.extend([this.toHTMLObjectElement()],arguments))}},A.Interface.Options,A.Interface.SearchStringBuilder)},"0.1.0",[{name:"lang",minVersion:"0.0.3"},{name:"array",minVersion:"1.0.0"},{name:"object",minVersion:"0.0.1"},{name:"browser",minVersion:"0.0.1"},{name:"query",minVersion:"0.0.1"},{name:"string",minVersion:"0.0.2"},{name:"interface.options",minVersion:"0.0.1"},{name:"interface.searchStringBuilder",minVersion:"0.0.1"}]);(function(){var a=AP.namespace("CherInfo"),b=AP.Query;a.EmailProtect={encodeMailtoLink:function(e){var d=function(g){return g.replace(/\./g,"email-dot").replace(/@/g,"email-at").replace(/mailto:/g,"email-action")},f=d(e.attr("href")),c=d(e.html());e.attr("href",f);e.html(c)},decodeMailtoLinks:function(){function c(d){return d.replace(/email-dot/g,".").replace(/email-at/g,"@").replace(/email-action/g,"mailto:")}b("span.mailto").each(function(){var e=b(this),f=function(g){return g.replace(/email-dot/g,".").replace(/email-at/g,"@").replace(/email-action/g,"mailto:")},d=f(e.find(".href").html());b(this).replaceWith('<a href="'+d+'">'+f(e.find(".content").html())+"</a>")});b("a").each(function(){var f=b(this),e=f.attr("href");if(!e||(e.indexOf("email-action")==-1)){return}var g=c(e),d=c(f.html());f.attr("href",g);f.html(d)})}}})();(function(){var d=AP.Query,a=AP.namespace("CherInfo"),c={path:AP.String.qualifyPath("/flash/uppod/uppod.swf"),params:{allowFullScreen:true,bgcolor:"#000000"},variables:{file:AP.String.qualifyPath("/resources/default.flv"),st:AP.String.qualifyPath("/flash/uppod/video_style.txt")},width:300,height:245},e={path:"/flash/uppod/uppod.swf",variables:{file:AP.String.qualifyPath("/resources/default.mp3"),st:AP.String.qualifyPath("/flash/uppod/audio_style.txt")},width:300,height:90},b=5*1000;a.Gui=function(){var h=function(){try{document.execCommand("BackgroundImageCache",false,true)}catch(q){}},g=function(){if(AP.Browser.trident==6){var r=d(AP.config.doc.body),q=parseInt(r.css("min-width").replace("px",""),0);function s(){if(AP.config.doc.documentElement.clientWidth<q){r.css("width",q+"px")}else{r.css("width","100%")}}s();d(AP.config.win).bind("resize",s)}},k=function(){if(typeof AP.CherInfo.data!="undefined"){return}var s=d(AP.config.doc),t=s.find(".innerPageLeftPlaceholderWrapper"),r=s.find(".innerPageCenterPlaceholderWrapper"),q=s.find(".rightPlaceholderWrapper");if((t.length>0)&&(r.length>0)&&(q.length>0)){d(t).css("height","auto");d(r).css("height","auto");d(q).css("height","auto");setTimeout(function(){var v=d(t).height(),u=d(r).height(),x=d(q).height(),w=v;if(w<u){w=u}if(w<x){w=x}d(t).height(w);d(r).height(w);d(q).height(w)},1000)}},m=function(z){var r=z.parents(".videoContent"),A=r.find(".alignCenterToLeft"),s=r.find(".alignCenterToRight"),v=s.children("object");if(v.length){A.toggleClass("hidden")}else{var w=AP.String.qualifyPath(AP.String.trim(s.find("span.hidden").text()));var B;if(s.is(".placeholder")){B=s}else{B=s.parents(".placeholder")}var t=B.width()-(39+38);var C=Math.round(t/1.224),x="videoplayer"+AP.config.envinronment.uidIndex++;var y=AP.extend(AP.Reflection.deepCopy(c),(w)?{variables:{file:w,st:AP.String.qualifyPath("/flash/uppod/video_style.txt"),uid:x},container:s,width:t,height:C,id:x}:{});var u="";for(var q in y){u+=q+" = "+y[q]+"\n"}v=AP.Flash.create(y);A.removeClass("hidden")}a.PostsStream.manager.resize();k()},o=function(){var q=d("form.search"),r=q.find("[name='query']");r.focus(function(){var s=d(this);if(s.val()=="Поиск"){s.addClass("active");s.val("")}});r.blur(function(){var s=d(this);if(s.val()==""){s.val("Поиск");s.removeClass("active")}});q.submit(function(w){w.preventDefault();var v=d(this),t=v.attr("action"),u=r.val(),s=v.siblings(".tabView").length?v.siblings(".tabView").find("li.active a").attr("href"):null;t=t+(u?"/"+u:"")+(s?"/"+s:"");window.location=t});d(".mainSearchContainer .tabView li").click(function(s){s.preventDefault();d(this).addClass("active").siblings().removeClass("active");if((/^\/search\/.+/).test(window.location.pathname)){q.submit()}})},p=function(){var q=document.getElementsByTagName("img"),r=q.length;while(r--){var t=q[r];if(t&&t.alt=="Структура мэрии"){var s=t.parentNode;if(s&&s.nodeName&&s.nodeName.toLowerCase()=="a"){s.style.display="inline-block"}}}},f=function(){d("img").each(function(){var s=d(this),u=s.attr("src");if((u.indexOf("?no-resize")!=-1)||(u.indexOf("/mediaStorageImages/width")==-1)){return
}var v=u.split("/"),r=2;if(u.indexOf("http://")!=-1){r=4}var q=s.get(0),t="";if(v[r].indexOf("_nowatermark")!=-1){t="_nowatermark"}v[r]="original_size"+t;q.title=q.alt;q.originalSrc=v.join("/");s.addClass("lightboxImage");s.click(function(){jsiBoxOpen(q)})})},l=function(){var q=null;d(AP.config.win).resize(function(){if(q!=null){clearTimeout(q)}q=setTimeout(function(){a.Gui.renderAudioPlayer();q=null},2000)})},n=function(){d(AP.config.doc.body).click(function(r){var q=d(r.target);if(!q.is("a")){q=q.parents("a")}if(!q.is("a")||!q.length||!q.hasClass("blank")){return true}if(AP.Browser.trident!=6){q.attr("target","_blank")}else{window.open(q.attr("href"));r.preventDefault()}})};initializeGeographyTab=function(){var r=d(".geography .tabView");var q=r.siblings(".tab");r.click(function(t){var s=d(t.target);if(s.is("a")){r.children("li").each(function(){var u=d(this);if(u.children("a")[0]==s[0]){u.addClass("active")}else{u.removeClass("active")}});q.each(function(){var v=d(this),u=s.attr("href");if(v.attr("id")==u.substr(u.indexOf("#")+1)){v.removeClass("hidden")}else{v.addClass("hidden")}});t.preventDefault();return false}})},initializeTipShow=function(){d(".tip").each(function(){var u=d(this),s=u.find("script"),v=u.find(".tipContent");if(v.length!=1||s.length!=1){return}var q=window[s.attr("id")];if(!q){return}var r=q.length;if(r<2){return}function t(){if(a.Gui.TIPS_INDEX==r){a.Gui.TIPS_INDEX=0}var w=v[0];while(w.hasChildNodes()){w.removeChild(w.firstChild)}v.html(AP.String.convertHtmlEntities(q[a.Gui.TIPS_INDEX++].content))}t();setInterval(t,b)})},checkBrowserCompability=function(){var q=false;q|=AP.Browser.gecko&&AP.Browser.gecko<1.8;q|=AP.Browser.webkit&&AP.Browser.webkit<523.12;q|=AP.Browser.presto&&AP.Browser.presto<9.6;q|=AP.Browser.trident&&AP.Browser.version<6;if(q){var r='<p>\u0412\u0430\u0448 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0443\u0441\u0442\u0430\u0440\u0435\u043b. \u041a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441\u0430\u0439\u0442\u0430 \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f. <br/>\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0441\u0432\u043e\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u043f\u0440\u043e\u0439\u0434\u044f \u043f\u043e \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u043d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0441\u0441\u044b\u043b\u043e\u043a \u0438 \u0441\u043b\u0435\u0434\u0443\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c:</p><ul><li><a href="http://www.google.com/chrome?hl=ru">Chrome</a></li><li><a href="http://www.mozilla-europe.org/ru/firefox/">Firefox</a></li><li><a href="http://www.apple.com/ru/safari/download/">Safari</a></li><li><a href="http://www.opera.com/browser/">Opera</a></li><li><a href="http://www.microsoft.com/rus/windows/internet-explorer/">Internet Explorer</a></li></ul>';d('<div class="browserWarning">'+r+"</div>").prependTo("body")}};return{TIPS_INDEX:0,renderAudioPlayer:function(q){var r=function(u){var t=u.find("span.hidden"),v=AP.String.qualifyPath(AP.String.trim(t.text())),y=u.children("object");if(y.length){y.remove()}var z;if(u.is(".placeholder")){z=u}else{z=u.parents(".placeholder")}var x=z.width()-2,s=90,w="audioplayer"+AP.config.envinronment.uidIndex++;AP.Flash.create(AP.extend(AP.Reflection.deepCopy(e),v?{variables:{file:v,st:AP.String.qualifyPath("/flash/uppod/audio_style.txt"),w:x,h:s,uid:w},container:u,width:x,height:s,id:w}:{}));u.append(t)};if(q){r(d(q))}else{d(".audioContent").each(function(){r(d(this))})}},initialize:function(){checkBrowserCompability();h();g();o();d("td.videoBlockSwitcher").live("click",function(q){m(d(this));if(q.preventDefault){q.preventDefault()}return false});p();initializeGeographyTab();this.renderAudioPlayer();f();a.EmailProtect.decodeMailtoLinks();l();n();setTimeout(initializeTipShow,b);d(window).load(function(){k();if(a.PostsStream){a.PostsStream.manager.initialize()}})}}}();d(function(){a.Gui.initialize()})})();(function(){var a=AP.namespace("CherInfo"),b=AP.Query;a.Poll={initialize:function(){b(".pollContent > li").click(a.Poll.vote)},vote:function(d){d.preventDefault();var f=b(d.target).is("li")?b(d.target):b(d.target).parents("li:first"),c=parseInt(f.children(".id").text(),10);b.ajax({url:"/rest/vote",type:"post",data:{answer:c,login:"anonymous",password:"anonymous"},dataType:"json",success:function(g){if(g.error){alert("\u041D\u0435 \u043F\u043E\u043B\u0443\u0447\u0430\u0435\u0442\u0441\u044F \u043F\u0440\u043E\u0433\u043E\u043B\u043E\u0441\u043E\u0432\u0430\u0442\u044C \u0432 \u043E\u043F\u0440\u043E\u0441\u0435");return}var e=b('<ul class="pollResults"></ul>');b.each(g.entity.answers,function(){var k=161,h=Math.round(k/100*this.voteCountPercent),l='<li class="answer"><span class="id hidden">'+this.id+'</span>                                      <div class="variantLabel">                                      <span class="variantText text">'+this.text+'</span>                                      <span class="variantPercent voteCountPercent">'+this.voteCountPercent+'%</span>                                      <div class="pollScale">                                      <div class="pollActiveScale pollActivePercent '+(g.entity.winner.id==this.id?"pollLeader":"")+' bar" style="width: '+h+'px;"></div>                                      </div>                                      </div>                                      </li>';e.append(l)});f.parents(".pollContent:first").replaceWith(e)}})}};b(function(){a.Poll.initialize()})})();(function(){if(typeof AP=="undefined"){window.PostsStream={};window.AP={Query:window.jQuery,Date:window.ApDate,Lang:{isUndefined:function(d){return typeof d==="undefined"}},String:{convertHtmlEntities:function(d){return d.replace(/&laquo;/g,"«").replace(/&raquo;/g,"»").replace(/&bdquo;/g,"„").replace(/&ldquo;/g,"“").replace(/&mdash;/g,"—").replace(/&ndash;/g,"–").replace(/&minus;/g,"−").replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&lsquo;/g,"‘").replace(/&rsquo;/g,"’").replace(/&nbsp;/g," ").replace(/&trade;/g,"™").replace(/&reg;/g,"®").replace(/&copy;/g,"©").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&apos;/g,"'").replace(/&[a-z]+;/ig,"")}},namespace:function(){return window.PostsStream}}}var c=AP.Query,a=AP.Lang,b=AP.namespace("CherInfo.PostsStream");b.DateRenderFormat={SIMPLE:"SIMPLE",DETAIL:"DETAIL",RANGE:"RANGE"};b.Iterator=function(d){this.index=d.index;this.collection=d.collection;this.collectionLength=d.collection.length;this.initialized=false;this.iterate=d.iterate;this.isWithinCollection=function(){return((this.index>=0)&&(this.index<this.collectionLength))};this.next=function(){if(!this.isWithinCollection()){return false}if(this.initialized){this.iterate()}else{this.initialized=true}return this.isWithinCollection()};this.getCurrentItem=function(){return this.collection[this.index]}};b.Stream=function(){var n=null,p=null,h=null,u=null,g,e,m,d,l,t,f,o,r,k=false,s=null,q=this;this.initialize=function(x){n=x.streamElement;p=n.find(".posts-stream-items");e=n.find(".stream-type").text();g=n.find(".scrollUpWrapper").outerHeight();f=n.find(".date-render-format").text();m=n.find(".date-year").text();d=n.find(".date-month").text();l=n.find(".date-day").text();o=b.manager.getHighlightClassByStreamType(e);var v=/\/(daily|weekly|monthly|yearly)/,w=v.exec(location.pathname);if(w&&w[1]){t=w[1]}this.initLastLoadedPostDate();this.updatePostsElements();this.bindEventsHandlers();this.activateFirstCategory();this.resizeEventHandler(true)};this.initLastLoadedPostDate=function(){var v="yyyy-mm-dd hh:ii:ss",w=n.find(".last-post-date").text();if(w==""){return}s=AP.Date.parseDate(w,v)};this.resizeEventHandler=function(v){this.updatePostsContainerHeight();this.initializeScrollArrowsAndFog(v)};this.updatePostsContainerHeight=function(v){p.height(parseInt(p.height())+(v||0));
h=p.innerHeight()+10};this.initializeScrollArrowsAndFog=function(v){var x=q.findLastVisiblePostOnCurrentPage(),w=(((x.index!=u.length-1)||x.stopConditionPassed)&&(u.length!=0));if(v){var y=(n.find(".has-more").text()=="true");w=w||y}q.setScrollUpVisibility(false);q.setScrollDownVisibility(w);q.setDownFogVisibility(w)};this.updatePostsElements=function(){u=p.find(".note, h2")};this.activateFirstCategory=function(){var v=n.find(".tabView.inlineMenu li:first");v.addClass("active");r=v.find("a.ajax").prev().text()||b.manager.DEFAULT_CATEGORY_KEY};this.findPostOnPage=function(z){var y=z.postsHeightSum,v=false,w,x;while(z.iterator.next()){w=c(z.iterator.getCurrentItem());x=z.iterator.index;y+=w.outerHeight()+parseInt(w.css("margin-top"))+0.5;if(z.stopCondition(y)){v=true;break}}return{post:w,index:x,stopConditionPassed:v}};this.findVisiblePostOnPreviousPage=function(x){var w=function(){this.index--},v=this.findFirstVisiblePostOnCurrentPage();return this.findPostOnPage({postsHeightSum:0,iterator:new b.Iterator({index:v.index,iterate:w,collection:u}),stopCondition:x})};this.findFirstVisiblePostOnPreviousPage=function(){return this.findVisiblePostOnPreviousPage(function(v){return(v>h)})};this.findVisiblePostOnCurrentPage=function(w){var v=function(){this.index++};return this.findPostOnPage({postsHeightSum:-p.scrollTop(),iterator:new b.Iterator({index:0,iterate:v,collection:u}),stopCondition:w})};this.findFirstVisiblePostOnCurrentPage=function(){return this.findVisiblePostOnCurrentPage(function(v){return(v>0)})};this.findLastVisiblePostOnCurrentPage=function(){return this.findVisiblePostOnCurrentPage(function(v){return(v>h)})};this.bindEventsHandlers=function(){n.find(".scrollArrow").click(this.scrollDownEventHandler);n.find(".scrollUpArrow").click(this.scrollUpEventHandler);n.find(".tabView.inlineMenu li a.ajax").click(this.categoryClickEventHandler)};this.scrollUpEventHandler=function(){var v=q.findFirstVisiblePostOnPreviousPage();p.scrollTo(v.post,500,{onAfter:function(){var w=(v.index==0);q.setScrollUpVisibility(!w);q.setScrollDownVisibility(true);q.setUpFogVisibility(false);q.setDownFogVisibility(true)}});return false};this.scrollDownEventHandler=function(){if(k){return false}var v=p.scrollTop();k=true;q.preloadPosts(function(x){q.setScrollUpVisibility(true);p.scrollTop(v);var w=q.findLastVisiblePostOnCurrentPage();p.scrollTo(w.post,500,{onAfter:function(){var z=q.findLastVisiblePostOnCurrentPage(),y=(z.index==u.length-1)&&!x;k=false;q.setScrollDownVisibility(!y);q.setUpFogVisibility(y);q.setDownFogVisibility(!y);if(y){p.scrollTo(z.post)}}})});return false};this.preloadPosts=function(x){var v=u.length,w=q.findLastVisiblePostOnCurrentPage();if(w.index+b.manager.loadPostsLimit>v){q.load({offset:u.length,append:true,callback:x})}else{x(true)}};this.setScrollDownVisibility=function(w){var v=n.find(".scrollArrow");if(w){v.removeClass("invisible")}else{v.addClass("invisible")}};this.setScrollUpVisibility=function(w){var v=n.find(".scrollUpWrapper"),x=p.scrollTop();if(w){if(v.is(".hidden")){v.removeClass("hidden");this.updatePostsContainerHeight(-g);p.scrollTop(x)}}else{if(!v.is(".hidden")){v.addClass("hidden");this.updatePostsContainerHeight(g);p.scrollTop(x)}}};this.setDownFogVisibility=function(w){var v=n.find(".fog");if(w){v.removeClass("invisible")}else{v.addClass("invisible")}};this.setUpFogVisibility=function(w){var v=n.find(".upfog");if(w){v.removeClass("invisible")}else{v.addClass("invisible")}};this.categoryClickEventHandler=function(w){var v=c(w.target),x=v.prev().text();if(x==r){return false}r=x;p.scrollTop(0);n.find(".tabView.inlineMenu li.active").removeClass("active");v.parent("li").addClass("active");q.load({offset:0,callback:q.initializeScrollArrowsAndFog,forceRerender:true});q.setUpFogVisibility(false);return false};this.load=function(w){var v={streamType:e,offset:w.offset,limit:b.manager.loadPostsLimit+1,categoryKey:r};if(m!==""){v.year=m}if(d!==""){v.month=d}if(l!==""){v.day=l}if(t){v.feature=t}c.ajax({url:b.manager.serviceUrl,type:"get",dataType:"json",data:v,success:function(x){var y=(x.length==(b.manager.loadPostsLimit+1));if(y){x.splice(x.length-1)}if((x.length>0)||w.forceRerender){q.renderPosts({response:x,append:w.append});q.updatePostsElements()}if(w.callback){w.callback(y)}}})};this.renderDate=function(y){var w="yyyy-mm-dd hh:ii:ss",x="dd.mm.yy",v={detailHtml:""};y.post.creationDate=AP.Date.parseDate(y.post.creationDate,w);if(f!=b.DateRenderFormat.RANGE){if(f==b.DateRenderFormat.DETAIL){if(((y.prevDate==null)||!b.DateUtil.isDatesEquals(y.prevDate,y.post.creationDate))){v.detailHtml+=b.DateUtil.getDateDescription(y.post.creationDate)}x="hh:ii"}v.html=b.Templates.SIMPLE_AND_DETAIL_DATE.replace("%{date}",AP.Date.formatDate(y.post.creationDate,x)).replace("%{dateHighlightClass}",o)}else{v.html=b.Templates.RANGE_DATE.replace("%{startDate}",AP.Date.formatDate(y.post.creationDate,x)).replace("%{endDate}",AP.Date.formatDate(y.post.creationDate,x))}return v};this.convertHtmlEntities=function(v){return AP.String.convertHtmlEntities(v)};this.renderPost=function(z){var y,w,v="";if(z.post.smallThumbnailUrl){v=b.Templates.IMAGE.replace(/%{url}/,z.post.smallThumbnailUrl)}if(z.post.url){y=b.Templates.LINKED_SUMMARY.replace(/%{url}/g,z.post.url)}else{y=b.Templates.SIMPLE_SUMMARY}y=this.convertHtmlEntities(y.replace("%{summary}",z.post.summary));w=this.renderDate(z);var x=b.Templates.POST.replace("%{postId}",z.post.id).replace("%{image}",v).replace("%{summary}",y).replace("%{date}",w.html);return w.detailHtml+x};this.renderPosts=function(z){var y="",v=z.response.length,x;for(x=0;x<v;++x){var w=z.response[x];y+=this.renderPost({post:w,prevDate:s});s=w.creationDate}if(z.append){p.append(c(y))}else{p.html(y)}}};b.DateUtil={DATES:null,GENITIVE_MONTHS_NAMES:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"],DATES_DESCRIPTIONS:{today:"Сегодня",yesterday:"Вчера",twoDaysAgo:"Два дня назад",threeDaysAgo:"Три дня назад"},getDateDescription:function(e){var d;if(this.isDatesEquals(e,this.DATES.today)){d=this.DATES_DESCRIPTIONS.today}else{if(this.isDatesEquals(e,this.DATES.yesterday)){d=this.DATES_DESCRIPTIONS.yesterday}else{if(this.isDatesEquals(e,this.DATES.twoDaysAgo)){d=this.DATES_DESCRIPTIONS.twoDaysAgo}else{if(this.isDatesEquals(e,this.DATES.threeDaysAgo)){d=this.DATES_DESCRIPTIONS.threeDaysAgo}else{d=e.getDate()+" "+this.GENITIVE_MONTHS_NAMES[e.getMonth()]+" "+e.getFullYear()}}}}return"<h2>"+d+"</h2>"},isDatesEquals:function(e,d){return((e.getFullYear()==d.getFullYear())&&(e.getDate()==d.getDate())&&(e.getMonth()==d.getMonth()))},initialize:function(){var d=new Date(),e=new Date(),f=new Date(),g=new Date();e.setDate(d.getDate()-1);f.setDate(d.getDate()-2);g.setDate(d.getDate()-3);this.DATES={today:d,yesterday:e,twoDaysAgo:f,threeDaysAgo:g}}};b.Autosize={DEFAULT_CONTAINER_HEIGHT:"680px",MIN_ITEMS_COUNT:8,findPlaceholderWithMaxHeight:function(d){var f=-1,h,e;for(e=0;e<d.length;++e){var k=c(d[e]),g=k.height();if(g>f){f=g;h=k}}return{object:h,height:f}},fitStreamsSize:function(k,e){var g;for(g=0;g<k.length;++g){var l=c(k[g]);if(l.get(0)==e.object.get(0)){continue}var o=l.find(".posts-stream"),n=e.height-l.height(),d=n/o.length,f;for(f=0;f<o.length;++f){var m=c(o[f]).find(".posts-stream-items"),h=m.scrollTop();m.height(m.height()+d);m.scrollTop(h)}}},minimizeStreamsSize:function(e){var d=this;e.each(function(){var h=c(this),f=h.find(".posts-stream-items"),g=f.scrollTop();f.css("height","auto");if(f.height()<parseInt(d.DEFAULT_CONTAINER_HEIGHT)){h.find(".fog").addClass("invisible");f.height(f.height()+1)}else{f.css("height",d.DEFAULT_CONTAINER_HEIGHT)}f.scrollTop(g)})},initialize:function(h){this.minimizeStreamsSize(h);var e=c(".topPlaceholders, .bottomPlaceholders"),f;for(f=0;f<e.length;++f){var d=c(e[f]).find(".placeholder"),g=this.findPlaceholderWithMaxHeight(d);this.fitStreamsSize(d,g)}}};b.Templates={POST:'<div class="note post">                    <span class="id hidden">%{postId}</span>                    %{image}                    <div class="noteText"> %{date} %{summary} </div>                </div>',SIMPLE_SUMMARY:'<div class="summary">%{summary}</div>',LINKED_SUMMARY:'<a href="%{url}" class="summary">%{summary}</a>',SIMPLE_AND_DETAIL_DATE:'<span class="noteDate creationDate %{dateHighlightClass}">%{date}</span>',IMAGE:'<img class="smallThumbnail" alt=" " src="%{url}" />',RANGE_DATE:'<span class="noteDate creationDate dateOfMun">%{startDate}</span><span>— </span>                      <span class="noteDate creationDate dateOfMun">%{endDate}</span>'};
b.manager={DEFAULT_SERVICE_URL:"/rest/posts-stream/",DEFAULT_LOAD_POSTS_LIMIT:30,DEFAULT_CATEGORY_KEY:"ALL",RESIZE_TIMER_TIMEOUT_IN_MILLISECONDS:1000,loadPostsLimit:null,serviceUrl:null,streams:null,streamsObjects:[],getHighlightClassByStreamType:function(d){return"dateOf"+AP.String.capitalize(d.toLowerCase())},initialize:function(e){var d=this;e=e||{};this.loadPostsLimit=a.isUndefined(e.loadPostsLimit)?this.DEFAULT_LOAD_POSTS_LIMIT:e.loadPostsLimit;this.serviceUrl=a.isUndefined(e.serviceUrl)?this.DEFAULT_SERVICE_URL:e.serviceUrl;this.streams=c(".posts-stream");b.DateUtil.initialize();b.Autosize.initialize(this.streams);this.streams.each(function(){var g=new b.Stream(),f=c(this);g.initialize({streamElement:f});d.streamsObjects.push(g)})},resize:function(){setTimeout(function(){b.Autosize.initialize(b.manager.streams)},this.RESIZE_TIMER_TIMEOUT_IN_MILLISECONDS)}}})();var jsiBox={statusString:"Изображение&nbsp;[num]&nbsp;из&nbsp;[total]"};function jsiBoxInit(){jsiBox.wrapNode=document.getElementById("wrapJsiBox");if(jsiBox.wrapNode==null){return}document.getElementById("wrapJsiBox").onclick=jsiBoxClose;jsiBox.preloadImg=new Image();jsiBox.preloadImg.onload=jsiBoxDisplayMainImg;jsiBox.wrapNode=document.getElementById("wrapJsiBox");jsiBox.boxNode=document.getElementById("jsiMainBox");jsiBox.progressImg=document.getElementById("jsiBoxLoading");jsiBox.prevLinkNode=document.getElementById("prevJsiBoxLink");jsiBox.nextLinkNode=document.getElementById("nextJsiBoxLink");jsiBox.infoNode=document.getElementById("jsiBoxNumberOfImage");jsiBox.wrapImgNode=document.getElementById("jsiBoxMainImageWrap");jsiBox.mainImg=document.getElementById("jsiBoxMainImage");jsiBox.titleNode=document.getElementById("jsiBoxTitle");jsiBox.currentImgIndex=0;jsiBox.linkNodesArray=new Array()}function jsiBoxDisplayMainImg(){var a=jsiBox.currentImgIndex-1;if(a>=0){jsiBox.prevLinkNode.style.display=""}else{jsiBox.prevLinkNode.style.display="none"}var b=jsiBox.currentImgIndex+1;if(b<jsiBox.linkNodesArray.length){jsiBox.nextLinkNode.style.display=""}else{jsiBox.nextLinkNode.style.display="none"}if(jsiBox.linkNodesArray.length>1){var c=jsiBox.statusString.replace("[num]",jsiBox.currentImgIndex+1);c=c.replace("[total]",jsiBox.linkNodesArray.length);jsiBox.infoNode.innerHTML=c}jsiBoxDimMainImage(10);jsiBox.progressImg.style.display="none";jsiBox.titleNode.innerHTML="";jsiBox.titleNode.style.display="none"}function jsiBoxDimMainImage(a){var c;if(a){c=a}else{var b=2;c=jsiBox.mainImg.style.opacity*10-b}jsiBox.mainImg.style.opacity=c/10;jsiBox.mainImg.style.filter="alpha(opacity="+c*10+")";if(jsiBox.mainImg.style.opacity>0){setTimeout("jsiBoxDimMainImage()",35)}else{jsiBox.mainImg.style.display="none";jsiBox.mainImg.style.opacity=0;jsiBox.mainImg.style.filter="alpha(opacity=100)";jsiBoxResize()}}function jsiBoxResize(){var c=parseInt(jsiBox.wrapImgNode.style.marginLeft,10)||0;var e=parseInt(jsiBox.wrapImgNode.style.marginRight,10)||0;var b=parseInt(jsiBox.boxNode.style.borderLeftWidth,10)||0;var h=parseInt(jsiBox.boxNode.style.borderRightWidth,10)||0;var m=jsiBox.wrapImgNode.offsetWidth-jsiBox.preloadImg.width;var l=jsiBox.wrapImgNode.offsetHeight-jsiBox.preloadImg.height;var k=m/4;var d=l/4;k=(k>0)?Math.ceil(k):Math.floor(k);d=(d>0)?Math.ceil(d):Math.floor(d);if(Math.abs(m)>Math.abs(k)){var g=jsiBox.boxNode.offsetWidth-b-h-k;jsiBox.boxNode.style.width=g+"px"}if(Math.abs(l)>Math.abs(d)){var a=jsiBox.wrapImgNode.offsetHeight-d;jsiBox.wrapImgNode.style.height=a+"px"}if((Math.abs(l)>Math.abs(d))||(Math.abs(m)>Math.abs(k))){setTimeout("jsiBoxResize()",35)}else{jsiBox.boxNode.style.width=jsiBox.preloadImg.width+c+e+16+"px";jsiBox.mainImg.style.width=jsiBox.preloadImg.width+"px";jsiBox.wrapImgNode.style.height=jsiBox.preloadImg.height+"px";jsiBox.mainImg.src=jsiBox.preloadImg.src;jsiBox.mainImg.style.display="block";var f=(jsiBox.originalImageDom.title)?jsiBox.originalImageDom.title:"";if(f!=""){jsiBox.titleNode.style.display="block";jsiBox.titleNode.innerHTML=f}jsiBoxLightenMainImage()}}function jsiBoxLightenMainImage(){var a=2;var b=jsiBox.mainImg.style.opacity*10+a;jsiBox.mainImg.style.opacity=b/10;jsiBox.mainImg.style.filter="alpha(opacity="+b*10+")";if(jsiBox.mainImg.style.opacity<1){setTimeout("jsiBoxLightenMainImage()",35)}else{jsiBox.mainImg.style.opacity="";jsiBox.mainImg.style.filter=""}}function jsiBoxNext(){jsiBox.progressImg.style.display="block";var a=jsiBox.currentImgIndex+1;if(a<jsiBox.linkNodesArray.length){jsiBox.currentImgIndex=a;jsiBox.preloadImg.src=jsiBox.linkNodesArray[a].href}return false}function jsiBoxPrev(){jsiBox.progressImg.style.display="block";var a=jsiBox.currentImgIndex-1;if(a>=0){jsiBox.currentImgIndex=a;jsiBox.preloadImg.src=jsiBox.linkNodesArray[a].href}return false}function jsiBoxClose(){jsiBox.wrapNode.style.display="none";jsiBox.boxNode.style.display="none";return false}function jsiBoxOpen(c){jsiBox.progressImg.style.display="block";jsiBox.linkNodesArray=new Array();jsiBox.infoNode.innerHTML="&#160;";jsiBox.titleNode.innerHTML="";var b=getPageSizeWithScroll();jsiBox.wrapNode.style.display="block";jsiBox.wrapNode.style.height=b[1]+"px";jsiBox.wrapNode.style.width=b[0]+"px";var d=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;var a=Math.round(screen.height/10);jsiBox.boxNode.style.top=(d+a)+"px";jsiBox.mainImg.src="/images/jsibox/blank.gif";jsiBox.wrapImgNode.style.height="30px";jsiBox.boxNode.style.width="200px";jsiBox.boxNode.style.display="block";jsiBox.originalImageDom=c;jsiBox.preloadImg.src=c.originalSrc;return false}function getPageSizeWithScroll(){if(window.innerHeight&&window.scrollMaxY){pageWidth=document.body.clientWidth+window.scrollMaxX;pageHeight=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){pageWidth=document.body.scrollWidth;pageHeight=document.body.scrollHeight}else{pageWidth=document.body.offsetWidth+document.body.offsetLeft;pageHeight=document.body.offsetHeight+document.body.offsetTop}}arrayPageSizeWithScroll=new Array(pageWidth,pageHeight);return arrayPageSizeWithScroll}jsiBoxInit();(function(){var c=new Array();var b=new Array();window.uppodStopAll=function(d){for(var e=0;e<c.length;e++){try{if(c[e]!=d){document.getElementById(c[e]).sendToUppod("stop")}}catch(f){}}};function a(){var g,f=document.getElementsByTagName("object");for(var d=0,e=f.length;d<e;d++){g=f[d].id+"";if(g.indexOf("player")!=-1&&AP.Array.indexOf(c,g)==-1){c[d]=g;b[g]=d}}}if(document.body.className.indexOf("cms")==-1){setInterval(a,1000)}})();(function(){var a=AP.namespace("CherInfo"),c=AP.Query,b=AP.Array;a.showPlacesData={icePalace:{src:"/images/city/icePalace.jpg",title:"Ледовый дворец",description:"Крупнейшая в регионе ледовая арена, рассчитана на 6 тысяч зрительских мест для проведения спортивных соревнований или 7 тысяч мест - для проведения концертов. Открытие сотоялось в 2006 году."},farmstead:{src:"/images/city/farmstead.jpg",title:"Усадьба Гальских",description:"Барский дом. Уникальный памятник русского зодчества XIX века, настоящая жемчужина Русского Севера. Реставрация завершена в 2009 году."},bridge:{src:"/images/city/bridge.jpg",title:"Мост через Ягорбу",description:"Одна из главных транспортных артерий Череповца. Построена в начале 60-х годов 20 века на месте деревянного моста, который называли тогда Красноармейским. В данный момент мост реконструируется."},temple:{src:"/images/city/temple.jpg",title:"Храм Рождества Христова",description:"Точная копия разрушенной в советские годы сельской церкви, построенной в 1789 г. Храм восстановлен и открыт в 1996 г."},dkm:{src:"/images/city/dkm.jpg",title:"Дворец Металлургов",description:"Открыт в 1993 году. Во Дворце Металлургов работают творческие коллективы и студии, имеются большой и малый залы, Голубая гостиная."},factory:{src:"/images/city/factory.jpg",title:"Пятая домна",description:"Крупнейшая доменная печь в Европе. Гордость Череповецкого металлургического комбината. В России и мире более известна под именем «Северянка». Запуск состоялся в 1986 году."},dks:{src:"/images/city/dks.jpg",title:"Дворец культуры «Строитель»",description:"Построен в 1954 году. В 1967 году открылось новое, дополнительное здание-пристройка с концертным залом на 950 мест, кабинетами для кружковой работы и репетиций. В 2008 году осуществлен капитальный ремонт."},planetChe:{src:"/images/city/planetChe.jpg",title:"Планета «Череповец»",description:"Уникальный архитектурный памятник в честь юбилея строительно-монтажного комплекса Череповца. Установлен в октябре 2008 года в сквере Строителей."},duma:{src:"/images/city/duma.jpg",title:"Мэрия",description:"Здание (бывшее горисполкома) построено в 1968 году в едином стиле застройки того времени."},tvTower:{src:"/images/city/tvTower.jpg",title:"Телевышки",description:"Пробную передачу череповецкий телецентр дал 30 апреля 1959 г. Открылась первая в Вологодской области студия ТВ. Городское телевидение выходило с новостями пять раз в неделю. С середины 90-х годов телевышка транслирует 3 российских канала."},sportComplex:{src:"/images/city/sportComplex.jpg",title:"Стадион «Металлург»",description:"Любимое место отдыха горожан, центральная арена футбольных баталий и легкоатлетических стартов. Торжественно открыт 12 августа 1959 года."},boy:{src:"/images/city/boy.jpg",title:"Скульптурная композиция «Металлург с сыном»",description:"Творение череповецкого скульптора Александра Шебунина. Установлена летом 2005 года в честь 50-летия ЧМК в сквере на площади Металлургов."},fountain:{src:"/images/city/fontan.jpg",title:"Фонтан в парке Ленинского комсомола",description:"Популярнейшее место отдыха детей и взрослых. Люди старшего поколения собираются возле него летом на танцы под гармошку, молодежь – людей посмотреть, себя показать. Фонтан был запущен в 1961 году - во время торжественного открытия парка."},theather:{src:"/images/city/theather.jpg",title:"Камерный театр",description:"Одна из лучших театральных площадок города. Здесь работает своя труппа и  театральная студия для детей и взрослых. Здание с вековой историей отметило своё второе рождение в 2007 году, после окончании капитального ремонта. Для череповчан отсчитывают время нового века отреставрированные часы на башне."},milyutin:{src:"/images/city/milyutin.jpg",title:"Памятник Милютину",description:"Автор - московский скульптор Андрей Ковальчук. Бронзовая статуя на постаменте установлена у Дворца бракосочетания на площади Милютина в 2005 году - в знак уважения череповчан к своему знаменитому городскому голове – Ивану Андреевичу Милютину."},church:{src:"/images/city/church.jpg",title:"Воскресенский собор",description:"Старейший памятник Череповца, действующий Храм, расположен на Соборной горке. Основан в XIV веке учениками преподобного Сергия Радонежского - иноками Феодосием и Афанасием Железным Посохом."},afanasiyAndPheodosiy:{src:"/images/city/afanasiyAndPheodosiy.jpg",title:"Памятник Афанасию и Феодосию",description:"Установлен в 1992 году на берегу Шексны, близ Воскресенского собора в честь основателей Череповца – монахов Феодосия и Афанасия."},"side-show":{src:"/images/city/kio.jpg",title:"Парк «Культуры и Отдыха»",description:"Свою историю парк ведет с конца 19 века. Тогда городским головой Иваном Милютиным был основан Соляной сад. В 50-х годах минувшего 20-го века в парк завезли аттракционы. И первым из них стало колесо обозрения."},bridge104:{src:"/images/city/bridge104.jpg",title:"Октябрьский мост",description:"Автомобильный мост через реку Шексна. Открыт в 1979 году. Первый в России вантовый мост. Длина - около 1000 м, высота - 83 м, общая длина вантов - 16 км. Имеется брат-близнец Октябрьского моста – в столице Латвии, городе Риге."},cannon:{src:"/images/city/zenitka.jpg",title:"Зенитка на Красноармейской площади",description:"Установлена 6 мая 1980 г. по инициативе ветеранов в честь 385-го отдельного зенитного дивизиона противовоздушной обороны, защищавшего Череповец во время Великой Отечественной войны."},ammophos:{src:"/images/city/ammophos.jpg",title:"Дворец культуры «Аммофос»",description:"Дворец культуры Химиков снован 1992 году. Теперь в городском ДК «Аммофос» работают танцевальные, вокальные, театральные коллективы и клубы города: молодежный театр пластики и драмы «Знак», народная вокальная студия Ольги Мошкиной и другие."},dockyard:{src:"/images/city/dockyard.jpg",title:"Череповец – порт пяти морей",description:"Здесь Ягорба впадает в Шексну. С открытием в 1964 году  Волго-Балтийского канала через Череповец с Волги и  Поволжья пошли крупные суда - в Ленинград, Карелию, Мурманск. Вот тогда город на Шексне и назвали  Портом пяти морей."},railway:{src:"/images/city/railway.jpg",title:"Вокзал",description:"Построен в 1905 году. Через Череповец тогда пошли первые поезда. В 2008 году построено дополнительное, новое здание вокзала – в едином стиле со всем комплексом. Реконструирована привокзальная площадь."}};
a.Gui.ShowPlace=function(){var x,q=["railway","dockyard","ammophos","cannon","bridge","afanasiyAndPheodosiy","church","milyutin","theather","fountain","boy","sportComplex","tvTower","duma","planetChe","dks","factory","side-show","dkm","temple","bridge104","farmstead","icePalace"],y,C,r,s,B,t=50,A,o,D,d="",n=AP.Lang;function E(){var G=c(this),F=G.attr("id").replace("ActiveArea","");if(A){A.cancel();A=null;o=AP.Timer.later(t,this,k,F)}else{u(F);f(G);B.show()}}function w(){if(A){A.cancel();A=null}}function h(){if(A){A.cancel()}A=AP.Timer.later(t,this,z)}function k(F){B.animate({left:p(c("#"+F+"ActiveArea"))},"fast");u(F)}function v(){if(A){A.cancel()}if(o){o.cancel();o=null}A=AP.Timer.later(t,this,z)}function z(){B.hide();A.cancel();A=null}function u(G){var F=a.showPlacesData[G];if(F){D.attr("src",F.src);D.attr("alt",F.title);y.text(F.description);C.text(F.title);d=G;if(b.indexOf(q,G)==0){r.hide()}else{r.show()}if(b.indexOf(q,G)==(q.length-1)){s.hide()}else{s.show()}}}function f(F){B.css("left",p(F))}function p(H){var G=c(H);var F=parseInt(G.outerWidth(),0)/2;return G.offset().left+F-164}function l(){var F=b.indexOf(q,d);if(F!=(q.length-1)){var G=q[F+1];B.animate({left:p(c("#"+G+"ActiveArea"))},"fast");u(G)}}function e(){var F=b.indexOf(q,d);if(F!=0){var G=q[F-1];B.animate({left:p(c("#"+G+"ActiveArea"))},"fast");u(G)}}function m(){var G=location.pathname;if(G=="/"||/\/index\.seam/.test(G)){var F=a.showPlacesData;a.Gui.ShowPlace.imagesPool={};for(var H in F){(function(J,L){J[L].ready=false;var I=J[L].img=new Image(300,200),K=c(I);K.load(function(){if(g(I)){AP.CherInfo.Gui.ShowPlace.imagesPool[L]=K;J[L].ready=true}});I.src=J[L].src})(F,H)}}}function g(F){return F.complete||(!n.isUndefined(F.naturalWidth)&&F.naturalWidth==0)}return{initialize:function(){x=c(".miniCityActiveArea div");x.each(function(){var F=c(this);F.mouseover(E);F.mouseout(v)});B=c(".miniCityWindow");y=c(".miniCityWindowText p");D=c(".miniCityWindow img.cityPhotoImage");C=c(".miniCityWindowText h2");r=c(".miniCityWindowImageLeftArrow");s=c(".miniCityWindowImageRightArrow");s.click(l);r.click(e);B.mouseover(w);B.mouseout(h);m()},stop:function(){x.each(function(){var F=c(this);F.unbind("mouseover",E);F.unbind("mouseout",v)});s.unbind("click",l);r.unbind("click",e);B.unbind("mouseover",E);B.unbind("mouseout",v);B.hide()}}}();a.Gui.ShowPlace.initialize()})();