);

		bookingTmplItems = $.tmplCmd( "replace", data, bookingTmplItems );

		function compareName( a, b ) {
			return a == b ? 0 : (((a.movie.Name > b.movie.Name) !== reverse) ? 1 : -1);
		}
		function compareDate( a, b ) {
			return a.date - b.date;
		}
	}

	function getMovies( index ) {
		var query = "http://odata.netflix.com/Catalog/Genres('" + genre + "')/Titles" +
			"?$format=json" +
			"&$inlinecount=allpages" +				// get total number of records
			"&$skip=" + (index-1) * pageSize +		// skip to first 