
var intm_shortcode_show = false;

(function() {
    tinymce.create('tinymce.plugins.intmShortcode', {
        init : function(ed, url) {
            ed.addButton('intm_shortcode', {
                title : 'intm_shortcode',
                image : url+'/button/shortcode.png',
                onclick : function() {
                    if ( ! intm_shortcode_show ) 
                    {
                        var popup = jQuery( '#intm-shortcode-popup' );
                        if ( popup.length > 0 ) 
                        {
                            arn_ui.popup.show( popup );
                        }
                    }
                    return false;
                }
            });
        },
        createControl : function(n, cm) {
            return null;
        },
        getInfo : function() {
            return {
                longname : "Insta Theme Shortcode",
                author : 'Insta Product',
                authorurl : 'http://insta-product.com/',
                infourl : 'http://insta-product.com/',
                version : "0.1"
            };
        }
    });
    tinymce.PluginManager.add('intm_shortcode', tinymce.plugins.intmShortcode);
})();