Event.observe(window, 'load', function(){

    var positionX = 600,
        positionY = 200,
        resizeWidth, resizeHeight;

    /* set position of poup */
    if($$('.catalog-product-view .more-views a').length > 0) {
        $$('.catalog-product-view .more-views a').each(function(i){
            var str = i.readAttribute('onclick').replace(/left=0,top=0/, 'left=' + positionX + ',top=' + positionY );
            i.setAttribute('onclick', str);
        });
    }
    
    if($$('.catalog-product-gallery').length > 0) {
        resizeWidth = $('product-gallery-image').getWidth() + 90; /* +90 From gallery defaults */
        resizeHeight = $('product-gallery-image').getHeight() + 210; /* +210 From gallery defaults */
        $$('.catalog-product-gallery')[0].setStyle({minWidth: 0});
        window.resizeTo(resizeWidth, resizeHeight);
    }
});
