";
$dom_ready_scripts[]="
$('.newsYSlctr a.current').click(function(){
$('body').toggleClass('selectyear');
})
$('#yearsHelper').click(function(){
$('body').toggleClass('selectyear');
})
$('.newsYSlctr .years a').click(function(){
var rel=$(this).attr('rel');
window.location = '$PHP_SELF?year='+rel;
})
";
if(!isset($year)){
list($year)=sql("select distinct DATE_FORMAT(published, '%Y') as y from articles order by y desc limit 1")[0];
}
$yresult = sql("select distinct DATE_FORMAT(published, '%Y') as y from articles order by y desc");
foreach($yresult as $yitem){
list($y)=$yitem;
$years[]="$y";
}
if(is_array($years)){
$yearsSelector="
";
}
include("newsList.php");
$dom_ready_scripts[]="
equalizeRows('.item', 4);
if(window.location.hash) {
var rel = window.location.hash.substring(1);
$('html, body').animate({
scrollTop: $('.item[rel='+rel+']').offset().top
}, 1000);
}
";
$total_pages = $result_array['total_pages'];
if($total_pages>1){
$articles_more="
";
$dom_ready_scripts[]="
var nextpage=2;
var total_pages=$total_pages;
$('.articles_more a').click(function(){
$.post('loadNewsList.php',
{ 'year': $year,
'page': nextpage
}, function(data) {
//$('#thumbnails .loading').stop(true, true).hide();
$(data).appendTo('.blockList');
equalizeRows('.item', 4);
});
nextpage++;
if(nextpage>total_pages){
$('.articles_more').remove();
}
return false;
});
";
}
$this_content = "
$page_title
$yearsSelector
".setting('volunteers_banner')."
";
$dom_ready_scripts[]="
$( window ).resize(function() {
equalizeRows('.item', 4);
})
$('.banner.volunteers').appendTo('.newsLenta .item:nth-child(1)');
";
echo standard_content($this_content);
?>