﻿// jquery plugin to make urls into links
(function($) {
    // initiate the jQuery Plugin  
    $.fn.activateUrls = function() {
        var regexp = /(^|[^'"])((ftp|http|https):\/\/(\w+:{0,1}\w*@)?[\w.]+(:[0-9]+)?(\/[\w#!:.?+=&%@!\-\/]*)?)([^'"]|$)/gi;
        this.each(function() {
            $(this).html($(this).html().replace(regexp, '$1<a href="$2">$2</a>$7'))
        });
        return $(this);
    }
    // make the $ reference to the jQuery object  
})(jQuery);