$(document).ready(function() {
	$("ul.sf-menu").superfish();
});

function getFAData(container, module_id, type) {
	var url = '/fafulltime.php?module_id=' + module_id;
	$.get(url, function(data) {
		data = data.replace('document.getElementById(\'lrep' + module_id + '\').innerHTML = \'', '');
		data = data.replace('\';', '');
		$("#" + container + "").html(data);
		$("#" + container + " img").hide();
		$("#" + container + " a").removeAttr('href');
		$("#" + container + " table").css('font-size', '14px');
		$("#" + container + " table").css('font-family', 'Arial');
		$("#" + container + " table td").css('padding', '4px');
		$("#" + container + "").find('div:first').css('width', '100%');
		
		// NOT IN USE
		if (type == "mini_fixture") {
			var row = 0;
			$("#" + container + " table tr").each(function() {
				if ($(this).find("td").length == 1) {
					row = row  + 1;
					$(this).addClass("date");
					$(this).addClass("date" + row);
					$(this).attr("block", row);
				}
				else {
					$(this).addClass("fixture" + row);
					$(this).attr("block", row);
				}
			});
			$("#" + container + " table tr.date").each(function() {
				block = $(this).attr("block");
				if ($("#" + container + " table tr.fixture" + block + " td:first").html() == "Cup:") {
					$("#" + container + " table tr.fixture" + block).remove();
					$("#" + container + " table tr.date" + block).remove();
				}
			});
			keep_block = $("#" + container + " table tr.date:first").attr("block");
			$("#" + container + " table tr").each(function() {
				if ($(this).attr("block") != keep_block) {
					$(this).remove();
				}
			});
		}
		
	});
}
