//for tab's change status
$(function(){
		   //for tours
		   var tours=$("#fenri div[@forwhere]");
           tours.click(function(){
			  var curbnId=this.id;
			  if($("#"+$(this).attr("forwhere")).length==1){
				   $("#"+$(this).attr("forwhere")).css("display","block");
				   $(this).css("background","url(../../media/skin/client/home_hotel_bn1.gif) top no-repeat");
				   for(var i=0;i<tours.length;i++){
					   if(tours[i].id!=curbnId){
						  $(tours[i]).css("background","url(../../media/skin/client/home_hotel_bn2.gif) top no-repeat")
						  $("#"+$(tours[i]).attr("forwhere")).css("display","none");
					   }
				   }
			  }
					  })
		   
		   //for hotels
		   var hotels=$("#hotelTitle2 div[@forwhere]");
           hotels.click(function(){
			  var curbnId=this.id;
			  if($("#"+$(this).attr("forwhere")).length==1){
				   $("#"+$(this).attr("forwhere")).css("display","block");
				   $(this).css("background","url(../../media/skin/client/home_hotel_bn1.gif) top no-repeat");
				   for(var i=0;i<hotels.length;i++){
					   if(hotels[i].id!=curbnId){
						  $(hotels[i]).css("background","url(../../media/skin/client/home_hotel_bn2.gif) top no-repeat")
						  $("#"+$(hotels[i]).attr("forwhere")).css("display","none");
					   }
				   }
			  }
					  })
		   
		   
       function scrolltext(){
		
        $('#scrolltext').find("ul:first").animate({
                marginTop:"-18px"
        },500,function(){
                $(this).css({marginTop:"0px"}).find("li:first").appendTo(this);
        })
		
	   }
	    $(document).ready(function(){
								
								var timeevent=setInterval(scrolltext,3000);
								//var xwcboxTop=$("#xinwenboxcopy").offset().top-10;
								//var xwcboxLeft=$("#xinwenboxcopy").offset().left;
								//$("#xinwenboxcopy").css("height","170px");
								//$("#xinwenbox").css({"left":"50px","top":xwcboxTop+"px","display":"block"})
                                $('#scrolltext').find("li").each(function(){
																		  $(this).mouseover(function(){
																									clearInterval(timeevent);
																									 })
																		  $(this).mouseout(function(){
																									timeevent=setInterval(scrolltext,3000);
																									 })
																		  
																		  
																		  })
								
								  })		   
		   
         
		   
		   })

