Automatically set the tab to selected 

Resolve #17 from gist https://gist.github.com/derekbrameyer/5801412