Rich-IDM: Extending IDM to Model Rich Internet Applications