[IMP] use jquery's settimeout instead of creating own function.