(function($) {
  
  $.fn.randomizeLink = function (options) {
    
    return this.each(function() {
      $this = $(this);
      var randNum = Math.floor(Math.random() * options.length)
      if (options[0] instanceof Object) {
        $this.attr('href',options[randNum].url).text(options[randNum].text);
      }else {
        $this.attr('href',options[randNum]);
      }
    });
    
  }
  
})(jQuery);
