<?php
if(!defined('IN_DEMOSOSO')) {
    exit('this is wrong page,please back to homepage');
}


$arr = dm_dirarr(dirname(__FILE__));

$jtpath =$arr['path'];
$jtroot = $arr['root'];

 ?>

	 
 

<!--
	<div class="welcome "><p>Loading . . .</p></div>
-->

<style>
html { 	overflow: hidden; }
</style>
 
<div id="dmfullonepage">
 
	<div id="home" class="dmsectionpage section1">
		 <?php
			block('vblock20171201_1536338532');
		 ?>
		 <a class="movedown"></a>
	</div>
	
	
 <div id="services" class="dmsectionpage  addslickmobi    bgimg2" >
		<div class="pt pt2">
	<?php
			block('vblock20170420_1158241500');
		 ?>
		 </div>
	     
	</div>
 

	
	<div id="products" class="dmsectionpage     bgimg3">
		<div class="pt pt3">
		<?php
			block('vblock20190719_1849038411');
		 ?>
	      </div>
	</div>
	
	<div id="tech" class="dmsectionpage     bgimg4">
		<div class="pt pt4">
		<?php
			block('vblock20170419_1837016257');
		 ?>
	      </div>
	</div>
	
 <div id="market" class="dmsectionpage  addslickmobi   bgimg5">
		<div class="pt pt5">
		<?php
			block('vblock20190426_1250452646');
		 ?>
	    </div>  
	</div>
	

	<div id="about" class="dmsectionpage hideimgmobi    bgimg6">
		 <div class="pt pt6">
			<?php
					block('vblock20191021_1148289139');
				 ?>
	      </div>
	</div>
	
	
	<div id="contact" class="dmsectionpage     bgimg7">
		<div class="pt pt7">
		 <?php
			block('group20180303_1220043665');
		 ?>
		  </div>
	</div>
	
	
	
</div>
	
 
 <script>
 $('#dmfullonepage').slick({
  infinite: false,
  slidesToShow: 1,
  slidesToScroll: 1,
  autoplay: false,
  speed: 600,
  dots:false,
  arrows:false,
  vertical:true,
  draggable:false
  
  
});

$('#dmfullonepage').on('wheel', (function(e) {
    e.preventDefault();
      ifwhichpage();
	 
	
		  if (e.originalEvent.deltaY < 0) {
			$(this).slick('slickPrev');
			
			
		  } else {
			$(this).slick('slickNext');
		  }
}));


 $(function(){
	 
            
			$('a.movedown').click(function(){
				$('#dmfullonepage').slick('slickNext');
			});

      //-----------------------
	 
	  if($('body').width()<800) mobimousemove();
	 
		//-----------------	
	  
	 $('.dmsectionpage').height($(window).height());
	  $('.menuonepagedec03 li').click(function(){
		 
		  indexv = $(this).index();
		  $('.menuonepagedec03 li').removeClass('active');
		  $(this).addClass('active');
		 // alert(indexv);
		   $('#dmfullonepage').slick('slickGoTo', indexv);
	 });
	 
	 
	 

	 //---------------
	 
	 hash = window.location.hash;
	 
	 hashindex = hashindex(hash);
	 $('#dmfullonepage').slick('slickGoTo', hashindex);
	
	 if(hashindex>0) $('header').addClass('fixed');
	   
	  
	 $('.menuonepagedec03 li').removeClass('active');
	 $('.menuonepagedec03 li').eq(hashindex).addClass('active');
	 
	
	 
	 //--------------
	 //-----because index use slick---------
		$('.page_index .dmkefu li.up').click(function() {
			  if($('.menu').hasClass('active'))  $('.menu').removeClass('active');
			 $('#dmfullonepage').slick('slickPrev');
			 ifwhichpage();
			  
			return false;
		});
		
		$('.page_index .dmkefu li.down').click(function(){
			 if($('.menu').hasClass('active'))  $('.menu').removeClass('active');
		      $('#dmfullonepage').slick('slickNext');
			  ifwhichpage();
			return false;});
			
			//----------------
			
			if($('body').width()<800){
				 $('.addslickmobi .gridaboutus').slick({
						  infinite: true,
						  slidesToShow: 1,
						  slidesToScroll: 1,
						  autoplay: true,
						  speed: 600,
						  dots:false,
						  arrows:true
						})
						
						
			}
			
	 
	 
 })
 
 
  //-------------
  
   function hashindex(hash){
		 indexv = 0;
		 $('.menuonepagedec03 li a').each(function(index){
				  var vv= $(this).attr('href');
				 // console.log(vv); console.log(hash);
				  if(vv==hash)  indexv=index;
			  });
			  
		return indexv;	  
		
	 }
	 
function movecutpage(){
	var currentSlide = $('#dmfullonepage').slick('slickCurrentSlide');
	 $('#dmfullonepage').slick('slickGoTo', currentSlide);
	
}	 
 function ifwhichpage(){
	 var currentSlide = $('#dmfullonepage').slick('slickCurrentSlide');
	//alert(currentSlide);
	if(currentSlide==0) $('header').removeClass('fixed');
	else $('header').addClass('fixed');
	
	$('.menuonepagedec03 li').removeClass('active');
	 $('.menuonepagedec03 li').eq(currentSlide).addClass('active');
	 
 }
 
 
 function mobimousemove(){
	  var y='';
	  var y2='';
	  var be = true;
	  $(".dmsectionpage").on("touchstart", function(e) {
            be = true;
		  var touch = e.originalEvent.targetTouches[0]; 

           y = touch.pageY; 
              
		});

  $(".dmsectionpage").on("touchmove", function(e) {
   if(be){
	   
  
		  var touch2 = e.originalEvent.targetTouches[0]; 

          var y2 = touch2.pageY;
		  be = false;
			
			  //console.log('y:'+y);
		  //console.log('y2:'+y2);
		   if(y2>y){
			   // console.log('dddd');
				var vvv = y2-y;
			    if(vvv>10) $('#dmfullonepage').slick('slickPrev'); 
				else movecutpage();
			 
		   }
		   else {
			  // console.log('xxx');
			   var vvv =  y-y2;
			      if(vvv>10) $('#dmfullonepage').slick('slickNext');
				else movecutpage();
				  
			 
		   }
		  // console.log(vvv);
	  } 	   

		});
	 
	
	 
	   
	
}

 
 </script>

 