function tinyurl(uri){
	encodeURIComponent(uri);
	$.getJSON("http://json-tinyurl.appspot.com/?callback=?&url=" + uri, function(data) {
		$("#tinydiv").fadeIn("slow");
		$("#tinyurlt").val(data.tinyurl);
		$("#tiny0rzt").val(data.tinyurl.substr(19)).focus().select();
		
		clip = new ZeroClipboard.Client();

		$('#tiny0rzt, #tinyurlt').mouseover( function() {
			// set the clip text to our innerHTML
			clip.setText( this.value );
			
			// reposition the movie over our element
			// or create it if this is the first time
			if (clip.div) {
				clip.receiveEvent('mouseout', null);
				clip.reposition(this);
			}
			else clip.glue(this);
			
			// gotta force these events due to the Flash movie
			// moving all around.  This insures the CSS effects
			// are properly updated.
			clip.receiveEvent('mouseover', null);
		} );
		
        clip.addEventListener( 'complete', function(client, text) {
	        $('#tinycopy').slideUp("fast",function(){$('#tinycopy').text("已複製").slideDown()});
		});
	});
}
