$(document).ready(function(){
	$("#commentPostFormSender").click(function()
	{
		$("#commentssend_progressbar img").show();
		var data = $("#commentPostForm").serialize() + "&showtpl=Y29tbWVudHMvcmVzdWx0X3NlbmRjb21tZW50LnRwbA==";
		req('comment.send', data, 'wassend');
		return false;	
	});
	
	$("a.compag").click(function(){
		$("ul.comment_paginator li").removeClass("active");
		$(this).parents("li").addClass("active");
		var data = 'sdata=' + cData + "&showtpl=Y29tbWVudHMvbGlzdF9jb21tZW50cy50cGw=﻿=&pg=" + $(this).attr('i');
		req('comment.get', data, 'drawcomment');

		return false;
	});
	
	
})


function wassend_complete(data,status)
	{
		if (status=='success') {	

		if (typeof window['wassend_complete_site'] == 'function')
			{wassend_complete_site(data, status);}
			 }else {
		alert("Возникла ошибка, попробуйте позже");
			}	
	}
	
function drawcomment_complete(data,status)
{

	if (typeof window['drawcomment_complete_site'] == 'function')
		{drawcomment_complete_site(data, status);}

}	
