jQuery(function($) {
    var DURATION = 300;

    var detail = $('#art-detail');
    detail.css('opacity', '0');
    detail.show();

    var images = $('.artwork-image');

    images.live('mouseenter', function() {
        detail.css('top', $(this).position().top);
        detail.html($(this).siblings('div.artwork-text').html());

        $(this).animate({ opacity: .4 }, {
            duration: DURATION,
            queue: false
        });
        detail.animate({ opacity: 1 }, {
            duration: DURATION,
            queue: false
        });
    });

    images.live('mouseleave', function() {
        $(this).animate({ opacity: 1 }, {
            duration: DURATION,
            queue: false
        });
        detail.animate({ opacity: 0 }, {
            duration: DURATION,
            queue: false
        });
    });

});

