var idx = "<?php echo($cs); ?>";
function slideSwitch() {
    var $active = $('#slideshow IMG.active');
 
    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
 
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow IMG:first');
 
    $active.addClass('last-active');
 
    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
        
	$.ajax({
		type: "GET",
		url: "saveSlide.php",
		data: "currentSlide="+$next.attr('id')/*,
		success: function(msg){
		    alert( msg );
		}*/
	});
					
}

function slide_faq(obj) {
	var test = obj.id
	$('#'+test).next().slideToggle('fast', function() {});
}
 
$(function() {
    setInterval( "slideSwitch()", 3000 );
});

