$("math").each(function () {
    var old = $(this).html().trim();
    old = "\\(" + old + "\\)";
    $(this).html(old);
    $(this).data("forum", old);
  }
  );



var _idx = 0;
$(".t h5").each(function () {
    _idx = _idx + 1;
    $(this).html(_idx + "." + $(this).html());

});



$("math").dblclick(
    function () {
        var html = "<span class=\"math-tex\">" + $(this).data("forum") + "</span>";
        html = html.trim();

        parent.tinyMCE.execCommand('mceReplaceContent', false, html);

        parent.enablescroll();
        parent.layer.closeAll();


    }
    );
