
$(function(){	
	//alert('Bạn đang xem Lịch học tại EZcooking. http://www.daynauan.vn');
	$('#month_select').change(function(){
		$('#hidden_day').val(1);									   
		load_current();
	});	
	$('#year_select').change(function(){
		$('#hidden_day').val(1);									  	
		load_current();
	});	
	function load_current(){
		$('#theForm').submit();
	}
	$('#prev').click(function(){							  
		var curent_day = parseInt($('#hidden_day').val());
		//
		if(curent_day<8){
			$('#hidden_day').val(1);	
			load_current();
		}
		else{
			$('#hidden_day').val(curent_day-7);	
			load_current();
		}		
		
	});	
	$('#next').click(function(){							  
		var curent_day = parseInt($('#hidden_day').val());
		//
		if(curent_day>24){
		}
		else{
			$('#hidden_day').val(curent_day+7);	
			load_current();
		}		
	});	
});
