// JavaScript Document
jQuery(function($){
		var UrlRegEx = function(url) {
			//如果加上/g参数，那么只返回$0匹配。也就是说arr.length = 0
			var re = /(\w+):\/\/([^\:|\/]+)(\:\d*)?(.*\/)([^#|\?|\n]+)?(#.*)?(\?.*)?/i;
			//re.exec(url);
			var arr = url.match(re);
			return arr;
		
		}
var page="";
		if(UrlRegEx(window.location.href)[5]){
			//page=UrlRegEx(window.location.href)[5].toLowerCase().split(".")[0];
			}
		else{
			page="index"
			}
   		
		
 
		//page=this.href.replace(/.+\/([^\/]+)\/*\.aspx/,'$1');
		//alert(page)
		if(page=='company'||page=='organizations'||page=='honor'||page=='dashi'){
var offset=$("#company").offset();
$("#company .menustyled").css({left:offset.left,top:offset.top+14})
			$("#company .menustyled").show();
		}
		else if(page=='news'||page=='industry'||page=='download'){
var offset=$("#menunews").offset();
$("#menunews .menustyle").css({left:offset.left,top:offset.top+14})

			$("#menunews .menustyle").show();
		}
		else if(page=='products'||page=='stuff'){
var offset=$("#products").offset();
$("#products .menustyle").css({left:offset.left,top:offset.top+14})

			$("#products .menustyle").show();
		}
		else if(page=='resource'||page=='job'){
var offset=$("#job").offset();
$("#job .menustylej").css({left:offset.left,top:offset.top+14})
			$("#job .menustylej").show();
		}
else if(page=='contact'){
				var offset=$("#bbs").offset();
				
				$("#bbs .menustyle").css({left:offset.left,top:offset.top+14})
				
				//alert("he")
				$("#bbs .menustyle").show();
	
}
		else{
			$("#company").hover(function(){
				var offset=$(this).offset();
				
				$("#company .menustyled")
				.css({left:offset.left,top:offset.top+14})
				
				$("#company .menustyled").show();
				
			   },function(){
				$("#company .menustyled").hide();
			   });
			   
			   $("#menunews").hover(function(){
				
				var offset=$(this).offset();
				//alert(offset.left)
				$("#menunews .menustyle")
				.css({left:offset.left,top:offset.top+14})
				
				$("#menunews .menustyle").show();
			   },function(){
				$("#menunews .menustyle").hide();
			   });
			   
			   $("#products").hover(function(){
				var offset=$(this).offset();
				
				$("#products .menustyle")
				.css({left:offset.left,top:offset.top+14})
				
				$("#products .menustyle").show();
			   },function(){
				$("#products .menustyle").hide();
			   })
			   
			   $("#job").hover(function(){
				var offset=$(this).offset();
				
				$("#job .menustylej")
				.css({left:offset.left,top:offset.top+14})
				
				$("#job .menustylej").show();
			   },function(){
				$("#job .menustylej").hide();
			   })
			   
			   
			   $("#bbs").hover(function(){
				var offset=$(this).offset();
				
				$("#bbs .menustyle")
				.css({left:offset.left,top:offset.top+14})
				
				//alert("he")
				$("#bbs .menustyle").show();
			   },function(){
				$("#bbs .menustyle").hide();
			   })
			}
	/*$("#getContact").load("contact.html #contactContainer",function(){
									$("#showContact").html();								
	})*/
	$("#getContact").click(function(){
									//alert("he")
								$("#showContact").load("contact.aspx #contactContainer")
								})
	$("#getContacty").click(function(){
								//alert("he")
								$("#Stuffv").load("contact.aspx #caigous")
								})
	$("#getContactx").click(function(){
										//alert("he")
									$("#prod").load("contact.aspx #xiaos")
	
	})
	
	$("#getContactj").click(function(){
										//alert("he")
									$("#jcon").load("contact.aspx #renshi")
									})
	
	
	
	
	//$("#qihoinfo1").hide();
	$("#qihoinfo2").hide();
	$("#qihoinfo3").hide();
	$("#qihotitle1").click(function(){
									$(".ctags h4").removeClass("hover")
									$(this).addClass("hover")
									
				$("#qihoinfo1").show();	
$("#qihoinfo2").hide();
	$("#qihoinfo3").hide();				
	})
	$("#qihotitle2").click(function(){
				$(".ctags h4").removeClass("hover")
									$(this).addClass("hover")					
				$("#qihoinfo2").show();	
$("#qihoinfo1").hide();
	$("#qihoinfo3").hide();				
	})
	$("#qihotitle3").click(function(){
									$(".ctags h4").removeClass("hover")
									$(this).addClass("hover")
				$("#qihoinfo3").show();	
$("#qihoinfo2").hide();
	$("#qihoinfo1").hide();			
	})
	
	
})




