  		var fadeDuration=2000;
        var slideDuration=6000;
        var currentIndex=1;
        var nextIndex=1;
        $(document).ready(function()
        {

            $('ul.slideshow li').css({opacity:0});
            $("'ul.slideshow li:nth-child("+nextIndex+")'").animate({opacity: 1}, fadeDuration);	
			$("'ul.dots li:nth-child("+nextIndex+")'").addClass('dots-active');
            var timer = setInterval('nextSlide()',slideDuration);
        })
     
        function nextSlide(){
                nextIndex =currentIndex+1;
                if(nextIndex> $('ul.slideshow li').length)
                {
                    nextIndex =1;
                }
                $("'ul.slideshow li:nth-child("+nextIndex+")'").animate({opacity: 1}, fadeDuration);
				$("'ul.dots li:nth-child("+nextIndex+")'").addClass('dots-active');
                $("'ul.slideshow li:nth-child("+currentIndex+")'").animate({opacity: 0}, fadeDuration);
				$("'ul.dots li:nth-child("+currentIndex+")'").removeClass('dots-active');
                currentIndex = nextIndex;
        }


