$(document).ready(function () {
    var artformDesc = {
        combinedarts: 'Combined arts include multidisciplinary arts, festivals, carnival, arts centres, rural touring, producers, participatory and celebratory work.',
        dance: 'Dance includes choreographer development, performance, touring, community and youth participation across a wide range of styles including ballet, contemporary, jazz, South Asian, folk and street dance.',
        literature: 'We support quality writing in diverse genres and media, from poetry, life writing and fiction to spoken word and digital narratives.',
        music: 'Music encompasses creation, performance and participation across a hugely diverse range of genres from jazz, folk and orchestral to urban, electronic, world, opera and music theatre.',
        theatre: 'Theatre varies from classical plays and new texts to experimental work, live art and dramatic work with no text at all. Street arts and circus are also included in our theatre portfolio.',
        visualarts: 'The visual arts include architecture, artist development, artists’ moving image, crafts, learning and education, live art, new media, photography and public art.'
    };

    var artformPopup = '<div class="artform_desc">\n<div class="artform_popup"></div>\n<p></p>\n</div>';
    $('#filters').append(artformPopup);

    $('.artform_list li a').hover(function () {
        var artformCode = $(this).attr('class');
        $('.artform_desc p').text(artformDesc[artformCode]);
        var linkPos = $(this).position();
        var popupHeight = $('.artform_desc').outerHeight();
        $('.artform_desc').css({
            'left':linkPos.left + 20,
            'top':linkPos.top - ((popupHeight / 2) - 10)
        });
        $('.artform_desc').show();
    }, function () {
        $('.artform_desc').hide();
    });

});

