<?php

/**
 *
 * @copyright  2010-2014 izend.org
 * @version    9
 * @link       http://www.izend.org
 */
?>
<?php if (!empty($title) or !empty($search) or !empty($summary) or !empty($cloud)): ?>
<div id="sidebar">
<?php if (false): ?>
<?php if (!empty($search)): ?>
<?php echo $search; ?>
<?php endif; ?>
<?php endif; ?>
<?php if (true): ?>
<?php if (!empty($title)): ?>
<?php echo $title; ?>
<?php endif; ?>
<?php endif; ?>
<?php if (!empty($summary)): ?>
<ol id="summary" class="menu">
<?php foreach ($summary as $s): ?>
<?php extract($s);	/* summary_page_id summary_page_title summary_page_url */ ?>
<li><a href="<?php echo $summary_page_url; ?>"><?php echo htmlspecialchars($summary_page_title ? $summary_page_title : $summary_page_id, ENT_NOQUOTES, 'UTF-8', false); ?></a></li>
<?php endforeach; ?>
</ol>
<?php endif; ?>
<?php if (!empty($cloud)): ?>
<?php head('javascript', 'jquery.cookie'); ?>
<div class="hidy">+</div>
<?php echo $cloud; ?>
<script type="text/javascript">
if ($.cookie('hidesidecloud') == 1) {
	$('#sidebar .cloud').hide();
}
$('#sidebar .hidy').click(function() {
	$('#sidebar .cloud').toggle();
	$.cookie('hidesidecloud', $('#sidebar .cloud').is(':hidden') ? 1 : 0, { path: '/' });
});
</script>
<?php endif; ?>
</div>
<?php endif; ?>
