Go to Perko.com and download the battery diagram for your set up.
When I installed a 2nd battery, I also installed a "bus bar" which is my common ground. All of my negative wires (from both batteries, electronics, engines, ignition) are screwed into this. (A bus bar has 4 screw terminals, so you can attach everything).
Then hook the positives from each battery to the corresponding switch terminals (#1 & #2) and run your ignition cable, engine +, and any electronics positives to the "All" switch terminal. Remember that your stereo, bilge pump, and possibly GPS need to be direct wired to a battery + terminal and not to the switch (b/c they need juice even if the switch is turned off).