﻿        var d=document, imgs = new Array(), zInterval = null, current=0, pause=false;

        function so_init(divel)
        {
            var elementDIV = $(divel);

            imgs = elementDIV.getElements('img.slide');
            imgs.each(function(el){
                el.setOpacity(0);
            })

			var effectFx = new Fx.Style(imgs[current], 'opacity').start(0,1);

	        setTimeout(so_xfade,3000);
        }

        function so_xfade()
        {
	        nIndex = imgs[current+1]?current+1:0;
	        var effectFx = new Fx.Style(imgs[current], 'opacity').start(1,0);
	        var effectFxn = new Fx.Style(imgs[nIndex], 'opacity', 
	        {
	            transition: Fx.Transitions.Sine.easeOut,
	            duration: 2500
	        }).start(0,1);
	        current = nIndex;
	        setTimeout(so_xfade,4000);
        }

