This page explains in detail the interactions between the Mario series and the Viewtiful Joe series.
Viewtiful Joe (GameCube version)
My 10 personal favorite Easter Eggs in video games
A video showing easter eggs from various video games. The Viewtiful Joe one can be seen at 3:20.
June 26, 2003
In the game there's a purchaseable power-up that lets Joe get bombs out of nowhere and juggle them. While doing so he whistles a part of the Super Mario Bros. ground theme, and it's actually a different part of it if it's done either on the ground, in mid-air or while in slow motion.
License
Capcom was licensed by Nintendo to produce a game on the GameCube, so they were able to include a little reference to the Mario series, but had to remove it when releasing the game on PlayStation 2.