<div xmlns="http://www.w3.org/1999/xhtml" 
       xmlns:py="http://genshi.edgewall.org/"
       id="${id}" class="${css_class}">
    <div id="${id}_calendar"></div>
    <script type="text/javascript">
		window.addEvent('domready', function () {
			var data = [
			<py:for each="i, row in enumerate(value)">
	            {
	               "title": "${row['title']}",
				   "start": "${row['start'].isoformat()}",
				   "end": "${row['end'].isoformat()}",
				   "location": "${row['location']}",
				   "url": "${row.get('url','')}"
	            }<py:if test="(i+1) &lt; len(value)">,</py:if>
			</py:for>];
			datagrid = new Calendar({
				'calContainer':'${id}_calendar',
				'cEvents':data,
				'embedLinks': true
			});
		});		
    </script>
</div>