

$(document).ready(function(){
   $("#bioEditButton").click(function(event){
     $("#bioEdit").show();
     $("#bioPublic").hide();
   });
   
   $("#profile_add_comment_top").hide();
   $("#profile_add_comment_section").hide();
   $("#bioEdit").hide();
   

   
    $("#profileCommentAddTop").toggle(
     
     function () {
        $("#profile_add_comment_top").show();
        $(this).text('Cancel / Hide');
        
      },
      function () {
        $("#profile_add_comment_top").hide();
        $(this).text('Add Comment');
      });
      
     $("#profileCommentAddSection").toggle(
     
     function () {
        $("#profile_add_comment_section").show();
        $(this).text('Cancel / Hide');
        
      },
      function () {
        $("#profile_add_comment_section").hide();
        $(this).text('Add Comment');
      });
      
      $('.woDoneCheck').click(function(e){
      	var currentId = $(e.target).attr('id');
         // alert( currentId + 'yup u did' );
         $("#assig_"+currentId).css('background-color','GreenYellow');
         
         var woName = $("#assig_"+currentId).text();
         
         
         
         $.post("test.php", { func: "markWoDone", woid: currentId },
            function(data) {
            	$('#newlyCompleted').prepend('<br />Today - ' + woName);
              // alert("Data Loaded: " + data);
         });
         
         $("#assig_"+currentId).hide('slow');	
      });
      
      $('.delWoEx_x').click(function(e){
      	var currentId = $(e.target).attr('id');
      	var woExArr = currentId.split('_'); 
        //  alert( currentId + 'yup u did' );
      //    alert( 'woid=' + woExArr[0] + ' and ord=' + woExArr[1]);
        $("#exli_"+currentId).css('background-color','Red');
         
       //  var woName = $("#assig_"+currentId).text();
         
         
     
         $.post("test.php", { func: "delWoEx", woid: woExArr[0], ord: woExArr[1] },
            function(data) {
            	//$('#newlyCompleted').prepend('<br />Today - ' + woName);
              // alert("Data Loaded: " + data);
         });
         
         $("#exli_"+currentId).hide('slow');	
      });

   
   

   
   $(function() {
		$( "#rc_date" ).datepicker();
	});
   
 });
 

   






