$(document).ready(function(){

    //isClosed = false;

    function showItem(el){

        
        elParent = $(el).parent(0);

        if (elParent.hasClass('isClosed') || $(el).hasClass('open')){
            return;
        }
        elParent.addClass('isClosed');

        elParent.children('.item').animate({
            width: 113
        }, 300, 'linear',  function() {
            $(this).removeClass('open');
        });


        $(el).animate({
            width: 258
        }, 500, 'linear', function(el, elParent) {
            $(this).addClass('open');
            $(this).parent(0).removeClass('isClosed');
        });
    }


    $('.promo-slider .item').hover(function(){
        showItem(this);

    }, function(){});

    //$('.promo-slider').hover(function(){}, function(){$(this).removeClass('isClosed')});

});
