<div id="week_range" style="display:none;" ><%= @range %></div>
<div id="calendar_week">
	<table class="table header">
		<tr>
			<th style="width: 44px;"></th>
			<% @dates.each_with_index do |day,i| %>
				<% if @today == i %>
					<th class='today'><%= day %></th>
				<% else %>
					<th><%= day %></th>
				<% end %>
			<% end %>
		</tr>
		<tr>
			<td colspan="8" style="border:0;">
				<div class="event_list_wrapper head_event_wrapper" style="height:50px;">
					<table style="position: absolute; width: 100%; height: 50px; top: 0;">
						<tr>
							<td style="border: 0; background: none; width: 60px;"></td>
							<% @d.each_with_index do |dt,i| %>
								<% if @today == i %>
									<td class="all_day_event week_day week_day_header today" date='<%= dt %>'></td>
								<% else %>
									<td class="all_day_event week_day week_day_header" date='<%= dt %>'></td>
								<% end %>
							<% end %>
						</tr>
					</table>
					<table class="all_day_event_holder">


					</table>
				</div>
			</td>
				<!-- <div class="event half" style="background-color: #ccffee;">
					<dl>
						<dt>10:30am - template</dt>
						<dd></dd>
					</dl>
				</div> -->
			<!-- <td class="all_day_event week_day">
			</td>
			<td class="all_day_event week_day"></td>
			<td class="all_day_event week_day">
				<div class="event half" style="background-color: #ccffee;">
					<dl>
						<dt>10:30am - template</dt>
						<dd></dd>
					</dl>
				</div>
			</td>
			<td class="all_day_event week_day"></td>
			<td class="all_day_event week_day"></td>
			<td class="all_day_event week_day"></td> -->
		</tr>
	</table>
	<div class="event_list">
		<table class="table cell_map">
			<tr height="0">
				<td style="width: 60px;"></td>
				<td colspan="7">
					<div class="event_list_wrapper">
						<div class="cell_wrapper">
							<% @hours.each do |hour| %>
							<div class="cell click_event" time="<%= hour.to_s+".5" %>" ref="add-btn" link="<%= new_panel_calendar_back_end_event_path %>" date="<%= @date.to_s %>" ses="AM">
								<div class="divide click_event" time="<%= hour %>" ref="add-btn" link="<%= new_panel_calendar_back_end_event_path %>" date="<%= @date.to_s %>" ses="AM"></div>
							</div>
						<% end %>
						<% @hours.each do |hour| %>
							<div class="cell click_event" time="<%= hour.to_s+".5" %>" ref="add-btn" link="<%= new_panel_calendar_back_end_event_path %>"  date="<%= @date.to_s %>" ses="PM">
								<div class="divide click_event" time="<%= hour %>" ref="add-btn" link="<%= new_panel_calendar_back_end_event_path %>" date="<%= @date.to_s %>" ses="PM"></div>
							</div>
						<% end %>
						</div>
					</div>
				</td>
			</tr>
			<tr>
				<td>
					<% @hours.each do |hour| %>
						<div class="day_time"><%= hour %>am</div>
					<% end %>
					<% @hours.each do |hour| %>
						<div class="day_time"><%= hour %>pm</div>
					<% end %>
					<!-- <div class="day_time">12am</div>
					<div class="day_time">1am</div>
					<div class="day_time">2am</div>
					<div class="day_time">3am</div>
					<div class="day_time">4am</div>
					<div class="day_time">5am</div>
					<div class="day_time">6am</div>
					<div class="day_time">7am</div>
					<div class="day_time">8am</div>
					<div class="day_time">9am</div>
					<div class="day_time">10am</div>
					<div class="day_time">11am</div>
					<div class="day_time">12pm</div>
					<div class="day_time">1pm</div>
					<div class="day_time">2pm</div>
					<div class="day_time">3pm</div>
					<div class="day_time">4pm</div>
					<div class="day_time">5pm</div>
					<div class="day_time">6pm</div>
					<div class="day_time">7pm</div>
					<div class="day_time">8pm</div>
					<div class="day_time">9pm</div>
					<div class="day_time">10pm</div>
					<div class="day_time">11pm</div> -->
				</td>
				<% @d.each_with_index do |dt,i| %>
					<% if i == @today %>
						<td class="week_day today week_day_body" date='<%= dt %>'>
					<% else %>
						<td class="week_day week_day_body" date='<%= dt %>'>
					<% end %>
						<div class="event_holder">
							<div class="inner">
								
							</div>
						</div>
					</td>
				<% end %>
				<!-- <td class="week_day">
					<div class="event_holder">
						<div class="inner">
						</div>
					</div>
				</td>
				<td class="week_day today">
					<div class="event_holder">
						<div class="inner">
							<div class="event" style="background-color: #ccffee; top: 117px;">
								<dl>
									<dt>10:30am - 11:00am</dt>
									<dd>template</dd>
								</dl>
							</div>
						</div>
					</div>
				</td>
				<td class="week_day">
					<div class="event_holder">
						<div class="inner">
						</div>
					</div>
				</td>
				<td class="week_day">
					<div class="event_holder">
						<div class="inner">
						</div>
					</div>
				</td>
				<td class="week_day">
					<div class="event_holder">
						<div class="inner">
						</div>
					</div>
				</td>
				<td class="week_day">
					<div class="event_holder">
						<div class="inner">
						</div>
					</div>
				</td> -->
			</tr>
		</table>
	</div>
</div>
