There is the possibility that you need to exchange the headphone jack. Not a terribly difficult or expensive repair. Of course, first try to insert and reinsert your headphones a couple of times in a row, potentially loosening a stuck contact. should that not work, try to replace the jack. http://www.ifixit.com/iPod-Parts/iPod-Vi... is the part and the guide is here iPod 5th Generation (Video) Headphone Jack & Hold Switch Replacement you can also try a restore with itunes, just make sure that all your data is backed up before you restore.
There is also another possibility, not as nice as the first one. In the case of your iPod I am leaning more toward this problem. This particular model has a problem with an IC on the logic board. You can try and see if you get sounds by applying some pressure to the right lower side of the ipod, almost between the click wheel and the bottom corner. If you should get sound by doing so, then you only have very few options. One is a new logic board for about $40 on eBay; the other one is to reflow your old logic board. Or you can try what warnergt did on http://forums.macnn.com/103/ipod-iphone-... By now I can verify that this works since I performed a reflow on three of the boards and it solved the problem. The logic board is of course available at ifixit as well. Good Luck to you and your iPod and rock on....;-)