jQuery(document).ready(function($) {

	$('#ts-upload-button').click(function() {
 		formfield = $('#ts-logo').attr('name');
 		tb_show('', 'media-upload.php?type=image&amp;TB_iframe=true');
 		return false;
	});

	window.send_to_editor = function(html) {
 		imgurl = $('img',html).attr('src');
 		$('#ts-logo').val(imgurl);
 		$('#ts-logo-img').attr('src',imgurl);
 		tb_remove();
	}

});