(function (context, $) {

  "use strict";

  context.JK = context.JK || {};
  context.JK.StepUnderstandGear = function (app) {

    var $step = null;
    var operatingSystem;

    function handleHelp() {
      return "https://jamkazam.desk.com/customer/portal/articles/1599817-first-time-setup---step-1";
    }

    function beforeShow() {
      var $watchVideo = $step.find('.watch-video');
      var videoUrl = 'https://www.youtube.com/watch?v=NiELWY769Tw';
      if (operatingSystem == "Win32") {
        $watchVideo.attr('href', 'https://www.youtube.com/watch?v=Z1GxCljtdCY');
      }
      $watchVideo.attr('href', videoUrl);
    }

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

      operatingSystem = context.JK.GetOSAsString();
    }

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

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