at_treedb_jslib_mathjax_MathJax = function() {
	var e = this.getElement();
	e.style.visibility='hidden'; 
	
	e.style.width = '0px';
	e.style.height = '0px';
	MathJax.Hub.Config({
		showMathMenu: false,
		showProcessingMessages: true,
		tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
	});
	var endRendering = function() { 
		e.style.visibility = 'visible';
		e.style.width = '100%';
		e.style.height = '100%';
	}; 
	this.onStateChange = function() {
		var id =  this.getState().divID;;
		e.innerHTML = "<p id=\"" + id + "\">" + this.getState().source + "</p>"; 
		MathJax.Hub.Queue(["Typeset",MathJax.Hub,document.getElementById(id) ]);
		MathJax.Hub.Queue(endRendering);
	};
};