    var _top = 0;
window.addEvent('domready',function(){
    if(($('black-box')) && ($$('.ff_rating_box')) && ($('ff-popup'))){

        $$('.ff_r_item').addEvent('click',function(){
            /*$('black-box').setStyle('display','block');
            $('ff-popup').setStyle('display','block');
            _top = (window.getCoordinates().height - $('ff-popup').getCoordinates().height) /2;
            (_top > 0) ? $('ff-popup').setStyle('top', _top) : $('ff-popup').setStyle('top',0);*/
            $('ff-popup-data').innerHTML = $('content-'+this.id).innerHTML;
            Modal.show('ff-popup');
        });

        if($('ff-close-button')){
            $('ff-close-button').addEvent('click',function(){
                /*$('black-box').setStyle('display','none');
                $('ff-popup').setStyle('display','none');*/
                Modal.hide();
            });
        }

       /* window.addEvent('resize',function(){
            _top = (window.getCoordinates().height - $('ff-popup').getCoordinates().height) /2;
            (_top > 0) ? $('ff-popup').setStyle('top', _top) : $('ff-popup').setStyle('top',0);
        })*/
    }
});
