$(document).ready(function() {
			$('.nhwcheck').removeAttr('checked');
			$('.nhwcheck').click(function(){
				this_nhw = $(this).next().text();
				container_contents = $('#nhwcontainer').attr("value");
				$('#nhwcontainer').attr("value", container_contents + ', ' + this_nhw);
			});
			
			$('#addNewSkill').click(function(){
				newSkill = $('#newSkill').attr('value');
				
				if (newSkill == ''){
					$('#skillsList > .error').show();
				} else {
					$('#newSkill').before('<li><input type="checkbox" checked="checked" class="nhwcheck" /> <label>' + newSkill + '</label></li>')
					$(this).prev().attr('value', '');
					$('#skillsList > .error').hide();
					
					container_contents = $('#nhwcontainer').attr("value");
					$('#nhwcontainer').attr("value", container_contents + ', ' + newSkill);
				}
			});
			
			$('.countMe').each(function(){  
			    var length = 250 - $(this).val().split(/\b[\s,\.-:;]*/).length;  
			    $(this).parent().find('.remaining').html( length);  

			    $(this).keyup(function(){  
			        var new_length = 250 - $(this).val().split(/\b[\s,\.-:;]*/).length;  
			        $(this).parent().find('.remaining').html( new_length);
			    });  
			});  

});  

