Adding Ajax detection to avoid jamming JSON's

tried the !$ci->input->is_ajax_request() but got an error so I went old school style ;)