$(document).ready(function(){
	$('#fade').innerfade({
		speed: 1500,
		timeout: 4000,
		type: 'sequence',
		containerheight: '234px'
	});

	//LINE HEIGHT
	var h1 = $("#content_left").height();
	var h2 = $("#calendar").height();
	
	var h1 = h1+45;
	var h2 = h2+45;
	
	if(h2 >= h1){
		$("#shadow_line").css("height", h2+'px');
	}else{
		$("#shadow_line").css("height", h1+'px');
	}
	
	//BUTTON HEIGHT
	bha = new Array();
	$('.buttons').each(function(){
		bh = $(this).height();
		bha.push(bh);
	});
	
	bha.sort();
	var bigOne = bha[0];
	$('.buttons').css('height', bigOne+'px');
	$('.buttons:last').css('margin-right', '0px');
	
	$('.buttons').click(function(){
		window.location = $(this).attr('rel');
	});

	//INPUT ELEMENTS	
	$('input[type=hidden]').each(function(){
		$(this).css('display', 'none');
	});
		
	$(':input').focus(function(){
		if($(this).val() == $(this).attr('rel')){
			$(this).val('');
		}
	}).blur(function(){
		if($(this).val() == ''){
			var atty = $(this).attr('rel');
			$(this).val(atty);
		}
	});
	
	//RANDOM STUFF
	$('#foot_right a:last').css({'padding-right' : '0px', 'border-right' : 'none'});
	$('#navbar a:last').css({'padding-right' : '0px'});
	
	//HOVER AND TOGGLE FUNCTIONS
	/*
		$('#news h2').hover(function(){
			$(this).css('color', '#000000');
		},function(){
			$(this).css('color', '#272262');
		});	
		
		$('#news h2').toggle(function(){
			$(this).next().slideDown(1000);
		},function(){
			$(this).next().slideUp(500);
		});
	*/
	
	//SHOW DESCRIPTION
	$('.showDescription').toggle(function(){
		$(this).next().show(1000);
		$(this).css('font-weight', 'bold');
	},function(){
		$(this).next().hide('slow');
		$(this).css('font-weight', 'normal');
	});
});
