//#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() } } var ua = navigator.useragent; var ipad = ua.match(/(ipad).*os\s([\d_]+)/), isiphone = !ipad && ua.match(/(iphone\sos)\s([\d_]+)/), isandroid = ua.match(/(android)\s+([\d.]+)/), ismobile = isiphone || isandroid; //navigation bar $(function(){ $(".nav ul li").hover( function(){ $(this).children('').next().stop(true,true).delay(300).slidedown(400); }, function(){ $(this).children('').next().stop(true,true).delay(300).slideup(400); } ); }); //banner $(document).ready(function(){ $('.flexslider').flexslider({ directionnav: false, pauseonaction: false, animation:"slider", slideshow:true, slideshowspeed:2000, animationspeed: 1000, animationloop: true, pauseonhover:false }); $(".a_txt .div3 ul li .a_txt2 a").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:"-80%"}, 500); }) }); $(document).ready(function(){ $('.flexslider1').flexslider({ directionnav: true, pauseonaction: false, animation: "fade", slideshow:true, slideshowspeed:5000, animationspeed: 1000, pauseonhover:false, }); $(".main_banner_moblie .div2 .p2").click( function(){ console.log(($(".main_banner_moblie").height())+45) $('html,body').animate({scrolltop:($(".main_banner_moblie").height())}, 400); } ) }); // products $(document).ready(function(){ $('.flexslider2').flexslider({ directionnav: true, pauseonaction: false, animation: "slider", slideshow:true, slideshowspeed:500000000, animationspeed: 500, animationloop: false, pauseonhover: false, after:function(e){ } }); }); $(document).ready(function(){ $('.flexslider3').flexslider({ directionnav: true, pauseonaction: false, animation: "fade", slideshow:true, slideshowspeed:50000, animationspeed: 500, pauseonhover: false, }); }); $(document).ready(function(){ $('.flexslider4').flexslider({ directionnav: true, pauseonaction: false, animation: "slider", slideshow:true, slideshowspeed:5000, animationspeed: 500, pauseonhover: false, easing: "easeinsine", animationloop: true }); }); //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); } ) $(".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:"-80%"}, 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); $(".a_txt1 #video")[0].pause(); } ) $(".a_js_a").on("click",function () { $(".a_txt_a").stop(true,false).delay(0).animate({width:"100%",height:"100%"}, 0); $(".a_txt_a").find(".div1").stop(true,false).delay(0).animate({opacity:"0.5"}, 300); $(".a_txt_a").find(".div2").stop(true,false).delay(0).animate({opacity:"1"}, 300); } ) $(".a_colsed_a").click( function(){ $(".a_txt_a").stop(true,false).delay(300).animate({width:"0",height:"0"}, 0); $(".a_txt_a").find(".div1").stop(true,false).delay(0).animate({opacity:"0"}, 300); $(".a_txt_a").find(".div2").stop(true,false).delay(0).animate({opacity:"0"}, 300); } ) $(".a_js_b").click( function(){ $(".a_txt_b").stop(true,false).delay(0).animate({width:"100%",height:"100%"}, 0); $(".a_txt_b").find(".div1").stop(true,false).delay(0).animate({opacity:"1"}, 300); $(".a_txt_b").find(".div2").stop(true,false).delay(0).animate({opacity:"1"}, 300); } ) $(".a_colsed_b").click( function(){ $(".a_txt_b").stop(true,false).delay(300).animate({width:"0",height:"0"}, 0); $(".a_txt_b").find(".div1").stop(true,false).delay(0).animate({opacity:"0"}, 300); $(".a_txt_b").find(".div2").stop(true,false).delay(0).animate({opacity:"0"}, 300); } ) $(".aaaa:nth-child(5),.div_cont .div4 ul li:nth-child(4n)").addclass("li"); $(".ul_2 li:nth-child(2n),.ul_3 li:nth-child(3n),.ul_4 li:nth-child(4n),.ul_5 li:nth-child(5n),.ul_6 li:nth-child(6n)").css({"margin-right":"0"}) $(".div_inv a:nth-child(1)").addclass("a1"); $(".div_inv a:nth-child(2)").addclass("a2"); } function qs_index(){ $(window).scroll(function(){ var qs = $(window).scrolltop() var qs1 = $(".dd").offset().top var qs2 = qs1 - qs if( qs2 < 600){ demo.start(); demo1.start(); demo2.start(); }; }) } function qs_lay(){ $(window).scroll(function(){ var qs = $(window).scrolltop() var qs1 = $(".div_lay .div1").offset().top var qs2 = qs1 - qs if( qs2 < 600){ $(".div_lay .div1 .box .p1_line").delay(0).animate({width:"412px"}, 3000); $(".div_lay .div1 .box .p1 .pp1").delay(3100).animate({opacity:"1"}, 500); $(".div_lay .div1 .box .p2_line").delay(0).animate({width:"313px"}, 2600); $(".div_lay .div1 .box .p2 .pp1").delay(2700).animate({opacity:"1"}, 500); $(".div_lay .div1 .box .p3_line").delay(0).animate({height:"33px"}, 1500); $(".div_lay .div1 .box .p3 .pp1").delay(1600).animate({opacity:"1"}, 500); $(".div_lay .div1 .box .p4_line").delay(0).animate({height:"80px"}, 1800); $(".div_lay .div1 .box .p4 .pp1").delay(1900).animate({opacity:"1"}, 500); $(".div_lay .div1 .box .p5_line").delay(0).animate({height:"96px"}, 1800); $(".div_lay .div1 .box .p5 .pp1").delay(1900).animate({opacity:"1"}, 500); $(".div_lay .div1 .box .p6_line").delay(0).animate({height:"98px"}, 1800); $(".div_lay .div1 .box .p6 .pp1").delay(1900).animate({opacity:"1"}, 500); $(".div_lay .div1 .box .p7_line").delay(0).animate({height:"152px"}, 2200); $(".div_lay .div1 .box .p7 .pp1").delay(2300).animate({opacity:"1"}, 500); $(".div_lay .div1 .box .p8_line").delay(0).animate({height:"152px"}, 2200); $(".div_lay .div1 .box .p8 .pp1").delay(2300).animate({opacity:"1"}, 500); $(".div_lay .div1 .box .p9_line").delay(0).animate({height:"169px"}, 2400); $(".div_lay .div1 .box .p9 .pp1").delay(2500).animate({opacity:"1"}, 500); $(".div_lay .div1 .box .p10_line").delay(0).animate({height:"302px"}, 3000); $(".div_lay .div1 .box .p10 .pp1").delay(3100).animate({opacity:"1"}, 500); $(".div_lay .div1 .box .p11_line").delay(0).animate({width:"31px",height:"24px"}, 1500); $(".div_lay .div1 .box .p11 .pp1").delay(1600).animate({opacity:"1"}, 500); $(".div_lay .div1 .box .p12_line").delay(0).animate({width:"256px"}, 3000); $(".div_lay .div1 .box .p12 .pp1").delay(1600).animate({opacity:"1"}, 500); $(".div_lay .div1 .box .p13_line").delay(0).animate({width:"570px"}, 3000); $(".div_lay .div1 .box .p13 .pp1").delay(1600).animate({opacity:"1"}, 500); $(".div_lay .div1 .box .p14_line").delay(0).animate({width:"501px"}, 3000); $(".div_lay .div1 .box .p14 .pp1").delay(1600).animate({opacity:"1"}, 500); }; }) } // css3 animation $.fn.isinviewport = function(callback, notcallback, callbackdelay) { var $this = $(this); callbackdelay = typeof notcallback === 'number' ? notcallback : callbackdelay || 300; $(window).on('domcontentloaded scroll', function() { settimeout(function() { $this.each(function() { var elemtoptowindowtop = $(this).offset().top - $(window).scrolltop(), elembottomtowindowtop = $(this).offset().top + $(this).outerheight(true) - $(window).scrolltop(); if ( (0 <= elemtoptowindowtop && elemtoptowindowtop < $(window).height()) || (0 <= elembottomtowindowtop && elembottomtowindowtop < $(window).height()) || (elemtoptowindowtop < 0 && elembottomtowindowtop > $(window).height()) ) { if ($(this).attr('in-viewport') === undefined) { callback.call(this); $(this).attr('in-viewport', ''); } } else { if (typeof notcallback === 'function') { notcallback.call(this); $(this).removeattr('in-viewport'); } } }); }, callbackdelay); }); }; var style = document.documentelement.style, animationname = typeof style.animationname === 'string' ? 'animationname' : 'webkitanimationname', animationdelay = typeof style.animationdelay === 'string' ? 'animationdelay' : 'webkitanimationdelay', animationduration = typeof style.animationduration === 'string' ? 'animationduration' : 'webkitanimationduration'; $.fn.setanimation = function() { $(this).each(function() { if ($(this).attr('animation-name')) { $(this).css(animationname, $(this).attr('animation-name')); } if ($(this).attr('animation-delay')) { $(this).css(animationdelay, $(this).attr('animation-delay') + 'ms'); } if ($(this).attr('animation-duration')) { $(this).css(animationduration, $(this).attr('animation-duration') + 'ms'); } $(this).css('visibility', 'visible'); }); }; $('[use-animation]').isinviewport(function() { if ($(this).attr('animation-name')) { $(this).setanimation(); } else { $(this).find('[animation-name]').setanimation(); } }); var ntt = !1; $(window).bind("scroll", function() { var st = $(document).scrolltop();//往下滚的高度 ntt = ntt ? ntt: $("#head").offset().top; // document.title=st; var sel=$("#head"); if (ntt < st) { sel.addclass("head_on"); } else { sel.removeclass("head_on"); } }); 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("#1f") == -1 && 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() //nicescroll //$(document).ready(function() { // var nice = $("html").nicescroll({ // oneaxismousemode:false, // cursorcolor:"#ccc", // cursoropacitymax:1, // cursorwidth: "8px", // cursorborderradius: "0px", // cursorborder: "0px solid #fff", // autohidemode:false, // background:"#fff", // zindex:"10000", // scrollspeed: 60, // mousescrollstep: 40, // hwacceleration: true, // }); //}); //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"); }