$(document).ready(function(){
	$('img.btn_over').mouseover(function(){
		$(this).attr('src', $(this).attr('src').toString().replace('.g','_over.g'));
    }).mouseout(function(){
		$(this).attr('src', $(this).attr('src').toString().replace('_over.g','.g'));
    });
	// alert(currentLang);
	var tc = location.href.search('/tc/');
	
	if (tc != -1){
		$('html').attr('lang', 'zh');
	}
	var min_height = $('#indexTabMenu').innerHeight(true);
	$('#wrappper_outer').find('#main_content').find('.sideSection').css('min-height', min_height);
	
	$('.news_list').each(function(){
		$(this).children('ul').children('li').each(function(){
			if ($(this).html().toLowerCase().search('<span>')==-1){
				var date = $(this).html().substring(0, $(this).html().toLowerCase().search('<div>'));
				$(this).html(''+$(this).html().substring($(this).html().toLowerCase().search('<div>'))+'');
				$(this).prepend('<span>'+date+'</span>');
			}
		});
	});
	
	if(jQuery.browser.version == '6.0'){
		$('.product_banner').children('div.right_nav').find('a').hover(
			function(){
				if ($(this).attr('class') == "p_con")
					$(this).css('background-image', 'url(/img/icon1_over.png)');
				else if ($(this).attr('class') == "p_compare")
					$(this).css('background-image', 'url(/img/icon2_over.png)');
				else if ($(this).attr('class') == "p_dl")
					$(this).css('background-image', 'url(/img/icon3_over.png)');
				else if ($(this).attr('class') == "p_dl_bro")
					$(this).css('background-image', 'url(/img/icon4_over.png)');
				else if ($(this).attr('class') == "p_printer")
					$(this).css('background-image', 'url(/img/icon5_over.png)');
			},
			function(){
				if ($(this).attr('class') == "p_con")
					$(this).css('background-image', 'url(/img/icon1.png)');
				else if($(this).attr('class') == "p_compare")
					$(this).css('background-image', 'url(/img/icon2.png)');
				else if ($(this).attr('class') == "p_dl")
					$(this).css('background-image', 'url(/img/icon3.png)');
				else if ($(this).attr('class') == "p_dl_bro")
					$(this).css('background-image', 'url(/img/icon4.png)');
				else if ($(this).attr('class') == "p_printer")
					$(this).css('background-image', 'url(/img/icon5.png)');
			}
		)
	}
});
