odd problem - led turns on when hand is near

Ok, so I took the code from the DigitalRead reference entry and tried to use it to turn on an LED using a switch (just wanted to try DigitalRead, I know I don't need to do it to use the switch). I got an LED connected to pin 12 and a switch connected to pin 7. The only time the LED turns on is when the switch is on AND my hand is nearby (not even touching, just nearby, regardless if i'm grounded with the wriststrap or not). The circuit with the switch doesn't even have to be completed; I can have one wire in pin 7 and the other in the air not touching anything; I put my hand nearby and the LED turns on.

Its probably some basic knowledge known to electronics savvy people, but I am clueless as to what is up. Btw, I have tried setting the circuit/s up a ton of different ways (common ground, seperate ciruits, in series with no ground, in series with common ground, pull up resistor, pull down resistor, etc.); they probably weren't all correct but most gave me the same result and the rest gave me none. Below is the code.

int ledPin = 12; // LED connected to digital pin 12
int inPin = 7;   // switch connected to digital pin 7
int val = 0;     // variable to store the read value

void setup()
{
  pinMode(ledPin, OUTPUT);      // sets the digital pin 12 as output
  pinMode(inPin, INPUT);      // sets the digital pin 7 as input
}

void loop()
{
  val = digitalRead(inPin);   // read the input pin
  digitalWrite(ledPin, val);    // sets the LED to the switch's value
}

I'd guess the problem was in your circuit. Check out the photo for the button example: http://arduino.cc/en/Tutorial/Button

The picture did the trick. I have an external LED instead of using the onboard but thats not much of a difference, it works now.

I didn't understand why it works backwards of what I thought it would, but reading the tutorial you linked explained it:
"When the pushbutton is open (unpressed) there is no connection between the two legs of the pushbutton, so the pin is connected to 5 volts (through the pull-up resistor) and we read a HIGH. When the button is closed (pressed), it makes a connection between its two legs, connecting the pin to ground, so that we read a LOW. (The pin is still connected to 5 volts, but the resistor in-between them means that the pin is "closer" to ground.)"

Thanks mellis for taking the time to help a newbie with a simple question/task.