jQuery(document).ready(function() {
	var et_tb_interval;
	jQuery('#upload_image_button').click(function() {
		formfield = jQuery('#upload_image').attr('name');
		et_tb_interval = setInterval(function() { 
			jQuery('#TB_iframeContent').contents().find('.savesend input.button').val('Utiliser cette image comme vignette du document');
		}, 1000);
		tb_show('', 'media-upload.php?type=image&amp;TB_iframe=true');
		return false;
	});

	window.send_to_editor = function(html) {
		clearInterval(et_tb_interval);
		reg = /href="(.[^"]*)/i;
		reg.exec(html);
		url = RegExp.$1;
		jQuery('#upload_image').val(url);
		tb_remove();
	}
});