
/**
 * resizeFix
 *
 * resizes wrapper containers width
 */

Event.observe(window, 'load', function(){
    resizeFix();
    Event.observe(window, 'resize', resizeFix);
});

function resizeFix(){
    var elem = $('wrapper');
    if(elem) {
        var width = document.viewport.getDimensions().width;
        if ( width<970 )
            width=970;
        if ( width%2 == 1)
            width-=1;
        elem.setStyle({width: (width)+'px'});
    }
}

function equalheightFix(){
    
    
}

var cartmini = $('cart-mini');

function forgotPassword(){
    
    
    
}
/**
 * preSelect
 *
 * onmouseover function for product listing
 * changes product-image and updates product-url
 */

function preSelect(elem, id, productUrl, imageUrl){
    
    elem.up(1).childElements().each(function(e){
        e.removeClassName('hover');
    })
    elem.up(0).addClassName('hover');
    $('image-'+id).src=imageUrl;
    $('image-'+id).up(0).href=productUrl;
    $('image-'+id).up(0).next().down(0).href=productUrl;
}
