
/** URL DES DOSSIER MODULES **/
var monkHtml = '/';
var monkAdmin = '/admin/';
function moduleHome(module){
    //On ajoute les css des modules	
       if(module == 'mobile'){
            return '/materiel/mobile/';
       }
              if(module == 'article'){
            return '/materiel/article/';
       }
              if(module == 'espace-membre'){
            return '/materiel/espace-membre/';
       }
              if(module == 'page'){
            return '/materiel/page/';
       }
              if(module == 'vente'){
            return '/materiel/vente/';
       }
              if(module == 'contact'){
            return '/materiel/contact/';
       }
              if(module == 'outils'){
            return '/materiel/outils/';
       }
              if(module == 'partenaires'){
            return '/materiel/partenaires/';
       }
              if(module == 'recherche'){
            return '/materiel/recherche/';
       }
       }

function monkEditor(selector){
    
    var config = {
		toolbar:
		[
			[
                'Bold', 'Italic', 'Underline', '-', 
                'BulletedList', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 
                'Link', 'Unlink', 'RemoveFormat', 'Anchor'],
			['UIColor']
		]
	};
    
	$(selector).each(
        function(){
            var item = $(this);  
            var edInstance = CKEDITOR.instances[item.attr('name')];
        	if (edInstance) {
        		CKEDITOR.remove(edInstance);
        	}
            
    		item.ckeditor(config);            
        }
    );
    
}

function monkEditorContent(selector){
    
    var item = $(selector);
    if(item.length){
        return item.val();
    }
    return '';
}

$(document).ready(
    function(){
        monkEditor('.monkEditor');
    }
);
