Change URL on ajax link
Found the best way of doing this was using ajax_command_invoke() instead.

By using this you can make a call to a custom jQuery function, in which you can then do what you want.

    ...
    // Prepare an ajax command to insert the node html into our ajax wrapper.
    $commands = array();
    $commands[] = ajax_command_html('#deck .deck-creator', $thumbnails);
    $commands[] = ajax_command_invoke(NULL, array('customAction'));


in a jQuery file

(function($) {
    $.fn.customAction = function() {
        // do my code
    }
})(jQuery);