I'm installing a light fixture slider switch in my closet and don't know much about electricity. I'm kind of confused about the wires. Pictures:

On the previous switch, the red wire was connected on the left, hte blue on the right. Also on the old switch, the wires from the wall hooked onto two screws on the side of the switch, whereas on the new one there are three wires (bare at the ends) that come out of the switch (as shown in the diagram).
So, what the hell exactly do I need to do?


On the previous switch, the red wire was connected on the left, hte blue on the right. Also on the old switch, the wires from the wall hooked onto two screws on the side of the switch, whereas on the new one there are three wires (bare at the ends) that come out of the switch (as shown in the diagram).
So, what the hell exactly do I need to do?