/*! WysiBB v1.5.1 2014-03-26
Author: Vadim Dobroskok
*/
"undefined"==typeof WBBLANG&&(WBBLANG={}),WBBLANG.en=CURLANG={bold:"Bold",italic:"Italic",underline:"Underline",strike:"Strike",link:"Link",img:"Insert image",sup:"Superscript",sub:"Subscript",justifyleft:"Align left",justifycenter:"Align center",justifyright:"Align right",table:"Insert table",bullist:"• Unordered list",numlist:"1. Ordered list",quote:"Quote",offtop:"Offtop",code:"Code",spoiler:"Spoiler",fontcolor:"Font color",fontsize:"Font size",fontfamily:"Font family",fs_verysmall:"Very small",fs_small:"Small",fs_normal:"Normal",fs_big:"Big",fs_verybig:"Very big",smilebox:"Insert emoticon",video:"Insert YouTube",removeFormat:"Remove Format",modal_link_title:"Insert link",modal_link_text:"Display text",modal_link_url:"URL",modal_email_text:"Display email",modal_email_url:"Email",modal_link_tab1:"Insert URL",modal_img_title:"Insert image",modal_img_tab1:"Insert URL",modal_img_tab2:"Upload image",modal_imgsrc_text:"Enter image URL",modal_img_btn:"Choose file",add_attach:"Add Attachment",modal_video_text:"Enter the URL of the video",close:"Close",save:"Save",cancel:"Cancel",remove:"Delete",validation_err:"The entered data is invalid",error_onupload:"Error during file upload",fileupload_text1:"Drop file here",fileupload_text2:"or",loading:"Loading",auto:"Auto",views:"Views",downloads:"Downloads",sm1:"Smile",sm2:"Laughter",sm3:"Wink",sm4:"Thank you",sm5:"Scold",sm6:"Shock",sm7:"Angry",sm8:"Pain",sm9:"Sick"},wbbdebug=!0,function(a){"use strict";a.wysibb=function(b,c){a(b).data("wbb",this),c&&c.deflang&&"undefined"!=typeof WBBLANG[c.deflang]&&(CURLANG=WBBLANG[c.deflang]),c&&c.lang&&"undefined"!=typeof WBBLANG[c.lang]&&(CURLANG=WBBLANG[c.lang]),this.txtArea=b,this.$txtArea=a(b);this.$txtArea.attr("id")||this.setUID(this.txtArea);this.options={bbmode:!1,onlyBBmode:!1,themeName:"default",bodyClass:"",lang:"ru",tabInsert:!0,imgupload:!1,img_uploadurl:"/iupload.php",img_maxwidth:800,img_maxheight:800,hotkeys:!0,showHotkeys:!0,autoresize:!0,resize_maxheight:800,loadPageStyles:!0,traceTextarea:!0,smileConversion:!0,buttons:"bold,italic,underline,strike,sup,sub,|,img,video,link,|,bullist,numlist,|,fontcolor,fontsize,fontfamily,|,justifyleft,justifycenter,justifyright,|,quote,code,table,removeFormat",allButtons:{bold:{title:CURLANG.bold,buttonHTML:'',excmd:"bold",hotkey:"ctrl+b",transform:{"{SELTEXT}":"[b]{SELTEXT}[/b]","{SELTEXT}":"[b]{SELTEXT}[/b]"}},italic:{title:CURLANG.italic,buttonHTML:'',excmd:"italic",hotkey:"ctrl+i",transform:{"{SELTEXT}":"[i]{SELTEXT}[/i]","{SELTEXT}":"[i]{SELTEXT}[/i]"}},underline:{title:CURLANG.underline,buttonHTML:'',excmd:"underline",hotkey:"ctrl+u",transform:{"{SELTEXT}":"[u]{SELTEXT}[/u]"}},strike:{title:CURLANG.strike,buttonHTML:'',excmd:"strikeThrough",transform:{"{SELTEXT}":"[s]{SELTEXT}[/s]","{SELTEXT}":"[s]{SELTEXT}[/s]"}},sup:{title:CURLANG.sup,buttonHTML:'',excmd:"superscript",transform:{"{SELTEXT}":"[sup]{SELTEXT}[/sup]"}},sub:{title:CURLANG.sub,buttonHTML:'',excmd:"subscript",transform:{"{SELTEXT}":"[sub]{SELTEXT}[/sub]"}},link:{title:CURLANG.link,buttonHTML:'',hotkey:"ctrl+shift+2",modal:{title:CURLANG.modal_link_title,width:"500px",tabs:[{input:[{param:"SELTEXT",title:CURLANG.modal_link_text,type:"div"},{param:"URL",title:CURLANG.modal_link_url,validation:"^http(s)?://"}]}]},transform:{'{SELTEXT}':"[url={URL}]{SELTEXT}[/url]",'{URL}':"[url]{URL}[/url]"}},img:{title:CURLANG.img,buttonHTML:'',hotkey:"ctrl+shift+1",addWrap:!0,modal:{title:CURLANG.modal_img_title,width:"600px",tabs:[{title:CURLANG.modal_img_tab1,input:[{param:"SRC",title:CURLANG.modal_imgsrc_text,validation:"^http(s)?://.*?.(jpg|png|gif|jpeg)$"}]}],onLoad:this.imgLoadModal},transform:{'':"[img]{SRC}[/img]",'':"[img width={WIDTH},height={HEIGHT}]{SRC}[/img]"}},bullist:{title:CURLANG.bullist,buttonHTML:'',excmd:"insertUnorderedList",transform:{"
{SELTEXT}":"[quote]{SELTEXT}[/quote]"}},code:{title:CURLANG.code,buttonText:"[code]",hotkey:"ctrl+shift+4",onlyClearText:!0,transform:{"
{SELTEXT}
":"[code]{SELTEXT}[/code]"}},offtop:{title:CURLANG.offtop,buttonText:"offtop",transform:{'{SELTEXT}':"[offtop]{SELTEXT}[/offtop]"}},fontcolor:{type:"colorpicker",title:CURLANG.fontcolor,excmd:"foreColor",valueBBname:"color",subInsert:!0,colors:"#000000,#444444,#666666,#999999,#b6b6b6,#cccccc,#d8d8d8,#efefef,#f4f4f4,#ffffff,-, #ff0000,#980000,#ff7700,#ffff00,#00ff00,#00ffff,#1e84cc,#0000ff,#9900ff,#ff00ff,-, #f4cccc,#dbb0a7,#fce5cd,#fff2cc,#d9ead3,#d0e0e3,#c9daf8,#cfe2f3,#d9d2e9,#ead1dc, #ea9999,#dd7e6b,#f9cb9c,#ffe599,#b6d7a8,#a2c4c9,#a4c2f4,#9fc5e8,#b4a7d6,#d5a6bd, #e06666,#cc4125,#f6b26b,#ffd966,#93c47d,#76a5af,#6d9eeb,#6fa8dc,#8e7cc3,#c27ba0, #cc0000,#a61c00,#e69138,#f1c232,#6aa84f,#45818e,#3c78d8,#3d85c6,#674ea7,#a64d79, #900000,#85200C,#B45F06,#BF9000,#38761D,#134F5C,#1155Cc,#0B5394,#351C75,#741B47, #660000,#5B0F00,#783F04,#7F6000,#274E13,#0C343D,#1C4587,#073763,#20124D,#4C1130",transform:{'{SELTEXT}':"[color={COLOR}]{SELTEXT}[/color]"}},table:{type:"table",title:CURLANG.table,cols:10,rows:10,cellwidth:20,transform:{"{SELTEXT}
':"[left]{SELTEXT}[/left]"}},justifyright:{title:CURLANG.justifyright,buttonHTML:'',groupkey:"align",transform:{'{SELTEXT}
':"[right]{SELTEXT}[/right]"}},justifycenter:{title:CURLANG.justifycenter,buttonHTML:'',groupkey:"align",transform:{'{SELTEXT}
':"[center]{SELTEXT}[/center]"}},video:{title:CURLANG.video,buttonHTML:'',modal:{title:CURLANG.video,width:"600px",tabs:[{title:CURLANG.video,input:[{param:"SRC",title:CURLANG.modal_video_text}]}],onSubmit:function(a){var b=this.$modal.find('input[name="SRC"]').val();b&&(b=b.replace(/^\s+/,"").replace(/\s+$/,""));var c;if(c=b.match(-1!=b.indexOf("youtu.be")?/^http[s]*:\/\/youtu\.be\/([a-z0-9_-]+)/i:/^http[s]*:\/\/www\.youtube\.com\/watch\?.*?v=([a-z0-9_-]+)/i),c&&2==c.length){var d=c[1];this.insertAtCursor(this.getCodeByCommand(a,{src:d}))}return this.closeModal(),this.updateUI(),!1}},transform:{'':"[video]{SRC}[/video]"}},fs_verysmall:{title:CURLANG.fs_verysmall,buttonText:"fs1",excmd:"fontSize",exvalue:"1",transform:{'{SELTEXT}':"[size=50]{SELTEXT}[/size]"}},fs_small:{title:CURLANG.fs_small,buttonText:"fs2",excmd:"fontSize",exvalue:"2",transform:{'{SELTEXT}':"[size=85]{SELTEXT}[/size]"}},fs_normal:{title:CURLANG.fs_normal,buttonText:"fs3",excmd:"fontSize",exvalue:"3",transform:{'{SELTEXT}':"[size=100]{SELTEXT}[/size]"}},fs_big:{title:CURLANG.fs_big,buttonText:"fs4",excmd:"fontSize",exvalue:"4",transform:{'{SELTEXT}':"[size=150]{SELTEXT}[/size]"}},fs_verybig:{title:CURLANG.fs_verybig,buttonText:"fs5",excmd:"fontSize",exvalue:"6",transform:{'{SELTEXT}':"[size=200]{SELTEXT}[/size]"}},removeformat:{title:CURLANG.removeFormat,buttonHTML:'',excmd:"removeFormat"}},systr:{"