(function (context, $) {

  "use strict";

  context.JK = context.JK || {};
  context.JK.AccountVideoProfile = function (app) {
    var $webcamViewer = new context.JK.WebcamViewer()
    function initialize() {
      var screenBindings = {
        'beforeShow': beforeShow,
        'beforeHide':beforeHide
      };
      app.bindScreen('account/video', screenBindings);
      
      $webcamViewer.init($(".webcam-container"))      
    }

    function beforeShow() {
      $webcamViewer.beforeShow()      
    }

    function beforeHide() {
      $webcamViewer.setVideoOff()
    }

    this.beforeShow = beforeShow
    this.beforeHide = beforeHide
    this.initialize = initialize
    return this;
  };

})(window, jQuery);