added onLoad event to attach ondeviceready event