Wernicke&;s encephalopathy involves