define([
    'Global',
    'Text!../html/templates/right-sub-header.html'
],
    function (Global, template) {
        'use strict';

        var RightSubHeaderView = Backbone.View.extend({
            tagName: 'div',
            initialize: function () {
	            this.template = _.template(template);
            },
            render: function () {
                var $container = getSubHeaderRight();

                this.$el
	                .empty()
                    .append(this.template);

                $container
	                .empty()
                    .append(this.$el)
                    .trigger('create');
            }
        });

		return RightSubHeaderView;
    }
);
