$(document).ready(
				
	function() {
		
		/*$('#mycarousel').jCarouselFade({
			auto: 3,
			wrap: 'last',
			scroll: 1,
			animation: 1000
		});*/

	}
				
);

function restore() {
	
	$('#submit_restore').addClass('loading');
	
	$('.validation').html('');
	
	$.post(
		$('#BASE_URL').attr('value') + 'libraries/user/restore',
		$("#restore_form").serialize(),
		function(report) {
			
			$('#submit_restore').removeClass('loading');
			
			if(!report.error) {
				
				if(report.valid) {
					
					alert('Check your email to continue restoring password');
					
					window.location = $('#BASE_URL').attr('value') + 'login.html';
					
				} else {
					
					$('.validation').each(
					
						function() {
							
							if(report.validation[$(this).attr('id').replace('validation_','')]) {
							
								$(this).html(report.validation[$(this).attr('id').replace('validation_','')]);
								
							}
							
						}	
					
					);
					
				}	
				
			}	
			
		},
		'json'
	);
	
}
