<%-- 
/**
  * Copyright (c) 2004 Red Hat, Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or any later version.
  *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  * USA
  *
  * Component of: Red Hat Application Server
  * 
  * Initial Developers: Aizaz Ahmed
  *                     Vivek Lakshmanan
  *                     Andrew Overholt
  *                     Matthew Wringe
  * Developers: Greg Lapouchnian
  * 			Patrick Smith
  */
--%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

    <jsp:include page="common/header.jsp" />
    <!-- Content begins here -->
    <div id="form" >

    <c:if test="${empty friendSet}"> 

          <p><div class="formHeader">Specials</div>
          <c:forEach var="item" items="${specialSet}" begin="0" end="3">
    <div class="itemDetailedView">
          <div class="header">
            <span class="label" >
			  <a href="<c:url value="/store/viewItem.do"><c:param name="itemId" value="${item.itemId}"/></c:url>">
			          <c:out value="${item.name}"/></a>
            </span>
            <span class="formw">
               [<a href="<c:url value="/store/viewItem.do"><c:param name="itemId" value="${item.itemId}"/></c:url>">Details</a>]
            </span>
            <div class="spacer"></div>
          </div>
          
      <div class="content">
        <c:forEach var="pic" items="${item.pictures}" begin="0" end="0">
	         <a href="<c:url value="/store/viewItem.do"><c:param name="itemId" value="${item.itemId}"/></c:url>">
    	         <img src="../${pic.location}" alt="${item.name}"/>
    	     </a>
        </c:forEach>

   
        <p class="price"><fmt:formatNumber value="${item.price}" pattern="$#,##0.00" /></p><br/>
        <p class="desc" ><c:out value="${item.longDesc}"/></p>
    <jsp:include page="ItemPurchasedBy.jsp" />
    <div class="spacer" ></div>
    </div>
    <div class="spacer"></div>

    </div>
     </c:forEach>
    </c:if>
    
    
    
        <c:if test="${!empty friendSet}"> 


          <p><div class="formHeader">Items your friends picked</div>
          <c:forEach var="item" items="${friendSet}" begin="0" end="3">
    <div class="itemDetailedView">
          <div class="header">
            <span class="label" >
			  <a href="<c:url value="/store/viewItem.do"><c:param name="itemId" value="${itemId}"/></c:url>">
			          <c:out value="${item.name}"/></a>
            </span>
            <span class="formw">
               [<a href="<c:url value="/store/viewItem.do"><c:param name="itemId" value="${item.itemId}"/></c:url>">Details</a>]
            </span>
            <div class="spacer"></div>
          </div>
          
      <div class="content">
        <c:forEach var="pic" items="${item.pictures}" begin="0" end="0">
	         <a href="<c:url value="/store/viewItem.do"><c:param name="itemId" value="${item.itemId}"/></c:url>">
    	         <img src="../${pic.location}" alt="${item.name}"/>
    	     </a>
        </c:forEach>

   
        <p class="price"><fmt:formatNumber value="${item.price}" pattern="$#,##0.00" /></p><br/>
        <p class="desc" ><c:out value="${item.longDesc}"/></p>
    <jsp:include page="ItemPurchasedBy.jsp" />
    <div class="spacer" ></div>
    </div>
    <div class="spacer"></div>

    </div>
     </c:forEach>
    </c:if>



 
    <c:if test="${!empty friendSet}">
	    <p><div class="formHeader">Specials</div>
    </c:if>
    <c:if test="${empty friendSet}">
    	<p><div class="formHeader">More Specials</div>
    </c:if>
    
          <c:forEach var="item" items="${specialSet}" begin="4" end="7">
    <div class="itemThumbView">
    
    <a href="<c:url value="/store/viewItem.do"><c:param name="itemId" value="${itemId}"/></c:url>">
	<c:forEach var="pic" items="${item.pictures}" begin="0" end="0">
		<a href="<c:url value="/store/viewItem.do"><c:param name="itemId" value="${item.itemId}"/></c:url>">
	    	<img src="../${pic.location}" alt="${item.name}"/>
	    </a>
	</c:forEach>
	
	    <a href="<c:url value="/store/viewItem.do"><c:param name="itemId" value="${itemId}"/></c:url>">
				          <c:out value="${item.name}"/></a>
	    <p class="priceCenter"><fmt:formatNumber value="${item.price}" pattern="$#,##0.00" /></p>
	    <div class="spacer"></div>
	    
	    </div>
	    </c:forEach>


<div class="spacer" ></div>
<br style="clear:both" />
</div>

<jsp:include page="common/footer.jsp" />
