My question involves a relationship in the state of: Massachusetts

If an umarried couple owns a dog, but then the couple breaks up, what happens in regards to the dog? Does one person have to compensate the other for their half of the purchase of the dog? Are there any rights to "joint custody" as there would be if a child were involved? Does any formal legal action need to be taken?

Also, if both of the people involved wish to take the dog, how would the case proceed in the courts, and in what court?