<div class="calendar">
	{% if Event_calendar_error_view %}
		<div class="calendar_content error_view">
			<div class="calendar_title">
				<h2>{{"Events Calendar"|trans}}</h2>
			</div>
			
			<div class="calendar_header"></div>
			
			<p class="error">{{"Sorry, the date provided is not valid."|trans}}</p>
		</div>
	{% elseif Event_calendar_year_view %}
		<div class="calendar_content year_view">
			{% if Calendar_year_view_title %}
				<div class="calendar_title">
					<h2>{{"Events Calendar"|trans}}</h2>
				</div>
			{% endif %}
			
			{% if Calendar_year_view_header %}
				<div class="calendar_header">
					<div class="calendar_month">
						<h2>{{Year_number}}</h2>
					</div>
				</div>
			{% endif %}
			{% if Calendar_year_view_content %}
				<div class="calendar_month_content">
				<table cellspacing="1" class="calendar">
		    		<tbody>
						{% for row in Months_row_element %}
							<tr class="monthrow" >
								{% for item in row.Months_cell_element %}
									<td class="monthcell {{item.Current_month}} {% if item.Month_with_events %} has_events {% endif %} {{item.Year_CSS_Class|e}}">
										<div class="content_cell">
											{% if Enable_popup and item.Anchor %}
												<div class="content_month">
													<a
														class="{{item.Current_month}} {{item.Month_with_events}}"
														{{item.Anchor}}
														onmouseover="{{item.On_mouseover_script}}"
														data-box-className="event_calendar"
													>
														<span class="month_label">
															{{item.Month_label}}
															
															{% if item.Display_year_beside_jan_month_name and item.January_year %}
																{{item.January_year|e}}
															{% endif %}
														</span>
														<span class="see_events">{{"See events"|trans}}</span>
													</a>
												</div>
											{% else %}
												<div class="content_month {{item.Current_month}} {{item.Month_with_events}}">
													<span class="month_label">
														{{item.Month_label}}

														{% if item.Display_year_beside_jan_month_name and item.January_year %}
															{{item.January_year|e}}
														{% endif %}
													</span>
												</div>
											{% endif %}
											
											{% if Show_event_count and item.Num_events %}
												<span class='event_count has_events has_eventsdesc'>{{item.Num_events}}</span>
											{% endif %}

											{% for EventId, Event in item.Month_events %}
												<span class="event">
													<a
														class="{{item.Current_month}}"
														href="{{Event.Link}}"
														target="_blank"
													>
														{{Event.Title}}
													</a>
												</span>
											{% endfor %}

											{% if item.Other_events and item.And_x_more_events_phrase %}
												<span class="event">
													{{item.And_x_more_events_phrase|e}}
												</span>
											{% endif %}
										</div>
									</td>
								{% endfor %}
							</tr>
						{% endfor %}
					</tbody>
				</table>
				</div>
			{% endif %}
			
			{% if Calendar_year_view_footer %}
				<div class="calendar_bottom">
					<div class="calendar_bottom_inner">
						{% if Show_next_and_previous_only %}
							<div class="calendar_prev calendar_prev_next">
								<a onclick="{{Previous_year_onclick}}return false;" href="#">{{Previous_year_name}}</a>
							</div>
							<div class="calendar_next calendar_prev_next">
								<a onclick="{{Next_year_onclick}}return false;" href="#">{{Next_year_name}}</a>
							</div>
						{% elseif Show_year_range %}
							<div class="calendar_year_navigation">
								{% for Year in Year_range %}
									<span {% if Year_number == Year.Label %} class="on" {% endif %}> 
										<a onclick="{{Year.Onclick}}return false;" href="#">{{Year.Label}}</a>
									</span>
								{% endfor %}
							</div>
						{% endif %}
					</div>
				</div>
			{% endif %}
    	</div>	

	{% elseif Event_calendar_month_view %}
		<div class="calendar_content month_view">
			{% if Calendar_month_view_title %}
				<div class="calendar_title">
					<h2>{{"Events Calendar"|trans}}</h2>
				</div>
			{% endif %}
			{% if Calendar_month_view_header %}
				<div class="calendar_header">
					<div class="calendar_month">
						<h2>{{Full_date}}</h2>
					</div>
				</div>
			{% endif %}

			{% if Calendar_month_view_content %}
				<div class="calendar_month_content">
				<table cellspacing="1" class="calendar">
		    		<tbody>
						{% if Table_header %}
	    	    			<tr class="day_header">
    	   				     	<td>{{Cal_day_1|e}}</td>
    	   				     	<td>{{Cal_day_2|e}}</td>
    	   				     	<td>{{Cal_day_3|e}}</td>
    	   				     	<td>{{Cal_day_4|e}}</td>
    	   				     	<td>{{Cal_day_5|e}}</td>
    	   				     	<td>{{Cal_day_6|e}}</td>
    	   				     	<td>{{Cal_day_7|e}}</td>
       					 	</tr>
						{% endif %}
						{% for row in Days_row_element %}
							<tr class="dayrow" >
								{% for item in row.Days_cell_element %}
									<td class="{{item.Td_day_class_name}} {% if item.Day_events %} has_events {% endif %}">
										<div class="content_cell">
											<span class="{{item.Day_class_name}}">
												{% if Enable_popup and item.Anchor %}
													<div class="{{item.Day_class_name}} day_number">
														<a
															class="{{item.Day_class_name}}"
															{{item.Anchor}}
															onmouseover="{{item.On_mouseover_script}}"
															data-box-className="event_calendar"
														>
															<span class="day_label">{{item.Day_label}}</span>
															<span class="see_events">{{"See events"|trans}}</span>
														</a>
													</div>
												{% else %}
													<div class="{{item.Day_class_name}} day_number"><span class="day_label">{{item.Day_label}}</span></div>
												{% endif %}
												
												{% if Show_event_count and item.Num_events %}
													<span class='event_count has_events has_eventscount'>{{item.Num_events}}</span>
												{% endif %}
											</span>
											{% for EventId, Event in item.Day_events %}
												<span class="event">
													<a
														class="{{item.Day_class_name}}"
														href="{{Event.Link}}"
														target="_blank"
													>
														{{Event.Title}}
													</a>
												</span>
											{% endfor %}

											{% if item.Other_events and item.And_x_more_events_phrase %}
												<span class="event">
													{{item.And_x_more_events_phrase|e}}
												</span>
											{% endif %}
										</div>
									</td>
								{% endfor %}
							</tr>
						{% endfor %}
		    		</tbody>
				</table>
				</div>
			{% endif %}

			{% if Calendar_month_view_footer %}
				<div class="calendar_bottom">
					<div class="calendar_bottom_inner">
						<div class="calendar_prev calendar_prev_next">
							<a onclick="{{Previous_month_onclick}}return false;" href="#">{{Previous_month_name}}</a>
						</div>
						<div class="calendar_next calendar_prev_next">
							<a onclick="{{Next_month_onclick}}return false;" href="#">{{Next_month_name}}</a>
						</div>
					</div>
				</div>
			{% endif %}
		</div>	

	{% elseif EFrame %}
		<div class="day_view">
            <div class="day_view_wrap">
   	    	     <div class="day_view_inner">
    	    	    <div class="day_view_title">
			            <h1>{{Date_of_event}}</h1>
			            <!-- Show events in the window --> 
			            {{Event_counter_class_in_window}}
            		</div>
            		<div class="day_view_events_list">
            			<ul>
							{% for event in Single_event %}
								<li>
									<div class="day_view_event">
										{{event.StickyImage}}
										
										<p class="day_view_event_time">
											{{event.Time_of_event}}{% if event.Event_timezone %}, <span class="day_view_event_timezone">{{event.Event_timezone}}</span>{% endif %}
										</p>
										
										{% if event.Event_title %}
											<h3>
												{% if event.Event_link %}
													<a href="{{event.Event_link}}" target="_parent">
												{% endif %}
												{{event.Event_title}}
												{% if event.Event_link %}
													</a>
												{% endif %}
											</h3>
										{% endif %}
                                    	<div class="day_view_event_summary"> {{event.Event_summary}}</div>
                                    	{% if event.Event_link %}
                                    		<div class="day_view_event_more"> <a href="{{event.Event_link}}" target="_parent">{{"View"|trans}}</a></div>
                                    	{% endif %}
									</div>
								</li>
							{% endfor %}
						</ul>
    	        	</div>
    	        </div>
        	</div>
 		</div>
	{% endif %}
</div> 