=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
-"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
-h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
-q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="";
-if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
-(function(){var g=s.createElement("div");g.innerHTML="";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
-function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
-{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
-"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
-d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
-a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
-1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"+d+">"},F={option:[1,""],legend:[1,""],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
-c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
-wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
-prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
-this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
-return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
-""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
-return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
-""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
-c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
-c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
-function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
-Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
-"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
-a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
-a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/")}},b:{start:function(){a1.push("")},end:function(){a1.push("")}},i:{start:function(){a1.push("")},end:function(){a1.push("")}},u:{start:function(){a1.push('')},end:function(){a1.push("")}},font:{start:function(a4){a1.push('')},end:function(a2){a1.push("")}}};function aX(a3){var a9=[],bi=a3.attributes,bd=s.trim;for(var a7=0,bb=bi.length;a7bk.nodeName?1:bj.nodeName=0){a2=C.toHex(a2)}a1.push(bf);a1.push(":");a1.push(a2);a1.push(";")}}}else{if(a5=="src"||a5=="href"){a1.push(a3.getAttribute(a5,2))}else{a1.push(K[a5]?a5:bc)}}a1.push('"')}}function aW(a2,a3){for(var a4=a2.firstChild;a4;a4=a4.nextSibling){aZ(a4,a3)}}function aZ(a5,a6){var a9=a5.nodeType;if(a9==1){if(a5.attributes._moz_dirty&&C.is(a5,"br")){return}var a3=C.name(a5);var a7=a0[a3];if(a7){a7.start(a5);aW(a5);a7.end(a5);return}a1.push("<");a1.push(a3);aX(a5);if(aH[a3]){a1.push(" />")}else{a1.push(">");aW(a5,a6||C.is(a5,"pre"));a1.push("");a1.push(a3);a1.push(">")}}else{if(a9==3){var a2=a5.nodeValue;if(!a6&&s.support.leadingWhitespace){var a8=a5.parentNode;var a4=(C.isInline(a8)?a8:a5).previousSibling;if(!a4||a4.innerHTML==""||C.isBlock(a4)){a2=a2.replace(/^[\r\n\v\f\t ]+/,"")}a2=a2.replace(/ +/," ")}a1.push(C.encode(a2))}else{if(a9==4){a1.push("")}else{if(a9==8){if(a5.data.indexOf("[CDATA[")<0){a1.push("")}else{a1.push("")}}}}}}aW(aY);return a1.join("")}var u=0,an=1,a=2,R=3;function q(aX){var aW=aX.startContainer;return aW.nodeType==9?aW:aW.ownerDocument}function D(aW){return aW.getSelection?aW.getSelection():new at(aW.document)}function ai(aX){var aW=q(aX);return aU(aW)}function aU(aW){return D(ax(aW))}function ax(aW){return aW.defaultView||aW.parentWindow}function aj(aW,aX,aZ){function aY(a2){var a0=aW.cloneRange();a0.collapse(a2);a0[a2?"setStartBefore":"setEndAfter"](aX);var a1=a0.extractContents();if(aZ){a1=C.trim(a1)}C[a2?"insertBefore":"insertAfter"](a1,aX)}aY(true);aY(false)}function M(aX){var aY=S.image(aX);if(aY){aX.setStartAfter(aY);aX.setEndAfter(aY)}var aW=ai(aX);aW.removeAllRanges();aW.addRange(aX)}function J(aW){s.extend(this,{ownerDocument:aW,startContainer:aW,endContainer:aW,commonAncestorContainer:aW,startOffset:0,endOffset:0,collapsed:true})}J.prototype={setStart:function(aW,aX){this.startContainer=aW;this.startOffset=aX;v(this);t(this,true)},setEnd:function(aW,aX){this.endContainer=aW;this.endOffset=aX;v(this);t(this,false)},setStartBefore:function(aW){this.setStart(aW.parentNode,p(aW))},setStartAfter:function(aW){this.setStart(aW.parentNode,p(aW)+1)},setEndBefore:function(aW){this.setEnd(aW.parentNode,p(aW))},setEndAfter:function(aW){this.setEnd(aW.parentNode,p(aW)+1)},selectNode:function(aW){this.setStartBefore(aW);this.setEndAfter(aW)},selectNodeContents:function(aW){this.setStart(aW,0);this.setEnd(aW,aW[aW.nodeType===1?"childNodes":"nodeValue"].length)},collapse:function(aW){if(aW){this.setEnd(this.startContainer,this.startOffset)}else{this.setStart(this.endContainer,this.endOffset)}},deleteContents:function(){var aX=this.cloneRange();if(this.startContainer!=this.commonAncestorContainer){this.setStartAfter(az(this.commonAncestorContainer,this.startContainer))}this.collapse(true);(function aW(aY){while(aY.next()){aY.hasPartialSubtree()?aW(aY.getSubtreeIterator()):aY.remove()}})(new l(aX))},cloneContents:function(){var aW=q(this);return(function aX(a0){for(var aZ,aY=aW.createDocumentFragment();aZ=a0.next();){aZ=aZ.cloneNode(!a0.hasPartialSubtree());if(a0.hasPartialSubtree()){aZ.appendChild(aX(a0.getSubtreeIterator()))}aY.appendChild(aZ)}return aY})(new l(this))},extractContents:function(){var aX=this.cloneRange();if(this.startContainer!=this.commonAncestorContainer){this.setStartAfter(az(this.commonAncestorContainer,this.startContainer))}this.collapse(true);var aY=this;var aW=q(this);return(function aZ(a2){for(var a1,a0=aW.createDocumentFragment();a1=a2.next();){a2.hasPartialSubtree()?a1=a1.cloneNode(false):a2.remove(aY.originalRange);if(a2.hasPartialSubtree()){a1.appendChild(aZ(a2.getSubtreeIterator()))}a0.appendChild(a1)}return a0})(new l(aX))},insertNode:function(aW){if(ac(this.startContainer)){if(this.startOffset!=this.startContainer.nodeValue.length){ar(this.startContainer,this.startOffset)}C.insertAfter(aW,this.startContainer)}else{C.insertAt(this.startContainer,aW,this.startOffset)}this.setStart(this.startContainer,this.startOffset)},cloneRange:function(){return s.extend(new J(this.ownerDocument),{startContainer:this.startContainer,endContainer:this.endContainer,commonAncestorContainer:this.commonAncestorContainer,startOffset:this.startOffset,endOffset:this.endOffset,collapsed:this.collapsed,originalRange:this})},toString:function(){var aX=this.startContainer.nodeName,aW=this.endContainer.nodeName;return[aX=="#text"?this.startContainer.nodeValue:aX,"(",this.startOffset,") : ",aW=="#text"?this.endContainer.nodeValue:aW,"(",this.endOffset,")"].join("")}};function m(aY,aW,a3,a0){if(aY==aW){return a0-a3}var a2=aW;while(a2&&a2.parentNode!=aY){a2=a2.parentNode}if(a2){return p(a2)-a3}a2=aY;while(a2&&a2.parentNode!=aW){a2=a2.parentNode}if(a2){return a0-p(a2)-1}var a1=C.commonAncestor(aY,aW);var aZ=aY;while(aZ&&aZ.parentNode!=a1){aZ=aZ.parentNode}if(!aZ){aZ=a1}var aX=aW;while(aX&&aX.parentNode!=a1){aX=aX.parentNode}if(!aX){aX=a1}if(aZ==aX){return 0}return p(aX)-p(aZ)}function t(aX,aY){function aW(a0){try{return m(a0.startContainer,a0.endContainer,a0.startOffset,a0.endOffset)<0}catch(aZ){return true}}if(aW(aX)){if(aY){aX.commonAncestorContainer=aX.endContainer=aX.startContainer;aX.endOffset=aX.startOffset}else{aX.commonAncestorContainer=aX.startContainer=aX.endContainer;aX.startOffset=aX.endOffset}aX.collapsed=true}}function v(aX){aX.collapsed=aX.startContainer==aX.endContainer&&aX.startOffset==aX.endOffset;var aW=aX.startContainer;while(aW&&aW!=aX.endContainer&&!k(aW,aX.endContainer)){aW=aW.parentNode}aX.commonAncestorContainer=aW}function aL(aW){return aW.createRange?aW.createRange():new J(aW)}function l(aX){s.extend(this,{range:aX,_current:null,_next:null,_end:null});if(aX.collapsed){return}var aW=aX.commonAncestorContainer;this._next=aX.startContainer==aW&&!ac(aX.startContainer)?aX.startContainer.childNodes[aX.startOffset]:az(aW,aX.startContainer);this._end=aX.endContainer==aW&&!ac(aX.endContainer)?aX.endContainer.childNodes[aX.endOffset]:az(aW,aX.endContainer).nextSibling}l.prototype={hasNext:function(){return !!this._next},next:function(){var aW=this._current=this._next;this._next=this._current&&this._current.nextSibling!=this._end?this._current.nextSibling:null;if(ac(this._current)){if(this.range.endContainer==this._current){(aW=aW.cloneNode(true)).deleteData(this.range.endOffset,aW.length-this.range.endOffset)}if(this.range.startContainer==this._current){(aW=aW.cloneNode(true)).deleteData(0,this.range.startOffset)}}return aW},traverse:function(aX){function aW(){this._current=this._next;this._next=this._current&&this._current.nextSibling!=this._end?this._current.nextSibling:null;return this._current}var aY;while(aY=aW.call(this)){if(this.hasPartialSubtree()){this.getSubtreeIterator().traverse(aX)}else{aX(aY)}}return aY},remove:function(a1){var a0=this.range.startContainer==this._current;var aY=this.range.endContainer==this._current;if(ac(this._current)&&(a0||aY)){var aX=a0?this.range.startOffset:0;var aW=aY?this.range.endOffset:this._current.length;var a3=aW-aX;if(a1&&(a0||aY)){if(this._current==a1.startContainer&&aX<=a1.startOffset){a1.startOffset-=a3}if(this._current==a1.endContainer&&aW<=a1.endOffset){a1.endOffset-=a3}}this._current.deleteData(aX,a3)}else{var a2=this._current.parentNode;if(a1&&(this.range.startContainer==a2||this.range.endContainer==a2)){var aZ=p(this._current);if(a2==a1.startContainer&&aZ<=a1.startOffset){a1.startOffset-=1}if(a2==a1.endContainer&&aZ0&&aZ.previousSibling);a2.setEndPoint(aW?"EndToStart":"EndToEnd",a1);var a0=aZ.nextSibling;if(!a0){a0=aZ.previousSibling;if(a0&&ac(a0)){aX.setEnd(a0,a0.nodeValue.length);C.remove(aZ)}else{aX.selectNodeContents(aY);C.remove(aZ);aX.endOffset-=1}return}C.remove(aZ);if(ac(a0)){aX[aW?"setStart":"setEnd"](a0,a2.text.length)}else{aX[aW?"setStartBefore":"setEndBefore"](a0)}}function ag(aW){this.enumerate=function(){var aY=[];function aX(aZ){if(C.is(aZ,"img")||(aZ.nodeType==3&&!C.isWhitespace(aZ))){aY.push(aZ)}else{aZ=aZ.firstChild;while(aZ){aX(aZ);aZ=aZ.nextSibling}}}new l(aW).traverse(aX);return aY}}function j(aW){return new ag(aW).enumerate()}function X(a0){var aW=[];for(var aX=0,aZ=a0.length;aX'}aY.selectNodeContents(a2)}}aY.collapse(true)};this.add=function(aX,aZ){if(aZ&&aX.collapsed){this.addCaret(aX);aX=S.expand(aX)}var aY=aX.cloneRange();aY.collapse(false);this.end=C.create(q(aX),"span",{className:"t-marker"});aY.insertNode(this.end);aY=aX.cloneRange();aY.collapse(true);this.start=this.end.cloneNode(true);aY.insertNode(this.start);aX.setStartBefore(this.start);aX.setEndAfter(this.end);g(aX.commonAncestorContainer);return aX};this.remove=function(a4){var aX=this.start,a9=this.end;g(a4.commonAncestorContainer);while(!aX.nextSibling&&aX.parentNode){aX=aX.parentNode}while(!a9.previousSibling&&a9.parentNode){a9=a9.parentNode}var aZ=(aX.previousSibling&&aX.previousSibling.nodeType==3)&&(aX.nextSibling&&aX.nextSibling.nodeType==3);var a5=(a9.previousSibling&&a9.previousSibling.nodeType==3)&&(a9.nextSibling&&a9.nextSibling.nodeType==3);aX=aX.nextSibling;a9=a9.previousSibling;var a8=false;var a2=false;if(aX==this.end){a2=!!this.start.previousSibling;aX=a9=this.start.previousSibling||this.end.nextSibling;a8=true}C.remove(this.start);C.remove(this.end);var a7=a8?ac(aX)?aX.nodeValue.length:aX.childNodes.length:0;var a0=ac(a9)?a9.nodeValue.length:a9.childNodes.length;if(aX.nodeType==3){while(aX.previousSibling&&aX.previousSibling.nodeType==3){aX=aX.previousSibling;a7+=aX.nodeValue.length}}if(a9.nodeType==3){while(a9.previousSibling&&a9.previousSibling.nodeType==3){a9=a9.previousSibling;a0+=a9.nodeValue.length}}var a3=p(aX),a6=aX.parentNode;var a1=p(a9),aY=a9.parentNode;for(var bb=aX;bb.previousSibling;bb=bb.previousSibling){if(bb.nodeType==3&&bb.previousSibling.nodeType==3){a3--}}for(var ba=a9;ba.previousSibling;ba=ba.previousSibling){if(ba.nodeType==3&&ba.previousSibling.nodeType==3){a1--}}g(a6);if(aX.nodeType==3){aX=a6.childNodes[a3]}g(aY);if(a9.nodeType==3){a9=aY.childNodes[a1]}if(a8){if(aX.nodeType==3){a4.setStart(aX,a7)}else{a4[a2?"setStartAfter":"setStartBefore"](aX)}a4.collapse(true)}else{if(aX.nodeType==3){a4.setStart(aX,a7)}else{a4.setStartBefore(aX)}if(a9.nodeType==3){a4.setEnd(a9,a0)}else{a4.setEndAfter(a9)}}if(aW){this.removeCaret(a4)}}}var ap=/[\u0009-\u000d]|\u0020|\u00a0|\ufeff|\.|,|;|:|!|\(|\)|\?/;var S={nodes:function(aX){var aW=j(aX);if(!aW.length){aX.selectNodeContents(aX.commonAncestorContainer);aW=j(aX);if(!aW.length){aW=C.significantChildNodes(aX.commonAncestorContainer)}}return aW},image:function(aX){var aW=[];new l(aX).traverse(function(aY){if(C.is(aY,"img")){aW.push(aY)}});if(aW.length==1){return aW[0]}},expand:function(aX){var aY=aX.cloneRange();var a1=aY.startContainer.childNodes[aY.startOffset==0?0:aY.startOffset-1];var a2=aY.endContainer.childNodes[aY.endOffset];if(!ac(a1)||!ac(a2)){return aY}var aZ=a1.nodeValue;var a0=a2.nodeValue;if(aZ==""||a0==""){return aY}var aW=aZ.split("").reverse().join("").search(ap);var a3=a0.search(ap);if(aW==0||a3==0){return aY}a3=a3==-1?a0.length:a3;aW=aW==-1?0:aZ.length-aW;aY.setStart(a1,aW);aY.setEnd(a2,a3);return aY},isExpandable:function(aX){var a2=aX.startContainer;var a1=q(aX);if(a2==a1||a2==a1.body){return false}var aY=aX.cloneRange();var aW=a2.nodeValue;if(!aW){return false}var aZ=aW.substring(0,aY.startOffset);var a0=aW.substring(aY.startOffset);var a3=0,a4=0;if(aZ!=""){a3=aZ.split("").reverse().join("").search(ap)}if(a0!=""){a4=a0.search(ap)}return a3!=0&&a4!=0}};function c(aX){var aY=new ak(aX.range);var aW=new aa();this.formatter=aX.formatter;this.getRange=function(){return aY.toRange()};this.lockRange=function(aZ){return aW.add(this.getRange(),aZ)};this.releaseRange=function(aZ){aW.remove(aZ);M(aZ)};this.undo=function(){aY.body.innerHTML=aY.html;M(aY.toRange())};this.redo=function(){this.exec()};this.exec=function(){var aZ=this.lockRange(true);this.formatter.editor=this.editor;this.formatter.toggle(aZ);this.releaseRange(aZ)}}function aR(aY,aX){var aW=aY.body;this.redo=function(){aW.innerHTML=aX.html;M(aX.toRange())};this.undo=function(){aW.innerHTML=aY.html;M(aY.toRange())}}function aM(aW){c.call(this,aW);this.managesUndoRedo=true;this.exec=function(){var aY=this.editor;var aX=aY.getRange();var aZ=new ak(aX);aY.clipboard.paste(aW.value||"");aY.undoRedoStack.push(new aR(aZ,new ak(aY.getRange())));aY.focus()}}function w(){V.call(this);this.command=function(aW){return new aM(aW)};this.update=function(aW,aX){aW.data("tSelectBox").close()};this.init=function(aY,aW){var aX=aW.editor;aY.tSelectBox({data:aX.insertHtml,onItemCreate:function(aZ){aZ.html=''+aZ.dataItem.Text+""},onChange:function(aZ){V.exec(aX,"insertHtml",aZ.value)},highlightFirst:false}).find(".t-input").html(aX.localization.insertHtml)}}function P(){var aX=[],aW=-1;this.push=function(aY){aX=aX.slice(0,aW+1);aW=aX.push(aY)-1};this.undo=function(){if(this.canUndo()){aX[aW--].undo()}};this.redo=function(){if(this.canRedo()){aX[++aW].redo()}};this.canUndo=function(){return aW>=0};this.canRedo=function(){return aW!=aX.length-1}}function aK(aW){this.keydown=function(aZ){var aY=aW.keyboard;var aX=aY.isTypingKey(aZ);if(!aX){au(aW)}if(aX&&!aY.typingInProgress()){this.startRestorePoint=new ak(aW.getRange());aY.startTyping(s.proxy(function(){this.endRestorePoint=new ak(aW.getRange());aW.undoRedoStack.push(new aR(this.startRestorePoint,this.endRestorePoint))},this));return true}return false};this.keyup=function(aX){var aY=aW.keyboard;if(aY.typingInProgress()){aY.endTyping();return true}return false}}function z(aX){var aW=false;this.createUndoCommand=function(){this.endRestorePoint=new ak(aX.getRange());aX.undoRedoStack.push(new aR(this.startRestorePoint,this.endRestorePoint));this.startRestorePoint=this.endRestorePoint};this.changed=function(){if(this.startRestorePoint){return this.startRestorePoint.html!=aX.body.innerHTML}return false},this.keydown=function(aY){var aZ=aX.keyboard;if(aZ.isModifierKey(aY)){if(aZ.typingInProgress()){aZ.endTyping(true)}this.startRestorePoint=new ak(aX.getRange());return true}if(aZ.isSystem(aY)){aW=true;if(this.changed()){aW=false;this.createUndoCommand()}return true}return false};this.keyup=function(aY){if(aW&&this.changed()){aW=false;this.createUndoCommand(aY);return true}return false}}function aE(aX){var aZ=false;var a2;var aY;function aW(a3){return(a3>=48&&a3<=90)||(a3>=96&&a3<=111)||(a3>=186&&a3<=192)||(a3>=219&&a3<=222)}this.toolFromShortcut=function(a5,a7){var a4=String.fromCharCode(a7.keyCode);for(var a6 in a5){var a3=a5[a6];if((a3.key==a4||a3.key==a7.keyCode)&&!!a3.ctrl==a7.ctrlKey&&!!a3.alt==a7.altKey&&!!a3.shift==a7.shiftKey){return a6}}};this.isTypingKey=function(a4){var a3=a4.keyCode;return(aW(a3)&&!a4.ctrlKey&&!a4.altKey)||a3==32||a3==13||a3==8||(a3==46&&!a4.shiftKey&&!a4.ctrlKey&&!a4.altKey)};this.isModifierKey=function(a4){var a3=a4.keyCode;return(a3==17&&!a4.shiftKey&&!a4.altKey)||(a3==16&&!a4.ctrlKey&&!a4.altKey)||(a3==18&&!a4.ctrlKey&&!a4.shiftKey)};this.isSystem=function(a3){return a3.keyCode==46&&a3.ctrlKey&&!a3.altKey&&!a3.shiftKey};this.startTyping=function(a3){aY=a3;aZ=true};function a0(){aZ=false;aY()}this.endTyping=function(a3){this.clearTimeout();if(a3){a0()}else{a2=window.setTimeout(a0,1000)}};this.typingInProgress=function(){return aZ};this.clearTimeout=function(){window.clearTimeout(a2)};function a1(a5,a4){for(var a3=0;a3$/g,"li>");var a2=aW(a5);var a4=a0.getRange();a4.deleteContents();if(a4.startContainer==a0.document){a4.selectNodeContents(a0.body)}var a6=new aa();var a9=a6.addCaret(a4);var a8=aY(a2,a9);var a7=false;if(!/body|td/.test(C.name(a8))&&(a2||C.isInline(a8))){a4.selectNode(a9);aj(a4,a8,true);a7=true}var ba=aX(a5);a4.insertNode(ba);a8=aY(a2,a9);if(a7){while(a9.parentNode!=a8){C.unwrap(a9.parentNode)}C.unwrap(a9.parentNode)}g(a4.commonAncestorContainer);a9.style.display="inline";C.scrollTo(a9);a6.removeCaret(a4);M(a4)}}function f(){var aW=[//g,"",/mso-[^;"]*;?/ig,"",/<\/?(meta|link|style|o:|v:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:)[^>]*>)?/ig,""];this.applicable=function(aZ){return/class="?Mso|style="[^"]*mso-/i.test(aZ)};function aX(aZ){if(/^[\u2022\u00b7\u00a7\u00d8o\-]\u00a0+/.test(aZ)){return"ul"}if(/^\s*\w+[\.\)]\u00a0{2,}/.test(aZ)){return"ol"}}function aY(bc){var a4=C.create(document,"div",{innerHTML:bc});var bb=s(G.join(","),a4);var a6=-1,a1,ba={ul:{},ol:{}},aZ=a4;for(var a7=0;a7]*>/g,"").replace(/ /g,"\u00a0");var a5=aX(bc);if(!a5||C.name(a2)!="p"){if(a2.innerHTML==""){C.remove(a2)}else{ba={ul:{},ol:{}};aZ=a4;a6=-1}continue}var a8=parseFloat(a2.style.marginLeft||0);var a9=ba[a5][a8];if(a8>a6||!a9){a9=C.create(document,a5);if(aZ==a4){C.insertBefore(a9,a2)}else{aZ.appendChild(a9)}ba[a5][a8]=a9}if(a1!=a5){for(var a3 in ba){for(var a0 in ba[a3]){if(s.contains(a9,ba[a3][a0])){delete ba[a3][a0]}}}}C.remove(a2.firstChild);aZ=C.create(document,"li",{innerHTML:a2.innerHTML});a9.appendChild(aZ);C.remove(a2);a6=a8;a1=a5}return a4.innerHTML}this.clean=function(a0){for(var aZ=0,a1=aW.length;aZ]*"?/ig,"");return a0}}function i(aW){function aX(a0){var aY=0;for(var aZ=a0.parentNode.firstChild;aZ;aZ=aZ.nextSibling){if(aZ!=a0&&aZ.className!="t-marker"&&aZ.nodeType==1){aY++}}return aY}this.findSuitable=function(aZ,aY){if(!aY&&aX(aZ)>0){return null}return C.parentOfType(aZ,aW[0].tags)};this.findFormat=function(a2){for(var aY=0;aY1){var a1=a3.pop();var a2=a3[a3.length-1];if(a1.previousSibling&&a1.previousSibling.className=="t-marker"){a2.appendChild(a1.previousSibling)}if(a1.previousSibling==a2&&a1.style.cssText==a2.style.cssText){while(a1.firstChild){a2.appendChild(a1.firstChild)}C.remove(a1)}}}}function aV(aX,aW){i.call(this,aX);function aY(a2){var bd=a2.attributes,ba=s.trim;for(var a1=0,a8=bd.length;a1=0?C.toHex(a0):a0}}}}return}function aZ(a4){var a5=s(ac(a4)?a4.parentNode:a4);var a3=a5.parents().andSelf();for(var a1=0,a2=a3.length;a1'+a1.dataItem.Text+""}}}function aT(aX){V.call(this,aX);var aW=new aV([{tags:["span"]}],aX.cssAttr);this.update=function(aY){aY.data("tColorPicker").close()};this.command=function(aY){return new aF(s.extend(aY,{formatter:function(){var aZ={};aZ[aX.domAttr]=aY.value;return new E([{tags:["span"]}],{style:aZ},aX.cssAttr)}}))};this.init=function(a0,aY){var aZ=aY.editor;a0.tColorPicker({selectedColor:"#000000",onChange:function(a1){V.exec(aZ,aX.name,a1.value)}})}}function Z(){V.call(this);var aW=new aV([{tags:["span"]}],"className");this.command=function(aX){return new aF(s.extend(aX,{formatter:function(){return new E([{tags:["span"]}],{className:aX.value})}}))};this.update=function(aX,aZ){var aY=aX.data("tSelectBox");aY.close();aY.value(aW.getFormat(aZ))};this.init=function(aZ,aX){var aY=aX.editor;aZ.tSelectBox({data:aY.style,title:aY.localization.style,onItemCreate:function(a0){var a1=C.inlineStyle(aY.document,"span",{className:a0.dataItem.Value});a0.html=''+a0.html+""},onChange:function(a0){V.exec(aY,"style",a0.value)}})}}function x(aX){function aW(a0,a1){for(var aY=0;aY'+a1.dataItem.Text+""+a0+">"},onChange:function(a0){V.exec(aY,"formatBlock",a0.value)},highlightFirst:false})}}function aN(aW){c.call(this,aW);this.exec=function(){var aZ=this.getRange();var a7=q(aZ);var a5=s.browser.msie?"":'
';var a8=C.parentOfType(aZ.startContainer,["p"]),aX=C.parentOfType(aZ.endContainer,["p"]),aY=(a8&&!aX)||(!a8&&aX);aZ.deleteContents();var a6=C.create(a7,"a");aZ.insertNode(a6);var a0=C.parentOfType(a6,"li".split(","));var a1;if(a0){var a3=aZ.cloneRange();a3.selectNode(a0);if(j(a3).length==0){var a9=C.create(a7,"p");if(a0.nextSibling){aj(a3,a0.parentNode)}C.insertAfter(a9,a0.parentNode);C.remove(a0.parentNode.childNodes.length==1?a0.parentNode:a0);a9.innerHTML=a5;a1=a9}}if(!a1){if(!a0){new U([{tags:["p"]}]).apply([a6])}aZ.selectNode(a6);var a2=C.parentOfType(a6,[a0?"li":"p"]);aj(aZ,a2,aY);var a4=a2.previousSibling;if(C.is(a4,"li")&&a4.firstChild&&!C.is(a4.firstChild,"br")){a4=a4.firstChild}a1=a2.nextSibling;if(C.is(a1,"li")&&a1.firstChild&&!C.is(a1.firstChild,"br")){a1=a1.firstChild}C.remove(a2);if(a4.firstChild&&C.is(a4.firstChild,"br")){C.remove(a4.firstChild)}if(ac(a4)&&a4.nodeValue==""){a4=a4.parentNode}if(a4&&a4.innerHTML==""){a4.innerHTML=a5}if(a1.firstChild&&C.is(a1.firstChild,"br")){C.remove(a1.firstChild)}if(ac(a1)&&a1.nodeValue==""){a1=a1.parentNode}if(a1.innerHTML==""){a1.innerHTML=a5}g(a4)}g(a1);aZ.selectNodeContents(a1);aZ.collapse(true);C.scrollTo(a1);M(aZ)}}function d(aW){c.call(this,aW);this.exec=function(){var aY=this.getRange();aY.deleteContents();var aX=C.create(q(aY),"br");aY.insertNode(aX);aX.parentNode.normalize();if(!s.browser.msie&&(!aX.nextSibling||C.isWhitespace(aX.nextSibling))){var aZ=aX.cloneNode(true);aZ.setAttribute("_moz_dirty","");C.insertAfter(aZ,aX)}aY.setStartAfter(aX);aY.collapse(true);M(aY)}}function am(aX){var aW=[aX=="ul"?"ol":"ul",aX];x.call(this,[{tags:aW}]);this.isFormatted=function(a1){var aY=[],aZ;for(var a0=0;a01){C.insertAfter(aZ[aZ.length-1],a0);C.insertAfter(aZ[1],a0);C[aY.length>0?"insertBefore":"insertAfter"](aZ[0],a0)}}else{var a1=new b([{tags:["a"]}],a2);a1.finder=this.finder;a1.apply(aY)}}}function al(aW){aW.formatter={toggle:function(aX){new b([{tags:["a"]}]).remove(j(aX))}};c.call(this,aW)}function Y(aX){c.call(this,aX);var aW;this.async=true;var aY=new aS();this.exec=function(){var a3=this.getRange();var a1=a3.collapsed;a3=this.lockRange(true);var a6=j(a3);var a5=null;var a0=this;function a7(bd){var bc=s("#t-editor-link-url",a4.element).val();if(bc&&bc!="http://"){aW={href:bc};var a9=s("#t-editor-link-title",a4.element).val();if(a9){aW.title=a9}var ba=s("#t-editor-link-text",a4.element).val();if(ba!==a5){aW.innerHTML=ba}var bb=s("#t-editor-link-target",a4.element).val();if(bb!="false"){aW.target="_blank"}aY.apply(a3,aW)}a2(bd);if(a0.change){a0.change()}}function a2(a9){a9.preventDefault();a4.destroy();ax(q(a3)).focus();a0.releaseRange(a3)}var a8=a6.length?aY.finder.findSuitable(a6[0]):null;var aZ=a6.length<=1||(a6.length==2&&a1);var a4=ao.window.create(s.extend({},this.editor.dialogOptions,{title:"Insert link",html:new s.telerik.stringBuilder().cat('").string(),onClose:a2})).hide().find(".t-dialog-insert").click(a7).end().find(".t-dialog-close").click(a2).end().find(".t-form-text-row input").keydown(function(a9){if(a9.keyCode==13){a7(a9)}else{if(a9.keyCode==27){a2(a9)}}}).end().delegate(".t-button","mouseenter",ao.buttonHover).delegate(".t-button","mouseleave",ao.buttonLeave).find("#t-editor-link-url").val(a8?a8.getAttribute("href",2):"http://").end().find("#t-editor-link-text").val(a6.length>0?(a6.length==1?a6[0].nodeValue:a6[0].nodeValue+a6[1].nodeValue):"").end().find("#t-editor-link-title").val(a8?a8.title:"").end().find("#t-editor-link-target").val(a8?a8.target=="_blank":"false").end().show().data("tWindow").center();if(aZ&&a6.length>0){a5=s("#t-editor-link-text",a4.element).val()}s("#t-editor-link-url",a4.element).focus().select()},this.redo=function(){var aZ=this.lockRange(true);aY.apply(aZ,aW);this.releaseRange(aZ)}}function aO(aX){V.call(this,s.extend(aX,{command:al}));var aW=new H();this.init=function(aY){aY.attr("unselectable","on").addClass("t-state-disabled")};this.update=function(aY,aZ){aY.toggleClass("t-state-disabled",!aW.findSuitable(aZ[0])).removeClass("t-state-hover")}}function aJ(aX){c.call(this,aX);this.async=true;var aW;function aY(aZ,a0){if(aW.src&&aW.src!="http://"){if(!aZ){aZ=C.create(q(a0),"img",aW);aZ.onload=aZ.onerror=function(){aZ.removeAttribute("complete");aZ.removeAttribute("width");aZ.removeAttribute("height")};a0.deleteContents();a0.insertNode(aZ);a0.setStartAfter(aZ);a0.setEndAfter(aZ);M(a0);return true}else{C.attr(aZ,aW)}}return false}this.redo=function(){var aZ=this.lockRange();if(!aY(S.image(aZ),aZ)){this.releaseRange(aZ)}};this.exec=function(){var a2=this.lockRange();var aZ=false;var a4=S.image(a2);var a0=this;function a5(a6){aW={src:s("#t-editor-image-url",a3.element).val(),alt:s("#t-editor-image-title",a3.element).val()};aZ=aY(a4,a2);a1(a6);if(a0.change){a0.change()}}function a1(a6){a6.preventDefault();a3.destroy();ax(q(a2)).focus();if(!aZ){a0.releaseRange(a2)}}var a3=ao.window.create(s.extend({},this.editor.dialogOptions,{title:"Insert image",html:new s.telerik.stringBuilder().cat('").string(),onClose:a1})).hide().find(".t-dialog-insert").click(a5).end().find(".t-dialog-close").click(a1).end().find(".t-form-text-row input").keydown(function(a6){if(a6.keyCode==13){a5(a6)}else{if(a6.keyCode==27){a1(a6)}}}).end().delegate(".t-button","mouseenter",ao.buttonHover).delegate(".t-button","mouseleave",ao.buttonLeave).find("#t-editor-image-url").val(a4?a4.getAttribute("src",2):"http://").end().find("#t-editor-image-title").val(a4?a4.alt:"").end().show().data("tWindow").center();s("#t-editor-image-url",a3.element).focus().select()}}ao.selectbox=function(aW,aX){var a4;var aZ=s(aW);var a1=aZ.find(".t-input");var aY=new ao.dropDown({outerHeight:aZ.outerHeight(),outerWidth:aZ.outerWidth(),zIndex:ao.list.getZIndex(aZ),effects:ao.fx.slide.defaults(),onOpen:function(){var a5=aZ.offset();aY.position(a5.top,a5.left);return true},onItemCreate:aX.onItemCreate,onClick:function(a5){a3(aX.data[s(a5.item).index()].Value);aX.onChange({value:a4})}});function a0(){if(!aY.$items){aY.dataBind(aX.data)}}function a2(a5){a1.html(a5)}function a3(a7){a0();var a6=-1;for(var a5=0,a8=aX.data.length;a50;if(a6&&!s.contains(aW,a7.target)&&!s.contains(a5.parent()[0],a7.target)){aY.close()}},this))};s.fn.tSelectBox=function(aW){return ao.create(this,{name:"tSelectBox",init:function(aX,aY){return new ao.selectbox(aX,aY)},options:aW})};s.fn.tSelectBox.defaults={effects:s.fn.tDropDownList.defaults.effects};ao.colorpicker=function(aW,aX){this.element=aW;var aY=s(aW);s.extend(this,aX);aY.bind("click",s.proxy(this.click,this));if(this.selectedColor){aY.find(".t-selected-color").css("background-color",this.selectedColor)}s(aW.ownerDocument).bind("mousedown",s.proxy(function(aZ){if(!s(aZ.target).closest(".t-colorpicker-popup").length){this.close()}},this));ao.bind(this,{change:this.onChange,load:this.onLoad})};ao.colorpicker.prototype={select:function(aW){if(aW){aW=C.toHex(aW);if(!ao.trigger(this.element,"change",{value:aW})){this.value(aW);this.close()}}else{ao.trigger(this.element,"change",{value:this.selectedColor})}},open:function(){var aW=this.popup();var aZ=s(this.element);var aY=aZ.offset();aY.top+=aZ.outerHeight();var aX="auto";aZ.parents().andSelf().each(function(){aX=s(this).css("zIndex");if(Number(aX)){aX=Number(aX)+1;return false}});ao.fx._wrap(aW).css(s.extend({position:"absolute",zIndex:aX},aY));aW.find(".t-item").bind("click",s.proxy(function(a1){var a0=s(a1.target,a1.target.ownerDocument).css("background-color");this.select(a0)},this));ao.fx.play(this.effects,aW,{direction:"bottom"})},close:function(){if(!this.$popup){return}ao.fx.rewind(this.effects,this.$popup,{direction:"bottom"},s.proxy(function(){C.remove(this.$popup[0].parentNode);this.$popup=null},this))},toggle:function(){if(!this.$popup||!this.$popup.is(":visible")){this.open()}else{this.close()}},click:function(aW){if(s(aW.target).closest(".t-tool-icon").length>0){this.select()}else{this.toggle()}},value:function(aW){if(!aW){return this.selectedColor}aW=C.toHex(aW);this.selectedColor=aW;s(".t-selected-color",this.element).css("background-color",aW)},popup:function(){if(!this.$popup){this.$popup=s(ao.colorpicker.buildPopup(this)).hide().appendTo(document.body)}return this.$popup}};s.extend(ao.colorpicker,{buildPopup:function(aW){var aZ=new ao.stringBuilder();aZ.cat('");return aZ.string()}});s.fn.tColorPicker=function(aW){return ao.create(this,{name:"tColorPicker",init:function(aX,aY){return new ao.colorpicker(aX,aY)},options:aW})};s.fn.tColorPicker.defaults={data:"000000,7f7f7f,880015,ed1c24,ff7f27,fff200,22b14c,00a2e8,3f48cc,a349a4,ffffff,c3c3c3,b97a57,ffaec9,ffc90e,efe4b0,b5e61d,99d9ea,7092be,c8bfe7".split(","),selectedColor:null,effects:s.fn.tDropDownList.defaults.effects};function aQ(){var aX=new x([{tags:G}]);function aW(aY){return aY.style.marginLeft||0}this.apply=function(a3){var a1=aX.findSuitable(a3);if(a1.length){var a0=[];for(var aZ=0;aZul")[0];if(!a6){a6=C.create(a4.ownerDocument,C.name(a7));a2.append(a6)}while(a4&&a4.parentNode==a7){a6.appendChild(a4);a4=a0.shift()}}else{var aY=parseInt(aW(a4))+30;C.style(a4,{marginLeft:aY})}}}else{var a5=new U([{tags:G}],{style:{marginLeft:30}});a5.apply(a3)}};this.remove=function(a0){var a2=aX.findSuitable(a0);for(var aY=0;aY",{src:'javascript:""',frameBorder:"0",className:"t-content"}).css("display","").insertBefore(aW)[0];var aX=a0.contentWindow||a0;var aZ=aX.document||a0.contentDocument;var aY=aW.val().replace(/(<\/?img[^>]*>)[\r\n\v\f\t ]+/ig,"$1");aZ.designMode="On";aZ.open();aZ.write(new ao.stringBuilder().cat('').cat('').cat('").cat(s.map(a1,function(a2){return[''].join("")}).join("")).cat('').cat(aY).cat("").string());aZ.close();return aX}function T(aW){ao.trigger(aW.element,"selectionChange")}function au(aW){if(aW.pendingFormats.length==0){return}aW.pendingFormats.reverse();s.each(aW.pendingFormats,function(){for(var aX=this.firstChild;aX;aX=aX.nextSibling){while(aX.nodeType==3&&(charIndex=aX.nodeValue.indexOf("\ufeff"))>=0){aX.deleteData(charIndex,1)}}});s.each(aW.pendingFormats,function(){if(this.innerHTML==""&&this.parentNode){C.remove(this)}});aW.pendingFormats=[]}ao.editor=function(aW,aX){if(/Mobile.*Safari/.test(navigator.userAgent)){return}var aY=this;this.element=aW;var aZ=s(aW);aZ.closest("form").bind("submit",function(){aY.update()});s.extend(this,aX);ao.bind(this,{load:this.onLoad,selectionChange:this.onSelectionChange,change:this.onChange,execute:this.onExecute});this.textarea=aZ.find("textarea").attr("autocomplete","off")[0];this.window=av(s(this.textarea),this.stylesheets);this.document=this.window.contentDocument||this.window.document;this.body=this.document.body;this.keyboard=new aE([new aK(this),new z(this)]);this.clipboard=new ay(this);this.pendingFormats=[];this.undoRedoStack=new P();function a3(a4){var a5=s.grep(a4.className.split(" "),function(a6){return !/^t-(widget|tool-icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(a6)});return a5[0]?a5[0].substring(2):"custom"}function a2(a5,a4){if(!a4.key){return a5}return new ao.stringBuilder().cat(a5).cat(" (").catIf("Ctrl + ",a4.ctrl).catIf("Shift + ",a4.shift).catIf("Alt + ",a4.alt).cat(a4.key).cat(")").string()}s(this.window).bind("blur",function(){var a4=aY.textarea.value;var a5=aY.encodedValue();aY.update(a5);if(a5!=a4){ao.trigger(aY.element,"change")}});var a1=".t-editor-toolbar > li > *";var a0=".t-editor-button .t-tool-icon:not(.t-state-disabled)";aZ.delegate(a0,"mouseenter",ao.hover).delegate(a0,"mouseleave",ao.leave).delegate(a0,"mousedown",ao.preventDefault).delegate(a0,"click",ao.stopAll(function(a4){aY.focus();aY.exec(a3(this))})).find(a1).each(function(){var a6=a3(this);var a4=aY.tools[a6];if(!a4){return}var a5=a2(aY.localization[a6],a4);a4.init(s(this),{title:a5,editor:aY})}).end().bind("selectionChange",function(){var a5=aY.getRange();aY.selectionRestorePoint=new ak(a5);var a4=j(a5);if(!a4.length){a4=[a5.startContainer]}aZ.find(a1).each(function(){var a6=aY.tools[a3(this)];if(a6){a6.update(s(this),a4)}})});s(this.document).bind("keyup",function(a4){var a5=[8,9,13,33,34,35,36,37,38,39,40,40,45,46];if(s.inArray(a4.keyCode,a5)>-1){T(aY)}}).keydown(function(a5){var a4=aY.keyboard.toolFromShortcut(aY.tools,a5);if(a4){a5.preventDefault();aY.exec(a4);return false}aY.keyboard.clearTimeout();aY.keyboard.keydown(a5)}).keyup(function(a4){aY.keyboard.keyup(a4)}).mouseup(function(){T(aY)});s(this.body).bind("cut paste",function(a4){aY.clipboard["on"+a4.type](a4)})};s.extend(ao.editor,{Dom:C,RestorePoint:ak,Marker:aa,RangeUtils:S,RangeEnumerator:ag,LinkFormatter:aS,LinkFormatFinder:H,LinkCommand:Y,UnlinkCommand:al,InlineFormatter:b,GreedyInlineFormatter:E,InlineFormatFinder:i,GreedyInlineFormatFinder:aV,BlockFormatter:U,GreedyBlockFormatter:aq,BlockFormatFinder:x,FormatCommand:aF,IndentFormatter:aQ,IndentCommand:o,OutdentCommand:Q,ListFormatFinder:am,ListFormatter:I,ListCommand:aw,ParagraphCommand:aN,NewLineCommand:d,ImageCommand:aJ,InsertHtmlCommand:aM,GenericCommand:aR,UndoRedoStack:P,TypingHandler:aK,SystemHandler:z,Keyboard:aE,MSWordFormatCleaner:f});ao.editor.prototype={value:function(aW){if(aW===undefined){return B(this.body)}aW=aW.replace(//g,"");aW=aW.replace(/")}},b:{start:function(){a2.push("")},end:function(){a2.push("")}},i:{start:function(){a2.push("")},end:function(){a2.push("")}},u:{start:function(){a2.push('')},end:function(){a2.push("")}},font:{start:function(a5){a2.push('')},end:function(a3){a2.push("")}}};function aY(a4){var bb=[],bj=a4.attributes,bg=s.trim;if(C.is(a4,"img")){var bm=a4.style.width,bc=a4.style.height,ba=s(a4);if(bm){ba.attr("width",parseInt(bm));C.unstyle(a4,{width:undefined})}if(bc){ba.attr("height",parseInt(bc));C.unstyle(a4,{height:undefined})}}for(var a9=0,be=bj.length;a9bo.nodeName?1:bn.nodeName=0){a3=C.toHex(a3)}a2.push(a5);a2.push(":");a2.push(a3);a2.push(";")}}}else{if(bl=="src"||bl=="href"){a2.push(a4.getAttribute(bl,2))}else{a2.push(K[bl]?bl:bf)}}a2.push('"')}}function aX(a3,a4){for(var a5=a3.firstChild;a5;a5=a5.nextSibling){a0(a5,a4)}}function a0(a6,a7){var ba=a6.nodeType;if(ba==1){if(a6.attributes._moz_dirty&&C.is(a6,"br")){return}var a4=C.name(a6);var a8=a1[a4];if(a8){a8.start(a6);aX(a6);a8.end(a6);return}a2.push("<");a2.push(a4);aY(a6);if(aH[a4]){a2.push(" />")}else{a2.push(">");aX(a6,a7||C.is(a6,"pre"));a2.push("");a2.push(a4);a2.push(">")}}else{if(ba==3){var a3=a6.nodeValue;if(!a7&&s.support.leadingWhitespace){var a9=a6.parentNode;var a5=(C.isInline(a9)?a9:a6).previousSibling;if(!a5||a5.innerHTML==""||C.isBlock(a5)){a3=a3.replace(/^[\r\n\v\f\t ]+/,"")}a3=a3.replace(/ +/," ")}a2.push(C.encode(a3))}else{if(ba==4){a2.push("")}else{if(ba==8){if(a6.data.indexOf("[CDATA[")<0){a2.push("")}else{a2.push("")}}}}}}aX(aZ);return a2.join("")}var u=0,an=1,a=2,R=3;function q(aY){var aX=aY.startContainer;return aX.nodeType==9?aX:aX.ownerDocument}function D(aX){return aX.getSelection?aX.getSelection():new at(aX.document)}function ai(aY){var aX=q(aY);return aV(aX)}function aV(aX){return D(ax(aX))}function ax(aX){return aX.defaultView||aX.parentWindow}function aj(aX,aY,a0){function aZ(a3){var a1=aX.cloneRange();a1.collapse(a3);a1[a3?"setStartBefore":"setEndAfter"](aY);var a2=a1.extractContents();if(a0){a2=C.trim(a2)}C[a3?"insertBefore":"insertAfter"](a2,aY)}aZ(true);aZ(false)}function M(aY){var aZ=S.image(aY);if(aZ){aY.setStartAfter(aZ);aY.setEndAfter(aZ)}var aX=ai(aY);aX.removeAllRanges();aX.addRange(aY)}function J(aX){s.extend(this,{ownerDocument:aX,startContainer:aX,endContainer:aX,commonAncestorContainer:aX,startOffset:0,endOffset:0,collapsed:true})}J.prototype={setStart:function(aX,aY){this.startContainer=aX;this.startOffset=aY;v(this);t(this,true)},setEnd:function(aX,aY){this.endContainer=aX;this.endOffset=aY;v(this);t(this,false)},setStartBefore:function(aX){this.setStart(aX.parentNode,p(aX))},setStartAfter:function(aX){this.setStart(aX.parentNode,p(aX)+1)},setEndBefore:function(aX){this.setEnd(aX.parentNode,p(aX))},setEndAfter:function(aX){this.setEnd(aX.parentNode,p(aX)+1)},selectNode:function(aX){this.setStartBefore(aX);this.setEndAfter(aX)},selectNodeContents:function(aX){this.setStart(aX,0);this.setEnd(aX,aX[aX.nodeType===1?"childNodes":"nodeValue"].length)},collapse:function(aX){if(aX){this.setEnd(this.startContainer,this.startOffset)}else{this.setStart(this.endContainer,this.endOffset)}},deleteContents:function(){var aY=this.cloneRange();if(this.startContainer!=this.commonAncestorContainer){this.setStartAfter(az(this.commonAncestorContainer,this.startContainer))}this.collapse(true);(function aX(aZ){while(aZ.next()){aZ.hasPartialSubtree()?aX(aZ.getSubtreeIterator()):aZ.remove()}})(new l(aY))},cloneContents:function(){var aX=q(this);return(function aY(a1){for(var a0,aZ=aX.createDocumentFragment();a0=a1.next();){a0=a0.cloneNode(!a1.hasPartialSubtree());if(a1.hasPartialSubtree()){a0.appendChild(aY(a1.getSubtreeIterator()))}aZ.appendChild(a0)}return aZ})(new l(this))},extractContents:function(){var aY=this.cloneRange();if(this.startContainer!=this.commonAncestorContainer){this.setStartAfter(az(this.commonAncestorContainer,this.startContainer))}this.collapse(true);var aZ=this;var aX=q(this);return(function a0(a3){for(var a2,a1=aX.createDocumentFragment();a2=a3.next();){a3.hasPartialSubtree()?a2=a2.cloneNode(false):a3.remove(aZ.originalRange);if(a3.hasPartialSubtree()){a2.appendChild(a0(a3.getSubtreeIterator()))}a1.appendChild(a2)}return a1})(new l(aY))},insertNode:function(aX){if(ac(this.startContainer)){if(this.startOffset!=this.startContainer.nodeValue.length){ar(this.startContainer,this.startOffset)}C.insertAfter(aX,this.startContainer)}else{C.insertAt(this.startContainer,aX,this.startOffset)}this.setStart(this.startContainer,this.startOffset)},cloneRange:function(){return s.extend(new J(this.ownerDocument),{startContainer:this.startContainer,endContainer:this.endContainer,commonAncestorContainer:this.commonAncestorContainer,startOffset:this.startOffset,endOffset:this.endOffset,collapsed:this.collapsed,originalRange:this})},toString:function(){var aY=this.startContainer.nodeName,aX=this.endContainer.nodeName;return[aY=="#text"?this.startContainer.nodeValue:aY,"(",this.startOffset,") : ",aX=="#text"?this.endContainer.nodeValue:aX,"(",this.endOffset,")"].join("")}};function m(aZ,aX,a4,a1){if(aZ==aX){return a1-a4}var a3=aX;while(a3&&a3.parentNode!=aZ){a3=a3.parentNode}if(a3){return p(a3)-a4}a3=aZ;while(a3&&a3.parentNode!=aX){a3=a3.parentNode}if(a3){return a1-p(a3)-1}var a2=C.commonAncestor(aZ,aX);var a0=aZ;while(a0&&a0.parentNode!=a2){a0=a0.parentNode}if(!a0){a0=a2}var aY=aX;while(aY&&aY.parentNode!=a2){aY=aY.parentNode}if(!aY){aY=a2}if(a0==aY){return 0}return p(aY)-p(a0)}function t(aY,aZ){function aX(a1){try{return m(a1.startContainer,a1.endContainer,a1.startOffset,a1.endOffset)<0}catch(a0){return true}}if(aX(aY)){if(aZ){aY.commonAncestorContainer=aY.endContainer=aY.startContainer;aY.endOffset=aY.startOffset}else{aY.commonAncestorContainer=aY.startContainer=aY.endContainer;aY.startOffset=aY.endOffset}aY.collapsed=true}}function v(aY){aY.collapsed=aY.startContainer==aY.endContainer&&aY.startOffset==aY.endOffset;var aX=aY.startContainer;while(aX&&aX!=aY.endContainer&&!k(aX,aY.endContainer)){aX=aX.parentNode}aY.commonAncestorContainer=aX}function aM(aX){return aX.createRange?aX.createRange():new J(aX)}function l(aY){s.extend(this,{range:aY,_current:null,_next:null,_end:null});if(aY.collapsed){return}var aX=aY.commonAncestorContainer;this._next=aY.startContainer==aX&&!ac(aY.startContainer)?aY.startContainer.childNodes[aY.startOffset]:az(aX,aY.startContainer);this._end=aY.endContainer==aX&&!ac(aY.endContainer)?aY.endContainer.childNodes[aY.endOffset]:az(aX,aY.endContainer).nextSibling}l.prototype={hasNext:function(){return !!this._next},next:function(){var aX=this._current=this._next;this._next=this._current&&this._current.nextSibling!=this._end?this._current.nextSibling:null;if(ac(this._current)){if(this.range.endContainer==this._current){(aX=aX.cloneNode(true)).deleteData(this.range.endOffset,aX.length-this.range.endOffset)}if(this.range.startContainer==this._current){(aX=aX.cloneNode(true)).deleteData(0,this.range.startOffset)}}return aX},traverse:function(aY){function aX(){this._current=this._next;this._next=this._current&&this._current.nextSibling!=this._end?this._current.nextSibling:null;return this._current}var aZ;while(aZ=aX.call(this)){if(this.hasPartialSubtree()){this.getSubtreeIterator().traverse(aY)}else{aY(aZ)}}return aZ},remove:function(a2){var a1=this.range.startContainer==this._current;var aZ=this.range.endContainer==this._current;if(ac(this._current)&&(a1||aZ)){var aY=a1?this.range.startOffset:0;var aX=aZ?this.range.endOffset:this._current.length;var a4=aX-aY;if(a2&&(a1||aZ)){if(this._current==a2.startContainer&&aY<=a2.startOffset){a2.startOffset-=a4}if(this._current==a2.endContainer&&aX<=a2.endOffset){a2.endOffset-=a4}}this._current.deleteData(aY,a4)}else{var a3=this._current.parentNode;if(a2&&(this.range.startContainer==a3||this.range.endContainer==a3)){var a0=p(this._current);if(a3==a2.startContainer&&a0<=a2.startOffset){a2.startOffset-=1}if(a3==a2.endContainer&&a00&&a0.previousSibling);a3.setEndPoint(aX?"EndToStart":"EndToEnd",a2);var a1=a0.nextSibling;if(!a1){a1=a0.previousSibling;if(a1&&ac(a1)){aY.setEnd(a1,a1.nodeValue.length);C.remove(a0)}else{aY.selectNodeContents(aZ);C.remove(a0);aY.endOffset-=1}return}C.remove(a0);if(ac(a1)){aY[aX?"setStart":"setEnd"](a1,a3.text.length)}else{aY[aX?"setStartBefore":"setEndBefore"](a1)}}function ag(aX){this.enumerate=function(){var aZ=[];function aY(a0){if(C.is(a0,"img")||(a0.nodeType==3&&!C.isWhitespace(a0))){aZ.push(a0)}else{a0=a0.firstChild;while(a0){aY(a0);a0=a0.nextSibling}}}new l(aX).traverse(aY);return aZ}}function j(aX){return new ag(aX).enumerate()}function X(a1){var aX=[];for(var aY=0,a0=a1.length;aY'}aZ.selectNodeContents(a3)}}aZ.collapse(true)};this.add=function(aY,a0){if(a0&&aY.collapsed){this.addCaret(aY);aY=S.expand(aY)}var aZ=aY.cloneRange();aZ.collapse(false);this.end=C.create(q(aY),"span",{className:"t-marker"});aZ.insertNode(this.end);aZ=aY.cloneRange();aZ.collapse(true);this.start=this.end.cloneNode(true);aZ.insertNode(this.start);aY.setStartBefore(this.start);aY.setEndAfter(this.end);g(aY.commonAncestorContainer);return aY};this.remove=function(a5){var aY=this.start,ba=this.end;g(a5.commonAncestorContainer);while(!aY.nextSibling&&aY.parentNode){aY=aY.parentNode}while(!ba.previousSibling&&ba.parentNode){ba=ba.parentNode}var a0=(aY.previousSibling&&aY.previousSibling.nodeType==3)&&(aY.nextSibling&&aY.nextSibling.nodeType==3);var a6=(ba.previousSibling&&ba.previousSibling.nodeType==3)&&(ba.nextSibling&&ba.nextSibling.nodeType==3);aY=aY.nextSibling;ba=ba.previousSibling;var a9=false;var a3=false;if(aY==this.end){a3=!!this.start.previousSibling;aY=ba=this.start.previousSibling||this.end.nextSibling;a9=true}C.remove(this.start);C.remove(this.end);if(aY==null||ba==null){a5.selectNodeContents(a5.commonAncestorContainer);a5.collapse(true);return}var a8=a9?ac(aY)?aY.nodeValue.length:aY.childNodes.length:0;var a1=ac(ba)?ba.nodeValue.length:ba.childNodes.length;if(aY.nodeType==3){while(aY.previousSibling&&aY.previousSibling.nodeType==3){aY=aY.previousSibling;a8+=aY.nodeValue.length}}if(ba.nodeType==3){while(ba.previousSibling&&ba.previousSibling.nodeType==3){ba=ba.previousSibling;a1+=ba.nodeValue.length}}var a4=p(aY),a7=aY.parentNode;var a2=p(ba),aZ=ba.parentNode;for(var bc=aY;bc.previousSibling;bc=bc.previousSibling){if(bc.nodeType==3&&bc.previousSibling.nodeType==3){a4--}}for(var bb=ba;bb.previousSibling;bb=bb.previousSibling){if(bb.nodeType==3&&bb.previousSibling.nodeType==3){a2--}}g(a7);if(aY.nodeType==3){aY=a7.childNodes[a4]}g(aZ);if(ba.nodeType==3){ba=aZ.childNodes[a2]}if(a9){if(aY.nodeType==3){a5.setStart(aY,a8)}else{a5[a3?"setStartAfter":"setStartBefore"](aY)}a5.collapse(true)}else{if(aY.nodeType==3){a5.setStart(aY,a8)}else{a5.setStartBefore(aY)}if(ba.nodeType==3){a5.setEnd(ba,a1)}else{a5.setEndAfter(ba)}}if(aX){this.removeCaret(a5)}}}var ap=/[\u0009-\u000d]|\u0020|\u00a0|\ufeff|\.|,|;|:|!|\(|\)|\?/;var S={nodes:function(aY){var aX=j(aY);if(!aX.length){aY.selectNodeContents(aY.commonAncestorContainer);aX=j(aY);if(!aX.length){aX=C.significantChildNodes(aY.commonAncestorContainer)}}return aX},image:function(aY){var aX=[];new l(aY).traverse(function(aZ){if(C.is(aZ,"img")){aX.push(aZ)}});if(aX.length==1){return aX[0]}},expand:function(aY){var aZ=aY.cloneRange();var a2=aZ.startContainer.childNodes[aZ.startOffset==0?0:aZ.startOffset-1];var a3=aZ.endContainer.childNodes[aZ.endOffset];if(!ac(a2)||!ac(a3)){return aZ}var a0=a2.nodeValue;var a1=a3.nodeValue;if(a0==""||a1==""){return aZ}var aX=a0.split("").reverse().join("").search(ap);var a4=a1.search(ap);if(aX==0||a4==0){return aZ}a4=a4==-1?a1.length:a4;aX=aX==-1?0:a0.length-aX;aZ.setStart(a2,aX);aZ.setEnd(a3,a4);return aZ},isExpandable:function(aY){var a3=aY.startContainer;var a2=q(aY);if(a3==a2||a3==a2.body){return false}var aZ=aY.cloneRange();var aX=a3.nodeValue;if(!aX){return false}var a0=aX.substring(0,aZ.startOffset);var a1=aX.substring(aZ.startOffset);var a4=0,a5=0;if(a0!=""){a4=a0.split("").reverse().join("").search(ap)}if(a1!=""){a5=a1.search(ap)}return a4!=0&&a5!=0}};function c(aY){var aZ=new ak(aY.range);var aX=new aa();this.formatter=aY.formatter;this.getRange=function(){return aZ.toRange()};this.lockRange=function(a0){return aX.add(this.getRange(),a0)};this.releaseRange=function(a0){aX.remove(a0);M(a0)};this.undo=function(){aZ.body.innerHTML=aZ.html;M(aZ.toRange())};this.redo=function(){this.exec()};this.exec=function(){var a0=this.lockRange(true);this.formatter.editor=this.editor;this.formatter.toggle(a0);this.releaseRange(a0)}}function aS(aZ,aY){var aX=aZ.body;this.redo=function(){aX.innerHTML=aY.html;M(aY.toRange())};this.undo=function(){aX.innerHTML=aZ.html;M(aZ.toRange())}}function aN(aX){c.call(this,aX);this.managesUndoRedo=true;this.exec=function(){var aZ=this.editor;var aY=aZ.getRange();var a0=new ak(aY);aZ.clipboard.paste(aX.value||"");aZ.undoRedoStack.push(new aS(a0,new ak(aZ.getRange())));aZ.focus()}}function w(){V.call(this);this.command=function(aX){return new aN(aX)};this.update=function(aX,aY){aX.data("tSelectBox").close()};this.init=function(aZ,aX){var aY=aX.editor;aZ.tSelectBox({data:aY.insertHtml,onItemCreate:function(a0){a0.html=''+a0.dataItem.Text+""},onChange:function(a0){V.exec(aY,"insertHtml",a0.value)},highlightFirst:false}).find(".t-input").html(aY.localization.insertHtml)}}function P(){var aY=[],aX=-1;this.push=function(aZ){aY=aY.slice(0,aX+1);aX=aY.push(aZ)-1};this.undo=function(){if(this.canUndo()){aY[aX--].undo()}};this.redo=function(){if(this.canRedo()){aY[++aX].redo()}};this.canUndo=function(){return aX>=0};this.canRedo=function(){return aX!=aY.length-1}}function aK(aX){this.keydown=function(a0){var aZ=aX.keyboard;var aY=aZ.isTypingKey(a0);if(!aY){au(aX)}if(aY&&!aZ.typingInProgress()){this.startRestorePoint=new ak(aX.getRange());aZ.startTyping(s.proxy(function(){this.endRestorePoint=new ak(aX.getRange());aX.undoRedoStack.push(new aS(this.startRestorePoint,this.endRestorePoint))},this));return true}return false};this.keyup=function(aY){var aZ=aX.keyboard;if(aZ.typingInProgress()){aZ.endTyping();return true}return false}}function z(aY){var aX=false;this.createUndoCommand=function(){this.endRestorePoint=new ak(aY.getRange());aY.undoRedoStack.push(new aS(this.startRestorePoint,this.endRestorePoint));this.startRestorePoint=this.endRestorePoint};this.changed=function(){if(this.startRestorePoint){return this.startRestorePoint.html!=aY.body.innerHTML}return false},this.keydown=function(aZ){var a0=aY.keyboard;if(a0.isModifierKey(aZ)){if(a0.typingInProgress()){a0.endTyping(true)}this.startRestorePoint=new ak(aY.getRange());return true}if(a0.isSystem(aZ)){aX=true;if(this.changed()){aX=false;this.createUndoCommand()}return true}return false};this.keyup=function(aZ){if(aX&&this.changed()){aX=false;this.createUndoCommand(aZ);return true}return false}}function aE(aY){var a0=false;var a3;var aZ;function aX(a4){return(a4>=48&&a4<=90)||(a4>=96&&a4<=111)||(a4>=186&&a4<=192)||(a4>=219&&a4<=222)}this.toolFromShortcut=function(a6,a8){var a5=String.fromCharCode(a8.keyCode);for(var a7 in a6){var a4=a6[a7];if((a4.key==a5||a4.key==a8.keyCode)&&!!a4.ctrl==a8.ctrlKey&&!!a4.alt==a8.altKey&&!!a4.shift==a8.shiftKey){return a7}}};this.isTypingKey=function(a5){var a4=a5.keyCode;return(aX(a4)&&!a5.ctrlKey&&!a5.altKey)||a4==32||a4==13||a4==8||(a4==46&&!a5.shiftKey&&!a5.ctrlKey&&!a5.altKey)};this.isModifierKey=function(a5){var a4=a5.keyCode;return(a4==17&&!a5.shiftKey&&!a5.altKey)||(a4==16&&!a5.ctrlKey&&!a5.altKey)||(a4==18&&!a5.ctrlKey&&!a5.shiftKey)};this.isSystem=function(a4){return a4.keyCode==46&&a4.ctrlKey&&!a4.altKey&&!a4.shiftKey};this.startTyping=function(a4){aZ=a4;a0=true};function a1(){a0=false;aZ()}this.endTyping=function(a4){this.clearTimeout();if(a4){a1()}else{a3=window.setTimeout(a1,1000)}};this.typingInProgress=function(){return a0};this.clearTimeout=function(){window.clearTimeout(a3)};function a2(a6,a5){for(var a4=0;a4$/g,"li>");var a3=aX(a6);var a5=a1.getRange();a5.deleteContents();if(a5.startContainer==a1.document){a5.selectNodeContents(a1.body)}var a7=new aa();var ba=a7.addCaret(a5);var a9=aZ(a3,ba);var a8=false;if(!/body|td/.test(C.name(a9))&&(a3||C.isInline(a9))){a5.selectNode(ba);aj(a5,a9,true);a8=true}var bb=aY(a6);a5.insertNode(bb);a9=aZ(a3,ba);if(a8){while(ba.parentNode!=a9){C.unwrap(ba.parentNode)}C.unwrap(ba.parentNode)}g(a5.commonAncestorContainer);ba.style.display="inline";C.scrollTo(ba);a7.removeCaret(a5);M(a5)}}function f(){var aX=[//g,"",/mso-[^;"]*;?/ig,"",/<\/?(meta|link|style|o:|v:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:)[^>]*>)?/ig,""];this.applicable=function(a0){return/class="?Mso|style="[^"]*mso-/i.test(a0)};function aY(a0){if(/^[\u2022\u00b7\u00a7\u00d8o\-]\u00a0+/.test(a0)){return"ul"}if(/^\s*\w+[\.\)]\u00a0{2,}/.test(a0)){return"ol"}}function aZ(bd){var a5=C.create(document,"div",{innerHTML:bd});var bc=s(G.join(","),a5);var a7=-1,a2,bb={ul:{},ol:{}},a0=a5;for(var a8=0;a8]*>/g,"").replace(/ /g,"\u00a0");var a6=aY(bd);if(!a6||C.name(a3)!="p"){if(a3.innerHTML==""){C.remove(a3)}else{bb={ul:{},ol:{}};a0=a5;a7=-1}continue}var a9=parseFloat(a3.style.marginLeft||0);var ba=bb[a6][a9];if(a9>a7||!ba){ba=C.create(document,a6);if(a0==a5){C.insertBefore(ba,a3)}else{a0.appendChild(ba)}bb[a6][a9]=ba}if(a2!=a6){for(var a4 in bb){for(var a1 in bb[a4]){if(s.contains(ba,bb[a4][a1])){delete bb[a4][a1]}}}}C.remove(a3.firstChild);a0=C.create(document,"li",{innerHTML:a3.innerHTML});ba.appendChild(a0);C.remove(a3);a7=a9;a2=a6}return a5.innerHTML}this.clean=function(a1){for(var a0=0,a2=aX.length;a0]*"?/ig,"");return a1}}function i(aX){function aY(a1){var aZ=0;for(var a0=a1.parentNode.firstChild;a0;a0=a0.nextSibling){if(a0!=a1&&a0.className!="t-marker"&&a0.nodeType==1){aZ++}}return aZ}this.findSuitable=function(a0,aZ){if(!aZ&&aY(a0)>0){return null}return C.parentOfType(a0,aX[0].tags)};this.findFormat=function(a3){for(var aZ=0;aZ1){var a2=a4.pop();var a3=a4[a4.length-1];if(a2.previousSibling&&a2.previousSibling.className=="t-marker"){a3.appendChild(a2.previousSibling)}if(a2.previousSibling==a3&&a2.style.cssText==a3.style.cssText){while(a2.firstChild){a3.appendChild(a2.firstChild)}C.remove(a2)}}}}function aW(aY,aX){i.call(this,aY);function aZ(a3){var be=a3.attributes,bb=s.trim;for(var a2=0,a9=be.length;a2=0?C.toHex(a1):a1}}}}return}function a0(a5){var a6=s(ac(a5)?a5.parentNode:a5);var a4=a6.parents().andSelf();for(var a2=0,a3=a4.length;a2'+a3.dataItem.Text+""}}}function aU(aY){V.call(this,aY);var aX=new aW([{tags:["span"]}],aY.cssAttr);this.update=function(aZ){aZ.data("tColorPicker").close()};this.command=function(aZ){return new aF(s.extend(aZ,{formatter:function(){var a0={};a0[aY.domAttr]=aZ.value;return new E([{tags:["span"]}],{style:a0},aY.cssAttr)}}))};this.init=function(a1,aZ){var a0=aZ.editor;a1.tColorPicker({selectedColor:"#000000",onChange:function(a2){V.exec(a0,aY.name,a2.value)}})}}function Z(){V.call(this);var aX=new aW([{tags:["span"]}],"className");this.command=function(aY){return new aF(s.extend(aY,{formatter:function(){return new E([{tags:["span"]}],{className:aY.value})}}))};this.update=function(aY,a0){var aZ=aY.data("tSelectBox");aZ.close();aZ.value(aX.getFormat(a0))};this.init=function(a0,aY){var aZ=aY.editor;a0.tSelectBox({data:aZ.style,title:aZ.localization.style,onItemCreate:function(a1){var a2=C.inlineStyle(aZ.document,"span",{className:a1.dataItem.Value});a1.html=''+a1.html+""},onChange:function(a1){V.exec(aZ,"style",a1.value)}})}}function x(aY){function aX(a1,a2){for(var aZ=0;aZ'+a2.dataItem.Text+""+a1+">"},onChange:function(a1){V.exec(aZ,"formatBlock",a1.value)},highlightFirst:false})}}function aO(aX){c.call(this,aX);this.exec=function(){var a0=this.getRange();var a8=q(a0);var a6=s.browser.msie?"":'
';var a9=C.parentOfType(a0.startContainer,["p"]),aY=C.parentOfType(a0.endContainer,["p"]),aZ=(a9&&!aY)||(!a9&&aY);a0.deleteContents();var a7=C.create(a8,"a");a0.insertNode(a7);var a1=C.parentOfType(a7,"li".split(","));var a2;if(a1){var a4=a0.cloneRange();a4.selectNode(a1);if(j(a4).length==0){var ba=C.create(a8,"p");if(a1.nextSibling){aj(a4,a1.parentNode)}C.insertAfter(ba,a1.parentNode);C.remove(a1.parentNode.childNodes.length==1?a1.parentNode:a1);ba.innerHTML=a6;a2=ba}}if(!a2){if(!a1){new U([{tags:["p"]}]).apply([a7])}a0.selectNode(a7);var a3=C.parentOfType(a7,[a1?"li":"p"]);aj(a0,a3,aZ);var a5=a3.previousSibling;if(C.is(a5,"li")&&a5.firstChild&&!C.is(a5.firstChild,"br")){a5=a5.firstChild}a2=a3.nextSibling;if(C.is(a2,"li")&&a2.firstChild&&!C.is(a2.firstChild,"br")){a2=a2.firstChild}C.remove(a3);if(a5.firstChild&&C.is(a5.firstChild,"br")){C.remove(a5.firstChild)}if(ac(a5)&&a5.nodeValue==""){a5=a5.parentNode}if(a5&&a5.innerHTML==""){a5.innerHTML=a6}if(a2.firstChild&&C.is(a2.firstChild,"br")){C.remove(a2.firstChild)}if(ac(a2)&&a2.nodeValue==""){a2=a2.parentNode}if(a2.innerHTML==""){a2.innerHTML=a6}g(a5)}g(a2);a0.selectNodeContents(a2);a0.collapse(true);C.scrollTo(a2);M(a0)}}function d(aX){c.call(this,aX);this.exec=function(){var aZ=this.getRange();aZ.deleteContents();var aY=C.create(q(aZ),"br");aZ.insertNode(aY);aY.parentNode.normalize();if(!s.browser.msie&&(!aY.nextSibling||C.isWhitespace(aY.nextSibling))){var a0=aY.cloneNode(true);a0.setAttribute("_moz_dirty","");C.insertAfter(a0,aY)}aZ.setStartAfter(aY);aZ.collapse(true);M(aZ)}}function am(aY){var aX=[aY=="ul"?"ol":"ul",aY];x.call(this,[{tags:aX}]);this.isFormatted=function(a2){var aZ=[],a0;for(var a1=0;a11){C.insertAfter(a0[a0.length-1],a1);C.insertAfter(a0[1],a1);C[aZ.length>0?"insertBefore":"insertAfter"](a0[0],a1)}}else{var a2=new b([{tags:["a"]}],a3);a2.finder=this.finder;a2.apply(aZ)}}}function al(aX){aX.formatter={toggle:function(aY){new b([{tags:["a"]}]).remove(j(aY))}};c.call(this,aX)}function Y(aY){c.call(this,aY);var aX;this.async=true;var aZ=new aT();this.exec=function(){var a4=this.getRange();var a2=a4.collapsed;a4=this.lockRange(true);var a7=j(a4);var a6=null;var a1=this;function a8(be){var bd=s("#t-editor-link-url",a5.element).val();if(bd&&bd!="http://"){aX={href:bd};var ba=s("#t-editor-link-title",a5.element).val();if(ba){aX.title=ba}var bb=s("#t-editor-link-text",a5.element).val();if(bb!==a6){aX.innerHTML=bb}var bc=s("#t-editor-link-target",a5.element).is(":checked");if(bc){aX.target="_blank"}aZ.apply(a4,aX)}a3(be);if(a1.change){a1.change()}}function a3(ba){ba.preventDefault();a5.destroy();ax(q(a4)).focus();a1.releaseRange(a4)}var a9=a7.length?aZ.finder.findSuitable(a7[0]):null;var a0=a7.length<=1||(a7.length==2&&a2);var a5=ao.window.create(s.extend({},this.editor.dialogOptions,{title:"Insert link",html:new s.telerik.stringBuilder().cat('").string(),onClose:a3})).hide().find(".t-dialog-insert").click(a8).end().find(".t-dialog-close").click(a3).end().find(".t-form-text-row input").keydown(function(ba){if(ba.keyCode==13){a8(ba)}else{if(ba.keyCode==27){a3(ba)}}}).end().delegate(".t-button","mouseenter",ao.buttonHover).delegate(".t-button","mouseleave",ao.buttonLeave).find("#t-editor-link-url").val(a9?a9.getAttribute("href",2):"http://").end().find("#t-editor-link-text").val(a7.length>0?(a7.length==1?a7[0].nodeValue:a7[0].nodeValue+a7[1].nodeValue):"").end().find("#t-editor-link-title").val(a9?a9.title:"").end().find("#t-editor-link-target").attr("checked",a9?a9.target=="_blank":false).end().show().data("tWindow").center();if(a0&&a7.length>0){a6=s("#t-editor-link-text",a5.element).val()}s("#t-editor-link-url",a5.element).focus().select()},this.redo=function(){var a0=this.lockRange(true);aZ.apply(a0,aX);this.releaseRange(a0)}}function aP(aY){V.call(this,s.extend(aY,{command:al}));var aX=new i([{tags:["a"]}]);this.init=function(aZ){aZ.attr("unselectable","on").addClass("t-state-disabled")};this.update=function(aZ,a0){aZ.toggleClass("t-state-disabled",!aX.isFormatted(a0)).removeClass("t-state-hover")}}function aJ(aY){c.call(this,aY);this.async=true;var aX;function aZ(a0,a1){if(aX.src&&aX.src!="http://"){if(!a0){a0=C.create(q(a1),"img",aX);a0.onload=a0.onerror=function(){a0.removeAttribute("complete");a0.removeAttribute("width");a0.removeAttribute("height")};a1.deleteContents();a1.insertNode(a0);a1.setStartAfter(a0);a1.setEndAfter(a0);M(a1);return true}else{C.attr(a0,aX)}}return false}this.redo=function(){var a0=this.lockRange();if(!aZ(S.image(a0),a0)){this.releaseRange(a0)}};this.exec=function(){var a3=this.lockRange();var a0=false;var a5=S.image(a3);var a1=this;function a6(a7){aX={src:s("#t-editor-image-url",a4.element).val(),alt:s("#t-editor-image-title",a4.element).val()};a0=aZ(a5,a3);a2(a7);if(a1.change){a1.change()}}function a2(a7){a7.preventDefault();a4.destroy();ax(q(a3)).focus();if(!a0){a1.releaseRange(a3)}}var a4=ao.window.create(s.extend({},this.editor.dialogOptions,{title:"Insert image",html:new s.telerik.stringBuilder().cat('").string(),onClose:a2})).hide().find(".t-dialog-insert").click(a6).end().find(".t-dialog-close").click(a2).end().find(".t-form-text-row input").keydown(function(a7){if(a7.keyCode==13){a6(a7)}else{if(a7.keyCode==27){a2(a7)}}}).end().delegate(".t-button","mouseenter",ao.buttonHover).delegate(".t-button","mouseleave",ao.buttonLeave).find("#t-editor-image-url").val(a5?a5.getAttribute("src",2):"http://").end().find("#t-editor-image-title").val(a5?a5.alt:"").end().show().data("tWindow").center();s("#t-editor-image-url",a4.element).focus().select()}}ao.selectbox=function(aX,aY){var a5;var aZ=s(aX);var a1=aZ.find(".t-input");var a2=this.dropDown=new ao.dropDown({effects:ao.fx.slide.defaults(),onItemCreate:aY.onItemCreate,onClick:function(a6){a4(aY.data[s(a6.item).index()].Value);aY.onChange({value:a5})}});function a0(){if(!a2.$items){a2.dataBind(aY.data)}}function a3(a6){a1.html(a6?a6:" ")}function a4(a8){a0();var a7=-1;for(var a6=0,a9=aY.data.length;a60?"rtl":"");s(document.documentElement).bind("mousedown",s.proxy(function(a8){var a6=a2.$element;var a7=a6&&a6.parent().length>0;if(a7&&!s.contains(aX,a8.target)&&!s.contains(a6.parent()[0],a8.target)){a2.close()}},this))};s.fn.tSelectBox=function(aX){return ao.create(this,{name:"tSelectBox",init:function(aY,aZ){return new ao.selectbox(aY,aZ)},options:aX})};s.fn.tSelectBox.defaults={effects:s.fn.tDropDownList.defaults.effects};ao.colorpicker=function(aX,aY){this.element=aX;var aZ=s(aX);s.extend(this,aY);aZ.bind("click",s.proxy(this.click,this)).find("*").attr("unselectable","on");if(this.selectedColor){aZ.find(".t-selected-color").css("background-color",this.selectedColor)}s(aX.ownerDocument.documentElement).bind("mousedown",s.proxy(function(a0){if(!s(a0.target).closest(".t-colorpicker-popup").length){this.close()}},this));ao.bind(this,{change:this.onChange,load:this.onLoad})};ao.colorpicker.prototype={select:function(aX){if(aX){aX=C.toHex(aX);if(!ao.trigger(this.element,"change",{value:aX})){this.value(aX);this.close()}}else{ao.trigger(this.element,"change",{value:this.selectedColor})}},open:function(){var aX=this.popup();var a0=s(this.element);var aZ=a0.offset();aZ.top+=a0.outerHeight();if(a0.closest(".t-rtl").length){aZ.left-=aX.outerWidth()-a0.outerWidth()}var aY="auto";a0.parents().andSelf().each(function(){aY=s(this).css("zIndex");if(Number(aY)){aY=Number(aY)+1;return false}});ao.fx._wrap(aX).css(s.extend({position:"absolute",zIndex:aY},aZ));aX.find(".t-item").bind("click",s.proxy(function(a2){var a1=s(a2.target,a2.target.ownerDocument).css("background-color");this.select(a1)},this));ao.fx.play(this.effects,aX,{direction:"bottom"})},close:function(){if(!this.$popup){return}ao.fx.rewind(this.effects,this.$popup,{direction:"bottom"},s.proxy(function(){C.remove(this.$popup[0].parentNode);this.$popup=null},this))},toggle:function(){if(!this.$popup||!this.$popup.is(":visible")){this.open()}else{this.close()}},click:function(aX){if(s(aX.target).closest(".t-tool-icon").length>0){this.select()}else{this.toggle()}},value:function(aX){if(!aX){return this.selectedColor}aX=C.toHex(aX);this.selectedColor=aX;s(".t-selected-color",this.element).css("background-color",aX)},popup:function(){if(!this.$popup){this.$popup=s(ao.colorpicker.buildPopup(this)).hide().appendTo(document.body).find("*").attr("unselectable","on").end()}return this.$popup}};s.extend(ao.colorpicker,{buildPopup:function(aX){var a0=new ao.stringBuilder();a0.cat('");return a0.string()}});s.fn.tColorPicker=function(aX){return ao.create(this,{name:"tColorPicker",init:function(aY,aZ){return new ao.colorpicker(aY,aZ)},options:aX})};s.fn.tColorPicker.defaults={data:"000000,7f7f7f,880015,ed1c24,ff7f27,fff200,22b14c,00a2e8,3f48cc,a349a4,ffffff,c3c3c3,b97a57,ffaec9,ffc90e,efe4b0,b5e61d,99d9ea,7092be,c8bfe7".split(","),selectedColor:null,effects:s.fn.tDropDownList.defaults.effects};function aR(){var aY=new x([{tags:G}]);function aX(aZ){return aZ.style.marginLeft||0}this.apply=function(a4){var a2=aY.findSuitable(a4);if(a2.length){var a1=[];for(var a0=0;a0ul")[0];if(!a7){a7=C.create(a5.ownerDocument,C.name(a8));a3.append(a7)}while(a5&&a5.parentNode==a8){a7.appendChild(a5);a5=a1.shift()}}else{var aZ=parseInt(aX(a5))+30;C.style(a5,{marginLeft:aZ})}}}else{var a6=new U([{tags:G}],{style:{marginLeft:30}});a6.apply(a4)}};this.remove=function(a1){var a3=aY.findSuitable(a1);for(var aZ=0;aZ",{src:'javascript:""',frameBorder:"0",className:"t-content"}).css("display","").insertBefore(aX)[0];var aY=a1.contentWindow||a1;var a0=aY.document||a1.contentDocument;var aZ=aX.val().replace(/(<\/?img[^>]*>)[\r\n\v\f\t ]+/ig,"$1");if(!aZ.length&&s.browser.mozilla){aZ='
'}a0.designMode="On";a0.open();a0.write(new ao.stringBuilder().cat("").cat('').cat('").cat(s.map(a2,function(a3){return[''].join("")}).join("")).cat('').cat(aZ).cat("").string());a0.close();return aY}function T(aX){ao.trigger(aX.element,"selectionChange")}function au(aX){if(aX.pendingFormats.length==0){return}aX.pendingFormats.reverse();s.each(aX.pendingFormats,function(){for(var aY=this.firstChild;aY;aY=aY.nextSibling){while(aY.nodeType==3&&(charIndex=aY.nodeValue.indexOf("\ufeff"))>=0){aY.deleteData(charIndex,1)}}});s.each(aX.pendingFormats,function(){if(this.innerHTML==""&&this.parentNode){C.remove(this)}});aX.pendingFormats=[]}ao.editor=function(aX,aY){if(/Mobile.*Safari/.test(navigator.userAgent)){return}var aZ=this;this.element=aX;var a0=s(aX);a0.closest("form").bind("submit",function(){aZ.update()});s.extend(this,aY);ao.bind(this,{load:this.onLoad,selectionChange:this.onSelectionChange,change:this.onChange,execute:this.onExecute});this.textarea=a0.find("textarea").attr("autocomplete","off")[0];this.window=av(s(this.textarea),this.stylesheets);this.document=this.window.contentDocument||this.window.document;this.body=this.document.body;this.keyboard=new aE([new aK(this),new z(this)]);this.clipboard=new ay(this);this.pendingFormats=[];this.undoRedoStack=new P();function a4(a5){var a6=s.grep(a5.className.split(" "),function(a7){return !/^t-(widget|tool-icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(a7)});return a6[0]?a6[0].substring(2):"custom"}function a3(a6,a5){if(!a5.key){return a6}return new ao.stringBuilder().cat(a6).cat(" (").catIf("Ctrl + ",a5.ctrl).catIf("Shift + ",a5.shift).catIf("Alt + ",a5.alt).cat(a5.key).cat(")").string()}s(this.window).bind("blur",function(){var a5=aZ.textarea.value;var a6=aZ.encodedValue();aZ.update(a6);if(a6!=a5){ao.trigger(aZ.element,"change")}});var a2=".t-editor-toolbar > li > *";var a1=".t-editor-button .t-tool-icon:not(.t-state-disabled)";a0.delegate(a1,"mouseenter",ao.hover).delegate(a1,"mouseleave",ao.leave).delegate(a1,"mousedown",ao.preventDefault).delegate(a1,"click",ao.stopAll(function(a5){aZ.focus();aZ.exec(a4(this))})).find(a2).each(function(){var a9=a4(this),a6=aZ.tools[a9],a8=aZ.localization[a9],a7=s(this);if(!a6){return}if(a9=="fontSize"||a9=="fontName"){var a5=aZ.localization[a9+"Inherit"]||aL[a9+"Inherit"];aZ[a9][0].Text=a5;a7.find("input").val(a5).end().find("span.t-input").text(a5).end()}a6.init(a7,{title:a3(a8,a6),editor:aZ})}).end().bind("selectionChange",function(){var a6=aZ.getRange();aZ.selectionRestorePoint=new ak(a6);var a5=j(a6);if(!a5.length){a5=[a6.startContainer]}a0.find(a2).each(function(){var a7=aZ.tools[a4(this)];if(a7){a7.update(s(this),a5)}})});s(document).bind("mousedown",function(){if(aZ.keyboard.typingInProgress()){aZ.keyboard.endTyping(true)}}).bind("DOMNodeInserted",function(a5){if(s.contains(a5.target,aZ.element)||aZ.element==a5.target){s(aZ.element).find("iframe").remove();aZ.window=av(s(aZ.textarea),aZ.stylesheets);aZ.document=aZ.window.contentDocument||aZ.window.document;aZ.body=aZ.document.body}});s(this.document).bind({keydown:function(a6){var a5=aZ.keyboard.toolFromShortcut(aZ.tools,a6);if(a5){a6.preventDefault();aZ.exec(a5);return false}aZ.keyboard.clearTimeout();aZ.keyboard.keydown(a6)},keyup:function(a5){var a6=[8,9,13,33,34,35,36,37,38,39,40,40,45,46];if(s.inArray(a5.keyCode,a6)>-1){T(aZ)}aZ.keyboard.keyup(a5)},mouseup:function(){T(aZ)}});s(this.body).bind("cut paste",function(a5){aZ.clipboard["on"+a5.type](a5)})};s.extend(ao.editor,{Dom:C,RestorePoint:ak,Marker:aa,RangeUtils:S,RangeEnumerator:ag,LinkFormatter:aT,LinkFormatFinder:H,LinkCommand:Y,UnlinkCommand:al,InlineFormatter:b,GreedyInlineFormatter:E,InlineFormatFinder:i,GreedyInlineFormatFinder:aW,BlockFormatter:U,GreedyBlockFormatter:aq,BlockFormatFinder:x,FormatCommand:aF,IndentFormatter:aR,IndentCommand:o,OutdentCommand:Q,ListFormatFinder:am,ListFormatter:I,ListCommand:aw,ParagraphCommand:aO,NewLineCommand:d,ImageCommand:aJ,InsertHtmlCommand:aN,GenericCommand:aS,UndoRedoStack:P,TypingHandler:aK,SystemHandler:z,Keyboard:aE,MSWordFormatCleaner:f});ao.editor.prototype={value:function(aZ){var aX=this.body;if(aZ===undefined){return B(aX)}aZ=aZ.replace(//g,"");aZ=aZ.replace(/