Updated javascript for present day and optimized jQuery calls