var smoothfx;

window.addEvent('domready', function() {

    window.addEvent('resize',function(){
        topRight();
    });
    window.addEvent('scroll',function(){
         topRight();
    });
    
    
    smoothfx = new Fx.Tween($('follow'));
    
    topRight();

    function topRight(){                
        var newpos = $('follow').position({
            relativeTo: $('bg'),
            position: 'upperRight',
            offset: {x:-32,y:0},
            returnPos: true
        });
        
        smoothfx.cancel();
        smoothfx.start('top',newpos.top);
    }

});

