The variable $wrapper_id is actually a class ID

php

function _popups_reference_links($field, $src_type, $wrapper_id, $widget_type) {

iJS :
var $wrapper = $(popup.targetLayerSelector() + ' div.' + rel);

I gave it an ID instead of a class and it didn't work, heh.