In this paper we prove a version of Deligne's conjecture for potentially automorphic motives, twisted by certain algebraic Hecke characters. The Hecke characters are chosen in such a way that we can use automorphic methods in the context of totally definite unitary groups.
Ribet [Ri] has generalized the conjecture of Shimura-Taniyama-Weil to abelian varieties defined over Q, giving rise to the study of abelian varieties of GL(2)-type. In this context, all curves over Q of genus one have Jacobian variety of GL(2)-type. Our aim in this paper is to begin with the analysis of which curves of genus 2 have Jacobian variety of GL(2)-type. To this end, we restrict our attention to curves with rational Rosenhain model and non-abelian automorphism group, and use the embedding of this group into the endomorphism algebra of its Jacobian variety to determine if it is of GL(2)-type.