js/components/showcase.js
function(nodes, options) {
        var element;

        options = this.setOptions(options);
        this.element = element = this.createElement();

        // Nodes found in the page on initialization
        this.nodes = $(nodes);

        // The wrapping items element
        this.items = element.find(this.ns('items'));

        // The wrapping tabs element
        this.tabs = element.find(this.ns('tabs'));

        // The caption element
        this.caption = element.find(this.ns('caption'));

        // Blackout element if enabled
        if (options.blackout) {
            this.blackout = Blackout.instance();
        }

        // Initialize events
        this.addEvents([
            ['keydown', 'window', 'onKeydown'],
            ['click', 'document', 'onShow', '{selector}'],
            ['click', 'element', 'hide', this.ns('close')],
            ['click', 'element', 'next', this.ns('next')],
            ['click', 'element', 'prev', this.ns('prev')],
            ['click', 'element', 'onJump', this.ns('tabs') + ' a']
        ]);

        if (options.clickout) {
            this.addEvents([
                ['clickout', 'document', 'onHide', '{selector}'],
                ['clickout', 'element', 'onHide']
            ]);
        }

        if (options.swipe) {
            this.addEvents([
                ['swipeleft', 'element', 'next'],
                ['swiperight', 'element', 'prev']
            ]);
        }

        // Stop `transitionend` events from bubbling up when the showcase is resized
        this.addEvent(Toolkit.transitionEnd, 'element', function(e) {
            e.stopPropagation();
        }, this.ns('items'));

        this.initialize();
    }
function(nodes, options) {
        var element;

        options = this.setOptions(options);
        this.element = element = this.createElement();

        // Nodes found in the page on initialization
        this.nodes = $(nodes);

        // The wrapping items element
        this.items = element.find(this.ns('items'));

        // The wrapping tabs element
        this.tabs = element.find(this.ns('tabs'));

        // The caption element
        this.caption = element.find(this.ns('caption'));

        // Blackout element if enabled
        if (options.blackout) {
            this.blackout = Blackout.instance();
        }

        // Initialize events
        this.addEvents([
            ['keydown', 'window', 'onKeydown'],
            ['click', 'document', 'onShow', '{selector}'],
            ['click', 'element', 'hide', this.ns('close')],
            ['click', 'element', 'next', this.ns('next')],
            ['click', 'element', 'prev', this.ns('prev')],
            ['click', 'element', 'onJump', this.ns('tabs') + ' a']
        ]);

        if (options.clickout) {
            this.addEvents([
                ['clickout', 'document', 'onHide', '{selector}'],
                ['clickout', 'element', 'onHide']
            ]);
        }

        if (options.swipe) {
            this.addEvents([
                ['swipeleft', 'element', 'next'],
                ['swiperight', 'element', 'prev']
            ]);
        }

        // Stop `transitionend` events from bubbling up when the showcase is resized
        this.addEvent(Toolkit.transitionEnd, 'element', function(e) {
            e.stopPropagation();
        }, this.ns('items'));

        this.initialize();
    }
function ( nodes , options ) { var element ; options = this . setOptions ( options ) ; this . element = element = this . createElement ( ) ; // Nodes found in the page on initialization this . nodes = $ ( nodes ) ; // The wrapping items element this . items = element . find ( this . ns ( 'items' ) ) ; // The wrapping tabs element this . tabs = element . find ( this . ns ( 'tabs' ) ) ; // The caption element this . caption = element . find ( this . ns ( 'caption' ) ) ; // Blackout element if enabled if ( options . blackout ) { this . blackout = Blackout . instance ( ) ; } // Initialize events this . addEvents ( [ [ 'keydown' , 'window' , 'onKeydown' ] , [ 'click' , 'document' , 'onShow' , '{selector}' ] , [ 'click' , 'element' , 'hide' , this . ns ( 'close' ) ] , [ 'click' , 'element' , 'next' , this . ns ( 'next' ) ] , [ 'click' , 'element' , 'prev' , this . ns ( 'prev' ) ] , [ 'click' , 'element' , 'onJump' , this . ns ( 'tabs' ) + ' a' ] ] ) ; if ( options . clickout ) { this . addEvents ( [ [ 'clickout' , 'document' , 'onHide' , '{selector}' ] , [ 'clickout' , 'element' , 'onHide' ] ] ) ; } if ( options . swipe ) { this . addEvents ( [ [ 'swipeleft' , 'element' , 'next' ] , [ 'swiperight' , 'element' , 'prev' ] ] ) ; } // Stop `transitionend` events from bubbling up when the showcase is resized this . addEvent ( Toolkit . transitionEnd , 'element' , function ( e ) { e . stopPropagation ( ) ; } , this . ns ( 'items' ) ) ; this . initialize ( ) ; }
Initialize the showcase.

@param {jQuery} nodes
@param {Object} [options]
Initialize the showcase .