(function(context,$) {

    "use strict";

    context.JK = context.JK || {};
    context.JK.AddNewGearDialog = function(app, ftueCallback) {
        var logger = context.JK.logger;

        function events() {
            $('#btn-leave-session-test').click(function() {
                ftueCallback();

                // TODO: THIS IS A HACK - THIS DIALOG IS LAYERED
                // ON TOP OF OTHER DIALOGS. ANY OTHER DIALOGS THAT
                // USE THIS NEED TO BE ADDED TO THE FOLLOWING LIST.
                // NEED TO FIGURE OUT A CLEANER WAY TO HANDLE THIS.
                app.layout.closeDialog('add-track');
                app.layout.closeDialog('configure-audio');
            });

            $('#btn-cancel-new-audio').click(function() {
                app.layout.closeDialog('add-new-audio-gear');
            });
        }

        this.initialize = function() {
            events();
        };

        return this;
    };

 })(window,jQuery);