var switchEditors={switchto:function(a){var b=a.id,c=b.length,d=b.substr(0,c-5),e=b.substr(c-4);this.go(d,e)},go:function(a,b){a=a||"content",b=b||"toggle";var c,d,e=this,f=tinyMCE.get(a),g=tinymce.DOM;if(c="wp-"+a+"-wrap",d=g.get(a),"toggle"==b&&(b=f&&!f.isHidden()?"html":"tmce"),"tmce"==b||"tinymce"==b){if(f&&!f.isHidden())return!1;"undefined"!=typeof QTags&&QTags.closeAllTags(a),tinyMCEPreInit.mceInit[a]&&tinyMCEPreInit.mceInit[a].wpautop&&(d.value=e.wpautop(d.value)),f?f.show():(f=new tinymce.Editor(a,tinyMCEPreInit.mceInit[a]),f.render()),g.removeClass(c,"html-active"),g.addClass(c,"tmce-active"),setUserSetting("editor","tinymce")}else if("html"==b){if(f&&f.isHidden())return!1;f?f.hide():(tinyMCEPreInit.mceInit[a]&&tinyMCEPreInit.mceInit[a].wpautop&&(d.value=e.pre_wpautop(d.value)),g.setStyles(d,{display:"",visibility:""})),g.removeClass(c,"tmce-active"),g.addClass(c,"html-active"),setUserSetting("editor","html")}return!1},_wp_Nop:function(a){var b,c,d=!1,e=!1;return(-1!=a.indexOf("]*>[\s\S]+?<\/\1>/g,function(a){return a=a.replace(/
(\r\n|\n)?/g,""),a.replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,"")})),-1!=a.indexOf("[caption")&&(e=!0,a=a.replace(/\[caption[\s\S]+?\[\/caption\]/g,function(a){return a.replace(/]*)>/g,"").replace(/[\r\n\t]+/,"")})),b="blockquote|ul|ol|li|table|thead|tbody|tfoot|tr|th|td|div|h[1-6]|p|fieldset",a=a.replace(new RegExp("\\s*\\s*","g"),"\n"),a=a.replace(new RegExp("\\s*<((?:"+b+")(?: [^>]*)?)>","g"),"\n<$1>"),a=a.replace(/(

]+>.*?)<\/p>/g,"$1"),a=a.replace(/]*)?>\s*

/gi,"\n\n"),a=a.replace(/\s*

/gi,""),a=a.replace(/\s*<\/p>\s*/gi,"\n\n"),a=a.replace(/\n[\s\u00a0]+\n/g,"\n\n"),a=a.replace(/\s*
\s*/gi,"\n"),a=a.replace(/\s*

\s*/g,"
\n"),a=a.replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,"\n\n[caption$1[/caption]\n\n"),a=a.replace(/caption\]\n\n+\[caption/g,"caption]\n\n[caption"),c="blockquote|ul|ol|li|table|thead|tbody|tfoot|tr|th|td|h[1-6]|pre|fieldset",a=a.replace(new RegExp("\\s*<((?:"+c+")(?: [^>]*)?)\\s*>","g"),"\n<$1>"),a=a.replace(new RegExp("\\s*\\s*","g"),"\n"),a=a.replace(/]*)>/g," "),-1!=a.indexOf("]*)?>\s*/g,"\n\n\n\n")),-1!=a.indexOf("/g,function(a){return a.replace(/[\r\n]+/g,"")})),a=a.replace(/<\/p#>/g,"

\n"),a=a.replace(/\s*(

]+>[\s\S]*?<\/p>)/g,"\n$1"),a=a.replace(/^\s+/,""),a=a.replace(/[\s\u00a0]+$/,""),d&&(a=a.replace(//g,"\n")),e&&(a=a.replace(/]*)>/g,"")),a},_wp_Autop:function(a){var b=!1,c=!1,d="table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|noscript|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary";return-1!=a.indexOf("/g,function(a){return a.replace(/[\r\n]+/g,"")})),a=a.replace(/<[^<>]+>/g,function(a){return a.replace(/[\r\n]+/g," ")}),(-1!=a.indexOf("]*>[\s\S]+?<\/\1>/g,function(a){return a.replace(/(\r\n|\n)/g,"")})),-1!=a.indexOf("[caption")&&(c=!0,a=a.replace(/\[caption[\s\S]+?\[\/caption\]/g,function(a){return a=a.replace(/]*)>/g,""),a=a.replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g,function(a){return a.replace(/[\r\n\t]+/," ")}),a.replace(/\s*\n\s*/g,"")})),a+="\n\n",a=a.replace(/
\s*
/gi,"\n\n"),a=a.replace(new RegExp("(<(?:"+d+")(?: [^>]*)?>)","gi"),"\n$1"),a=a.replace(new RegExp("()","gi"),"$1\n\n"),a=a.replace(/]*)?>/gi,"\n\n"),a=a.replace(/\r\n|\r/g,"\n"),a=a.replace(/\n\s*\n+/g,"\n\n"),a=a.replace(/([\s\S]+?)\n\n/g,"

$1

\n"),a=a.replace(/

\s*?<\/p>/gi,""),a=a.replace(new RegExp("

\\s*(]*)?>)\\s*

","gi"),"$1"),a=a.replace(/

(/gi,"$1"),a=a.replace(/

\s*]*)>/gi,"

"),a=a.replace(/<\/blockquote>\s*<\/p>/gi,"

"),a=a.replace(new RegExp("

\\s*(]*)?>)","gi"),"$1"),a=a.replace(new RegExp("(]*)?>)\\s*

","gi"),"$1"),a=a.replace(/\s*\n/gi,"
\n"),a=a.replace(new RegExp("(]*>)\\s*
","gi"),"$1"),a=a.replace(/
(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)/gi,"$1"),a=a.replace(/(?:

|
)*\s*\[caption([^\[]+)\[\/caption\]\s*(?:<\/p>|
)*/gi,"[caption$1[/caption]"),a=a.replace(/(<(?:div|th|td|form|fieldset|dd)[^>]*>)(.*?)<\/p>/g,function(a,b,c){return c.match(/]*)?>/)?a:b+"

"+c+"

"}),b&&(a=a.replace(//g,"\n")),c&&(a=a.replace(/]*)>/g,"")),a},pre_wpautop:function(a){var b=this,c={o:b,data:a,unfiltered:a},d="undefined"!=typeof jQuery;return d&&jQuery("body").trigger("beforePreWpautop",[c]),c.data=b._wp_Nop(c.data),d&&jQuery("body").trigger("afterPreWpautop",[c]),c.data},wpautop:function(a){var b=this,c={o:b,data:a,unfiltered:a},d="undefined"!=typeof jQuery;return d&&jQuery("body").trigger("beforeWpautop",[c]),c.data=b._wp_Autop(c.data),d&&jQuery("body").trigger("afterWpautop",[c]),c.data}};