<% if(data.items.length == 0){ %>
    <h1>Nessuna ricetta trovata</h1>
<%} else { for (var i = 0; i < data.items.length; i++) { %>
  <% var item = data.items[i]; %>
<li><a href="#ricetta/<%= item.ricetta_id%>" class="ui-btn ui-btn-icon-right ui-icon-carat-r ui-li-has-thumb">
	<% if(item.firstImage === ""){ %>
		<!--<img class="thmbImg emptyItemList">-->
	<%}else{%>
		<!--<img class="thmbImg" src='<%=data.images.getThumb(item.firstImage)%>'>-->
	<%}%>
    <div class='ricettaTitolo'><%= unescape(item.titolo) %></div>
    <div class='ricettaAutore'><%= unescape(item.autore) %></div>
    <br><div class='ricettaAutore'>Diff.:&nbsp;&nbsp;</div>
	<div id="valutazione">
		<div role="text" data-role="none" aria-label="Molto Semplice" class="star-rating rater-0 star star-rating-applied star-rating-live <% if(parseInt(item.difficolta)>=1){%>star-rating-on<%}%>">
			<div data-role="none" title="Molto Semplice">1</div>
		</div>
		<div data-role="none" role="text" aria-label="Semplice" class="star-rating rater-0 star star-rating-applied star-rating-live <% if(parseInt(item.difficolta)>=2){%>star-rating-on<%}%>">
			<div data-role="none" title="Semplice">2</div>
		</div>
		<div data-role="none" role="text" aria-label="Normale" class="star-rating rater-0 star star-rating-applied star-rating-live <% if(parseInt(item.difficolta)>=3){%>star-rating-on<%}%>">
			<div data-role="none" title="Normale">3</div>
		</div>
		<div data-role="none" role="text" aria-label="Difficile" class="star-rating rater-0 star star-rating-applied star-rating-live <% if(parseInt(item.difficolta)>=4){%>star-rating-on<%}%>">
			<div data-role="none" title="Difficile">4</div>
		</div>
		<div data-role="none" role="text" aria-label="Molto Difficile" class="star-rating rater-0 star star-rating-applied star-rating-live <% if(parseInt(item.difficolta)>=5){%>star-rating-on<%}%>">
			<div data-role="none" title="Molto Difficile">5</div>
		</div>
	</div>
</a></li>
<% }} %>