// JavaScript Document

$(document).ready(function () {
	$("a[href^=mailto]").css({'text-decoration' : 'underline'});
	$("#header ul li:first-child").css({'padding-left' : '0'});
	$("ul.links li:first-child").css({'padding-left' : '10px'});
	$("#header ul li:first-child a").css({'padding-left' : '0'});
	$("#header ul li:last-child").css({'border-right' : '0'});
	$("#header ul li:last-child a").css({'border-right' : '0'});
	$("ul.file li:last-child").css({'border-right' : '0'});
	$("dl dd:last-child").css({'border-right' : '0'});
	
	$("#template").append('<div class="corner topLeft"></div>');        	
	$("#template").append('<div class="corner topRight"></div>');   
	$("#template").append('<div class="corner bottomLeft"></div>');   
	$("#template").append('<div class="corner bottomRight"></div>');   
	
	
	$("a.login").mouseover(function(){
      $("#login").show();
    })
	$("#login").mouseover(function(){
      $("#login").show();
    })
	$("#login").mouseout(function(){
      $("#login").hide();
      $("#login.homepage").show();
    })
	

	$("ul a").hover(function() {
		var w = $(this).width();
		w = -123 + w;
	  $(this).next("em").css({left: w});
	  $(this).next("em").animate({opacity: "show", top: "-35"}, "slow");
	}, function() {
	  $(this).next("em").animate({opacity: "hide", top: "-45"}, "fast");
	});
});
