/*** link find and replace ***/
/* http://kawika.org/jquery/index.php */

jQuery.fn.autolink = function () {
	return this.each( function(){
		var re = /((http|https|ftp):\/\/[\w?=&.\/-;#~%-]+(?![\w\s?&.\/;#~%"=-]*>))/g;
		$(this).html( $(this).html().replace(re, '<a href="$1">$1</a> ') );
	});
};

$(document).ready(function(){
	$("#microblog").autolink();
	$(".resourcemicro").autolink();
	$(".microbloglisting").autolink();
	$("#convert-urls").autolink(); //special case for when user views individual microblog
});