﻿
// Jquery handler for current address

$(document).ready(function(){
    $("#ApplicationAddressCurrentStartDateYear").change(function(){

var currentDate = new Date()
var year = currentDate.getFullYear()

 if ( year - $(this).val() < 3 ) {
 
            $("#hide1").slideDown("fast"); //Slide Down Effect
 
        } else {
 
            $("#hide1").slideUp("fast");    //Slide Up Effect
 
        }
    });

// Jquery handler for previous address

    $("#ApplicationAddressPreviousStartDateYear").change(function(){
    	
    	var retDate = new Date()
    	var d_years = retDate.getFullYear()
 
        if ( d_years - $(this).val() < 2 ) {
 
            $("#hide2").slideDown("fast"); //Slide Down Effect
 
        } else {
 
            $("#hide2").slideUp("fast");    //Slide Up Effect
 
        }
    });
	
	// Jquery handler for the current job history
	
    $("#ApplicationJobCurrentStartDateYear").change(function(){

    	var curDate = new Date()
    	  var yearz = curDate.getFullYear()

    	 if ( yearz - $(this).val() < 3 ) {
    	 
    	            $("#hide3").slideDown("fast"); //Slide Down Effect
    	 
    	        } else {
    	 
    	            $("#hide3").slideUp("fast");    //Slide Up Effect
    	 
    	        }
    	    });
});



