<%@tag description="User message template" pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>

<!-- User Messages -->
<script type="text/javascript">
    $(function(){
        $(".message").click(function(){
            $(this).fade();
        });
    });
</script>
<div class="menu">
    <c:forEach items="${param.messages}" var="message">
        <c:choose>
            <c:when test="${message.isInfo()}">
                <div class="message" style="border: 2px solid #039C00; padding: 0px; margin: 5px; background: #9BFB66 none repeat scroll 0%; font-size: 11px; color: black; border-radius: 7px;">
                    <center><b>${message.title}</b></center>
                </div>
            </c:when>
            <c:when test="${message.isSuccess()}">
                <div class="message" style="border: 2px solid #039C00; padding: 0px; margin: 5px; background: #9BFB66 none repeat scroll 0%; font-size: 11px; color: black; border-radius: 7px;">
                    <center><b>${message.title}</b></center>
                </div>
            </c:when>
            <c:when test="${message.isWarning()}">
                <div class="message" style="border: 2px solid #E6E600; padding: 0px; margin: 5px; background: #FFFF99 none repeat scroll 0%; font-size: 11px; color: black; border-radius: 7px;">
                    <center><b>${message.title}</b></center>
                </div>
            </c:when>
            <c:when test="${message.isError()}">
                <div class="message" style="border: 2px solid #FF0000; padding: 0px; margin: 5px; background: #FFDDCC none repeat scroll 0%; font-size: 11px; color: black; border-radius: 7px;">
                    <center><b>${message.title}</b></center>
                </div>
            </c:when>
        </c:choose>
    </c:forEach>
</div>