jQuery(document).ready(function() {
 
jQuery('#upload_image_button').click(function() {
 formfield = jQuery('#plg_header_image').attr('name');
 tb_show('', 'media-upload.php?type=image&amp;TB_iframe=true');
 return false;
});

window.send_to_editor = function(html) {
	headImgUrl = jQuery('img',html).attr('src');
	jQuery('#plg_header_image').val(headImgUrl);
 	tb_remove();
}
 
});