added .ajax function to gear and dialog apis