$(document).ready(function(){
	$('.news_spam_report').click(function(){
		var get_id = $(this).attr('id');
		var id = get_id.split('_');	
		var token = $('.token').text();
		
		if(id[3] != '' && token != '')
		{
			$.post('/news/spam_report/news/'+id[3]+'/'+token, function(data){
				$('#spam_message').remove();		
				$('<div class="flash_m_ok" id="spam_message">Panešimas išsiųstas, ačiū!</div>').insertAfter('#page_message_area');						
			});
			
			$('.news_spam').hide();	
		}
	});
}); 

