(function() {
    tinymce.create('tinymce.plugins.BrettsYouTube', {
        init : function(ed, url){
            ed.addCommand('simplicyvideoplayer', function(){
                ilc_sel_content = tinyMCE.activeEditor.selection.getContent();
                tinyMCE.activeEditor.selection.setContent('[video_mp4 src="url de la video"]');
            });
            ed.addButton('mp4video', {
                title: 'Insérer une vidéo Mp4',
                image: url + '/icon.png',
                cmd: 'simplicyvideoplayer'
            });
            ed.addShortcut('alt+ctrl+x', ed.getLang('Saut de ligne'), 'simplicyvideoplayer');
        },
        createControl : function(n, cm) {
            return null;
        },
        getInfo : function() {
            return {
                longname : "Brett's YouTube Shortcode",
                author : 'Brett Terpstra',
                authorurl : 'http://brettterpstra.com/',
                infourl : 'http://brettterpstra.com/',
                version : "1.0"
            };
        }
    });
    tinymce.PluginManager.add('simplicyvideoplayer', tinymce.plugins.BrettsYouTube);
})();