The very first line
var tabContainers = $('div.tabcontrol > div');
is looking for a <div> with the class name of "tabcontrol" and then looking for the <div> inside of that.
That is, it will find the <div>'s in red, below.
The "tab1 and "tab2" code you show does not follow that pattern.