<script>

// Create the first YUI instance
YUI().use("node", function (Y) {
    
    Y.one( "#yui1" ).on( "click", function () {
        Y.log( "Message from YUI instance #1" );
    });

});

// Create the second YUI instance
YUI().use("node", function (Y) {

    Y.one( "#yui2" ).on( "click", function () {
        Y.log( "I'm the second YUI instance" );
    });

});

// Create a third YUI instance
YUI().use("node", function (Y) {

    Y.one( "#yui3" ).on( "click", function () {
        Y.log( "And this is #3 YUI" );
    });

});

// Create a separate YUI instance to listen to all instances' logging
YUI().use("console", function (Y) {

    // Configure the Console's logSource to Y.Global to make it universal
    new Y.Console({
        logSource: Y.Global,
        style: 'inline',
        newestOnTop: false
    }).render( "#yconsole" );

});

</script>
