window.addEvent('domready', function() {
	var list = $$('#categories a');
	list.each(function(element) {
	 
		var fx = new Fx.Morph(element, {duration:300, wait:false});
	 
		element.addEvent('mouseenter', function(){
			fx.start({
				'color': '#210e40',
				'margin-left': '5px'
			});
		});
	 
		element.addEvent('mouseleave', function(){
			fx.start({
				'color': '#646060',
				'margin-left': '0px'
			});
		});
	 
	});
	var list2 = $$('a.box_content_link');
	list2.each(function(element) {
	 
		var fx = new Fx.Morph(element, {duration:300, wait:false});
	 
		element.addEvent('mouseenter', function(){
			fx.start({
				'color': '#210e40',
				'margin-left': '11px'
			});
		});
	 
		element.addEvent('mouseleave', function(){
			fx.start({
				'color': '#646060',
				'margin-left': '6px'
			});
		});
	 
	});
	
	//window.setTimeout("tabledivs()", 300);
	
});

function tabledivs () {
	var border = 4;
	var contentheight = $('contentwrapper').getStyle('height').toInt()+border;
	var leftheight = $('left').getStyle('height').toInt();
	var rightheight = $('right').getStyle('height').toInt();
	if (contentheight > leftheight) {
		$('left').setStyle('height',contentheight+'px');
		leftheight = contentheight;
	}
	if (contentheight > rightheight) {
		$('right').setStyle('height',contentheight+'px');
		rightheight = contentheight;
	}
	
	if (leftheight < rightheight) {
		$('left').setStyle('height',rightheight+'px');
		leftheight = rightheight;
	}
	
	if (leftheight > rightheight) {
		$('right').setStyle('height',leftheight+'px');
		rightheight = leftheight;
	}
	
	if (contentheight < (leftheight-border)) {
		//$('right').setStyle('height',leftheight+'px');
		$('contentwrapper').setStyle('height',leftheight-border+'px');
	}
	
	if (contentheight < (rightheight-border)) {
		//$('left').setStyle('height',rightheight+'px');
		$('contentwrapper').setStyle('height',rightheight-border+'px');
	}
}
