Separated Ajax func calls in mockup js