<?php include_once('./includes/cmsLibraries.php'); ?>
<?php


?>
<!DOCTYPE html> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> 
<head> 
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
<meta name="viewport" content="width=1024" />
<title></title>
<meta name="Description" content="" />
<meta name="Keywords" content="" />
<link href="/styles.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/scripts/jquery-1.10.2.min.js"></script>
</head>

<body>

This page was generated at: <?php echo @date('Y-m-d H:i:s'); ?><hr/>

<div id="container">

	<div id="left">
		<br class="clear-both" /><br class="clear-both" />
		<ul>
			<li><a href="#" onclick="updateAjaxContent('index_body_ajax.php?color=red'); return false;">red</a></li>
			<li><a href="#" onclick="updateAjaxContent('index_body_ajax.php?color=yellow'); return false;">yellow</a></li>
			<li><a href="#" onclick="updateAjaxContent('index_body_ajax.php?color=green'); return false;">green</a></li>
			<li><a href="#" onclick="updateAjaxContent('index_body_ajax.php?color=blue'); return false;">blue</a></li>
			<li><a href="#" onclick="updateAjaxContent('index_body_ajax.php'); return false;">view all</a></li>
		</ul>
	</div>

	<div id="right">
          <!-- ajax content will be automatically inserted here -->	
	</div>

</div>

<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script>
// query must be defined and must start with ?	
function updateAjaxContent(ajaxurl) {
  if (ajaxurl == undefined || ajaxurl == '') { return alert('updateAjaxContent: no url defined!'); }
  
  $.get(ajaxurl, function( data ) {
    $('#right').html(data);
  });
  return false;
}

// on page load get ajax content
$( document ).ready(function() {
  updateAjaxContent('index_body_ajax.php');
});

</script>

</body>
</html>
