$(document).ready(function() {
	// Asynchronos post message, append results to #response element and show

	$('#post-comment').click(function() {
		if ($(".validate").valid()) {
			if(verify()) {
				var name = $('#your-name').val();
				var email = $('#your-email').val();
				var comment = $('#your-comment').val();
				var cptchallenge = $('#recaptcha_challenge_field').val(); 
				var cptresponse = $('#recaptcha_response_field').val();
				var vRef = $('#vRef').val();

				$.post('/resources/vb/post-blog-comment.asp',{
				name:name,
				email:email,
				comment:comment,
				cptchallenge:cptchallenge,
				cptresponse:cptresponse,
				vRef:vRef
				}, function(result) {
					if (result == '') {
						$("#response").empty();
						$('#myPostComment').slideUp(500);
						$('#myPostComment').animate({opacity: 0}, 500)
						$('#myPostConfirm').slideDown(500);
					} else {
						$('#response').empty();
						$('#response').append(result);
					}
				});
			}
		}
	reloadRecaptcha;
	return false;
	});

});

function getolderposts(myPage){
	//$('#blog-archive').empty();
	$.post('/resources/vb/post-blog-older-articles.asp',{myPage:myPage},function(response){
		$('#blog-content').append(response);
	});
};

