jQuery.fn.ImageAutoSize = function(width,height)
{
    $("img",this).each(function()
    {
        var image = $(this);
        if(image.width()>width)
        {
            image.width(width);
            image.height(width/image.width()*image.height());
        }
        if(image.height()>height)
        {
            image.height(height);
            image.width(height/image.height()*image.width());
        }
    });
} 


$(document).ready(function() {
	// do something here
$(".openwin tr:even").css("background-color","#eee");
$(".openwin tr:odd").css("background-color","#fff");
$(".ppp").ImageAutoSize(188,135);
$('#nav li').find('.subnav li:last').css('border','none');		   
$('#nav').find('li').hover(function(){
									$(this).addClass('on');
									$(this).css('z-index','3')
									$(this).find('.subnav').css('display','block')
									},
									function(){
										$(this).removeClass('on')
										$(this).css('z-index','1')
										$(this).find('.subnav').css('display','none')
										})
$('.class .fenlei li').hover(function(){
									$(this).css('background-color','#efefef')},
									function(){
										$(this).css('background-color','transparent')});
$('#contact ul').tabs({ fxSlide: true, fxFade: true, fxSpeed: 'normal' });
$('#xuqiu ul').tabs();
$('.news').find('tr').hover(function(){
									 $(this).css('background-color','#fafafa')},
									function(){
										$(this).css('background-color','transparent')});


})
