Witgets.set('slideshow',{ styles: { 'element': 'box-slideshow', 'image': 'this', 'text': 'this', 'thumbs': 'thumb-img' }, content: { thumbs: true, slides: null, primary: ['slides'] }, contentSettings: { 'thumbs': 'checkbox' }, startEditing: function() { var c = this.getContent(), _this = this; Witgets.setUploadEvent($('#image-upload'), function(data) { if(c.slides == null) c.slides = []; c.slides.push({ image: data.files }); _this.set('slides', c.slides); }); $('#slideshow-slide-empty').hide(); this.setContent(); this.updateEditing(); }, updateEditing: function() { c = this.getContent(); if(c.slides == null) { c.slides = []; } image = ''; html = '
'; if(c.slides.length > 0) { Setup.element.find('.box-slideshow').html(html); $('#slideshow-slide-content').html(imagesHtml); } else { Setup.element.find('.box-slideshow').html('