jQuery(document).ready(function($){
								
	$('html').addClass('js');

	$('#pageBody > .primary').find('p, li').deorphanize();
	$('ul.menu li a').closest('li')
		.css('cursor', 'pointer')
		.click(function(){ location.href = $(this).find('a').attr('href'); })
	;

	$('#nav .mainMenu > ul').find('li:has(a):has(ul)').children('a').hoverfix();
	
	$('label.overlay + input')
		.focus(function(){ $(this).prev('label.overlay').hide(); })
		.blur(function(){ if ($(this).val().length > 0) $(this).prev('label.overlay').hide(); else $(this).prev('label.overlay').show(); })
	;
	
	$('form.email-signup').submit(function(){
		var jqF = $(this);
		var emailMatcher = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}$/i;
		var info = { n: jqF.find('#signupName').val(), e: jqF.find('#signupEmail').val() };
		if ( !( (info.n.length > 0) && (info.e.length > 0) ) ) {
			alert('You must enter your name and email address.');
			
		} else if (!(emailMatcher.test(info.e))) {
			alert('You must enter a valid email address.');
			
		} else {
			$.post('/_inc/aspx/sm.aspx', info, function(data, textStatus){
				if (data == 'sent') {
					$('.sidebar .widget_signup').fadeOut("fast");
				} else {
					alert('We\'re sorry, but your request was not submitted.  Please try again later.');
				}
			}, 'text');

		}
		return false;
	});
	
});



