// JavaScript Document

 function ReloadPage(jid){ 
 	 var taget_obj = document.getElementById('jcinfo');
	 myajax = new DedeAjax(taget_obj,false,false,'','','');
	 myajax.SendGet2("plus/feedback.php?jid="+jid+"&action=ncinfo&aid=1");
	 DedeXHTTP = null;
  }
function ss(a,b,c,d)
{
//document.getElementById('jctitle').innerHTML=a;
//document.getElementById('jctime').innerHTML=b;
document.getElementById('bigimg').style.background="url("+c+")";
//ReloadPage(d);
}

$(function(){
	$(".scrollable-1").scrollable();
	$(".scrollable-2").scrollable();
	$(".scrollable-3").scrollable();
	$(".scrollable-4").scrollable();
	$(".scrollable-5").scrollable();
	/*----Jquery control picture change ----*/
	//initialize small pic opacity to 0.6 
	$(".gallery-1").animate({opacity: 0.8}, 0);
	$(".gallery-1 > li").animate({opacity: 0.6}, 0);
	$(".p-1").animate({opacity: 1}, 0); 
	var index_1 = 1; 
	
		
	//when mouse over change pic opacity to 1
	$(".gallery-1 > li").mouseover(function(){ 
		$(this).animate({opacity: 1}, 0); 
	}); 
	//when mouse out resume pic opacity to 0.6
	$(".gallery-1 > li").mouseout(function(){ 
		$(this).animate({opacity: 0.6}, 0);
	}); 
	
	
	//click small pic ,change big pic to show
	function pic_1_ShowLight(){
			//when to one pic its opacity change to 1
				$(".pic-1").animate({opacity: 0.6}, 0); 
				if(index_1==1){
					$(".p-1").animate({opacity: 1}, 0); 
				}if(index_1==2){
					$(".p-2").animate({opacity: 1}, 0); 
				}if(index_1==3){
					$(".p-3").animate({opacity: 1}, 0);  
				}if(index_1==4){
					$(".p-4").animate({opacity: 1}, 0); 
				}if(index_1==5){
					$(".p-5").animate({opacity: 1}, 0); 
				}	
	}
	
	/*----------------------------------------------------------------------------------------------*/
	var index_2 = 0; 
	var img_length_1 =0 ;
	var img_length_1 =  $(".pic-2 > img").length;
 
	//initialize small pic opacity to 0.6 
	$(".pic-2 > img").animate({opacity: 0.6}, 0);
	//$(".image_show-2").css({background:"url(images/s_pic_1.jpg) no-repeat center bottom"}); 
	$(".g-2-1").animate({opacity: 1}, 0); 
	//when mouse over change pic opacity to 1
	$(".pic-2 img").mouseover(function(){ 
		$(this).animate({opacity: 1}, 0); 
	}); 
	//when mouse out resume pic opacity to 0.6
	$(".pic-2 img").mouseout(function(){ 
		$(this).animate({opacity: 0.6}, 0);
	}); 
	//click small pic ,change big pic to show
	$(".pic-2 > img").click(function(){
			var src_path = $(this).attr("src"); 
			index_2 = $(".pic-2 > img").index($(this)); 
			 
			pic_2_ShowLight(index_2);
			$(".image_show-2").css({background:"url('"+src_path+"') no-repeat center bottom"});
	});
    
	function changePic_2(){ 
		setInterval(function() {   
				var srcs = $(".pic-2 > img").get(index_2); 
				var temp_src= srcs.src; 
				$(".image_show-2").css({background:"url('"+temp_src+"') no-repeat center bottom"});
				pic_2_ShowLight();
				index_2++; 
				if(index_2==img_length_1){
					index_2=0;
				} 
		},3000);
	}

	changePic_2();
	
	function pic_2_ShowLight(temp){
				//when to one pic its opacity change to 1
				$(".pic-2 >img").animate({opacity: 0.6}, 0); 
				//alert(temp);
				$(".pic-2 >img").eq(temp).animate({opacity: 1}, 0); 
	}
	/*----------------------------------------------------------------------------------------------*/
	var index_3 = 0; 
	var img_length_2 =0 ;
	var img_length_2 =  $(".pic-3 > img").length;
	//initialize small pic opacity to 0.6 
	$(".pic-3 img").animate({opacity: 0.6}, 0);
	//$(".image_show-3").css({background:"url(images/s_pic_1.jpg) no-repeat center bottom"}); 
	$(".g-3-1").animate({opacity: 1}, 0); 
	//when mouse over change pic opacity to 1
	$(".pic-3 img").mouseover(function(){ 
		$(this).animate({opacity: 1}, 0); 
	}); 
	//when mouse out resume pic opacity to 0.6
	$(".pic-3 img").mouseout(function(){ 
		$(this).animate({opacity: 0.6}, 0);
	}); 
	//click small pic ,change big pic to show
	$(".pic-3 > img").click(function(){
			var src_path = $(this).attr("src"); 
			index_3 = $(".pic-3 > img").index($(this)); 
			pic_3_ShowLight();
			$(".image_show-3").css({background:"url('"+src_path+"') no-repeat center bottom"});
	});
 
 
	function changePic_3(){ 
		setInterval(function() {   
				var srcs = $(".pic-3 > img").get(index_3); 
				var temp_src= srcs.src; 
				$(".image_show-3").css({background:"url('"+temp_src+"') no-repeat center bottom"});
				pic_3_ShowLight();
				index_3++;
				if(index_3==img_length_2){
					index_3=0;
				}
		},3000);
	}

	changePic_3();
	
	function pic_3_ShowLight(){
			//when to one pic its opacity change to 1
				$(".pic-3 >img").animate({opacity: 0.6}, 0); 
				if(index_3==0){
					$(".g-2-1").animate({opacity: 1}, 0); 
				}if(index_3==1){
					$(".g-2-2").animate({opacity: 1}, 0); 
				}if(index_3==2){
					$(".g-2-3").animate({opacity: 1}, 0);  
				}if(index_3==3){
					$(".g-2-4").animate({opacity: 1}, 0); 
				}if(index_3==4){
					$(".g-2-5").animate({opacity: 1}, 0); 
				}	  
	}
	/*----------------------------------------------------------------------------------------------*/
	var index_4 = 0; 
	var img_length_3 =0 ;
	var img_length_3 =  $(".pic-4 > img").length;
	//initialize small pic opacity to 0.6 
	$(".pic-4 img").animate({opacity: 0.6}, 0);
	//$(".image_show-4").css({background:"url(images/s_pic_1.jpg) no-repeat center bottom"}); 
	$(".g-4-1").animate({opacity: 1}, 0); 
	//when mouse over change pic opacity to 1
	$(".pic-4 img").mouseover(function(){ 
		$(this).animate({opacity: 1}, 0); 
	}); 
	//when mouse out resume pic opacity to 0.6
	$(".pic-4 img").mouseout(function(){ 
		$(this).animate({opacity: 0.6}, 0);
	}); 
	//click small pic ,change big pic to show
	$(".pic-4 > img").click(function(){
			var src_path = $(this).attr("src"); 
			index_4 = $(".pic-4 > img").index($(this)); 
			pic_4_ShowLight();
			$(".image_show-4").css({background:"url('"+src_path+"') no-repeat center bottom"});
	});
 
 
	function changePic_4(){ 
		setInterval(function() {  
				var srcs = $(".pic-4 > img").get(index_4); 
				var temp_src= srcs.src; 
				$(".image_show-4").css({background:"url('"+temp_src+"') no-repeat center bottom"});
				pic_4_ShowLight();
				index_4++;
				if(index_4==img_length_3){
					index_4=0;
				}
		},3000);
	}

	changePic_4();
	
	function pic_4_ShowLight(){
			//when to one pic its opacity change to 1
				$(".pic-4 >img").animate({opacity: 0.6}, 0); 
				if(index_4==0){
					$(".g-3-1").animate({opacity: 1}, 0); 
				}if(index_4==1){
					$(".g-3-2").animate({opacity: 1}, 0); 
				}if(index_4==2){
					$(".g-3-3").animate({opacity: 1}, 0);  
				}if(index_4==3){
					$(".g-3-4").animate({opacity: 1}, 0); 
				}if(index_4==4){
					$(".g-3-5").animate({opacity: 1}, 0); 
				}	  
	}
	/*----------------------------------------------------------------------------------------------*/
	var index_5 = 0; 
	var img_length_4 =0 ;
	var img_length_4 =  $(".pic-5 > img").length;
	//initialize small pic opacity to 0.6 
	$(".pic-5 img").animate({opacity: 0.6}, 0);
	//$(".image_show-5").css({background:"url(images/s_pic_1.jpg) no-repeat center bottom"}); 
	$(".g-5-1").animate({opacity: 1}, 0); 
	//when mouse over change pic opacity to 1
	$(".pic-5 img").mouseover(function(){ 
		$(this).animate({opacity: 1}, 0); 
	}); 
	//when mouse out resume pic opacity to 0.6
	$(".pic-5 img").mouseout(function(){ 
		$(this).animate({opacity: 0.6}, 0);
	}); 
	//click small pic ,change big pic to show
	$(".pic-5 > img").click(function(){
			var src_path = $(this).attr("src"); 
			index_5 = $(".pic-5 > img").index($(this)); 
			pic_5_ShowLight();
			$(".image_show-5").css({background:"url('"+src_path+"') no-repeat center bottom"});
	});
 
 
	function changePic_5(){ 
		setInterval(function() {  
				var srcs = $(".pic-5 > img").get(index_5); 
				var temp_src= srcs.src; 
				$(".image_show-5").css({background:"url('"+temp_src+"') no-repeat center bottom"});
				pic_5_ShowLight();
				index_5++;
				if(index_5==img_length_4){
					index_5=0;
				}
		},3000);
	}

	changePic_5();
	
	function pic_5_ShowLight(){
			//when to one pic its opacity change to 1
				$(".pic-5 >img").animate({opacity: 0.6}, 0); 
				if(index_5==0){
					$(".g-4-1").animate({opacity: 1}, 0); 
				}if(index_5==1){
					$(".g-4-2").animate({opacity: 1}, 0); 
				}if(index_5==2){
					$(".g-4-3").animate({opacity: 1}, 0);  
				}if(index_5==3){
					$(".g-4-4").animate({opacity: 1}, 0); 
				}if(index_5==4){
					$(".g-4-5").animate({opacity: 1}, 0); 
				}	  
	}
	/*----------------------------------------------------------------------------------------------*/
	var index_6 = 1; 
	var img_length_5 =0 ;
	var img_length_5 =  $(".pic-6 > img").length;
	//initialize small pic opacity to 0.6 
	$(".pic-6 img").animate({opacity: 0.6}, 0);
	//$(".image_show-6").css({background:"url(images/s_pic_1.jpg) no-repeat center bottom"}); 
	$(".g-6-1").animate({opacity: 1}, 0); 
	//when mouse over change pic opacity to 1
	$(".pic-6 img").mouseover(function(){ 
		$(this).animate({opacity: 1}, 0); 
	}); 
	//when mouse out resume pic opacity to 0.6
	$(".pic-6 img").mouseout(function(){ 
		$(this).animate({opacity: 0.6}, 0);
	}); 
	//click small pic ,change big pic to show
	$(".pic-6 > img").click(function(){
			var src_path = $(this).attr("src"); 
			index_6 = $(".pic-6 > img").index($(this)); 
			pic_6_ShowLight();
			$(".image_show-6").css({background:"url('"+src_path+"') no-repeat center bottom"});
	});
 
 
	function changePic_6(){ 
		setInterval(function() {   
				var srcs = $(".pic-6 > img").get(index_6); 
				var temp_src= srcs.src; 
				$(".image_show-6").css({background:"url('"+temp_src+"') no-repeat center bottom"});
				pic_6_ShowLight();
				index_6++;
				if(index_6==img_length_5){
					index_6=0;
				}
		},3000);
	}

	changePic_6();
	
	function pic_6_ShowLight(){
			//when to one pic its opacity change to 1
				$(".pic-6 >img").animate({opacity: 0.6}, 0); 
				if(index_6==0){
					$(".g-5-1").animate({opacity: 1}, 0); 
				}if(index_6==1){
					$(".g-5-2").animate({opacity: 1}, 0); 
				}if(index_6==2){
					$(".g-5-3").animate({opacity: 1}, 0);  
				}if(index_6==3){
					$(".g-5-4").animate({opacity: 1}, 0); 
				}if(index_6==4){
					$(".g-5-5").animate({opacity: 1}, 0); 
				}	  
	}
	/*---------------------------------*/
 	
	
	
	
	
	
	
	
	
	/*----Jquery slide effect  ----*/
	$(function(){  
		$(".title-1").click(function(){   
				//$(".title-1").css("background","url(images/main_company_title_hover_1.jpg) center center");
				//$(".title-2").css("background","url(images/main_company_title_2.jpg) center center");
				//$(".title-3").css("background","url(images/main_company_title_3.jpg) center center");
				//$(".title-4").css("background","url(images/main_company_title_4.jpg) center center");
				//$(".title-5").css("background","url(images/main_company_title_5.jpg) center center");
				
				$(".tab-2").animate({width: '35px'}, 0);
				$(".tab-3").animate({width: '35px'}, 0);
				$(".tab-4").animate({width: '35px'}, 0);
				$(".tab-5").animate({width: '35px'}, 0);
				$(".tab-1").animate({width: '775px'}, 1000);
		}); 

		$(".title-2").click(function(){  
				//$(".title-1").css("background","url(images/main_company_title_1.jpg) center center");
				//$(".title-2").css("background","url(images/main_company_title_hover_2.jpg) center center");
				//$(".title-3").css("background","url(images/main_company_title_3.jpg) center center");
				//$(".title-4").css("background","url(images/main_company_title_4.jpg) center center");
				//$(".title-5").css("background","url(images/main_company_title_5.jpg) center center");
				
				$(".tab-1").animate({width: '35px'}, 0);
				$(".tab-3").animate({width: '35px'}, 0);
				$(".tab-4").animate({width: '35px'}, 0);
				$(".tab-5").animate({width: '35px'}, 0);
				$(".tab-2").animate({width: '775px'}, 1000); 
		}); 

		$(".title-3").click(function(){   
				//$(".title-1").css("background","url(images/main_company_title_1.jpg) center center");
				//$(".title-2").css("background","url(images/main_company_title_2.jpg) center center");
				//$(".title-3").css("background","url(images/main_company_title_hover_3.jpg) center center");
				//$(".title-4").css("background","url(images/main_company_title_4.jpg) center center");
				//$(".title-5").css("background","url(images/main_company_title_5.jpg) center center");
				
				$(".tab-1").animate({width: '35px'}, 0);
				$(".tab-2").animate({width: '35px'}, 0);
				$(".tab-4").animate({width: '35px'}, 0);
				$(".tab-5").animate({width: '35px'}, 0);
				$(".tab-3").animate({width: '775px'}, 1000);
		}); 
		
		$(".title-4").click(function(){  
				//$(".title-1").css("background","url(images/main_company_title_1.jpg) center center");
				//$(".title-2").css("background","url(images/main_company_title_2.jpg) center center");
				//$(".title-3").css("background","url(images/main_company_title_3.jpg) center center");
				//$(".title-4").css("background","url(images/main_company_title_hover_4.jpg) center center");
				//$(".title-5").css("background","url(images/main_company_title_5.jpg) center center");
				 
				$(".tab-1").animate({width: '35px'},0);
				$(".tab-2").animate({width: '35px'}, 0);
				$(".tab-3").animate({width: '35px'}, 0); 
				$(".tab-5").animate({width: '35px'}, 0);
				$(".tab-4").animate({width: '775px'}, 1000);
		}); 
		
		$(".title-5").click(function(){ 
				//$(".title-1").css("background","url(images/main_company_title_1.jpg) center center");
				//$(".title-2").css("background","url(images/main_company_title_2.jpg) center center");
				//$(".title-3").css("background","url(images/main_company_title_3.jpg) center center");
				//$(".title-4").css("background","url(images/main_company_title_4.jpg) center center");
				//$(".title-5").css("background","url(images/main_company_title_hover_5.jpg) center center");
				  
				$(".tab-1").animate({width: '35px'}, 0);
				$(".tab-2").animate({width: '35px'}, 0);
				$(".tab-3").animate({width: '35px'}, 0);
				$(".tab-4").animate({width: '35px'}, 0);
			  $(".tab-5").animate({width: '775px'}, 1000);
		}); 
	});
	/*---------------------------------*/
});
