$(document).ready(function(){	
    $('#slogan_sh').css({fontSize:'30px'}).dropShadow({opacity:0.3});

	$('#head_menu li').click( menuC );
	if(jQuery.browser.msie==true)
	{
		$('#head_menu li').each(function(){
			$(this).css({width:$(this).find('.green_middle').width()+47+'px'});
		});
	}

	$('.green_first').hover(function()
	{
		hmenub($(this).parent());
	},function(){
		hmenug($(this).parent());
	});
	$('.green_middle').not('[rel=black]').hover(function(){hmenub($(this).parent());},function(){hmenug($(this).parent());});
	$('.green_back').hover(function(){hmenub($(this).parent());},function(){hmenug($(this).parent());});
    $.preloadImages(
        localURLl+"/public/images/menu/black_button_first.png",
        localURLl+"/public/images/menu/black_button_middle.png",
        localURLl+"/public/images/menu/black_button_back.png"
    );
	$('.next_game_team_img').load(function(){
        ne_team_h=0;
        $(this).each(function(){
            if($(this).height()>ne_team_h)
            {
                ne_team_h=$(this).height();
            }
        }).height(ne_team_h);
    });
    $('.news_img').load(function(){
        equalHeight();
    });
    $('.banner_img').load(function(){
        equalHeight();
    });
});
jQuery.preloadImages = function()
{
    for(var i = 0; i<arguments.length; i++)
    {
        jQuery("<img>").attr("src", arguments[i]);
    }
};
function menuC(href)
{
	window.location=$(this).find('a').attr('href');
}
function equalHeight()
{
        $('#right').height('auto');
        $('#content').height('auto');
        $('#left').height('auto');

        height=$('#right').height();
        if(height<$('#content').height())
        {
            height=$('#content').height();
        }
        if(height<$('#left').height())
        {
            height=$('#left').height();
        }
        $('#right').height(height);
        $('#content').height(height);
        $('#left').height(height);
}
function hmenub(men)
{
	men.find('.green_first').addClass('active_menu');
	men.find('.green_middle').addClass('active_menu_m');
	men.find('.green_back').addClass('active_menu_b');
}
function hmenug(men)
{
	men.find('.green_first').removeClass('active_menu');
	men.find('.green_middle').removeClass('active_menu_m');
	men.find('.green_back').removeClass('active_menu_b');
}