I've never seen this before in Baseball. Somewhat amusing.
Story: NYC Switch Pitcher Confounds Batters, Umpires
Apparently unsure of how the rules handle such an oddity, the umpires didn't stop the cat-and-mouse game until Venditte walked toward the plate and said something while pointing at Henriquez. Umpires and both managers then huddled and the umps decided the batter and pitcher can both change sides one time per at-bat, and that the batter must declare first.
The ruling favored the pitcher, since he gets to declare last.