function refreshVerImg(imgid){
	var currentTime = new Date();
	document.getElementById('imgCaptcha').src = 'includes/captcha.php?' + currentTime.getTime();
}


/* ===== Sending forms with Jquery and Ajax =====*/
function sendForm(form) {
	$(document).ready(function() {
		var options = {
			target:        	'#ajaxresponse',
			beforeSubmit:  	showBefore,
			success:       	showResponse,
			url:  			'includes/post.php',
			type: 			'post',
			timeout:   		16000
		};
			
		$('#'+form).submit(function() { 
			$(this).ajaxSubmit(options); 
				return false; 
		}); 
	});

	function showBefore()  {
		document.getElementById('ajaxresponse').style.display = 'block';
		document.getElementById('ajaxresponse').innerHTML = '<div class="success"><img src="images/ajax-loader.gif" align="absmiddle" /> Sending informations...</div>';
	}
	function showResponse(result)  {
		var currentTime = new Date();
		document.getElementById('ajaxresponse').style.display = 'block';
		document.getElementById('ajaxresponse').innerHTML = '<div class="success">'+result+'</div>';
		var img = document.getElementById('imgCaptcha');
		img.src = 'includes/captcha.php?' + currentTime.getTime();
	}
}
/* ===== END Sending forms with Jquery and Ajax =====*/

/*$(document).ready(function(){
	$('a.captioned').each(
		function() {
			var target = $(this).find('img');
			var targetWidth = $(target).width();
			$(target)
				.wrap('<div class="imgcontainer" style="width: '+(targetWidth+2)+'px"></div>')
				.after('<div class="caption" style="height:0;">Click to enlarge</div>');
			
			$(this).hover(function(){
				$(this).find('div.caption').animate({'height':'18px'},'slow');	
			},function(){
				$(this).find('div.caption').animate({'height':'0'},'slow');
			});
				
		}
	);
});*/