function reset_inputs(){
    $('input.emailAddress, input.text').addClass('resetValue');
	$.each($('input.resetValue'), function() {
        $(this).data('value',$(this).val());
    });
    $('input.resetValue').focus(function() {
        if($(this).val() == $(this).data('value')) {
            $(this).val('');
        }
    })
	.blur(function() {
        if($(this).val() == '') {
            $(this).val($(this).data('value'));
        }
    });  
}

$(document).ready(function() {
	reset_inputs();

	$('input.submitBtn').hover(function(){
		$(this).parents('fieldset.element').addClass('hover');
	}, function(){
		$(this).parents('fieldset.element').removeClass('hover');
	});
	
	if(typeof document.body.style.maxHeight === "undefined") {
        //IE6 and below use new window rather than overlay
	    $('div.bottomBox > a.element, ul.footerNav li a, a.thanksEmail').click(function(){
            window.open($(this).attr('href'), 'overlay', 'width=975,height=525');
            return false;
        });        
    } else {
	    $('div.bottomBox > a.element, ul.footerNav li a, a.thanksEmail').fancybox({
		    'type'	:	'iframe'
	    });
    };
});
