(function() {
    tinymce.create('tinymce.plugins.sympleCarousel', {
        init : function(ed, url) {
            ed.addButton('symple_carousel', {
                title : 'Insert Carousel',
                image : url+'/images/carousel-mce.png',
                onclick : function() {
                     ed.selection.setContent('[symple_carousel post_type="portfolio" taxonomy_name="" taxonomy_id="" count="-1" lightbox_only="false" title="false" excerpt="false" excerpt_length="15" read_more="false" img_width="220" img_height="170" margin="20" min_slides="1" max_slides="4" pager="true" controls="false" mode="horizontal"]');
                }
            });
        },
        createControl : function(n, cm) {
            return null;
        },
    });
    tinymce.PluginManager.add('symple_carousel', tinymce.plugins.sympleCarousel);
})();