$(document).ready(function(){$(".answer").click(function(){$.ajax({type:"POST",url:"/ajax/votes.html",data:"act=ajax&id="+$("input:checked[name=gr1]").val(),success:function(msg){$(".vote").html(msg);}});});$(".month").click(function(){$(".popup_month").slideToggle("fast");});$(".year").click(function(){$(".popup_year").slideToggle("fast");});function calendarnews(){nyear=$(".year").text();nmonth=$(".month").text();$.ajax({type:"POST",url:"/ajax/calendar.html",data:"act=ajax&year="+nyear+"&month="+nmonth+"&rubric="+$("input[name=rubric_for_calendar]").val(),success:function(msg){document.getElementById("calendardates").innerHTML=msg;}});}$(".month_ch").click(function(){$(".popup_month").slideToggle("fast");$(".month").text($(this).text());calendarnews();});$(".year_ch").click(function(){$(".popup_year").slideToggle("fast");$(".year").text($(this).text());calendarnews();});$(".month_chsr").click(function(){$(".popup_month").slideToggle("fast");$(".month").text($(this).text());calendarsrnews();});$(".year_chsr").click(function(){$(".popup_year").slideToggle("fast");$(".year").text($(this).text());calendarsrnews();});$('.selnews').click(function(){$('.newsarea').hide();$('#newsarea'+$(this).attr('num')).show();});});function isEmailCorrect(email){var x=0;if(email.indexOf('@')<1)x=1;if(email.indexOf('.')<2)x=1;if(x==0)return true;else{return false;}}