changed jquery ready to device ready.