(function($) {
	
	$.fn.slizzle = function( ) {
		this.each(function() {
			var slideid = this.id;
			setInterval( function() { slide(slideid); } , 2800 );
		});
	};

	function slide(slideid) {
    var active = $('#' + slideid + ' img.active');
		
		var next =  active.next().length ? active.next() : $('#' + slideid + ' img:first');
    
		active.addClass('lastactive'); 

		next.css({opacity: 0.0})
        	.addClass('active')
        	.animate({opacity: 1.0}, 1800, function() {
            active.removeClass('active lastactive');
        });
   	};

})(jQuery);
