tiny2long has a simple api which returns long urls in json format.
Here is a simple example of how to use this to change tiny urls in a page using javascript
Include this piece of javascript in your page and call the elongate function to elongate them
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'></script>
<script>
$(function(){
function elongate(){
var url='http://localhost/vinayraikar/apps/t2l/?api=api'
$.each(document.links,function(i,l){
url+='&url[]='+l;
});
$.ajax({
dataType: 'jsonp',
url: url,
success: function (data) {
$.each(data,function(ti,lo){
$.each(document.links,function(i,j){
if(ti==j && lo!='')
{$(j).html(lo).attr('href',lo);}
});
});
},
});
}
</script>
Well, this is just a sample text to see how you can change short urls to their original long urls.