/**
 * (c) by aheadware.com
 */

"use strict";

var app = app || {};
app.gui = app.gui || {};

/**
 *
 */
app.gui.OffcanvasMenu = (function()
{
    var offCanvasComponent;

    return {
        init : function()
        {
            $('#offCanvas').offcanvas(
            {
                modifiers: 'right' //, overlay' // default options
            });

            offCanvasComponent = $( '#offCanvas' ).data( 'offcanvas-component' );

            $( '#offCanvas' ).find( '.a-offcanvas-menu-link' ).on( 'click', function()
            {
                offCanvasComponent.close();
            });
        }
    }
})();