﻿//#ff8a00; HANSUN VI color system
//Blood_Wolf JQ Plug in package to support open source, if used or two development, please indicate the source, thank you for your cooperation!
//Site by HANSUN for the whole planning / page design / program development completed. 24 hours technical support - HANSUN:http://www.68hanchen.com

//Click on the box without A tag
window.onload = function () {
	for (var ii = 0; ii < document.links.length; ii++)
		document.links[ii].onfocus = function () { this.blur() }
}

//Navigation bar
$(function(){
	$(".nav ul li").hover(
		function(){
			$(this).children('').next().stop(true,true).delay(200).slideDown(500);
		},
		function(){
			$(this).children('').next().stop(true,true).delay(500).slideUp(500);
			
		}
	);
});

function nTabs(thisObj,Num){
if(thisObj.className == "active")return;
var tabObj = thisObj.parentNode.id;
var tabList = document.getElementById(tabObj).getElementsByTagName("li");
for(i=0; i <tabList.length; i++)
{
  if (i == Num)
  {
   thisObj.className = "active"; 
      document.getElementById(tabObj+"_Content"+i).style.display = "block";
  }else{
   tabList[i].className = "normal"; 
   document.getElementById(tabObj+"_Content"+i).style.display = "none";
  }
} 
}
 
//Blood_wolf Animate GO
$(function(){	    
	qs();
  });

function qs(){
	$(".ul_lf li").hover(
		function(){
			$(this).stop(true,false).delay(0).animate({left:"-10px"}, 500);
		},
		function(){
			$(this).stop(true,false).delay(0).animate({left:"0px"}, 500);
		}
	)
	$(".ul_js li").hover(
		function(){
			$(this).stop(true,false).delay(0).animate({top:"-10px"}, 500);
		},
		function(){
			$(this).stop(true,false).delay(0).animate({top:"0px"}, 500);
		}
	)
  // $(".ss2 .div2 .p2").hover(
  // 	function(){
  // 		$(this).find(".pp2").stop().slideDown(400);
  // 	},
  // 	function(){
  // 		$(this).find(".pp2").stop().slideUp(400);
  // 	}
  // )
  $(".ss2 .div2 .p2").on('mouseenter', function () {
    $(this).find(".pp2").stop().slideDown(400);
  })
  $(".ss2 .div2 .p2").on('mouseleave', function () {
    $(this).find(".pp2").stop().slideUp(400);
  })
	$(".a_js").click(
		function(){
			$(".a_txt").stop(true,false).delay(0).animate({width:"100%",height:"100%"}, 0);
			$(".a_txt").find(".div1").stop(true,false).delay(0).animate({opacity:"0.9"}, 500);
			$(".a_txt").find(".div2").stop(true,false).delay(0).animate({opacity:"1"}, 500);
			$(".a_txt").find(".div3").stop(true,false).delay(0).animate({right:"0"}, 500);
		}
	)
	$(".a_closed").click(
		function(){
			$(".a_txt").stop(true,false).delay(500).animate({width:"0",height:"0"}, 0);
			$(".a_txt").find(".div1").stop(true,false).delay(0).animate({opacity:"0"}, 500);
			$(".a_txt").find(".div2").stop(true,false).delay(0).animate({opacity:"0"}, 500);
			$(".a_txt").find(".div3").stop(true,false).delay(0).animate({right:"-100%"}, 500);
		}
	)
	$(".a_js1").click(
		function(){
			$(".a_txt1").stop(true,false).delay(0).animate({width:"100%",height:"100%"}, 0);
			$(".a_txt1").find(".div1").stop(true,false).delay(0).animate({opacity:"0.5"}, 300);
			$(".a_txt1").find(".div2").stop(true,false).delay(0).animate({opacity:"1"}, 300);
		}
	)
	$(".a_colsed1").click(
		function(){
			$(".a_txt1").stop(true,false).delay(300).animate({width:"0",height:"0"}, 0);
			$(".a_txt1").find(".div1").stop(true,false).delay(0).animate({opacity:"0"}, 300);
			$(".a_txt1").find(".div2").stop(true,false).delay(0).animate({opacity:"0"}, 300);
		}
	)
	$(".jj .div3").click(
		function(){
			$(".jj .div2").stop(true,false).delay(0).animate({width:"100%"}, 1500);
			$(".jj .div4").stop(true,false).delay(0).animate({opacity:"1",right:"0",bottom:"0"}, 1200);
			$(".jj .div5").stop(true,false).delay(1500).animate({opacity:"1"}, 800);
		}
	)
	$(".jj .div5").click(
		function(){
			$(".jj .div2").stop(true,false).delay(500).animate({width:"0%"}, 1500);
			$(".jj .div4").stop(true,false).delay(0).animate({opacity:"0",right:"-40",bottom:"-40"}, 500);
			$(".jj .div5").stop(true,false).delay(0).animate({opacity:"0"}, 500);
		}
	)
	$(".aaaa:nth-child(5)").addClass("li");
	$(".hh .div2 ul li:nth-child(4),.div_hon .div2 .slides li a:nth-child(4),.div_video1 ul li:nth-child(3n),.div_ject .div2 .slides li a:nth-child(3n),.div_dea2 .div2 ul li:nth-child(4n),.div_info1 .rg .div4 .p1:nth-child(2n)").css({"margin-right":"0"})
	//$("#div_select .pp2 ul li a").click(function(){
//		var txt = $(this).text();
//		$("#div_select .pp1").html(txt);		
//	});
	$("#div_select1 .pp2 ul li a").click(function(){
		var txt = $(this).text();
		$("#div_select1 .pp1").html(txt);		
	});
	$(".head .rg .top .a4").hover(
		function(){
			$(this).find(".div1").stop(true,true).slideDown(400);
		},
		function(){
			$(this).find(".div1").stop(true,true).slideUp(400);
		}
	);
}


