/* mustache templates */
var TEMPLATES = {} ;
TEMPLATES.lineFilter = '<fieldset>{{#contentList}}<input type="checkbox" value="{{name}}" name="line" class="check"/>{{name}}<br />{{/contentList}}</fieldset>' ;
TEMPLATES.typologyFilter = '<fieldset>{{#contentList}}<input type="checkbox" value="{{value}}" name="typology" class="check"/>{{label}}<br />{{/contentList}}</fieldset>' ;
TEMPLATES.useFilter = '<fieldset>{{#contentList}}<input type="checkbox" value="{{value}}" name="use" class="check"/>{{label}}<br />{{/contentList}}</fieldset>' ;
TEMPLATES.searchResults = '{{#contentList}}<div class="item"><img src="{{> thumb_large}}" width="210" height="152" class="thumb" /><span class="discount">{{#discountprice}}</span><h4>{{> name}}<span>{{> line}}</span></h4><div class="ico"><a href="/it/catalogo/{{kca:id}}.jsp" class="card tvs-openproduct" title="Scheda prodotto">Scheda prodotto</a> <a href="#" rel="{{kca:id}}" class="shop add-to-cart" title="Aggiungi al carrello">Aggiungi al carrello</a></div><div class="price"><span class="strike">{{price}}&euro;</span> <span>{{discountprice}}&euro;</span></div> <span class="discount">-{{discountpercentage}}%</span> {{/discountprice}}{{^discountprice}}{{price}}&euro;{{/discountprice}}</div>{{/contentList}}' ;
TEMPLATES.searchResultsPagination = '<div class="pagination">{{#prev}}<a href="#" rel="{{prev}}">&lt;&lt;</a>{{/prev}}{{#pages}}<a href="#" rel="{{i}}" class="{{current}}">{{i}}</a>{{/pages}}{{#next}}<a href="#" rel="{{next}}">&gt;&gt;</a>{{/next}}</div>';
TEMPLATES.cartRows = '<tr class="head"><th colspan="3">Prodotto</th><th class="right qta">Quantit&agrave;</th><th class="right">Pr.Unitario</th><th class="right">Pr.Totale</th><th class="center last">Promozione</th></tr>{{#rows}}<tr><td><a href="#" class="delete remove-from-cart" rel="{{product}}">Elimina</a></td><td><img src="'+serviceBasePath+'media/{{thumb_small}}"  alt="{{name}}" width="110" height="80"/></td><td>{{name}}</td><td>{{> quantity}}</td><td class="right">{{price}} &euro;</td><td class="right">{{totalPrice}} &euro;</td><td class="center promo">{{discount}}%</td></tr>{{/rows}}<tr class="tot line"><th colspan="5">Importo totale</th><td class="right">{{totalCart}} &euro;</td><td></td></tr>';
TEMPLATES.checkoutCartRows = '<tr class="head"><th>Prodotto</th><th class="center">Quantit&agrave;</th><th class="right">Pr.Unitario</th><th class="right last">Pr.Totale</th></tr>{{#rows}}<tr><td>{{name}}</td><td class="center">{{quantity}}</td><td class="right">{{price}} &euro;</td><td class="right">{{totalPrice}} &euro;</td></tr>{{/rows}}<tr class="tot line"><td colspan="3">Importo totale</td><td class="right">{{totalCart}} &euro;</td></tr>';
TEMPLATES.userData = '<p><br /><strong>Nome</strong>: {{firstname}}<br /><strong>Cognome</strong>: {{lastname}}<br /><strong>E-mail</strong>: {{email}}<br /><strong>Indirizzo</strong>: {{> address}}<br /><strong>Recapito telefonico</strong>: {{phone}}<br /><strong>recapito telefonico alternativo</strong>: {{phone2}}</p>' ;
TEMPLATES.wishlistRows = '{{#rows}}<li><a href="#" class="delete remove-from-wishlist" rel="{{product}}">Elimina</a><img src="'+serviceBasePath+'media/{{thumb_xsmall}}"  alt="{{name}}" width="110" height="80"/><p><a href="#" class="btn_add_basket add-to-cart" rel="{{product}}">Aggiungi al carrello</a> {{name}}</p></li>{{/rows}}';
TEMPLATES.loginboxTrue = '<div id="logged-true"><b>{{email}}</b> <a href="javascript:void(0);">Mio profilo</a><div class="profile_list"><ul><li><a href="/it/servizi/registrati/dati-personali.jsp">Profilo &gt;</a></li><li><a href="/it/servizi/carrello/index.jsp">Carrello &gt;</a></li><li><a href="/it/servizi/carrello/wishlist.jsp">Wishlist &gt;</a></li><li><a href="javascript:void(0);" class="tvs-logout">Logout &gt;</a></li></ul></div></div>' ;
TEMPLATES.loginboxFalse = '<div id="logged-false"><div id="login"><div class="close"><a href="javascript:void(0);">chiudi</a></div><div class="ctn"><form action="#" class="reg" method="post"><h1>Login</h1><p>Per accedere inserisci E-Mail e password.</p><fieldset><div class="medium"><label for="login-email">Email<span>*</span></label> <input type="text" name="login-email" id="login-email" value=""  /></div><div class="medium"><label for="login-password">Password<span>*</span></label> <input type="password" name="login-password" id="login-password" value=""  /></div></fieldset><button type="button" class="tvs-login">Accedi</button> <p>Non sei ancora iscritto? <a href="/it/servizi/registrati/index.jsp"><strong>Registrati</strong></a></p></form></div></div></div>' ;



var PARTIALS = {} ;
PARTIALS.name = '{{IT}}' ;
PARTIALS.line = '{{name}}' ;
PARTIALS.thumb_xsmall = '{{kca:src}}' ;
PARTIALS.thumb_large = '{{kca:src}}' ;
PARTIALS.quantity = '<a href="#" class="add-to-cart-total" rel="{{product}}">aggiorna</a> <input type="text" value="{{quantity}}" />' ;
PARTIALS.address = '{{address}}, {{cap}} {{comune}} {{prov}}, {{country}}' ;


