model {
theta ~ dbeta(a[pick], b[pick])
pick ~ dcat(q[1:2])
q[1] <- 0.50
q[2] <- 0.50
q.post[1] <- equals(pick, 1) # = 1 if prior 1 picked
q.post[2] <- equals(pick, 2) # = 1 if prior 2 picked
r ~ dbin(theta, n) # sampling distribution
r.pred ~ dbin(theta, m) # predictive distribution
}

Data:
list(r = 2, n = 5, m = 10, a = c(3,3), b = c(27,3))

   node   mean   sd   MC error   2.5%   median   97.5%   start   sample
   q.post[1]   0.2416   0.4281   0.004438   0.0   0.0   1.0   1001   50000
   q.post[2]   0.7584   0.4281   0.004438   0.0   1.0   1.0   1001   50000
   r.pred   3.789   2.328   0.0177   0.0   4.0   8.0   1001   50000
   theta   0.3786   0.1843   0.00164   0.07455   0.3872   0.721   1001   50000

[example-8_10_2-mixture-of-priors0][example-8_10_2-mixture-of-priors1][example-8_10_2-mixture-of-priors2][example-8_10_2-mixture-of-priors3]