function wave() {
    var b = $("#site .product a");
    cards = [];
    b.each(function() {
        cards.push(new Card($(this)))
    });
    b = function() {
        for (var a = 0; a < cards.length; a++)cards[a].trig(a)
    };
    $("h2 a").hover(b);
    b()
}
function Card(b) {
    var a = b.find("img"),c = false;
    a.hover(function() {
        if (!c) {
            c = true;
            a.animate({top:-10}, 200)
        }
    }, function() {
        a.animate({top:0}, 200, function() {
            c = false
        })
    });
    var e = function(d) {
        setTimeout(function() {
            if (!c) {
                c = true;
                a.animate({top:-10}, 200, function() {
                    a.animate({top:0}, 200, function() {
                        c = false
                    })
                })
            }
        }, d * 100)
    };
    return{trig:function(d) {
        e(d)
    }}
}
$(function() {
    wave()
});

