Don't understand how to call a function on HTML that uses this "(function($) {" on JS

Don't understand how to call a function on HTML that uses this "(function($) {" on JS

Hi, 

I am using a sample from https://github.com/cowboy/jquery-tiny-pubsub, however, because my little knowledge of JQuery syntax, I am unable to call the  subscribe1, for instance, so that to test this implementation. 

Would anyone be able to help?

Thank you.


---------------------------------------------

<html>
<body onLoad='log("Testing123");'>
<a href=" https://gist.github.com/661855" target="_top">jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.</a>


<a href=" https://gist.github.com/661855" target="_top">Teste</a>
</body>


<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
  /*

        jQuery pub/sub plugin by Peter Higgins ( dante@dojotoolkit.org)

        Loosely based on Dojo publish/subscribe API, limited in scope. Rewritten blindly.

        Original is (c) Dojo Foundation 2004-2010. Released under either AFL or new BSD, see:
        http://dojofoundation.org/license for more information.

  */
  (function($) {
   var topics = {};

   $.publish1 = function(topic, args) {
    if (topics[topic]) {
     var currentTopic = topics[topic];

     for (var i = 0, j = currentTopic.length; i < j; i++) {
      currentTopic[i].apply($, args || []);
     }
    }
   };

   $.subscribe1 = function(topic, callback) {
    if (!topics[topic]) {
     topics[topic] = [];
    }

    topics[topic].push(callback);

    return {
     "topic": topic,
     "callback": callback
    };
   };

   $.unsubscribe1 = function(handle) {
    var topic = handle.topic;

    if (topics[topic]) {
     var currentTopic = topics[topic];

     for (var i = 0, j = currentTopic.length; i < j; i++) {
      if (currentTopic[i] === handle.callback) {
       currentTopic.splice(i, 1);
      }
     }
    }
   };

  })(jQuery);

  /*!
   * jQuery Tiny Pub/Sub - v0.3pre - 11/4/2010
   *
   * Copyright (c) 2010 "Cowboy" Ben Alman
   * Dual licensed under the MIT and GPL licenses.
   */
  /*!
   * jQuery Tiny Pub/Sub - v0.X - 11/18/2010
   *
   * Original Copyright (c) 2010 "Cowboy" Ben Alman
   * Dual licensed under the MIT and GPL licenses.
   *
   * Made awesome by Rick Waldron
   *
   */
  (function(jQuery) {
   var o = jQuery({});
   jQuery.each({
    "subscribe2": "bind",
    "unsubscribe2": "unbind",
    "publish2": "trigger"
   }, function(fn, api) {
    jQuery[fn] = function() {
     o[api].apply(o, arguments);
    };
   });
  })(jQuery);
</script>
</html>