//by Hugh

$(document).ready(function(){ 
//导航下拉菜单  
            $('.navitem').mouseover (function(){
                $(this).children(".secnav").css("display","block");
            }); 
			$('.navitem').mouseout (function(){   
                $(this).children("ul").css("display","none");
            });
		
//倒计时计算
			function getDiffDate(m){
				m-=(D=parseInt(m/86400000))*86400000;
				return D;
			}
			diff = getDiffDate(new Date('2011/6/7')-new Date());
			$('#exam').html(diff);
			
//自己写的浮动层插件			
			jQuery.fn.center = function () {  
				this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px");  
				this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px").show();  
				return this;  
			}
			$('.jiyu').click (function(){
                $('#speak').center();
            }); 
			$('.close').click (function(){
                $('#speak').css("display","none");
            }); 
        });

