<%for (var i = 0, l = list.length; i<l; i++) {%>
    <%var avaliableFlag = list[i] && list[i].avaliable;%>
    <li data-url="<%=list[i].url%>" class="<%=avaliableFlag ? '' : 'not-avalible'%>" >
        <div class="item-detail">
            <input type="checkbox" class="select">
            <a href="<%=list[i].cpsUrl%>" target="_blank" class="item-img"  clkAction="FAVOR_ITEM_COLLECT_CLICK" data-position="IMG">
                <%if (list[i].img !== undefined) {%>
                    <img src="<%=list[i].img%>" alt="<%=list[i].title%>">
                <%}%>
            </a>
            <div class="item-content">
                <a href="<%=list[i].cpsUrl%>" clkAction="FAVOR_ITEM_COLLECT_CLICK" data-position="TITLE" target="_blank" class="title"><%=list[i].    title%></a>

                <p class="shop-price"><span class="shop"><%=list[i].domainName%></span>：<span class="price"><%=(list[i].curPrice === '-1') ? '暂无价格' : list[i].curPrice + list[i].priceunit%></span></p>
                <%if (!avaliableFlag) {%>
                    <p class="not-avalible">无货</p>
                <%} else {%>
                    <%if (list[i].lastSecondPrice !== -1 && list[i].lastSecondPrice - list[i].curPrice > 0) {%>
                        <p class="deprice"><span class="icon icon-deprice"></span>价格下降<span class="depriced-number"><%=Math.floor((list[i].lastSecondPrice - list[i].curPrice) * 100 ) / 100%><%=list[i].priceunit%></span></p>
                    <%}%>
                    <%if (list[i].promotionInfo !== undefined) {%>
                        <p class="promotion"><span class="icon icon-promotion"></span><%=list[i].promotionInfo%></p>
                    <%}%>
                <%}%>
            </div>
            <div class="item-ops">
                <a class="go-to-item-page" href="<%=list[i].cpsUrl%>" target="_blank"  clkAction="FAVOR_ITEM_COLLECT_CLICK" data-position="BTN">去看看</a>
                <a id="deleteCurItem" class="delete" href="javascript:;" clkAction="FAVOR_ITEM_DEL_CLICK">删除收藏</a>
            </div>
        </div>
        <%var recmds = list[i].recmds;%>
        <%if (recmds !== undefined) {%>
            <div class="items-recmds">
                <span class="prev prev-disable" data-btn-type="prev"  clkAction="FAVOR_ITEM_RECPAGECHANGE_CLICK" data-position="PREV"></span>
            <div class="contents-wrapper">
                <div class="recom-contents">
                    <%for (var j = 1, gl = recmds.length;j <= gl;j++) {%>
                        <%var recoItem = recmds[j - 1];%>
                        <%if (/^DISCOUNT.+/g.test(recoItem.type)) {%>
                            <span class="recom-content">
                                <span class="icon special-offer-tip"></span>
                                <a clkAction="FAVOR_ITEM_REC_CLICK" target="_blank" href="<%=recoItem.url%>">
                                    <img src="<%=recoItem.imgUrl%>" title="<%=recoItem.title%>">
                                </a>
                                <span class="intro">
                                    <span class="icon icon-depriced"></span><span class="cur-price"><%=recoItem.price%><%=list[i].priceunit%></span>
                                    <span class="ori-price"><%=recoItem.maxPrice%><%=list[i].priceunit%></span>
                                </span>
                            </span>
                        <%} else if (/^ITEMCF.+/g.test(recoItem.type)) {%>
                            <span class="recom-content">
                                <a clkAction="FAVOR_ITEM_REC_CLICK" target="_blank" href="<%=recoItem.url%>">
                                    <img src="<%=recoItem.imgUrl%>" title="<%=recoItem.title%>">
                                </a>
                                <span class="intro">
                                    <span class="cur-price"><%=recoItem.price%><%=list[i].priceunit%></span>
                                    <span class="people-counts"><%=recoItem.covisitNum%>人还看</span>
                                </span>

                            </span>
                        <%} else if (/^BRAND.+/g.test(recoItem.type)) {%>
                            <!-- 品牌特卖 -->
                        <%}%>
                    <%}%>
                    <span class="recom-content">
                        <p class="no-more-recommand">暂无更多</p>
                    </span>
                </div>
            </div>
                <span class="next <%=recmds.length >= 3 ? '' : 'next-disable' %>"  data-btn-type="next" clkAction="FAVOR_ITEM_RECPAGECHANGE_CLICK" data-position="NEXT"></span>
            </div>
        <%} else {%>
            <p class="no-recommands">暂无你可能喜欢的商品推荐~</p>
        <%}%>
    </li>
<%}%>