function showit() {
	
	$("#hide").show('slow');
	$("#add").hide('slow');	
	
	$('#hide').highlightFade({
		speed:1000
	});
}





function hideit() {
	
	$("#hide").hide('slow');
	$("#add").show('slow');	
}

$(".input_check").live('click', function(event) {
    var id = $(this).attr('id');
	var parent = $(this).parent().parent().attr('id');
	
	$(this).attr('disabled', 'disabled');
	
	$("#"+parent).css("background", "#F7F7F7").css("color", "#999999").css("text-decoration", "line-through").css("border", "#CCCCCC 1px solid");
	
$.post("done.php", { nameid: id },
  function(data){
  });
		
}
); 
 
$(".delete").live('click', function(event) {
		var id2 = $(this).parent().parent().parent().attr("id");
	var answer = confirm("Do you really want to delete this todo?")
	if (answer){
    $.get("delete.php?id="+id2);
        $(this).parent().parent().parent().highlightFade({
		speed:1000
	}).slideUp('slow');
	}
	else{
	}
		
}
); 

  $(document).ready(function() {
    $("#test-list").sortable({
      handle : '.handle',
	  revert: true,
	  cursor: 'crosshair',
	  opacity: 0.6,
      update : function () {
		  var order = $('#test-list').sortable('serialize');
  		$("#info").load("process-sortable.php?"+order);
      }
    });
});
  
  $(document).ready(function() {
    $("#lists").sortable({
      handle : '.handle2',
	  revert: true,
	  cursor: 'crosshair',
	  opacity: 0.6,
      update : function () {
		  var order = $('#lists').sortable('serialize');
  		$("#info2").load("list-sortable.php?"+order);
      }
    });
});