$(document).ready(function(){ 

  //Setup for contact us page - text box for 'Nature of enquiry'
  //  $('#fldEnquiryTypes').change(function() {
  //  if ($(this).val() == "General") {
  //    $('#js_droptext').show('slow');
  //  } else {
  //    $('#js_droptext').hide('slow');
  //  }
  //});
  
  // age checker
  $('#day').focusin(function(){
    if($(this).val() == 'DD')
    {
      $(this).val("");
    }
  });
  $('#day').focusout(function(){
    if($(this).val() == "")
    {
      $(this).val("DD");
    }
  });
  $('#day').keyup(function(event) {
    if($(this).val().length == 2)
    {
      if((event.which > 47 && event.which < 58) || (event.which > 95 && event.which < 106))
      {
  $('#month').get(0).focus();
      }
    }
  });
  $('#month').focusin(function(){
    if($(this).val() == 'MM')
    {
      $(this).val("");
    }
  });
  $('#month').focusout(function(){
    if($(this).val() == "")
    {
      $(this).val("MM");
    }
  });
  $('#month').keyup(function(event) {
    if($(this).val().length == 2)
    {
       if((event.which > 47 && event.which < 58) || (event.which > 95 && event.which < 106))
       {
         $('#year').get(0).focus();
       }
    }
  });  
  $('#year').focusin(function(){
    if($(this).val() == 'YYYY')
    {
      $(this).val("");
    }
  });
  $('#year').focusout(function(){
    if(($(this).val() == "19") || ($(this).val() == ""))
    {
      $(this).val("YYYY");
    }
  });
  $('#year').keyup(function(event) {
    if($(this).val().length == 4)
    {
      if((event.which > 47 && event.which < 58) || (event.which > 95 && event.which < 106))
      {
        $('#day').get(0).focus();
      }
    }
  });
  
});
