The most expensive part of this whole project was the standard Dimmer wall switch (push in to turn on and off, rotate to dim or brighten) (the black box on the left) which ran me about $7 at the Home supply store.
There are three wires running out of the back of the dimmer switch unit, two black and one green, the green wire is for grounding, and since the box is wood and since i didn't use a three prong grounded electrical cord i just removed the green wire.
*Okay i've revised this a bit and made a much simpler and effective way to wire up the sockets, i could have sworn i wired it up one way and not another, but i completed this project a few months ago and just did the write up now, so i forgot about that change in plans sorry for the confusion*
... take all the black wires coming out of the sockets and bunch them together, i used wire ties to keep them all together, do the same with the white wires coming from the sockets use a wire nut to connect all the white wires together and have them connect to one of the wires from the power cord...
connect all the black wires from the sockets together as well and wire nut them together with one of the 2 black wires coming from the dimmer switch... then connect the remaining black wire from the dimmer switch to the other wire on the power cord