$(document).ready(function(){
	
	$('#header ul.menu > li > a').bind('mouseover', function() {
		$(this).find('~ ul.submenu').css('display','block');
	});
	
	$('#header ul.menu > li > a').bind('mouseout', function() {
		$(this).find('~ ul.submenu').css('display','none');
	});
	
	
	$('#header ul.menu > li > ul.submenu ').bind('mouseover', function () {
		$(this).css('display', 'block');
	});
	
	$('#header ul.menu > li > ul.submenu ').bind('mouseout', function () {
		$(this).css('display', 'none');
	});

    /* Newsletter Signup */
    var newsletter = ['from', 'name'];
    for (i in newsletter) {
        $('.delegate-effectively input[name="' + newsletter[i] + '"]').each(function(){
            $(this).attr('title', $(this).attr('value'));
            $(this).css('color', '#999');

            $(this).focus(function(){
               	if ($(this).val() == $(this).attr('title')) {
               		$(this).css('color', '#000');
               		$(this).val('');
               	}
               }).blur(function(){
               	if ($(this).val() == '') {
               		$(this).css('color', '#999');
               		$(this).val($(this).attr('title'));
               	}
               });
        });
    }
});

