Longtime Democratic judge switches parties in monumental move