You can find the '.panel-tool' to get the tools container. Append your icons to it. Please try this code:
var tool = $('#w').window('header').find('.panel-tool');
var a = $('<a href="javascript:void(0)" class="panel-tool-a"></a>').prependTo(tool);
var img = $('<img></img>').appendTo(a);
img.attr('src', '../../themes/icons/help.png');