(function($) {
	
	FlagView = Backbone.View.extend({
		tagName: 'li'
		,className: 'flag'

		,initialize: function initialize () {

			_.bindAll(this, 'render');

			//this.render();
		}

		,render: function render () {
			var vars = this.model.toJSON();

			$(this.el).html( _.template( $('#flag_template').html(), this.model.toJSON() ) );

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

			return this;
		}

		,positionHeader: function positionHeaders () {

			if ( $(this.el).children('a').hasClass('alternate') ) {
				// console.log('alternate');
			} else {
				
				var header = $(this.el).find('h1')
				,headerHeight = header.height()
				,wrap = $(this.el).find('a')
				,wrapHeight = wrap.height()
				,newPosition = (wrapHeight - headerHeight) / 2;

				header.css('top', newPosition);
				
			}
		}
	})

}(jQuery));
