/**
 * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.html or http://ckeditor.com/license
 */

CKEDITOR.editorConfig = function( config ) {
	// Define changes to default configuration here.
	// For the complete reference:
	// http://docs.ckeditor.com/#!/api/CKEDITOR.config

	//config.font_names = 'Arial;colaborate-regularregular;';
	//config.fontSize_sizes = 'Default/1.0em;small/0.9em;large/1.3em;x-large/1.5em;xx-large/2.0em;';
	//config.colorButton_colors = 'FontColor1/FF9900,FontColor2/0066CC,FontColor3/F00';
	//config.colorButton_colors = '565656,636363,EB1C24,FFFFFF';
	//config.colorButton_enableMore = false;

	// The toolbar groups arrangement, optimized for two toolbar rows.
	config.toolbarGroups = [
		{ name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
		{ name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
		{ name: 'links' },
		{ name: 'insert' },
		//{ name: 'forms' },
		{ name: 'tools' },
		{ name: 'document',	   groups: [ 'mode', 'document', 'doctools' ] },
		{ name: 'others' },
		'/',
		{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
		{ name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
		{ name: 'styles' },
		{ name: 'colors' },
		{ name: 'about' }
	];
	
	config.toolbar_Basic = [
		[ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-','Link','Unlink','Anchor','-','Source', 'About'  ]
	];
	
	config.toolbar_Full = [
	    { name: 'document',    items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
	    { name: 'clipboard',   items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
	    { name: 'editing',     items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
		{ name: 'links',       items : [ 'Link','Unlink','Anchor' ] },
	    { name: 'insert',      items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak' ] },
	    '/',
	    { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
	    { name: 'paragraph',   items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
	    { name: 'styles',      items : [ 'Styles', 'Format' ] },
	    //{ name: 'colors',      items : [ 'TextColor','BGColor' ] },
	    { name: 'tools',       items : [ 'Maximize', 'ShowBlocks','-','About' ] }
	];
	
	config.toolbar_EbayFull = [
	    { name: 'document',    items : [ 'Source','-','NewPage','DocProps','Preview','Print','-' ] },
	    { name: 'clipboard',   items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
	    { name: 'editing',     items : [ 'Find','Replace','-','SelectAll' ] },
		{ name: 'links',       items : [ 'Link','Unlink','Anchor' ] },
	    { name: 'insert',      items : [ 'Image','Table','HorizontalRule','SpecialChar','PageBreak' ] },
	    '/',
	    { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
	    { name: 'paragraph',   items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock' ] },
	    { name: 'styles',      items : [ 'Styles','Format','Font','FontSize' ] },
	    { name: 'colors',      items : [ 'TextColor','BGColor' ] },
	    { name: 'tools',       items : [ 'Maximize' ] }
	];
	
	config.toolbar = 'Full';


	// Remove some buttons, provided by the standard plugins, which we don't
	// need to have in the Standard(s) toolbar.
	//config.removeButtons = 'Underline,Subscript,Superscript';

	// Se the most common block elements.
	config.format_tags = 'p;h2;h3;h4;pre';

	// Make dialogs simpler.
	config.removeDialogTabs = 'image:advanced;link:advanced';
  
  config.filebrowserBrowseUrl = CKEDITOR_BASEPATH+'kcfinder/browse.php?type=file&dir=../../../UserFiles/Image/';
  config.filebrowserImageBrowseUrl = CKEDITOR_BASEPATH+'kcfinder/browse.php?type=image&dir=../../../UserFiles/Image/';
  config.filebrowserFlashBrowseUrl = CKEDITOR_BASEPATH+'kcfinder/browse.php?type=flash';
  config.filebrowserUploadUrl = CKEDITOR_BASEPATH+'kcfinder/upload.php?type=file';
  config.filebrowserImageUploadUrl = CKEDITOR_BASEPATH+'kcfinder/upload.php?type=image';
  config.filebrowserFlashUploadUrl = CKEDITOR_BASEPATH+'kcfinder/upload.php?type=flash'; 
  
  config.scayt_sLang = 'en_GB';
  config.wsc_lang = "en_GB";
  
  config.toolbar_Basic =
	[
		['Bold','Italic','BulletedList','Link','Format']
	];
  
};