$(document).ready(function() {
Cufon.replace('.newstitle',{hover:true})('.newsitemdate');
});

function viewNews(id) {
	$.ajax({
		type: 'POST',
		url: '/news.php',
		dataType: 'json',
		cache: false,
		data: {newsid:id},
		success: function(data,textStatus) {
			var str = '<h2>' + data[0].title + '</h2>';
			if (data[0].image)
				str += '<img src="/images/news/' + data[0].image + '" width="240" height=180" class="newsimg" />';
			str += '<div class="main-news">' + data[0].news + '</div>';
			$('#newsresult').empty().append(str);
			Cufon.replace('h2')('h3');
		},
		error: function (XMLHttpRequest, textStatus, errorThrown) {
			alert('Error : ' + textStatus);
		},
		async: true		   
	});	
	return false;
}