function qs_muse(){
	$(window).scroll(function(){
		var qs = $(window).scrollTop() 
		var qs1 = $(".gg").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 600){
			$('#myStat').circliful();
			$('#myStat1').circliful();
			$('#myStat2').circliful();
			demo.start();
			demo1.start();
		};
	})
}

function qs_file(){
	$(window).scroll(function(){
		var qs = $(window).scrollTop() 
		var qs1 = $(".div_file").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 600){
			$('#myStat').circliful();
			$('#myStat1').circliful();
			$('#myStat2').circliful();
			demo.start();
			demo1.start();
		};
	})
}

//Animate
function qs_index(){
	$(window).scroll(function(){
		var qs = $(window).scrollTop() 
		var qs1 = $(".ff").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 600 ){
				$(".ff").find(".ff1").delay(0).animate({opacity:"1",left:"0px"}, 1500,"");
				$(".ff2").find(".div1").delay(0).animate({opacity:"1",top:"0px",right:"0px"}, 1500,"");
				$(".ff2").find(".div2").delay(0).animate({opacity:"1",top:"0px",right:"0px"}, 1500,"");
				$(".ff2").find(".div3").delay(0).animate({opacity:"1",top:"0px",right:"0px"}, 1500,"");
			}
	})
}



function qs_pro(){
	$(window).scroll(function(){
		var qs = $(window).scrollTop() 
		
		var qs1 = $(".div_pro5").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 400 ){
				$(".div_pro5").find(".div1 .p1").delay(0).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_pro5").find(".div1 .p2").delay(500).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_pro5").find(".div1 .p3").delay(1000).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_pro5").find(".div2").delay(1500).animate({opacity:"1"}, 800,"");
			}
		
		
		var qs1 = $(".div_pro2").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 400 ){
				$(".div_pro2").find(".div1 .p1").delay(0).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_pro2").find(".div1 .p2").delay(500).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_pro2").find(".div2").delay(1000).animate({top:"0",opacity:"1"}, 800,"");
				
				$(".div_pro2").find(".div3").delay(1500).animate({opacity:"1"}, 1000);
				$(".div_pro2").find(".div3 .p1").delay(2000).animate({top:"-100",opacity:"1"}, 800);
				$(".div_pro2").find(".div3 .p2").delay(2000).animate({opacity:"1"}, 800);
				$(".div_pro2").find(".div3 .p3").delay(2000).animate({top:"100",opacity:"1"}, 800);
			}
		
		
		var qs1 = $(".div_pro6").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 400 ){
				$(".div_pro6").find(".div1 .p1").delay(0).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_pro6").find(".div1 .p2").delay(500).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_pro6").find(".div1 .p3").delay(1000).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_pro6").find(".div2").delay(1500).animate({bottom:"0",opacity:"1"}, 800,"");
				$(".div_pro6").find(".div2 .p2").delay(2000).animate({width:"296px",opacity:"1"}, 3000,"");
			}
		
		
		
		
		
		
		
		
		
		
		var qs1 = $(".div_pro10 .div1").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 500 ){
				$(".div_pro10 .div1").delay(0).animate({top:"0",opacity:"1"}, 800,"");
			}
		var qs1 = $(".div_pro10 .div2").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 500 ){
				$(".div_pro10 .div2").delay(0).animate({top:"0",opacity:"1"}, 800,"");
			}
		var qs1 = $(".div_pro10 .div3").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 500 ){
				$(".div_pro10 .div3").delay(0).animate({top:"0",opacity:"1"}, 800,"");
			}

	
	
		
	})
}

