function onAfter() { 
	var idsx = $(this).attr('rel');
	var $content  = $("#minislider") ;
	$.ajax({
		type: "GET",
		url: "Asl.php",
		data: "idsx=" + idsx ,
		success: function(html){
			$content.empty().append(html).fadeIn("slow");
		}
	});
	
}

function onBefore() { 
	var $content  = $("#minislider") ;
	$content.fadeOut("slow");
}

$(document).ready(function(){

	var numslide = $('.slide img').length ;
	if(numslide > 1)
	{
		$('.slide') 
		.cycle({ 
			fx:     'fade', 
			speed:  'slow', 
			timeout: 5000, 
			 pause:         true,  
			pager:  '#navslide' ,
			before: onBefore,
			after:   onAfter 
		});
		
	}
	else
	{
		var idsx = $('.slide img:first').attr('rel');
		var $content  = $("#minislider") ;
			$.ajax({
				type: "GET",
				url: "Asl.php",
				data: "idsx=" + idsx ,
				success: function(html){
					$content.empty().append(html).fadeIn("slow");
				}
			});
	}
	
	$('.slide2') 
	.cycle({ 
		fx:     'fade', 
		speed:  'slow', 
		timeout: 5000, 
		 pause:         true

	});
});
