change json -> ajax afiliate and add 403 and 404 support