// JavaScript Document
$(function(){
					 
	$('input[type!=submit][type!=image]').each(function() {
		var node = $(this);
		save(node);
		node.focus(function() {
			if(node.hasClass('pw')) {
				node.addClass('hide');
				node.next('input').removeClass('hide').focus();
			}
			else if(node.attr('value') == node.attr('title')) {
				node.attr('value','');
				node.removeClass('fade');
			}
		});
		node.blur(function() {
			if(node.attr('value') == '' && node.attr('type') == 'password') {
				node.addClass('hide');				
				restore(node.prev('input'));
			}
			else if(node.attr('value') == '') restore(node);
		});
  });
	
	function save(node) {
		node.attr('title' , node.attr('value'));
	}
	
	function restore(node) {
		node.attr('value',node.attr('title'));
		node.addClass('fade');
		node.removeClass('hide');
	}

$('table[class!="crested-table"] tr:nth-child(even) td').css('background','#fbfbfb');
$('.events li:nth-child(odd)').css('background-color', '#ffffff');
});

function generateEmailLink(n,d) {
	var username = n;
	var hostname = d;
	var linktext = n+"@"+d;
	document.write("<a hr"+"ef=" + "mai"+"l" + "to:" + username +
	"@" + hostname + ">" + linktext + "</"+"a>")
}

/*-----------*/

