$(function() {
    var id = 0;

    $('object[classid=clsid\\:d27cdb6e\\-ae6d\\-11cf\\-96b8\\-444553540000]').each(function(){
        var width = this.width, height = this.height;
        var movie = $('param[name=movie]', this).attr('value');
        $('param[name=movie]', this).remove();
        var params = {bgColor: '#FFFFFF'};
        $('param', this).each(function(){
            params[$(this).attr('name')] = $(this).attr('value');
        });

        id++;
        $(this).before('<div id="home_flash_'+id+'" />').end();
        swfobject.embedSWF(movie, 'home_flash_'+id, width, height, '9', false, false, params);
    }).remove();
});

function show_message(msg, error) {
    var html;

    if (error)
        html = '<div class="ui-widget"><div class="ui-state-error ui-corner-all" style="padding: 0 .7em;">'+
               '<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>' +
               msg+'</p></div></div>';
    else
        html = '<div class="ui-widget"><div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;">'+
               '<p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>' +
               msg+'</p></div></div>';

    $('<div />').attr('title', error? 'Error': 'Información').html(html).dialog({
        modal: true
    });
}




