/**
 * YtTools
 * requires mootools version 1.1
 *
 * @version 1.0.13 (13.08.2007)
 * @author yootheme.com
 * @copyright Copyright (C) 2007 YOOtheme Ltd. & Co. KG. All rights reserved.
 */ 
var YtTools = {
		
	start: function() {
		
		/* Color settings */
		var currentColor = '#ff4b00'; /* default */	

		/* Main menu */
		var menuEnter = { 'margin-top': 0, 'padding-bottom': 15, 'background-color': '#000000' };
		var menuLeave = { 'margin-top': 5, 'padding-bottom': 0, 'background-color': '#1E1E1E' };
		
		if (YtSettings.color == 'white') {
			$extend(menuEnter, { 'background-color': '#ffffff' });
			$extend(menuLeave, { 'background-color': '#E6E6E6' });
		}

		var menuFx = new YtMorph('#menu li', menuEnter, menuLeave,
			{ transition: Fx.Transitions.expoOut, duration: 300 }); 
	
		/* Module Morphing */
		var moduleEnter = currentColor;
		var moduleLeave = '#2e2e2e';
		if (YtSettings.color == 'white') moduleLeave = '#E6E6E6';
		
		var moduleFx = new YtMorph('table.maintable, table.maintable2, textarea.maintable3, div#ce', 
			{ 'border-top-color': moduleEnter, 'border-right-color': moduleEnter,
			  'border-bottom-color': moduleEnter, 'border-left-color': moduleEnter },
			{ 'border-top-color': moduleLeave, 'border-right-color': moduleLeave,
			  'border-bottom-color': moduleLeave, 'border-left-color': moduleLeave },
			{ transition: Fx.Transitions.expoOut, duration: 400 },
			{ transition: Fx.Transitions.sineIn, duration: 500 }); 	
		
		var listFx = new YtMorph('ul#togglewebmails li, ul#showform li', 
			{ 'background-color': moduleEnter, 'color': '#000', 'width': 170 },
			{ 'background-color': moduleLeave, 'color': '#5a5a5a', 'width': 150 },
			{ transition: Fx.Transitions.expoOut, duration: 400 },
			{ transition: Fx.Transitions.sineIn, duration: 500 });
	}

};


/* Add functions on window load */
window.addEvent('load', YtTools.start);

