$(document).ready(function(){

	$('.result_item').mouseover(function(){
		//$(this).gradient({ from: 'afc9d1', to: '728f98' })
		$(this).addClass('result_hover');
	});
	$('.result_item').mouseout(function(){
		//$(this).gradient({ from: 'afc9d1', to: '728f98' })
		$(this).removeClass('result_hover');
	});

});
function deleteAd(obj){
	
	if (confirm("Valóban törölni kívánja hirdetését?")) { 
		$.get($(obj).attr('href'), function(response){
			if (response == "OK"){
				$(obj).parents('.result_item').hide();
				$(obj).parents('.result_item').remove();
			}
		
		});
	}
	
}


function updateTimeAd(obj){
	$.getJSON($(obj).attr('href'), function(response){
		if (response.status == "OK"){
			alert(response.msg);
			$(obj).parents('td:first').prev().html(response.date);
			$(obj).remove();
		}
	
	});
	
}

