"),c.before(l),r=0;r").html(t);t.find("a").addClass("imCssLink"),r.after('"),r.attr("name","donotuse"),n.submit()}),e.autoGrow||i.on("ready.jwysiwyg",function(){var t=i.find(".wysiwyg").find(".toolbar").outerHeight(),t=(t+=i.find(".wysiwyg-buttons").outerHeight())+ +i.find(".wysiwyg").css("margin-bottom").replace(/px/g,"")+2;i.find(".wysiwyg").find("iframe").height(i.height()-t),i.css("width","100%")}),r.wysiwyg(e)}}});var r=window.console||{log:y.noop,error:function(t){y.error(t)}},t="prop"in y.fn&&"removeProp"in y.fn,n=x.l10n.get,C=/MSIE/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent)||/MSHTML/i.test(navigator.userAgent),s=/opera/i.test(navigator.userAgent),a=/firefox/i.test(navigator.userAgent),k=/safari/i.test(navigator.userAgent)&&!/chrome/i.test(navigator.userAgent);function o(){this.controls={bold:{groupIndex:1,visible:!0,tags:["b","strong"],css:{fontWeight:"bold"},tooltip:n("wysiwyg_bold","Bold"),hotkey:{ctrl:1,key:66}},copy:{groupIndex:0,visible:!1,hasState:!1,tooltip:n("wysiwyg_copy","Copy")},createLink:{groupIndex:6,visible:!0,exec:function(){var t=this;y.wysiwyg.controls&&y.wysiwyg.controls.link?y.wysiwyg.controls.link.init(this):y.wysiwyg.autoload?y.wysiwyg.autoload.control("wysiwyg.link.js",function(){t.controls.createLink.exec.apply(t)}):r.error("$.wysiwyg.controls.link not defined. You need to include wysiwyg.link.js file")},tags:["a"],tooltip:n("wysiwyg_add_link","Create link")},unLink:{groupIndex:6,hasState:!1,visible:!0,exec:function(){this.editorDoc.execCommand("unlink",!1,null)},tooltip:n("wysiwyg_remove_link","Remove link")},cut:{groupIndex:0,visible:!1,hasState:!1,tooltip:n("wysiwyg_cut","Cut")},decreaseFontSize:{groupIndex:9,visible:!1,hasState:!1,tags:["small"],tooltip:"Decrease font size",exec:function(){this.decreaseFontSize()}},h1:{groupIndex:7,visible:!1,className:"h1",command:C||k?"FormatBlock":"heading",arguments:C||k?"
":"h3",tags:["h3"],tooltip:"Header 3"},highlight:{tooltip:"Highlight",className:"highlight",groupIndex:1,visible:!1,css:{backgroundColor:"rgb(255, 255, 102)"},exec:function(){var t,e,i=C||k?"backcolor":"hilitecolor";if(C)t=this.getInternalRange().parentElement();else for(t=(e=this.getInternalSelection()).extentNode||e.focusNode;void 0===t.style;)if((t=t.parentNode).tagName&&"body"===t.tagName.toLowerCase())return;e="rgb(255, 255, 102)"===t.style.backgroundColor||"#ffff66"===t.style.backgroundColor?"#ffffff":"#ffff66",this.editorDoc.execCommand(i,!1,e)}},html:{groupIndex:10,visible:!0,exec:function(){var t;this.options.resizeOptions&&y.fn.resizable&&(t=this.element.height()),this.viewHTML?(this.setContent(this.original.value),y(this.original).hide(),this.editor.show(),this.options.resizeOptions&&y.fn.resizable&&(t===this.element.height()&&this.element.height(t+this.editor.height()),this.element.resizable(y.extend(!0,{alsoResize:this.editor},this.options.resizeOptions))),this.ui.toolbar.find("li").each(function(){var t=y(this);t.hasClass("html")||t.removeClass("disabled")})):(this.saveContent(),y(this.original).css({width:this.element.outerWidth()-6,height:this.element.height()-this.ui.toolbar.height()-10,resize:"none"}).show(),this.editor.hide(),this.options.resizeOptions&&y.fn.resizable&&(t===this.element.height()&&this.element.height(this.ui.toolbar.height()),this.element.resizable("destroy")),this.ui.toolbar.find("li").each(function(){var t=y(this);t.hasClass("html")||!1!==t.hasClass("fullscreen")||t.removeClass("active").addClass("disabled")})),this.viewHTML=!this.viewHTML},tooltip:"View source code"},increaseFontSize:{groupIndex:9,visible:!1,hasState:!1,tags:["big"],tooltip:"Increase font size",exec:function(){this.increaseFontSize()}},indent:{groupIndex:2,hasState:!1,visible:!1,tooltip:"Indent"},insertHorizontalRule:{groupIndex:6,visible:!1,hasState:!1,tags:["hr"],tooltip:"Insert Horizontal Rule"},insertImage:{groupIndex:6,hasState:!1,visible:!0,exec:function(){var t=this;y.wysiwyg.controls&&y.wysiwyg.controls.image?y.wysiwyg.controls.image.init(this):y.wysiwyg.autoload?y.wysiwyg.autoload.control("wysiwyg.image.js",function(){t.controls.insertImage.exec.apply(t)}):r.error("$.wysiwyg.controls.image not defined. You need to include wysiwyg.image.js file")},tags:["img"],tooltip:n("wysiwyg_image","Insert image")},insertOrderedList:{groupIndex:5,visible:!0,tags:["ol"],tooltip:n("wysiwyg_ol","Insert Ordered List")},insertTable:{groupIndex:6,hasState:!1,visible:!1,exec:function(){var t=this;y.wysiwyg.controls&&y.wysiwyg.controls.table?y.wysiwyg.controls.table(this):y.wysiwyg.autoload?y.wysiwyg.autoload.control("wysiwyg.table.js",function(){t.controls.insertTable.exec.apply(t)}):r.error("$.wysiwyg.controls.table not defined. You need to include wysiwyg.table.js file")},tags:["table"],tooltip:"Insert table"},insertUnorderedList:{groupIndex:5,visible:!0,tags:["ul"],tooltip:n("wysiwyg_ul","Insert Unordered List")},italic:{groupIndex:1,visible:!0,tags:["i","em"],css:{fontStyle:"italic"},tooltip:n("wysiwyg_italic","Italic"),hotkey:{ctrl:1,key:73}},justifyCenter:{groupIndex:2,visible:!0,exclusive:!0,tags:["center"],css:{textAlign:"center"},tooltip:n("wysiwyg_justify_center","Justify Center")},justifyFull:{groupIndex:2,visible:!0,exclusive:!0,css:{textAlign:"justify"},tooltip:n("wysiwyg_justify_full","Justify Full")},justifyLeft:{visible:!0,groupIndex:2,exclusive:!0,css:{textAlign:"left"},tooltip:n("wysiwyg_justify_left","Justify Left")},justifyRight:{groupIndex:2,visible:!0,exclusive:!0,css:{textAlign:"right"},tooltip:n("wysiwyg_justify_right","Justify Right")},ltr:{groupIndex:10,visible:!1,exec:function(){var t=this.dom.getElement("p");return!!t&&(y(t).attr("dir","ltr"),!0)},tooltip:"Left to Right"},outdent:{groupIndex:2,visible:!1,tooltip:"Outdent"},paragraph:{groupIndex:7,visible:!1,className:"paragraph",command:"FormatBlock",arguments:C||k?"
":"p",tags:["p"],tooltip:"Paragraph"},paste:{groupIndex:0,hasState:!1,visible:!1,tooltip:n("wysiwyg_paste","Paste")},undo:{groupIndex:3,hasState:!1,visible:!0,tooltip:n("wysiwyg_undo","Undo")},redo:{groupIndex:3,hasState:!1,visible:!0,tooltip:n("wysiwyg_redo","Redo")},removeFormat:{groupIndex:10,visible:!0,exec:function(){this.removeFormat()},tooltip:n("wysiwyg_reset","Remove formatting")},rtl:{groupIndex:10,visible:!1,exec:function(){var t=this.dom.getElement("p");return!!t&&(y(t).attr("dir","rtl"),!0)},tooltip:"Right to Left"},strikeThrough:{groupIndex:1,visible:!0,tags:["s","strike"],css:{textDecoration:"line-through"},tooltip:n("wysiwyg_strike","Strike-through")},subscript:{groupIndex:3,visible:!1,tags:["sub"],tooltip:"Subscript"},superscript:{groupIndex:3,visible:!1,tags:["sup"],tooltip:"Superscript"},underline:{groupIndex:1,visible:!0,tags:["u"],css:{textDecoration:"underline"},tooltip:n("wysiwyg_underline","Underline"),hotkey:{ctrl:1,key:85}},code:{visible:!1,groupIndex:6,tooltip:"Code snippet",exec:function(){var t=this.getInternalRange(),e=y(t.commonAncestorContainer),t=t.commonAncestorContainer.nodeName.toLowerCase();e.parent("code").length?e.unwrap():"body"!==t&&e.wrap("")}},cssWrap:{visible:!1,groupIndex:6,tooltip:"CSS Wrapper",exec:function(){y.wysiwyg.controls.cssWrap.init(this)}}},this.defaults={html:'
")),e=(o._$dialog.append(i).append(n),"auto"==this.options.height?300:this.options.height),i="auto"==this.options.width?450:this.options.width;return o._$dialog.hide().css({width:i,height:e,left:(y(window).width()-i)/2,top:(y(window).height()-e)/3}),y("body").append(o._$dialog),o._$dialog},this.show=function(){var t,r;return this.options.modal&&(t=y.wysiwyg.dialog.getDimensions(),t=y('').css({width:t[0],height:t[1]}),o._$dialog.wrap(t)),this.options.draggable&&(r=!1,o._$dialog.find("div.wysiwyg-dialog-topbar").on("mousedown",function(t){t.preventDefault(),y(this).css({cursor:"move"});var e=y(this),i=y(this).parents(".wysiwyg-dialog"),n=t.pageX-parseInt(i.css("left"),10),o=t.pageY-parseInt(i.css("top"),10);r=!0,y(this).css({cursor:"move"}),y(document).on("mousemove",function(t){t.preventDefault(),r&&i.css({top:t.pageY-o,left:t.pageX-n})}).on("mouseup",function(t){t.preventDefault(),r=!1,e.css({cursor:"auto"}),y(document).off("mousemove").off("mouseup")})})),o._$dialog.show(),o._$dialog},this.hide=function(){return o._$dialog.hide(),o._$dialog},this.destroy=function(){return this.options.modal&&o._$dialog.unwrap(),this.options.draggable&&o._$dialog.find("div.wysiwyg-dialog-topbar").off("mousedown"),o._$dialog.remove(),o._$dialog}})}),y.fn.wysiwyg=function(t){var e,i=arguments;return void 0!==y.wysiwyg[t]?(i=Array.prototype.concat.call([i[0]],[this],Array.prototype.slice.call(i,1)),y.wysiwyg[t].apply(y.wysiwyg,Array.prototype.slice.call(i,1))):"object"!=typeof t&&t?y.wysiwyg.plugin.exists(t)?(e=y.wysiwyg.plugin.parseName(t),i=Array.prototype.concat.call([i[0]],[this],Array.prototype.slice.call(i,1)),y.wysiwyg[e.name][e.method].apply(y.wysiwyg[e.name],Array.prototype.slice.call(i,1))):void r.error("Method '"+t+"' does not exist on jQuery.wysiwyg.\nTry to include some extra controls or plugins"):(Array.prototype.unshift.call(i,this),y.wysiwyg.init.apply(y.wysiwyg,i))},y.fn.getWysiwyg=function(){return this.data("wysiwyg")}}(_jq,x5engine),!function(u){"use strict";if(void 0===u.wysiwyg)throw"wysiwyg.link.js depends on $.wysiwyg";u.wysiwyg.controls||(u.wysiwyg.controls={});var h=x5engine.l10n.get,p=/MSIE/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent)||/MSHTML/i.test(navigator.userAgent);/opera/i.test(navigator.userAgent),/firefox/i.test(navigator.userAgent),/safari/i.test(navigator.userAgent)&&/chrome/i.test(navigator.userAgent);u.wysiwyg.controls.link={init:function(o){var t,r,a,e,i,n,s,l=x5engine.utils.trim,c={legend:l(h("wysiwyg_add_link","Insert Link")," :"),url:"URL",title:l(h("wysiwyg_image_title","Title")," :"),target:"Target",submit:l(h("wysiwyg_add_link","Insert Link")," :"),reset:l(h("dynamicobj_cancel","Cancel")," :")},d='