// JavaScript Document

/*** 
    Simple jQuery Slideshow Script
***/

function slideSwitch() {
//clearAll()
 // $('.contentSlide').css('opacity', '0.0');
	/***FOR THE IMAGES***/
	var $active = $('#slideshow div.active');
	
	
    
	if ( $active.length == 0 ){
		$active = $('#slideshow div:last');
	}

    var $next =  $active.next().length ? $active.next() : $('#slideshow div:first');
	
	$next.fadeIn( function(){
		$active.removeAttr('style');
		
	})
	
	$active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 250, function() {
			
            $active.removeClass('active last-active');
			
			
    });
                              
    //alert($active.attr('id') + " - " + $next.attr('id'));                            
}



$(document).ready(function() {
	
	var myInt=  setInterval( "slideSwitch()", 7000 );

	
});

