Increment class name

Increment class name

Hello. I have 30 divs: toggle_container01, toggle_container02, toggle_container03 and so.
The main idea is this: when i'm pressing the title (.pull01) the content is sliding up (.toggle_container01). When the content is hidden and i'm pressing the title again, the content is sliding down. This is the same story for all the 30 divs. Also, the div state will be stored inside a cookie (that's implemented already). I tried to add a for and counting the variable from 0 to 30 and increment another variable but it didn't work. Also, i tried to use selectors, but no chance. I need to find some way to increment the div's name, in order to use the same code for all 30 divs. This is the original code:
  1.  var showTop = $.cookie('showTop');
    if ($.cookie('showTop') == 'collapsed') {
    $(".toggle_container").hide();
    }else {
    $(".toggle_container").show();
    };
    $("a.pull").click(function () {
    if ($(".toggle_container").is(":hidden")) {
    $(".toggle_container").slideDown("slow");
    $.cookie('showTop', 'expanded');
    } else {
    $(".toggle_container").slideUp("slow");
    $.cookie('showTop', 'collapsed');
    }
    return false;

    });