        ZONTIK.Class.create("ZONTIK.Controls.Slideshow", ZONTIK.Controls.Control, 
                function(config) {
                    var thisContext = this;
                    this.items = config.items;
                    this.target = config.target;
                    $(document).ready(function(){
                      thisContext.initialize();
                    });
                }, 
                {
                    currentItem: 0,
                    intervalId: 0,
                    items: [],
                    randId: 0,
                    target : "",
                    
                    initialize: function() {
                        this.setRandId();
                        this.emptyDiv();
                        this.createSlides();
                        this.showDefaultSlide();
                        this.setSlideshowTimer();
                    },
                    
                    createSlide: function(item, i) {
                        $("#" + this.target).append(this.getSlideHTML(item, i));
                    },
                    
                    createSlides: function() {
                        for (var i=0; i < this.items.length; i++) {
                            this.createSlide(this.items[i], i);
                        }
                    },
                    
                    emptyDiv: function() {
                        $("#" + this.target).html("");
                    },
                    
                    getSlideHTML: function(item, i) {
                        var html =  "<div id='ZSlide"+ this.randId + i + "' class='ZontikSlide'>";
                        html +=      "<a href='"+ item.link + "'><img src='" + item.src + "'></a>";
                        html +=      "</div>";
                        return html;
                    },
                    
                    nextSlide: function() {
                        var currentItem = this.currentItem;
                        if (this.currentItem + 1 == this.items.length) { 
                            var nextItem = 0;
                            this.currentItem = 0;
                        } else {
                            this.currentItem++;
                            var nextItem = this.currentItem;
                        }
                        var currentSlide = "#ZSlide" + this.randId + currentItem;
                        var nextSlide = "#ZSlide" + this.randId + nextItem;
                        $(currentSlide).fadeOut(1000);
                        $(nextSlide).fadeIn(1000);
                    },
                    
                    setRandId: function() {
                        this.randId = Math.floor(Math.random() * 1000000000);
                    },
                    
                    setSlideshowTimer: function() {
                        setInterval(ZONTIK.Delegate.create(this, this.nextSlide), 6500);
                    },
                    
                    showDefaultSlide: function() {
                        this.intervalId = $("#ZSlide" + this.randId + "0").css("display", "block");
                    }
                }
            );