I dont want to scare you, its probably nothing but we had a jack russel that would just go off and stare off into space for ages and shake, this got progressively worse and he was diagnosed with epilepsy - he was fine on medication and lived to 14. Please get your pup checked out, hope it's nothing serious!