	
var LIGHTHOUSE = LIGHTHOUSE || {};

LIGHTHOUSE.config = LIGHTHOUSE.config || {};

(function(){

	var Dom = YAHOO.util.Dom;
	var Event = YAHOO.util.Event;
	var Lang = YAHOO.lang;

	LIGHTHOUSE.config.domain = document.location.host;//no trailing slash
	LIGHTHOUSE.config.protocol = document.location.protocol;
	LIGHTHOUSE.config.autoSaveInterval = 3 * 60000; // 3 minutes in milliseconds
	LIGHTHOUSE.config.richTextEditor = {
	// autoHeight fix, this keeps the dialog boxes that appear from 'sticking' to the bottom of the height
	autoHeightFix : (function(){
		
		return {
			open : function(){
				if(parseInt(Dom.getStyle(this.get('editor_wrapper'))) > 32000){
					this.set('height', 32000);
				}else{
					this.set('height', Dom.getStyle(this.get('editor_wrapper'), 'height'));
				}
			},
			reset : function(){
				this._configs.height.value = this._configs.height._initialConfig.value;
			}
		}
	})(),

	// Config options for the content editor
	content : {
		focusAtStart: true,
		autoHeight: true,
		handleSubmit: true,
		width: '746px',
		toolbar : {
			collapse: true,
			titlebar: '',
			draggable: false,
			buttonType: 'basic',
			buttons: [
				{ group: 'textstyle', label: 'Font Style',
					buttons: [
						{ type: 'spin', label: '13', value: 'fontsize', range: [ 9, 75 ], disabled: true },
						{ type: 'push', label: 'Bold CTRL + SHIFT + B', value: 'bold' },
						{ type: 'push', label: 'Italic CTRL + SHIFT + I', value: 'italic' },
						{ type: 'push', label: 'Underline CTRL + SHIFT + U', value: 'underline' },
						{ type: 'select', label: 'Normal', value: 'heading', disabled: true,
							menu: [
								{ text: 'Normal', value: 'none', checked: true },
								{ text: 'Header 1', value: 'h1' },
								{ text: 'Header 2', value: '20' },
								{ text: 'Header 3', value: 'h3' },
								{ text: 'Header 4', value: 'h4' },
								{ text: 'Header 5', value: 'h5' },
								{ text: 'Header 6', value: 'h6' }
							]
						},
						{ type: 'separator' },
						{ type: 'color', label: 'Font Color', value: 'forecolor', disabled: true },
						{ type: 'color', label: 'Background Color', value: 'backcolor', disabled: true }
					]
				},
				{ type: 'separator' },
				{ group: 'alignment', label: 'Alignment',
					buttons: [
						{ type: 'push', label: 'Align Left CTRL + SHIFT + [', value: 'justifyleft' },
						{ type: 'push', label: 'Align Center CTRL + SHIFT + |', value: 'justifycenter' },
						{ type: 'push', label: 'Align Right CTRL + SHIFT + ]', value: 'justifyright' },
						{ type: 'push', label: 'Justify', value: 'justifyfull' }
					]
				},
				{ type: 'separator' },
				{ group: 'indentlist', label: 'Lists',
					buttons: [
						{ type: 'push', label: 'Create an Unordered List', value: 'insertunorderedlist' },
						{ type: 'push', label: 'Create an Ordered List', value: 'insertorderedlist' }
					]
				},
				{ type: 'separator' },
				{ group: 'insertitem', label: 'Insert Item',
					buttons: [
						{ type: 'push', label: 'HTML Link CTRL + SHIFT + L', value: 'createlink', disabled: true },
						{ type: 'push', label: 'Insert Image', value: 'insertimage' },
						{ type: 'push', label: 'Insert Video', value: 'insertvideo' }
					]
				}
			]
		}
	},

	// Basic rich text editing options
	standard : {
		autoHeight: false,
		handleSubmit: true,
		toolbar : {
			collapse: true,
			titlebar: '',
			draggable: false,
			buttonType: 'basic',
			buttons: [
				{ group: 'textstyle', label: 'Font Style',
					buttons: [
						{ type: 'spin', label: '13', value: 'fontsize', range: [ 9, 75 ], disabled: true },
						{ type: 'push', label: 'Bold CTRL + SHIFT + B', value: 'bold' },
						{ type: 'push', label: 'Italic CTRL + SHIFT + I', value: 'italic' },
						{ type: 'push', label: 'Underline CTRL + SHIFT + U', value: 'underline' },
						{ type: 'select', label: 'Normal', value: 'heading', disabled: true,
							menu: [
								{ text: 'None', value: 'none', checked: true },
								{ text: 'Chapter', value: 'h1' },
								{ text: 'Header 2', value: 'h2' },
								{ text: 'Header 3', value: 'h3' },
								{ text: 'Header 4', value: 'h4' },
								{ text: 'Header 5', value: 'h5' },
								{ text: 'Header 6', value: 'h6' }
							]
						},
						{ type: 'color', label: 'Font Color', value: 'forecolor', disabled: true },
						{ type: 'color', label: 'Background Color', value: 'backcolor', disabled: true }
					]
				},
				{ type: 'separator' },
				{ group: 'alignment', label: 'Alignment',
					buttons: [
						{ type: 'push', label: 'Align Left CTRL + SHIFT + [', value: 'justifyleft' },
						{ type: 'push', label: 'Align Center CTRL + SHIFT + |', value: 'justifycenter' },
						{ type: 'push', label: 'Align Right CTRL + SHIFT + ]', value: 'justifyright' },
						{ type: 'push', label: 'Justify', value: 'justifyfull' }
					]
				},
				{ type: 'separator' },
				{ group: 'indentlist', label: 'Lists',
					buttons: [
						{ type: 'push', label: 'Create an Unordered List', value: 'insertunorderedlist' },
						{ type: 'push', label: 'Create an Ordered List', value: 'insertorderedlist' }
					]
				},
				{ type: 'separator' },
				{ group: 'insertitem', label: 'Insert Item',
					buttons: [
						{ type: 'push', label: 'HTML Link CTRL + SHIFT + L', value: 'createlink', disabled: true },
						{ type: 'push', label: 'Insert Image', value: 'insertimage' },
						{ type: 'push', label: 'Insert Video', value: 'insertvideo' }
					]
				}
			]
		}
	},// standard
	tinyMCEInit : { // tinymce initialization stuff for editor on Update Content
		plugins : "paste, media, inlinepopups",
		mode : "specific_textareas",
		editor_selector : "mceEditor",
		convert_urls : false,
		remove_script_host : false,
		relative_urls : false,
		theme : "advanced",
		theme_advanced_toolbar_align : "left",
		theme_advanced_toolbar_location : "top",
		theme_advanced_buttons1 : "fontselect,fontsizeselect,bold,italic,underline,strikethrough,|,forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull,"
								 +"|,link,unlink,anchor,"
								 +"|,bullist,numlist,|,pasteword,image,media,"
								 +"|,undo,redo,"
								 +"|,code",
		theme_advanced_buttons2 : "",
		theme_advanced_buttons3 : "",
		theme_advanced_buttons4 : "",
		language : "en",
		dialog_type : "modal"

	}, // tinyMCEInit
	tinyMCEInitSmall : { // tinymce initialization stuff for editor on Update Content
		plugins : "paste, media, inlinepopups",
		mode : "specific_textareas",
		editor_selector : "mceEditorSmall",
		convert_urls : false,
		remove_script_host : false,
		relative_urls : false,
		theme : "advanced",
		language : "en",
		theme_advanced_toolbar_align : "left",
		theme_advanced_toolbar_location : "top",
		theme_advanced_buttons1 : "fontselect,fontsizeselect,bold,italic,underline,strikethrough,|,forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull,"
								 +"|,link,unlink,anchor,",
		theme_advanced_buttons2 : "bullist,numlist,|,pasteword,image,|,undo,redo",
		theme_advanced_buttons3 : "",
		theme_advanced_buttons4 : "",
		dialog_type : "modal"

	} // tinyMCEInit
};

})(); 
