$(document).ready(function() {
	$(".btn_approve").click(function(){
		if(confirm('Are you sure you want to approve this user ?'))
		{
			return true;
		}else{
			return false;
		}
	});
	
	$(".btn_approve_route").click(function(){
		if(confirm('Are you sure you want to approve this route ?'))
		{
			return true;
		}else{
			return false;
		}
	});

	$(".btn_deny").click(function(){
		if(confirm('Are you sure you want to deny this user ? All of his data will be deleted.'))
		{
			return true;
		}else{
			return false;
		}
	});
	
	$(".btn_suspend").click(function(){
		if(confirm('Are you sure you want to suspend/reactive this user ?'))
		{
			return true;
		}else{
			return false;
		}
	});	
	
	$(".btn_delete").click(function(){
		if(confirm('Are you sure you want to delete this route ?'))
		{
			return true;
		}else{
			return false;
		}
	});	
	
	$(".btn_endorse-ride").click(function(){
		if(confirm('Are you sure you want to endorse this route ?'))
		{
			$("#controlPanel").submit();
			return true;
		}else{
			return false;
		}
	})
	
	$(".delete").click(function(){
		if(confirm('Are you sure you want to delete this item ?'))
		{
			return true;
		}else{
			return false;
		}
	})
	
	$("#delete_input").click(function(){
		document.location.href="/account/delete/";
	})
	
	$("#cancel").click(function(){
		document.location.href="/";
	});
	
	$("#go_back").click(function(){
		$("#from_preview").val("1");
		$("#controlPanel2").submit();
	})
});



