Design, synthesis, and biological evaluation of new 1,8-naphthyridin-4(1H)-on-3-carboxamide and quinolin-4(1H)-on-3-carboxamide derivatives as CB2 selective agonists.