Update ajax.js

Added default for options.type