$(function() {
	ajax_post = function(name, id) {
		$.post("/lib/ajax/test.php", { id: id, name: name },
		   function(d) {
				$('#test').append(" Oh, say hello to "+name)
			 //alert( "Data Saved: " + d.name+' ('+d.id+')');
		   }, "json");
	}
	ajax_get = function(name, id) {
		$.get("/lib/ajax/test.php?id="+id+"&name="+name,
		   function(d) {
				$('#test').append(" Oh, say hello to "+name)
			 //alert( "Data Saved: " + d.name+' ('+d.id+')');
		   }, "json");
	}
	this_test = function(me) {
		var id = me.id;
		alert('this elements id is: '+id);
	}
	show_div = function() {
		alert($('#test').html());
	}
	is_visible = function(test) {
		if($('#'+test).is(':visible')) {
			alert(test+' is visible.');
		} else {
			alert(test+' is NOT visible.');
		}
	}
	show_loading = function(anchor,size) {
		if(!size) {
			size = 'sm';
		}
		if(size=='lrg') {
			$('#loading').addClass('loadingLRG');
		} else {
			$('#loading').removeClass('loadingLRG');
		}
		var offset = $('#'+anchor).offset();
		$('#loading').css({ 'top': eval(offset.top+10)+'px', 'left': eval(offset.left+10)+'px' }).slideDown();
	}
	hide_loading = function() {
		$('#loading').hide();
	}

	$('#cssdropdown li.headlink').hover(
		function() { $('ul', this).css('display', 'block'); },
		function() { $('ul', this).css('display', 'none'); });
		

});
