Invariant Synchrony and Anti-synchrony Subspaces of Weighted Networks