jQuery(function ($) {
    var x, y;

    $('map#Map area')
        .mouseover(function (ev) {
            $('.event-holder')
                .hide();

            $('#events-' + this.id)
                .css({
                    top: ev.pageY + 'px',
                    left: ev.pageX + 'px'
                })
                .mouseover(function () {
                    $(this).show();
                })
                .mouseout(function () {
                    $(this).hide();
                })
                .show();
        })
        .mouseout(function () {
            $('.event-holder')
                .hide();
        })

        /*.click(function (ev) {
            x = ev.pageX - $('#Karte').position().left;
            y = ev.pageY - $('#Karte').position().top - 7;

            $('#cords').append(document.createTextNode("'" + this.id + "' => array(" + x + "," + y + "),\n"));
            $('#Karte').append('<div class="flag" style="top: ' + y + 'px; left: ' + x + 'px;"></div>');
            return false;
        })*/;
});

