Controller['revista'] = {

      initialized: false,
      title: 'Revista',

      html: '',
      mainElement: {},
      setElement: function($elm)
      {
            if(Controller['revista'].html == '')
            {
                  Controller['revista'].mainElement = $elm;
                  Controller['revista'].html = $elm.html();
            }
      },
      init: function ()
      {
            ControllerRevista.initialized = true;
            setTimeout(ControllerRevista.update, 100);
      },

      transitionIn : function ()
      {
            var $content = ControllerRevista.mainElement;
		$content.show();
		$content.find('.modal-section-background').fadeTo('fast', .7, function() {
			$content.find('.modal-section-content').fadeIn('fast', function() {
				ControllerRevista.endTransitionIn();
			})
		});
      },

      transitionOut : function ()
      {

            var $content = ControllerRevista.mainElement;
            $content.find('.modal-section-content').fadeOut('fast', function() {
                  $content.find('.modal-section-background').fadeOut('fast', function() {
                        $content.hide();
                        ControllerRevista.endTransitionOut();
                  })
            });
      },

      endTransitionIn : function ()
      {
            if(ControllerRevista.initialized === false)
                  ControllerRevista.init();
            else
                  ControllerRevista.update();
      },

      endTransitionOut : function ()
      {
            Modal.close();
      },

      load:
      {
            beforeSend: function () {},

            success: function () {},

            complete: function ()
            {
                  if(window.ControllerRevista == undefined)
                        window.ControllerRevista = Controller['revista'];

                  ControllerRevista.mainElement.find('.modal-section-background, .modal-section-content').hide();
                  ControllerRevista.mainElement.find('.modal-section-close').bind('click', ControllerRevista.closeModal);

                  ControllerRevista.transitionIn();
            },

            error: function () {}
      },

      update : function ()
      {

      },

      close : function ()
      {
            ControllerRevista.transitionOut();
      },

      closeModal: function (e)
      {
            e.preventDefault();
            e.stopImmediatePropagation();
            ControllerRevista.close();
      }

}
