Ok, for that sound chipset, the jacks can be used for more than one thing, by default the jacks are line out, line in, and mic.
The jack colors should be (in order from top) blue, green, rose.
For surround, use the jacks like this:
line out - green jack - front left and right
line in - blue jack - rear left and right
mic - rose jack - center/subwoofer
As for the line colors from the speakers, just look at where you plug the in, the jacks on the speaker end should be labelled and match with the correct jack as above.
Also, make sure you are using the correct driver for the Realtek chipset. You can download it from here:
http://downloadcenter.intel.com/SearchResult.aspx?lang=eng&keyword=%22Intel+Desktop+Board+D101GGC%22Just choose your OS and download.
This should include the Realtek HD Audio Manager, which will either automatically determine what's plugged in to each jack, or allow you to specify.