resize script para galleria

Quiero cambiar el tamaño de todo el galleria div y cambiar el tamaño de todas las imágenes generadas dinámicamente utilizando el script de la galería.

hasta ahora tengo

    $(window).resize(function() {
    var h = $(window).height();
    var galleriaHeight = h-54;
    var w = $(".content").width();
    var galleriaWidth = w-18;

    $("#galleria").height(galleriaHeight);
    $("#galleria").width(w);


    $(".galleria-stage").height(galleriaHeight);
    $(".galleria-stage").width(galleriaWidth);

    $(".galleria-images .galleria-image img").css({"max-height":"auto"});
    $(".galleria-images .galleria-image img").css({"max-width":galleriaWidth-36});

    $(".galleria-stage").height(galleriaHeight);
    $(".galleria-stage").width(galleriaWidth);

    $(".galleria-container").width(w);
    $(".galleria-container").height(galleriaHeight);

    $(".caption").width(w);
    $(".counter-nav").width(w);

    var sidebarHeight =h-54;
    var contentHeight =h-36;

    $(".sidebar1").height(sidebarHeight);
    $(".content").height(contentHeight);




});

Pero todo está escalando de manera desigual y muy desordenado. Después de mirar el código de pantalla completa, también agregué

this.bind(Galleria.RESCALE, function() {
 POS = this.getStageHeight() - tab.height() - 2;
 thumbs.css('top', OPEN ? POS - list.outerHeight() + 2 : POS);
 var img = this.getActiveImage();
 if (img) 
     {
     fixCaption(img);
     }
});

pero eso tampoco funciona ...

Supongo que quiero volver a cargar la página después de cambiar el tamaño, pero sobre la marcha ... o cambiar el tamaño de todos los elementos entre sí, o usar el script de cambio de tamaño de Galleria ...

¿Algunas ideas

Respuestas a la pregunta(1)

Su respuesta a la pregunta