Phongap 3.0 ready

working & tested only on phonegap 3.0