
function loadContentComplete ( req, target ) {

	new Effect.Opacity('content-'+target, {from:1, to:0, queue:'end', afterFinish: function() { 																							
		new	Effect.BlindUp('content-'+target, {from:0, to:1, queue:'end', afterFinish: function() {
		
		$('content-'+target).innerHTML = req.responseText;
		
		Effect.BlindDown('content-'+target, {from:0, to:1, queue:'end'} );
		Effect.Appear('content-'+target, {from:0, to:1, queue:'end'} );		
																							  
		} } );
		
	} } );
	
	new Effect.Fade('loading-'+target, {duration:1, queue:'end'});
}

function content( file, q, method, label, target ) {

	new Effect.Appear('loading-'+target, {duration:1, queue:'end'});
	var url = file+".php?"+q;
	//var dim = $('content-'+target).getDimensions();
	var ajaxContentRequest = new Ajax.Request(url,
	{
		method: 'get',
		onComplete : function(req) {
			loadContentComplete( req, target );
		}
	
	});
	
}

loadTestimonial = function (h) {
	var file = "wp-content/plugins/axp.works-testimonial/testimonial.ajax";
	var target = 'testimonial';
	var label = 'Testimonial Data';	
	var method = 'get';	
	if(h <= maxpage && h >= 1) {
		offset = (h-1)*2; //alert('off:'+offset+'|p:'+p);
		q = "offset="+offset+"&row=10";
		content( file, q, method, label, target );
		return h;
	} else
		return p;	

}
