	$(function() {
	
		attachGeneral();
	
	});

	function attachGeneral() {
	
		$('#submit').click(function(){
		
			var required = $('.requiredField');
			var title = '';
			var content = '';
			var message = 0;
			var thisId = '';
			
			jQuery.each(required, function(i, val) {
				title = val['id'];
				
				content = $(this).val();
				
				if(content.length == 0) {
					$(this).parent().parent().children('label').css('color', '#cc0000');
					message += 1;
				} else {
					$(this).parent().parent().children('label').css('color', '#9d9fa0');
				}
			});
			
			if(message == 0) {
				return true;
			} else {
				return false;
			}
		
		});
	
	}