waiting dialog for phonegap 3.0+