// Custom Javascript
var webBrowser = true;
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPad/i))) {
	webBrowser = false;
}

Cufon.replace('h1', {fontFamily: 'New Caledonia LT Std'});
Cufon.replace('p', {fontFamily: 'Georgia'});
Cufon.replace('label', {fontFamily: 'New Caledonia LT Std'});

$(function(){ $("select").uniform({selectClass: "ageSelect"}); });

 // 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))
      {
    	if (webBrowser){
    	  $('#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))
       {
    	 if (webBrowser){
           $('#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))
      {
    	if (webBrowser){
          $('#day').get(0).focus();
    	}
      }
    }
  });






