$(document).ready(function () {
    //$(window).resize(wincenter);
    $(".delete_action").click(function(e){if(!confirm("¿Realmente quiere borrar este elemento?\n\n")) return false;});
    $.ui.dialog.defaults.bgiframe = true;
    $(function() {
        $('#wrap').position();
       
        $(".message").dialog({
            position: [500,300]
        });
        
        $('#rollo_anuncio a img').hover(function(){
            $(this).attr('src','themes/retriex/anuncio2.png');
        }, function(){
            $(this).attr('src','themes/retriex/anuncio.png');
        });
        $('#rollo_infraestructura a img').hover(function(){
            $(this).attr('src','themes/retriex/infraestructura2.png');
        }, function(){
            $(this).attr('src','themes/retriex/infraestructura.png');
        });
        $('#rollo_foro a img').hover(function(){
            $(this).attr('src','themes/retriex/foros2.png');
        }, function(){
            $(this).attr('src','themes/retriex/foros.png');
        });
         $('#rollo_centro a img').hover(function(){
            $(this).attr('src','themes/retriex/centro2.png');
        }, function(){
            $(this).attr('src','themes/retriex/centro.png');

        });
         $('#rollo_nacional a img').hover(function(){
            $(this).attr('src','themes/retriex/nacional2.png');
        }, function(){
            $(this).attr('src','themes/retriex/nacional.png');

        });
         $('#rollo_regional a img').hover(function(){
            $(this).attr('src','themes/retriex/regional2.png');
        }, function(){
            $(this).attr('src','themes/retriex/regional.png');

        });
         $('#rollo_personal a img').hover(function(){
            $(this).attr('src','themes/retriex/personal2.png');
        }, function(){
            $(this).attr('src','themes/retriex/personal.png');

        });
         $('#rollo_europea a img').hover(function(){
            $(this).attr('src','themes/retriex/europea2.png');
        }, function(){
            $(this).attr('src','themes/retriex/europea.png');

        });
        $('#rollo_descarga a img').hover(function(){
            $(this).attr('src','themes/retriex/descarga2.png');
        }, function(){
            $(this).attr('src','themes/retriex/descarga.png');

        });


         $('#rollo_mercado a img').hover(function(){
            $(this).attr('src','themes/retriex/logo_mercado_brillo.png');
        }, function(){
            $(this).attr('src','themes/retriex/logo_mercado.png');

        });
        $('#rollo_formacion a img').hover(function(){
            $(this).attr('src','themes/retriex/logo_formacion_brillo.png');
        }, function(){
            $(this).attr('src','themes/retriex/logo_formacion.png');

        });
        $('#rollo_unidades a img').hover(function(){
            $(this).attr('src','themes/retriex/logo_unidades_brillo.png');
        }, function(){
            $(this).attr('src','themes/retriex/logo_unidades.png');

        });
    });

});


function wincenter()
{
    aux=parseInt((($(document.documentElement).attr('clientHeight'))-($("#wrap").height()))/2);
    if (aux<0) aux=0;
    $("#wrap").css('top', aux+'px');
}