function qs_tick(){
	$(window).scroll(function(){
		var qs = $(window).scrollTop() 
		var qs1 = $(".div_tick1").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 400 ){
				$(".div_tick1").find(".div1 .p1").delay(0).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_tick1").find(".div1 .p2").delay(500).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_tick1").find(".div2").delay(1000).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_tick1").find(".div3").delay(1500).animate({opacity:"1"}, 800,"");
				$(".div_tick1").find(".div3 .p1").delay(2000).animate({left:"-400"}, 800,"");
				$(".div_tick1").find(".div3 .p2").delay(2000).animate({left:"-280"}, 800,"");
				$(".div_tick1").find(".div3 .p3").delay(2000).animate({left:"-200"}, 800,"");
				$(".div_tick1").find(".div3 .p4").delay(2000).animate({left:"-75"}, 800,"");
				$(".div_tick1").find(".div3 .p5").delay(2000).animate({left:"75"}, 800,"");
				$(".div_tick1").find(".div3 .p6").delay(2000).animate({left:"200"}, 800,"");
				$(".div_tick1").find(".div3 .p7").delay(2000).animate({left:"350"}, 800,"");
			}
		var qs1 = $(".div_tick2").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 400 ){
				$(".div_tick2").find(".div1 .p1").delay(0).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_tick2").find(".div1 .p2").delay(500).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_tick2").find(".div2").delay(1000).animate({opacity:"1"}, 800,"");
				$(".div_tick2").find(".div2 .p1").delay(1500).animate({bottom:"0",opacity:"1"}, 800,"");
				$(".div_tick2").find(".div2 .p2").delay(2000).animate({bottom:"0",opacity:"1"}, 800,"");
				$(".div_tick2").find(".div2 .p3").delay(2500).animate({bottom:"0",opacity:"1"}, 800,"");
				$(".div_tick2").find(".div2 .p4").delay(3000).animate({bottom:"0",opacity:"1"}, 800,"");
				$(".div_tick2").find(".div2 .p5").delay(3500).animate({bottom:"0",opacity:"1"}, 800,"");
			}
		var qs1 = $(".div_tick3").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 400 ){
				$(".div_tick3").find(".div1 .p1").delay(0).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_tick3").find(".div1 .p2").delay(500).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_tick3").find(".div2").delay(1000).animate({bottom:"0",opacity:"1"}, 800,"");
				$(".div_tick3").find(".div3").delay(1800).animate({width:"900px"}, 2000,"");
			}
		var qs1 = $(".div_tick4").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 400 ){
				$(".div_tick4").find(".div1 .p1").delay(0).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_tick4").find(".div1 .p2").delay(500).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_tick4").find(".div2").delay(1000).animate({bottom:"0",opacity:"1"}, 800,"");
			}
		var qs1 = $(".div_tick5").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 400 ){
				$(".div_tick5").find(".div1 .p1").delay(0).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_tick5").find(".div1 .p2").delay(500).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_tick5").find(".div1 .p3").delay(1000).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_tick5").find(".div2").delay(1500).animate({bottom:"0",left:"0",opacity:"1"}, 800,"");
			}
		var qs1 = $(".div_tick6").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 400 ){
				$(".div_tick6").find(".div1 .p1").delay(0).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_tick6").find(".div1 .p2").delay(500).animate({top:"0",opacity:"1"}, 800,"");
				$(".div_tick6").find(".div1 .p3").delay(1000).animate({top:"0",opacity:"1"}, 800,"");
			}
		
		var qs1 = $(".div_tick7 .div1").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 500 ){
				$(".div_tick7 .div1").delay(0).animate({top:"0",opacity:"1"}, 800,"");
			}
		var qs1 = $(".div_tick7 .div2").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 500 ){
				$(".div_tick7 .div2").delay(0).animate({top:"0",opacity:"1"}, 800,"");
			}
		var qs1 = $(".div_tick7 .div3").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 500 ){
				$(".div_tick7 .div3").delay(0).animate({top:"0",opacity:"1"}, 800,"");
			}
		var qs1 = $(".div_tick7 .div4").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 500 ){
				$(".div_tick7 .div4").delay(0).animate({top:"0",opacity:"1"}, 800,"");
			}
		var qs1 = $(".div_tick7 .div5").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 500 ){
				$(".div_tick7 .div5").delay(0).animate({top:"0",opacity:"1"}, 800,"");
			}
		var qs1 = $(".div_tick7 .div6").offset().top
		var qs2 = qs1 - qs
		if( qs2 < 500 ){
				$(".div_tick7 .div6").delay(0).animate({top:"0",opacity:"1"}, 800,"");
			}
	})
}


