
jQuery.fn.center = function () {
    this.css("position","absolute");
    this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px");
    this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px");
    return this;
}

function ajaxCall(action,args,container) {
    $.ajax({
	type : 'POST',
	url : 'ajaxCb.php',
	data: 'action='+action+'&'+args,
	dataType: 'html',
	success: function(data) {
	    $(container).html(data).fadeIn(300);
        },
	error: function(XMLHttpRequest, textStatus, errorThrown) {
	    $(container).html('There was an error.').fadeIn(300);
	}
    });
}


