using sortable, dragable, resizable in multy levels

using sortable, dragable, resizable in multy levels

hi,
[my first post btw..:) ]
My html looks like this

<div id="mainContainer" >
      <div class="tab">tabl 1</div>
      <div class="tab">tabl 2</div>
      <div class="tab">tabl 3</div>
</div><!--#mainContainer-->

my js code is like this
  1. $('#mainContainer').sortable().draggable().resizable();
  2. $('.tab').draggable().resizable();

What i actualy want to do?
1. all divs should be draggable and resizable
2. divs with class .tab should be sortable aslo
Seems like straight forward thing but i just cant manage to make everithing work together
if i make mainContainer sortable i cannot resize it and vice versa....

Help please!?