jQuery-UI upgrade introduced error in code that worked previously
===

I have a simple jQuery routine for drag/drop, I recently upgraded from 1.7.2 to 1.8.21 and now when I drop the items, I get the error message 'Uncaught TypeError: Cannot call method 'search' of undefined'

Couldn't find anything through search, so I'm hoping someone has seen this one before.

Here's the code:

    $("#frame").droppable({
        drop: function(ev, ui) {
            if (ui.helper.attr('id').search(/drag[0-9]/) != -1){
                counter++;
                var element=$(ui.draggable).clone();
                element.addClass("tempclass");
                $(this).append(element);
                $(".tempclass").attr("id","sig_"+counter);
                //$(this).css('z-index', 100+counter);
                $("#sig_"+counter).removeClass("tempclass");
                var x = event.pageX - $(this).offset().left + 4;
                var y = event.pageY - $(this).offset().top + 4;
                $(this).find("input").val(x+","+y);
                $("div#stop").text("STOP: \nLeft: "+ x + "\nTop: " + y);
                //Get the dynamically item id
                draggedNumber = ui.helper.attr('id').search(/drag([0-9])/)
                itemDragged = "dragged" + RegExp.$1
                //console.log(itemDragged)

                $("#sig_"+counter).addClass(itemDragged);
            }
        }
    });

jQuery Version: 1.7.2
jQuery-UI Version: 1.8.21
Browser: Chrome 20.0.1132
