djshad0w has it basically right. Inboard for upwind, outboard for downwind - you want the slot between the main and jib to be as even as possible (same width, top to bottom, or at least constantly increasing width). In heavy air upwind, you want to travel out to relieve some of the back pressure on the main, which will help keep the mast from counter-rotating - a very bad thing if it happens when everything is loaded up.
The clew/sheet attachment position affects the twist of the jib going upwind. Bottom hole = flatter jib, more twist. Top hole = fuller jib, less twist. The best way to determine if it's set right is to have three tell-tales about 1/3 back in the jib in the middle three panels, like this:
Sheet the jib in all the way and slowly head up and watch to see which windward tell-tale starts flipping up ("breaks") first. If the top one breaks first, then the sheet is attached too low. If the bottom one breaks first, then the sheet is attached too high. If they all break at roughly the same time, then it's just right.