function showChildControlsModal() {
    var mommyStatus = $('#lstMommyStatusModal').val();
    //console.log('showChildControls, lstMommyStatus = ' + mommyStatus);
    if ((mommyStatus == 1) || (mommyStatus == 2) || (mommyStatus == 3)) {
	$('#childrenBlockModal').show(250);
    } else {
	$('#childrenBlockModal').hide(250);
    }
}
//------------------------------------------
function completedSignup() {
    $('#membershipApplication').hide();
    $('#membershipConfirm').fadeIn(500);
}

function link() {
//	FB.Connect.requireSession(function() {
//		$('#linkfacebook').click();
//	}, true);
	$('#linkfacebook').click();
}

function completedFacebookLink() {
    $('#membershipApplication').hide();
    $('#membershipFacebook').fadeIn(500);
}

function showChildControls() {
    var mommyStatus = $('#lstMommyStatus').val();
    //console.log('showChildControls, lstMommyStatus = ' + mommyStatus);
    if ((mommyStatus == 1) || (mommyStatus == 2) || (mommyStatus == 3)) {
	$('#childrenBlock').show(250);
    } else {
	$('#childrenBlock').hide(250);
    }
}
function rebindDatePickers() {

	return;
/* GDS this whole thing is broken.
    var i;
    Date.firstDayOfWeek = 7;
    Date.format = 'mm/dd/yyyy';
    for (i = 0; i < 6; ++i) {
    	$('#txtChildBirthDates' + i).keyfilter(/[0-9\/]/);
    	$('#Dates' + i).DatePicker({ 
    		onBeforeShow: function(j) {
    			return function() {
    				var input = $("#txtChildBirthDates"+j);
    				var link = $("#Dates"+j);
    				if (/\d\d\/\d\d\/\d\d\d\d/.test(input.val())) {
    					link.DatePickerSetDate(input.val(), true);
    				}
    			}
    		}(i),
    		onChange: function(j) {
    			return function(formated, dates) {
    				var input = $("#txtChildBirthDates"+j);
					if ($('#txtChildBirthDatesModal'+j).length >0)
						input = $("#txtChildBirthDatesModal"+j);
					//alert('dates:'+formated+'\ninput:#txtChildBirthDates'+j);
    				var link = $("#Dates"+j);
    				input.val(formated);
    				link.DatePickerHide();
    			}
    		}(i),
    		format: 'm/d/Y', 
    		position: 'right', 
    		view: 'years',
    		date: new Date() 
    	});
    	$('#Dates'+i).click(function(e) {
    		var s=$(this).attr('id');
    		$('#txtChildBirth' + s).DatePickerShow();
    		e.preventDefault();
    	});
    	//$('#txtChildBirthDates' + i).datePicker({clickInput:true, createButton:false, startDate: '01/01/1970' } );
    }
*/

}

$(document).ready(function () {
	rebindDatePickers();
    });


