﻿    var categoryId;

    $(document).ready(function() {
        $("a.toggle").click(function() {

            var next_items_container = $(this).parent().next('li.items_container:visible');
            if (next_items_container.length > 0) {
                next_items_container.hide();

                IE6Fix();

                return false;
            }


            var info = $(this).attr('id');
            var infoArr = info.split('_');
            categoryId = infoArr[1];
            var personsHtml = list.GetPersonsHtml(categoryId).value;
            if (!personsHtml) {
                return false;
            }
            var personsElement = $(personsHtml).hide();
            $(this).parent().after(personsElement);
            
            $('li.items_container:visible').hide();
            personsElement.show();
            IE6Fix();

            return false;
        });

    });

    function IE6Fix() {
        document.getElementById("footer_block").style.bottom = "1px";
        document.getElementById("footer_block").style.bottom = "0px";
    }
