$(document).ready(function(){
    $('map>area').each(function(){
        var customStyle = {
            name: 'cream',
            border: {width: 1, radius: 3},
            width: {min:50, max:380},
            tip: true
        };
        var area = $(this);
        var cont = typeof(area.attr('alt')) != 'undefined' ? area.attr('alt') : '';
        if (typeof(area.attr('href')) != 'undefined') {
            cont += '\n<a href="'+area.attr('href')+'</a>';
        }
        if (typeof(area.attr('id')) != 'undefined') {
            cont += '<br/><br/>'; //'<img src="/dyn_images/img'+$(this).attr('image')+'.jpg" alt="" />';
            $.get('/includes/images/'+area.attr('id')+'.shtml', function(data){
                area.qtip({
                    content: cont + data,
                    style: customStyle
                });
            });
        } else {
            area.qtip({
                content: cont,
                style: customStyle
            });
        }
    });
});
