// jsSyntax designed by Chris Sullins
function jsSyntax( text ) {
	// quotes
	text = text.replace(/\"(.*)\"/g, "<span class=\"q\">\"$1\"</span>");
	text = text.replace(/\'(.*)\'/g, "<span class=\"q\">\'$1\'</span>");
	// numbers
	text = text.replace(/\b(\d+)\b/g, "<span class=\"d\">$1</span>");
	text = text.replace(/\[(\d+)\]/g, "<span class=\"d\">$1</span>");
	// functions
	text = text.replace(/([\s\.][\w_]+)\s?\(/g, "<span class=\"f\">$1</span>(");
	// keywords
	text = text.replace(/(new|var|return|function|typeof)/g, "<span class=\"v\">$1</span>");
	// control structures
	text = text.replace(/(if|for|while|do|case)([^\s\w])/g, "<span class=\"v\">$1</span>$2");
	// ojbects
	text = text.replace(/\b(Object|RegExp|Array|Date|Math|Number|String|Boolean)\b/g, "<span class=\"t\">$1</span>");
	// comments
	text = text.replace(/\/\/(.*)\n/g, "<span class=\"c\">//$1</span>\n");
	// symbols
	text = text.replace(/([{}\[\]\|\?])/g, "<span class=\"s\">$1</span>");
	text = text.replace(/(&amp;)/g, "<span class=\"b\">$1</span>");
	//boolean
	text = text.replace(/\b(true|false|null)\b/g, "<span class=\"b\">$1</span>");
	// this
	text = text.replace(/\b(this)\b/g, "<span class=\"b\">$1</span>");
	return text;
}