Well, if you've got the right version of the GD library you can work with both Gifs and Jpegs... but, they discontinued support for Gif because of licensing issues somewhere between 1.6.x and 1.8.x. I think if you have 1.6.x you can work with both Gif and Jpegs... but don't quote me on that. If you do have the magic version, check out the image functions on php.net.
Why would you want to convert Gifs to Jpegs anyway? You're going to end up with larger file sizes, and because they're already gifs, the file quality is going to stay the same... might even get worse. Just curious.