$(function(){
	$.ajaxSetup( {dataType:'txt'} );
	$.get('cal.php',{},display,'txt');
});

function display(data,dataType){
	$("#calendar").append(data);
	$("#calendar tr:last td").css({background:'none'});
}
function display_dilay (data,dataType) {
	$("#calendar").animate({opacity:0.4},
		{
			duration:500,
			complete:function(){
				$(this).html(data)
				.animate({opacity:1},{duration:500});
				$(".calendar tr:last td").css({background:'none'});
			}
		}
	);
}
function trySearch1(year,month){
	var data = {year:year,month:month};
	$.get('cal.php',data,display_dilay,'txt');
}

function testsss(date){
    var data = "date="+date;
	
	$.get('cal_result.php',data,insert,'txt');

}
function insert (data,dataType) {
	$('#insert').remove();
	$("#calendar table").after('<div id="insert"></div>');
	$('#insert').append(data).hide().slideDown(600);
}
