var phpFile = "confirm-profile.php";
var infoForm = "sign-in-form";


$(document).ready(function(){
	
	$('form[name="'+infoForm+'"]').submit(function(e){
		preloadShow();
		$.post(
			phpFile,$('form[name="'+infoForm+'"]').serialize(),
			function(data){
				alert(data.description);
				if(data.status == 200){
					window.location = phpFile+"?m=update"+data.channel;
				}else{
					if(data.redirect != undefined) window.location=data.redirect;
				}
				preloadHide();
			},"json"
		);
		e.preventDefault();
	});
	
});

function channelSelect(channel){
	$('#channelSelect input[value="'+channel+'"]').attr('checked',true); 
}
