function leaveMessage(){
	$("#leavemessage").css("left",((($(window).width())/2-(parseInt(360) /2)))).css("top",(($(window).height())/2-(parseInt(600)/2)+$(document).scrollTop())+"px").show();
}
function closeLeaveMessage(){
	$("#leavemessage").hide('slow');
}
function app(){
	$("#formapp").submit();
}

$(function() {
    $("#southimg").jCarouselLite({
     	auto: 800,
   		speed: 1000,
		visible: 4,
		mouseWheel: true
		
    });
    
     $("#friendurl").jCarouselLite({
     	auto: 200,
   		speed: 1000,
		visible: 3,
		mouseWheel: true,
		vertical: true 
    });
    
	 $("#zhuanti_center").jCarouselLite({
		 auto: 2000,
     	btnNext: ".topic_back",
    	btnPrev: ".topic_go",
		visible: 1,
    	speed: 3000

    });
	 $("#topic_div_m").jCarouselLite({
			auto: 200,
	   		speed: 1000,
			visible: 7,
			mouseWheel: true,
			vertical: true 
	    });
	getWelInfo();getADInfo();
	expandcontent('sc1', $('#sclink1').get(0));
});
$(function(){ 
	 var _navLi = $("#guide_of_action_ul li"),
     speed = 1000,    
     maxWidth = 678,   
     minWidth = 33,   
     diffWidth = maxWidth - minWidth;

 _navLi.each(function(i){
     var _this = $(this),
         _prev = _this.prev(),
         _left = !_prev.length ? 0 :(_prev.position().left + (i==1 ? maxWidth : minWidth));
     _this.css("left", _left).data("left", _left);
 }).click(function(){
     $(this).nextAll().each(slideBack).end().prevAll().andSelf().each(function(){	
         var id = $(this).attr("id");
		 $("#"+id+"_img").attr("src","images/"+id+"_img_01.jpg");
		 if(id=="li1"){$("#li2_img").attr("src","images/li2_img_02.jpg");$("#li3_img").attr("src","images/li3_img_02.jpg");}
	 	 if(id=="li2"){$("#li1_img").attr("src","images/li1_img_02.jpg");$("#li3_img").attr("src","images/li3_img_02.jpg");}
		 if(id=="li3"){$("#li1_img").attr("src","images/li1_img_02.jpg");$("#li2_img").attr("src","images/li2_img_02.jpg");}
		 var _this = $(this);  
         if(_navLi.index(_this)>0){
			 
             _this.stop().animate({
                 left: _this.data("left") - diffWidth
             }, speed);
         }
     });
 });
 function slideBack(){
     var _this = $(this);
     _this.stop().animate({
         left: _this.data("left")
     }, speed);
 }
});

function showMap(num){
	switch(num){
	case 1:$("#map1").show();$("#map2").hide();break;
	case 2:$("#map2").show();$("#map1").hide();break;
	}
}
function close_wel_add(){
	$("#wel_add").slideUp();
}

function tohref(obj){
	var url = obj.value;
	window.open(url);
}
