function frmSubmit(){var e="";var d=jQuery("#nText");var g=d.val();g=g.replace(/(\r\n|\n)/g,"<br>");if(jQuery("#files .select").length){jQuery("#files .select").each(function(){var a=jQuery(this).find("button").attr("data-type");if(a=="img"){e=e+'<p><img src="'+jQuery(this).find("button").attr("data-file")+'" alt="'+jQuery(this).find("button").attr("title")+'" /></p>';e=e.replace("/modules/board/skins/sketchbook5/","");e=e.replace("/modules/board/m.skins/sketchbook5/","")}else{if(a=="music"){e=e+'<div><audio src="'+jQuery(this).find("button").attr("data-file")+'" controls="controls">Your browser does not support this file type. You can download <a href="'+jQuery(this).find("button").attr("data-dnld")+'" style="text-decoration:underline">'+jQuery(this).find("small").text()+"</a> and play it!</audio></div>"}else{if(a=="media"){e=e+'<div><video src="'+jQuery(this).find("button").attr("data-file")+'" controls="controls">Your browser does not support this file type. You can download <a href="'+jQuery(this).find("button").attr("data-dnld")+'" style="text-decoration:underline">'+jQuery(this).find("small").text()+"</a> and play it!</video></div>"}else{e=e+'<p><a href="'+jQuery(this).find("button").attr("data-dnld")+'" style="text-decoration:underline">'+jQuery(this).find("small").text()+"</a></p>"}}}});if(jQuery("#m_img_upoad_2:checked").length){g=g+e}else{g=e+g}}jQuery("#ff input[name=content]").val(g);var f=document.getElementById("ff");procFilter(f,insert);jQuery("#frmSubmit").attr("disabled","disabled")}jQuery(function(a){a("#nText").html(a("#ff input[name=content]").val().replace(/<br([^>]*)>/ig,"\n"))});