$(function() {
	//Input field focus/blur
	$('.text').focus(function(){
		if($(this).hasClass('password')){
			this.type = 'password';
		};
		$(this).val($(this).val() == $(this).attr('default_value') ? '' : $(this).val());
		$(this).blur(function(){
			if($(this).val() == ''){
				$(this).val($(this).attr('default_value'));
				this.type = 'text';
			}
		});
	});
	
});


$(document).ready(function(){

	var duration = 150; //time in milliseconds

	$('ul#mainMenu li a').hover(function() {
		$(this).parent().stop(true, false).animate({ marginTop: '0px'}, duration);
	}, function() {
		$(this).parent().stop(true, false).animate({ marginTop: '5px'}, duration);
	});
	
	var footerHeight = $('#footer').height();
	var extraFooterHeight = 35;
	$('#footer').css("margin-top", -footerHeight-extraFooterHeight+24);
	$('#main').css("padding-bottom", footerHeight+extraFooterHeight);

	function equalHeight(group) {
		tallest = 0;
		group.each(function() {
			thisHeight = $(this).height();
			if(thisHeight > tallest) {
				tallest = thisHeight;
			}
		});
		group.height(tallest);
	}
	equalHeight($(".equalHeight"));	
});
