var animated = new Array();
var animTO = new Array();

$().ready(
    function ()
    {
        $('.left-column').append('<a href="/grownup/budget_optics.html" style="display: block; margin: 30px 0 20px -6px;"><img src="/contents/templates/default/img/left-banner.png" style="border: 0;" alt="" /></a>');
//        $('#cat-item1-16').height($('#cat-item1-16 a img').height()-(-90));
        $('.right-column').append('<a href="/Contact-lenses/free-consult.html" style="display: block; margin: 35px 0 0 -5px;"><img src="/contents/templates/default/img/osmotr.png" border="0" alt="" /></a>');
//        $('.right-column').append('<img src="/contents/templates/default/img/right-banner.png" style="margin: 20px 0 0 -5px; border: 0;" alt="" />');
        $('.left-column').append('<a href="/Lenses/Drive-Wear.html" style="display: block; margin: 0 0 0 -6px;"><img src="/contents/templates/default/img/driver-banner.png" border="0" alt="" /></a>');
        $('.for-kids .phone').append('<br /><span>(499)</span> 783 52 23');
        $('.top-phones').css({'margin-top': '-45px', 'margin-bottom': '45px'});
        $('.item-regular').mouseover(
            function ()
            {
/*                for (var i = 0; document.getElementById('cat-item-'+i) != null; i++)
                {
                    if (this.id != 'cat-item-'+i)
                    {
                        if (!$('#cat-item-'+i).hasClass('item-current'))
                            $('#cat-item-'+i+' .submenu').animate(
                                {height: 'hide'},
                                {duration: 'fast'}
                            );
                    }
                    else*/
                    clearTimeout(animTO[this.id]);
                        $('#'+this.id+' .submenu').animate(
                            {height: 'show'},
                            {duration: 'fast'}
                        );
//                }
            }
        )
        $('.item-regular').mouseout(
            function ()
            {
/*                for (var i = 0; document.getElementById('cat-item-'+i) != null; i++)
                {
                    if (this.id != 'cat-item-'+i)
                    {
                        if (!$('#cat-item-'+i).hasClass('item-current'))
                            $('#cat-item-'+i+' .submenu').animate(
                                {height: 'hide'},
                                {duration: 'fast'}
                            );
                    }
                    else*/
                    var thisid = this.id;
                    animTO[this.id] = setTimeout(
                        function ()
                        { 
                        $('#'+thisid+' .submenu').animate(
                            {height: 'hide'},
                            {duration: 'fast'}
                        );
                        clearTimeout(animTO[thisid]);
                        },
                        100
                    );
//                }
            }
        )
    }
)
