(function(s){var ao=s.telerik;function F(aZ){var aY={};for(var aX=0;aX1?aZ:"0"+aZ}).join("")},encode:function(aX){return aX.replace(/&/g,"&").replace(//g,">").replace(/\u00a0/g," ")},name:function(aX){return aX.nodeName.toLowerCase()},significantChildNodes:function(aX){return s.grep(aX.childNodes,function(aY){return aY.nodeType!=3||!C.isWhitespace(aY)})},lastTextNode:function(aY){if(aY.nodeType==3){return aY}var aX=null;for(var aZ=aY.lastChild;aZ;aZ=aZ.previousSibling){if(aX=C.lastTextNode(aZ)){return aX}}return aX},is:function(aX,aY){return C.name(aX)==aY},isMarker:function(aX){return aX.className=="t-marker"},isWhitespace:function(aX){return aB.test(aX.nodeValue)},isBlock:function(aX){return L[C.name(aX)]},isEmpty:function(aX){return aH[C.name(aX)]},isInline:function(aX){return aQ[C.name(aX)]},scrollTo:function(aX){aX.ownerDocument.body.scrollTop=s(ac(aX)?aX.parentNode:aX).offset().top},insertAt:function(aY,aX,aZ){aY.insertBefore(aX,aY.childNodes[aZ]||null)},insertBefore:function(aX,aY){return aY.parentNode.insertBefore(aX,aY)},insertAfter:function(aX,aY){return aY.parentNode.insertBefore(aX,aY.nextSibling)},remove:function(aX){aX.parentNode.removeChild(aX)},trim:function(aY){for(var aX=aY.childNodes.length-1;aX>=0;aX--){var aZ=aY.childNodes[aX];if(ac(aZ)){if(aZ.nodeValue.replace(/\ufeff/g,"").length==0){C.remove(aZ)}if(C.isWhitespace(aZ)){C.insertBefore(aZ,aY)}}else{if(aZ.className!="t-marker"){C.trim(aZ);if(aZ.childNodes.length==0&&!C.isEmpty(aZ)){C.remove(aZ)}}}}return aY},parentOfType:function(aX,aY){do{aX=aX.parentNode}while(aX&&!(C.ofType(aX,aY)));return aX},ofType:function(aX,aY){return s.inArray(C.name(aX),aY)>=0},changeTag:function(a1,aY){var a0=C.create(a1.ownerDocument,aY);var a4=a1.attributes;for(var aZ=0;aZ")},end:function(){a2.push("")}},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("")}}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+""},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('
').cat("
    ").cat('
  1. ').catIf('
  2. ',a0).cat('
  3. ').cat('
  4. ').cat("
").cat('
').cat('').cat(" or ").cat('Close').cat("
").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('
').cat("
    ").cat('
  1. ').cat('
  2. ').cat("
").cat('
').cat('').cat(" or ").cat('Close').cat("
").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('
').cat('
    ');var a2=aX.data;var aZ=(aX.value()||"").substring(1);for(var aY=0,a1=a2.length;aY')}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(/]*)>(.*)?<\/script>/ig,"$2");if(s.browser.msie){aZ="
"+aZ;var a0="originalsrc",aY="originalhref";aZ=aZ.replace(/href\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,aY+'="$1"');aZ=aZ.replace(/src\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,a0+'="$1"');aX.innerHTML=aZ;C.remove(aX.firstChild);s(aX).find("telerik\\:script,script,link,img,a").each(function(){var a1=this;if(a1[aY]){a1.setAttribute("href",a1[aY]);a1.removeAttribute(aY)}if(a1[a0]){a1.setAttribute("src",a1[a0]);a1.removeAttribute(a0)}})}else{aX.innerHTML=aZ}this.update()},focus:function(){this.window.focus()},update:function(aX){this.textarea.value=aX||this.encoded?this.encodedValue():this.value()},encodedValue:function(){return C.encode(this.value())},createRange:function(aX){return aM(aX||this.document)},getSelection:function(){return aV(this.document)},selectRange:function(aY){var aX=this.getSelection();aX.removeAllRanges();aX.addRange(aY)},getRange:function(){var aX=this.getSelection();return aX.rangeCount>0?aX.getRangeAt(0):this.createRange()},selectedHtml:function(){return B(this.getRange().cloneContents())},paste:function(aX){this.clipboard.paste(aX)},exec:function(a0,aX){a0=a0.toLowerCase();var a2="";for(var aZ in this.tools){if(aZ.toLowerCase()==a0){a2=this.tools[aZ];break}}if(a2){var aY=this.getRange();var a1=a2.command?a2.command(s.extend({range:aY},aX)):null;ao.trigger(this.element,"execute",{name:a0,command:a1});if(/undo|redo/i.test(a0)){this.undoRedoStack[a0]()}else{if(a1){if(!a1.managesUndoRedo){this.undoRedoStack.push(a1)}a1.editor=this;a1.exec();if(a1.async){a1.change=s.proxy(function(){T(this)},this);return}}}T(this)}}};s.fn.tEditor=function(aX){return ao.create(this,{name:"tEditor",init:function(aY,aZ){return new ao.editor(aY,aZ)},options:aX})};var ah={bold:[{tags:["strong"]},{tags:["span"],attr:{style:{fontWeight:"bold"}}}],italic:[{tags:["em"]},{tags:["span"],attr:{style:{fontStyle:"italic"}}}],underline:[{tags:["span"],attr:{style:{textDecoration:"underline"}}}],strikethrough:[{tags:["del"]},{tags:["span"],attr:{style:{textDecoration:"line-through"}}}],justifyLeft:[{tags:G,attr:{style:{textAlign:"left"}}},{tags:["img"],attr:{style:{"float":"left"}}}],justifyCenter:[{tags:G,attr:{style:{textAlign:"center"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto"}}}],justifyRight:[{tags:G,attr:{style:{textAlign:"right"}}},{tags:["img"],attr:{style:{"float":"right"}}}],justifyFull:[{tags:G,attr:{style:{textAlign:"justify"}}}]};function ab(aZ,aY){for(var aX=0;aX=0){return aY[aX]}}}function V(aX){s.extend(this,aX);this.init=function(aY,aZ){aY.attr({unselectable:"on",title:aZ.title})};this.command=function(aY){return new aX.command(aY)};this.update=function(){}}V.exec=function(aY,aZ,aX){aY.focus();if(aY.selectionRestorePoint){aY.selectRange(aY.selectionRestorePoint.toRange())}aY.exec(aZ,{value:aX})};function af(aX){V.call(this,aX);this.command=function(aY){return new aF(s.extend(aY,{formatter:aX.formatter}))};this.update=function(aY,aZ){aY.toggleClass("t-state-active",aX.finder.isFormatted(aZ))}}var O=function(){return{isFormatted:function(){return false}}};var aL={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",justifyCenter:"Center text",justifyLeft:"Align text left",justifyRight:"Align text right",justifyFull:"Justify",insertUnorderedList:"Insert unordered list",insertOrderedList:"Insert ordered list",indent:"Indent",outdent:"Outdent",createLink:"Insert hyperlink",unlink:"Remove hyperlink",insertImage:"Insert image",insertHtml:"Insert HTML",fontName:"Select font family",fontNameInherit:"(inherited font)",fontSize:"Select font size",fontSizeInherit:"(inherited size)",formatBlock:"Format",style:"Styles"};s.fn.tEditor.defaults={localization:aL,formats:ah,encoded:true,stylesheets:[],dialogOptions:{modal:true,resizable:false,draggable:true,effects:{list:[{name:"toggle"}]}},fontName:[{Text:aL.fontNameInherit,Value:"inherit"},{Text:"Arial",Value:"Arial,Helvetica,sans-serif"},{Text:"Courier New",Value:"'Courier New',Courier,monospace"},{Text:"Georgia",Value:"Georgia,serif"},{Text:"Impact",Value:"Impact,Charcoal,sans-serif"},{Text:"Lucida Console",Value:"'Lucida Console',Monaco,monospace"},{Text:"Tahoma",Value:"Tahoma,Geneva,sans-serif"},{Text:"Times New Roman",Value:"'Times New Roman',Times,serif"},{Text:"Trebuchet MS",Value:"'Trebuchet MS',Helvetica,sans-serif"},{Text:"Verdana",Value:"Verdana,Geneva,sans-serif"}],fontSize:[{Text:aL.fontSizeInherit,Value:"inherit"},{Text:"1 (8pt)",Value:"xx-small"},{Text:"2 (10pt)",Value:"x-small"},{Text:"3 (12pt)",Value:"small"},{Text:"4 (14pt)",Value:"medium"},{Text:"5 (18pt)",Value:"large"},{Text:"6 (24pt)",Value:"x-large"},{Text:"7 (36pt)",Value:"xx-large"}],formatBlock:[{Text:"Paragraph",Value:"p"},{Text:"Quotation",Value:"blockquote"},{Text:"Heading 1",Value:"h1"},{Text:"Heading 2",Value:"h2"},{Text:"Heading 3",Value:"h3"},{Text:"Heading 4",Value:"h4"},{Text:"Heading 5",Value:"h5"},{Text:"Heading 6",Value:"h6"}],tools:{bold:new W({key:"B",ctrl:true,format:ah.bold}),italic:new W({key:"I",ctrl:true,format:ah.italic}),underline:new W({key:"U",ctrl:true,format:ah.underline}),strikethrough:new W({format:ah.strikethrough}),undo:{key:"Z",ctrl:true},redo:{key:"Y",ctrl:true},insertLineBreak:new V({key:13,shift:true,command:d}),insertParagraph:new V({key:13,command:aO}),justifyCenter:new N({format:ah.justifyCenter}),justifyLeft:new N({format:ah.justifyLeft}),justifyRight:new N({format:ah.justifyRight}),justifyFull:new N({format:ah.justifyFull}),insertUnorderedList:new aI({tag:"ul"}),insertOrderedList:new aI({tag:"ol"}),createLink:new V({key:"K",ctrl:true,command:Y}),unlink:new aP({key:"K",ctrl:true,shift:true}),insertImage:new V({command:aJ}),indent:new V({command:o}),outdent:new ad(),insertHtml:new w(),style:new Z(),fontName:new aA({cssAttr:"font-family",domAttr:"fontFamily",name:"fontName"}),fontSize:new aA({cssAttr:"font-size",domAttr:"fontSize",name:"fontSize"}),formatBlock:new n(),foreColor:new aU({cssAttr:"color",domAttr:"color",name:"foreColor"}),backColor:new aU({cssAttr:"background-color",domAttr:"backgroundColor",name:"backColor"})}}})(jQuery);