/*jslint node: true, nomen: true, unparam: true */
/*global jquery, $, _, define, Marionette, jqm, describe, it, expect, beforeEach, spyOn */
define([ 'Global',
	'Text!patient-search/templates/appletNavBar.html',
	'patient-search/models/AppletModel' ],
	function (Global, template, model) {
		'use strict';
		return Backbone.Marionette.ItemView.extend({
			model: model,
			tagName: 'ul',
			template: _.template(template),
			onRender: function () {
				var fragment = model.get('searchType');

				fragment = (fragment === 'myList') ? 'my-list' : fragment;

				this.$el.find('a[href=#search-' + fragment + ']').addClass('ui-btn-active');
			}
		});
	});