Added type checking to d3.select

If argument passed to d3.select is already selected, it returns
the argument.
Converted d3 from an object into a function;

Now, you can select with d3(selector).
Added usual selection prototype mod to d3