help please math type helper..

Screen Shot 2013-03-02 at 12.55.11 PM.jpg I have implemented a small script on some of my pages to help people write math equations using mathjax

for example to type fraction A/B as above...

i give users the option to insert the latex code like this.. by clicking ont he buttons on the left.Screen Shot 2013-03-02 at 12.54.51 PM.jpg

the code looks something like this.

insertAtCaret: function(myValue){
var obj;
if( typeof this[0].name !='undefined' ) obj = this[0];
else obj = this;

if ($.browser.msie) {
sel = document.selection.createRange();
sel.text = myValue;
else if ($.browser.mozilla || $.browser.webkit) {
var startPos = obj.selectionStart;
var endPos = obj.selectionEnd;
var scrollTop = obj.scrollTop;
obj.value = obj.value.substring(0, startPos)+myValue+obj.value.substring(endPos,obj.value.length);
obj.selectionStart = startPos + myValue.length;
obj.selectionEnd = startPos + myValue.length;
obj.scrollTop = scrollTop;
} else {
obj.value += myValue;

function put(somthing){
var thisSTuff = somthing;

Now.. I would like to add this menu for students on my forum so the menu should appear everywhere where students can post questions or start threads .. if possible would like a floating menu..but whatever gets the job done would be greatly appreciated.. currently on my non-forum pages all i add is this line
include_once($_SERVER['DOCUMENT_ROOT'] . "/configs/mJaxHelper.php");
and contains all the stuff i need.. what would you suggest to add this to my forum?
much appreciated