// ========= NEWS // ========= \\
news = function(string, action, id) {
	loading("on");
	module = "news"
	switch (action) {
		case "list":
			$.ajax({
				type: "POST",
				url: site_address + control + module + "_list",
				data: "page="+page,
				success: function(data) {
					$("#"+content).html(data);
				}
			});
		break;
		
		case "info":
			$.ajax({
				type: "POST",
				url: site_address + control + module + "_info",
				data: "page="+page+"&id="+id+"&link="+string,
				success: function(data) {
					$("#"+content).html(data);
				}
			});
		break;
	}
	loading("off");
}

// ========= NEWS // ========= \\

active = function(string, action, id) {
	loading("on");
	module = "active"
	switch (action) {
		case "list":
			$.ajax({
				type: "POST",
				url: site_address + control + module + "_list",
				data: "page="+page,
				success: function(data) {
					$("#"+content).html(data);
				}
			});
		break;
		
		case "info":
			$.ajax({
				type: "POST",
				url: site_address + control + module + "_info",
				data: "page="+page+"&id="+id+"&link="+string,
				success: function(data) {
					$("#"+content).html(data);
				}
			});
		break;
	}
	loading("off");
}

artists = function(string, action, id) {
	loading("on");
	module = "artists"
	switch (action) {
		case "list":
			$.ajax({
				type: "POST",
				url: site_address + control + module + "_list",
				data: "page="+page,
				success: function(data) {
					$("#"+content).html(data);
				}
			});
		break;
		
		case "info":
			$.ajax({
				type: "POST",
				url: site_address + control + module + "_info",
				data: "page="+page+"&id="+id,
				success: function(data) {
					$("#"+content).html(data);
				}
			});
		break;
	}
	loading("off");
}

artworks = function(string, action, id) {
	loading("on");
	module = "artworks"
	switch (action) {
		case "list":
			$.ajax({
				type: "POST",
				url: site_address + control + module + "_list",
				data: "page="+page+"&type="+id,
				success: function(data) {
					$("#"+content).html(data);
				}
			});
		break;
		
		case "info":
			$.ajax({
				type: "POST",
				url: site_address + control + module + "_info",
				data: "page="+page+"&id="+id+"&type="+string,
				success: function(data) {
					$("#"+content).html(data);
				}
			});
		break;
	}
	loading("off");
}