//Nav Animate


var nt = !1;
	$(window).bind("scroll",
		function() {
		var st = $(document).scrollTop();//往下滚的高度
		nt = nt ? nt: $("#heg").offset().top;
		// document.title=st;
		var sel=$("#heg");
		if (nt < st) {
			sel.addClass("heg_on");
		} else {
			sel.removeClass("heg_on");
		}
});

	




//Scroll Animate
Scroller = {
    speed: 10,
    offsetParent: function(d) {
        offsetParent = d.offsetTop;
        if (d.offsetParent) {
            while (d = d.offsetParent) {
                offsetParent += d.offsetTop
            }
        }
        return offsetParent
    },
    scrollTop: function() {
        body = document.body;
        d = document.documentElement;
        if (body && body.scrollTop) {
            return body.scrollTop
        }
        if (d && d.scrollTop) {
            return d.scrollTop
        }
        if (window.pageYOffset) {
            return window.pageYOffset
        }
        return 0
    },
    attachEvent: function(a, b, d) {
        if (a.addEventListener) {
            return a.addEventListener(b, d, false)
        }
        if (a.attachEvent) {
            return a.attachEvent("on" + b, d)
        }
    },
    end: function(e) {
        if (window.event) {
            window.event.cancelBubble = true;
            window.event.returnValue = false;
            return
        }
        if (e.preventDefault && e.stopPropagation) {
            e.preventDefault();
            e.stopPropagation()
        }
    },
    scroll: function(d) {
        i = window.innerHeight || document.documentElement.clientHeight;
        h = document.body.scrollHeight;
        a = Scroller.scrollTop();
        if (d > a) {
            if (h - d > i) {
                a += Math.ceil((d - a) / Scroller.speed)
            } else {
                a += Math.ceil((d - a - (h - d)) / Scroller.speed)
            }
        } else {
            a = a + (d - a) / Scroller.speed
        }
        window.scrollTo(0, a);
        if (a == d || Scroller.offsetTop == a) {
            clearInterval(Scroller.interval)
        }
        Scroller.offsetTop = a
    },
    init: function() {
        Scroller.attachEvent(window, "load", Scroller.load)
    },
    load: function() {
        a = document.getElementsByTagName("a");
        Scroller.end(this);
        window.onscroll;
        for (i = 0; i < a.length; i++) {
            l = a[i];
            d = location.pathname;
            if (l.href && l.href.indexOf("#") != -1 && (l.pathname == d || "/" + l.pathname == d)) {
                Scroller.attachEvent(l, "click", Scroller.end);
                l.onclick = function() {
                    Scroller.end(this);
                    l = this.hash.substr(1);
                    a = document.getElementsByTagName("a");
                    for (i = 0; i < a.length; i++) {
                        if (a[i].name == l) {
                            clearInterval(Scroller.interval);
                            Scroller.interval = setInterval("Scroller.scroll(" + Scroller.offsetParent(a[i]) + ")", 10)
                        }
                    }
                }
            }
        }
    }
};
Scroller.init()

//Browser judgment
var browser=navigator.appName
var b_version=navigator.appVersion
var version=b_version.split(";");
var trim_Version=version[1].replace(/[ ]/g,"");
if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE8.0")
{
	alert("您的浏览器版本过低，请用IE9以上或其他高版本浏览器浏览该网站。");
	window.open("http://chrome.360.cn");
}
if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE7.0")
{
   	alert("您的浏览器版本过低，请用IE9以上或其他高版本浏览器浏览该网站。");
	window.open("http://chrome.360.cn");
}