jQuery(function($){
	$(".dob .country").change(function(){
		if($("option:selected", this).attr('id') != 'agegate-default') {
			var arr = $("option:selected", this).attr('id').split('-');
			if(parseInt(arr[2]) < 13) {arr[2] = 13;}
			$(".big-age").html(arr[2]);
			$(".age-warning").css('visibility', 'visible');
		}else{
			$(".age-warning").css('visibility', 'hidden');
		}
	});
	
	$("#agegate-month").keyup(function(){
		if($(this).val().length > 1) {
			$("#agegate-day").focus();
		}
	});
	
	$("#agegate-day").keyup(function(){
		if($(this).val().length > 1) {
			$("#agegate-year").focus();
		}
	});
});
	
