Checking and beginning Ajax