﻿$(document).ready(function () {
	var now=new Date();
	var yy=now.getFullYear();
	$('#cYear').html(yy);
})

$(document).ready(function () {
	var width=parseInt($('#menu').width()/$('#menu > ul > li').length-1).toString();
	$('#menu > ul > li > a').css({width:width+'px'});

	$('#menu > ul > li > a').hover(function (){
		if ($(this).next().is('ul')) {
			$(this).parent().addClass('current');
			$(this).next().css({display:'block'});
		} else {
			$(this).parent().addClass('current');
		};
	},function (){
		if ($(this).next().is('ul')) {
			$(this).parent().removeClass('current');
			$(this).next().css({display:'none'});
		} else {
			$(this).parent().removeClass('current');
		};
	})
	$('#menu > ul > li > ul').hover(function (){
		$(this).parent().addClass('current');
		$(this).css({display:'block'});
	},function (){
		$(this).parent().removeClass('current');
		$(this).css({display:'none'});
	})
})