jQuery(function($){ 
	if($('body').hasClass(".qhd-content"))
	{
		var width = $(".qhd-content").outerWidth(true);
		var window_width = $(window).width();
	
		if(width == "" || width == 'undefined')
		{
			var w = '100%';
		}
		else
		{
			var w = width+'px';
			var w2 = width;
		}
		
		if(window_width>1280)
		{
			$(".qhd-content").ImageAutoSize(w,'*');
		}
		
		if(window_width>=1024 && window_width<1280)
		{
			$(".qhd-content").ImageAutoSize('100%','*');
		}
		
		if(window_width<1024)
		{
			$(".qhd-content").ImageAutoSize(w,'*');
		}
		
		if(window_width<980)
		{
			$(".qhd-content table").attr('width','100%');
			$(".qhd-content table").css('width','100%');
			$(".qhd-content table td").attr('width','');
			$(".qhd-content table td").css('width','auto');
		
		}
	}
	var page_url = window.location.pathname;
	if(page_url == "/" || page_url == "/index.html")
	{
		var is_qa = $.cookie('qabox');
		if(!is_qa)
		{
			/*
			layer.open({
			  type: 1,
			  title: "请选择您喜欢的站点",
			  closeBtn: 0,
			  anim: 2,
			  shadeClose: false,
			  content: $("#sitechange").html()
			});	
			*/
		}
		else if(is_qa == 'company')
		{
			//layer.closeAll();
		}
	}
	
	$('.sites').click(function(){
		var aname = $(this).attr("name");							  
		if(aname == 'company')
		{
			$.cookie('qabox', 'company');
			window.location.href ='/';
		}
		else if(aname == 'education')
		{
			$.cookie('qabox', 'education');
			window.location.href ='/education';	
		}
	});
	
	$(".country_pull_choose").hover(function () {
		$(".country_pull_box").show();
		$(".icon-chevron-up").removeClass("icon-chevron-up").addClass("icon-chevron-down");
	}, function () {
		$(".country_pull_box").hide();
		$(".icon-chevron-down").removeClass("icon-chevron-down").addClass("icon-chevron-up");
	})
});