/* TODO: I think this can go away. The legal tooltip stuff was moved to default.js */
/*  Used to fill the content for legal tooltips
 *  Usage: Place <span class="legal-mark" name="" title=""></span> where the legal mark should appear.
 *  	   Give it a unique name (or use a pre-existing name)
 *  	   Add a matching entry to the array in _includes/_legal.php
 */
$(function(){
	var legal_list = [];
	$(".legal-mark").each(function() {
		legal_list.push($(this).attr('name'));
	});

	$.getJSON(
		'_legal.php',
		{"legal_list[]" : legal_list},
		fill_legal
	);
});

function fill_legal(json) {
	$(".legal-mark").each(function(i) {
		this.title = json[$(this).attr('name')][1];
		$(this).html("[" + json[$(this).attr('name')][0] + "]");
	});
	for (i in json) {
		$('#legal-glossary').append("<p>[" + json[i][0] + "] " + json[i][1] + "</p>");
	}
}


