(function (context, $) {

  "use strict";

  context.JK = context.JK || {};
  context.JK.StepLoopbackIntro = function (app, $dialog) {

    var $step = null;

    function videoLinkClicked(evt) {
      var myOS = jamClient.GetOSAsString();
      var link;
      if (myOS === 'MacOSX') {
        link = $(evt.currentTarget).attr('external-link-mac');
      } else if (myOS === 'Win32') {
        link = $(evt.currentTarget).attr('external-link-win');
      }
      if (link) {
        context.jamClient.OpenSystemBrowser(link);
      }
    }

    function beforeShow() {
    }

    function initialize(_$step) {
      $step = _$step;

      $step.find('.ftue-video-link').on('click', videoLinkClicked);
    }

    this.beforeShow = beforeShow;
    this.initialize = initialize;

    return this;
  }
})(window, jQuery);