<script>
jQuery(document).ready(function() {
jQuery('.nailthumb-container').nailthumb({method:'resize',fitDirection:' center'}); //width:166,height:79,
});
</script>
function addTovar (val){
// добавляет товар
// alert(val.image)
var block = $('#tovar_block');
block.append('' +
'<li class="catalog-elements-ul-li parent">' +
' <div class="catalog-elements-ul-li-photo">' +
' <a href="#" class="nailthumb-container">' +
' <img src="/img/product/smal/'+val.art+'_0.jpg.jpg">' +
' </a>' +
' <div class="tovar-sravni">' +
' <input type="checkbox" name="check">' +
' </div>' +
' </div>' +
' <div class="catalog-elements-ul-li-name">' +
' <a href="#" class="catalog-elements-ul-li-name-link">'+val.name+'</a>' +
' <span class="catalog-elements-ul-li-name-text">'+val.title+'</span>' +
' <div class="catalog-elements-ul-li-name-el">' +
' <a href=""><strong>Отзывы</strong> <span>4</span></a>' +
' <a href=""><strong>Описание</strong></a>' +
' <a href=""><strong>Фото</strong></a>' +
' </div>' +
' </div>' +
' <div class="catalog-elements-ul-li-add">' +
' <span class="tovar-list-price">'+val.price+' <span>₷</span></span>' +
' <div class="tovar-star parent">' +
' <span class="star-on"></span>' +
' <span class="star-on"></span>' +
' <span class="star-on"></span>' +
' <span class="star-on"></span>' +
' <span class="star-on"></span>' +
' </div>' +
' <span class="code-tovar">Код товара: '+val.art+'</span>' +
' <button id="catalog-add">В корзину<span></span></button>' +
' </div>' +
'</li>');
}
function addTovar (val){
// добавляет товар
// alert(val.image)
var block = $('#tovar_block');
block.append('' +
'<li class="catalog-elements-ul-li parent">' +
' <div class="catalog-elements-ul-li-photo">' +
' <a href="#" class="nailthumb-container">' +
' <img src="/img/product/smal/'+val.art+'_0.jpg.jpg">' +
' </a>' +
' <div class="tovar-sravni">' +
' <input type="checkbox" name="check">' +
' </div>' +
' </div>' +
' <div class="catalog-elements-ul-li-name">' +
' <a href="#" class="catalog-elements-ul-li-name-link">'+val.name+'</a>' +
' <span class="catalog-elements-ul-li-name-text">'+val.title+'</span>' +
' <div class="catalog-elements-ul-li-name-el">' +
' <a href=""><strong>Отзывы</strong> <span>4</span></a>' +
' <a href=""><strong>Описание</strong></a>' +
' <a href=""><strong>Фото</strong></a>' +
' </div>' +
' </div>' +
' <div class="catalog-elements-ul-li-add">' +
' <span class="tovar-list-price">'+val.price+' <span>₷</span></span>' +
' <div class="tovar-star parent">' +
' <span class="star-on"></span>' +
' <span class="star-on"></span>' +
' <span class="star-on"></span>' +
' <span class="star-on"></span>' +
' <span class="star-on"></span>' +
' </div>' +
' <span class="code-tovar">Код товара: '+val.art+'</span>' +
' <button id="catalog-add">В корзину<span></span></button>' +
' </div>' +
'</li>');
jQuery('.nailthumb-container').nailthumb({method:'resize',fitDirection:' center'});
}