<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../common/common.jsp"%>
<title>今日推荐</title>

</head>
<body>
<%@ include file="../common/head.jsp"%>
<div class="screen main">
    <%@ include file="../common/left.jsp" %>
    <div class="main-content">
        <div class="rFloat notice">
        	<div class="hd-title">公告</div>
        	<ul class="notice-list" id="noticeList"></ul>
        	<div class="mTop20 notice-page" id="noticePage"></div>
        </div>
        <div class="recom-silder">
		    <div class="flexslider">
		    	<span class="today_rec"></span>
		    	<ul class="slides">
			        <c:if test="${turnHeadSourceList != null && turnHeadSourceList.size() > 0}">
                    <c:forEach var="it" items="${turnHeadSourceList}">
						<li>
							<a href="<c:if test="${it.resourceType == 1}">to_play_list.do</c:if><c:if test="${it.resourceType == 2}">to_advertise_list.do</c:if><c:if test="${it.resourceType == 3}">to_long_list.do</c:if><c:if test="${it.resourceType == 4}">to_short_list.do</c:if><c:if test="${it.resourceType == 5}">to_app_list.do</c:if><c:if test="${it.resourceType == 6}">to_other_list.do</c:if>?id=${it.id}" class="pic1" style="background-image:url(${it.imgUrl});"></a>
						</li>
					</c:forEach>
                    </c:if>
			    </ul>
		    </div>
		</div>
		<div class="hdT-title mTop10"><i class="icon ion-resource"></i>&nbsp;&nbsp;资源推荐</div>
		<ul class="resource-list mTop20">
			<c:if test="${nonHeadSourceList != null && nonHeadSourceList.size() > 0}">
			<c:forEach var="it" items="${nonHeadSourceList}"><li>
				<a href="<c:if test="${it.resourceType == 1}">to_play_list.do</c:if><c:if test="${it.resourceType == 2}">to_advertise_list.do</c:if><c:if test="${it.resourceType == 3}">to_long_list.do</c:if><c:if test="${it.resourceType == 4}">to_short_list.do</c:if><c:if test="${it.resourceType == 5}">to_app_list.do</c:if><c:if test="${it.resourceType == 6}">to_other_list.do</c:if>?resourceName=${it.resourceName}">
					<img src="${it.imgUrl}" width="330" height="186" valign="middle" onerror="this.src='../img/defaut_zy.png'" />
					<div class="mTop10 font14">${it.resourceName}</div>
				</a>
			</li>
			</c:forEach>
			</c:if>
		</ul>
		<div class="hdT-title mTop10"><i class="icon ion-medium"></i>&nbsp;&nbsp;媒体排名</div>
		<div class="tab-buttons" id="recomTabs">
			<span class="button button-20">电视台排行</span>
			<span class="button button-20">电视剧排名</span>
			<span class="button button-20">栏目排名</span>
			<span class="button button-20">网络电视剧</span>
			<span class="button button-20">网络栏目</span>
		</div>
		<table class="table table-gray mTop10" cellpadding="0" cellspacing="0" id="mediaTable">
            <thead>
	            <tr>
	                <th width="20%">
	                	<div class="radio-tabs">
		                	<input type="radio" class="radio {skin:'radioChange',click:getMediaRankList}" name="cityType" value="0" checked="checked" /><label>35城排名</label>
							<input type="radio" class="radio {skin:'radioChange',click:getMediaRankList}" name="cityType" value="1" /><label>52城排名</label>
						</div>
	                </th>
	                <th width="40%">名称</th>
	                <th width="20%">频道</th>
	                <th width="10%">收视率</th>
	                <th width="10%">收视份额</th>
	            </tr>
            </thead>
            <tbody id="mediaList"></tbody>
        </table>
        <table class="table table-gray mTop10 contentTxt" cellpadding="0" cellspacing="0" id="mediaTable2">
            <thead>
	            <tr>
	                <th width="30%">名称</th>
	                <th width="20%">网络平台</th>
	                <th width="10%">日增点击量</th>
	                <th width="10%">排名</th>
	            </tr>
            </thead>
            <tbody id="mediaList2"></tbody>
        </table>
    </div>
    <div class="clear"></div>
</div>
<%@ include file="../common/footer.jsp"%>
<script type="text/javascript" src="${staticPath}js/recommend/recommend.js"></script>
<script type="text/javascript" src="${staticPath}js/common/jquery.smallslider.js"></script>
<script type="text/javascript">
$(function(){
	$('.flexslider').flexslider({
		animation: "fade",
      	pauseOnHover:true,
		slideshowSpeed: 4000, //展示时间间隔ms
		animationSpeed: 500, //滚动时间ms
		touch: true //是否支持触屏滑动
    });
    $.radio();
	getNoticeList(1);
	$("#recomTabs").tabMenu({children:".button",isAdd:false,fun:function(obj){
		var index = $(obj).index();
		if(index > 2){
			$("#mediaTable2").removeClass("contentTxt");
			$("#mediaTable").addClass("contentTxt");
		}else{
			$("#mediaTable").removeClass("contentTxt");
			$("#mediaTable2").addClass("contentTxt");
		}
		getMediaRankList();
	}});
	getMediaRankList();
});
</script>
</body>
</html>