<%@ page import="kr.co.jinwoosi.clfd.framework.util.SessionHelper" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/include/tags.jspf" %>

<script src="/clfd/js/common/clfdCommonService.js?ver=1.1"></script>
<script src="/clfd/js/main/mainService.js?ver=1.3"></script>
<script src="/clfd/js/main/main.js?ver=1.1"></script>

<div class="main-ad">
    <div class="main-ad__img">
        <a href="#" id="surveyAnchorBtn">
            <div class="main-ad__img__btn">
                피부 테스트 하기
            </div>
        </a>
    </div>
</div>

<div class="main2">
    <div class="main2__img">
    </div>
</div>

<div class="main3">
    <div class="main3__img">
        <a href="/clfd/prod/list.do">
            <div class="main3__img__btn">
                화장품 보러가기
            </div>
        </a>
    </div>
</div>

<script>
    $('#surveyAnchorBtn').click(function () {
        <%
        if (SessionHelper.getUser() != null) {
        %>
        location.href="/clfd/dgns/survey.do"
        <%
        } else {
        %>
        if(confirm("회원만 이용가능한 서비스입니다. 로그인하시겠습니까?")) {
            location.href="/login/loginForm.mng?path="+'/clfd/dgns/survey.do';
        }
        <%
        }
        %>
    });
</script>