(function() {
"use strict";   
	
	var rs_val = [];
	
	for(var i in revslider_shortcodes){
		rs_val[i] = {text: revslider_shortcodes[i], onclick : function() {
			tinymce.execCommand('mceInsertContent', false, revslider_shortcodes[i]);
		}};
	}
 
    tinymce.init({
        selector: ".wp-editor-area",
        toolbar: "shortcodes",
        setup: function(editor) {
 
            tinymce.PluginManager.add( 'revslider', function( editor, url ) {
     
                editor.addButton( 'revslider', {
                    type: 'listbox',
                    text: 'RevSlider',
                    icon: false,
                    onselect: function(e) {
						//tinymce.execCommand('mceInsertContent', false, e.control._text);
                    }, 
                    values: rs_val
         
                });
         
          });
         
        }
         
    });
 
})();