$(function()
{
	
//	$('#older18').click(function(){
//		
//		if($(this).attr('checked'))
//		{
//			$('#date-row').attr('style', 'display:block');
//		}
//		else
//		{
//			$('#date-row').attr('style', 'display:none;');
//		}
//	});
	
//	$('.date-pick').datepicker();
	
//IE does not support this:	
//	$('.date-pick').datepicker({
//	changeYear: true,	
//	 'prevText':'<<',
//	 'nextText':'>>',
//	});
	
//	$('.date-pick').datepicker('option', 'prevText', '<<');
//	$('.date-pick').datepicker('option', 'nextText', '>>');
//	$('.date-pick').datepicker('option', 'changeYear', true);
//	$('.date-pick').datepicker('option', 'maxDate', '-18y');
//	$('.date-pick').datepicker('option', 'yearRange', '1930:2009');
//	
//	$('#promolead-form').submit(function(){
//		if ($('#promolead_date_of_birth').attr('value') == "Click here...")
//		{
//			$('#promolead_date_of_birth').attr('value', '');
//		}
//	});

});

function clearForm(form) {
	  $(':input', form).each(function() {
	    var type = this.type;
	    var tag = this.tagName.toLowerCase(); // normalize case
	    if (type == 'text' || type == 'password' || tag == 'textarea')
	      this.value = "";
	    else if (type == 'checkbox' || type == 'radio')
	      this.checked = false;
	    else if (tag == 'select')
	      this.selectedIndex = -1;
	  });
	};

