function Loading() {
	$('#contents').hide(); //fadeTo("fast", 0.33);
	$('#loading').show();
}

function NotLoading() {
	$('#loading').hide();
	$('#contents').show(); //.fadeIn("fast");
}

$(function() {
	NotLoading();
	ready();
	$('tr, input').Tooltip({
		showBody: " - "
	});

	$('div, a, img').Tooltip({
		track: true,
		delay: 0,
		showURL: false,
		showBody: " - "
	});

    $("tr[onclick],a,:button,:submit").not($("#tab-container a,a.header,a[target],.noloading")).click(function () { 
		Loading();
    });

	// Selector test
	//$('#tables a').css("color", "red");

	// .get("recordCount.php", { TABLE: "APRVAL", PARID: "02 111004100030000", TAXYR: "2007" }, 
/*
	var url;
	$('#tables a').map(function() {
		var href = $(this).attr('href');
		url = "recordCount.php?" + href.split('?')[1];
		return url;
	}).get(url, function(data){
			alert("Data Loaded: " + data);
	});
*/
/*
	var TABLE = "APRVAL";
	var PARID = "02 111004100030000";
	var TAXYR = "2007";
	$('#tables a').get("recordCount.php", { TABLE: "APRVAL", PARID: "02 111004100030000", TAXYR: "2007" },
		function(data){
			alert("Data Loaded: " + data);
	});
*/
});

