jQuery(document).ready(function() {

	// Do Something
	jQuery('.infobox').equalHeight();
	/*
	var originalBG = $('.menu li a').css('background-color');
	var hover = '#FFFFFF';
	jQuery('.menu li a').mouseover(function(){
		$(this).stop().animate({backgroundColor: hover},500);
	}).mouseout(function(){
		$(this).stop().animate({backgroundColor: originalBG},500);
	});
	*/
	
	// Form Validation
	jQuery('#healthsurvey').validate({
		messages: {
			Email: { required: 'Valid email please.' },
			name: { required: 'Your name please.' },
		} 
	});
	
}); 

// make sure the $ is pointing to JQuery and not some other library
(function($){
    $.fn.equalHeight = function() {
       // find the tallest height in the collection
        tallest = 0;
        this.each(function(){
            thisHeight = $(this).height();
            if( thisHeight > tallest)
                tallest = thisHeight;
        });

        // set each items height to use the tallest value found
        this.each(function(){
            $(this).height(tallest);
        });
    }
})(jQuery);

