jQuery(document).ready(function($){

	// show auto updates
	$('#updateFilterAuto').bind (
		'click',
		function(){
						
			var user_id = $('#user_id').val();
						
			$('#theUpdates').hide().load('/ajax/printUserUpdates.php?user_id=' + user_id + '&update_type=auto', function() {
				$(this).fadeIn(200);
				if (typeof(bindAutoUpdateDelete) !== 'undefined') {
					bindAutoUpdateDelete();
				}
				$('#updateFilterAuto').addClass('active');
				$('#updateFilterQuick').removeClass('active');
				if (typeof(pageTracker) !== 'undefined') {
					pageTracker._trackPageview('/ajax/printUserUpdates.php'); // track this AJAX call in google analytics
				}
			});
						
			return false; // return false so the link doesn't actually click anywhere

		}
	);
	
	// show quick updates
	$('#updateFilterQuick').bind (
		'click',
		function(){
						
			var user_id = $('#user_id').val();
						
			$('#theUpdates').hide().load('/ajax/printUserUpdates.php?user_id=' + user_id + '&update_type=quick', function() {
				$(this).fadeIn(200);
				if (typeof(bindUpdateDelete) !== 'undefined') {
					bindUpdateDelete();
				}
				if (typeof(bindUpdateEdit) !== 'undefined') {
					bindUpdateEdit();
				}
				$('#updateFilterQuick').addClass('active');
				$('#updateFilterAuto').removeClass('active');
				if (typeof(pageTracker) !== 'undefined') {
					pageTracker._trackPageview('/ajax/printUserUpdates.php'); // track this AJAX call in google analytics
				}
			});
						
			return false; // return false so the link doesn't actually click anywhere

		}
	);
});