//  @import com.hedgehoglab.application.view.BaseView;

/**
 * @author hedgehog
 */
function FlashMessageView(scope){
  BaseView.call(this);
  var _this = this;

  scope.model.subscribe_to('model_changed',function(e){
	if (e.model==null){
		$(scope.element).fadeOut("slow",function(){$(this).html("")});
	}else{
	  _this.render_template_with_view(scope.template,e.model,{},function(rendered_template){
		$(scope.element).html(rendered_template);
      	$(scope.element).fadeIn("fast");
	  });
	}
  });
  
};