Creating js skeleton for device orientation