Legha 0 Newbie Poster

My video card recently went bad and became unusable, also my motherboard was somewhat out of date. I bought a new motherboard, processor, and had to replace the harddrive because it wouldn't format and I couldn't access it. I just got my new harddrive in and went to install it(note: I only vaguely know how to install these things myself). Excuse my newbie language, but I don't know the correct terms for most things. I plugged in the harddrive to one master port and the CD drive to another(this seems to be where my problem is somehow). I've tried using both as separate masters, using hd as master and cdrom as slave, cdrom as master and hd as slave, switching between the two ports on the motherboard(not the 3 1/2 floppy one) and depending on which setup I have either the keyboard gets power, the mouse gets power, or neither get it. I currently have no idea how to fix this or what may even be the problem. Sometimes the light on the mouse comes on and stays when it gets power, but when it doesnt it flickers then goes out. The keyboard LED lights flash when it has power(at least it seems like it does) and sometimes dont come on at all. I'm thinking its just the way I have the cords plugged in, but I can't manage to get it right. Maybe its something else?