$(window).scroll(function () { if ($(window).scrollTop() >= 30) { $("#header").addClass("header-fixed"); } else { $("#header").removeClass("header-fixed"); } }); $(function(){ /*var wow = new WOW({ boxClass: 'wow', animateClass: 'animated', offset: 0, mobile: true, live: true }); wow.init();*/ //棣栭〉鏍稿績涓氬姟鍒囨崲 $("#hx-vip li").on("click",function(){ $(this).addClass("active").siblings().removeClass("active"); }); //涓撻鐮旂┒tab //$("#tabs").tabso({ // cntSelect: "#tabContent1", // tabEvent: "click", // tabStyle: "fade" //}); //棣栭〉鏂伴椈tab $("#newsMenu").tabso({ cntSelect: "#tabContent2", tabEvent: "hover", tabStyle: "" }); //浜т笟鐮旂┒ 浜т笟鎶曡祫鎮ㄩ渶瑕乼ab $("#tzTab").tabso({ cntSelect: "#tabContent3", tabEvent: "click", tabStyle: "normal" }); //浜т笟鐮旂┒ 浜х爺鎴愭灉 $("#cgTab").tabso({ cntSelect: "#tabContent4", tabEvent: "click", tabStyle: "fade" }); $("#cgTab2").tabso({ cntSelect: "#tabContent5", tabEvent: "click", tabStyle: "fade" }); $("#zbTab").tabso({ cntSelect: "#tabContent6", tabEvent: "click", tabStyle: "fade" }); //浜т笟瑙勫垝 $("#ghfc").tabso({ cntSelect: "#tabContent7", tabEvent: "click", tabStyle: "fade" }); $("#jztxBox li").hover(function () { $(this).addClass("current").siblings().removeClass("current"); }); //鎷涘晢 $(".zs-tixi li").hover(function () { $(this).addClass("current").siblings().removeClass("current"); }); //澶撮儴鍥哄畾 $(window).scroll(function() { var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop; if(scrollTop > 50) { $('.header').addClass('header-fixed'); } else { $('.header').removeClass('header-fixed'); } }); }); //tab鍒囨崲 ;(function($){ $.fn.tabso=function( options ){ var opts=$.extend({},$.fn.tabso.defaults,options ); return this.each(function(i){ var _this=$(this); var $menus=_this.children( opts.menuChildSel ); var $container=$( opts.cntSelect ).eq(i); if( !$container) return; if( opts.tabStyle=="move"||opts.tabStyle=="move-fade"||opts.tabStyle=="move-animate" ){ var step=0; if( opts.direction=="left"){ step=$container.children().children( opts.cntChildSel ).outerWidth(true); }else{ step=$container.children().children( opts.cntChildSel ).outerHeight(true); } } if( opts.tabStyle=="move-animate" ){ var animateArgu=new Object(); } $menus[ opts.tabEvent]( function(){ var index=$menus.index( $(this) ); $( this).addClass( opts.onStyle ) .siblings().removeClass( opts.onStyle ); switch( opts.tabStyle ){ case "fade": if( !($container.children( opts.cntChildSel ).eq( index ).is(":animated")) ){ $container.children( opts.cntChildSel ).eq( index ).siblings().css( "display", "none") .end().stop( true, true ).fadeIn( opts.aniSpeed ); } break; case "move": $container.children( opts.cntChildSel ).css(opts.direction,-step*index+"px"); break; case "move-fade": if( $container.children( opts.cntChildSel ).css(opts.direction)==-step*index+"px" ) break; $container.children( opts.cntChildSel ).stop(true).css("opacity",0).css(opts.direction,-step*index+"px").animate( {"opacity":1},opts.aniSpeed ); break; case "move-animate": animateArgu[opts.direction]=-step*index+"px"; $container.children( opts.cntChildSel ).stop(true).animate( animateArgu,opts.aniSpeed,opts.aniMethod ); break; default: $container.children( opts.cntChildSel ).eq( index ).css( "display", "block") .siblings().css( "display","none" ); } }); $menus.eq(0)[ opts.tabEvent ](); }); }; $.fn.tabso.defaults={ cntSelect : ".content_wrap", tabEvent : "mouseover", tabStyle : "normal", direction : "top", aniMethod : "swing", aniSpeed : "fast", onStyle : "current", menuChildSel : "*", cntChildSel : "*" }; })(jQuery); ;(function($,document,window){$.pictureViewer=function(options){var pictureViewer_html='
'+ '
'+ ''+ '
'+ '
'+ ''+ '
'+ '
'+ '
'+ ' of '+ '
'+ '
'+ '
';var $images=options.images,$initImageIndex=options.initImageIndex,$scrollSwitch=options.scrollSwitch;if(!$images||!$images.length)return;if(!$initImageIndex)$initImageIndex=1;var $nowImageIndex=$initImageIndex;if(!$('#pictureViewer').length)$('body').append(pictureViewer_html);var BODY=$('body');var ESC_KEY_CODE=27;var LEFT_KEY_CODE=37;var RIGHT_KEY_CODE=39;var $pictureViewer=$('#pictureViewer');var $pictureViewerContent=$pictureViewer.children('.content');var $cover=$pictureViewer.find('.picture-content .cover');var $closeBtn=$pictureViewer.find('.close-view');var $maximizationBtn=$pictureViewer.find('.maximization');var $miniaturizationBtn=$pictureViewer.find('.miniaturization');var $prevBtn=$pictureViewer.find('.handel-prev');var $nextBtn=$pictureViewer.find('.handel-next');var $num=$pictureViewer.find('.counter .num');var $total=$pictureViewer.find('.counter .total');var defaultViewWidth=$pictureViewerContent.css('width');var defaultViewHeight=$pictureViewerContent.css('height');var $imagesTotal=$images.length;var viewIsShow=function viewIsShow(){return $pictureViewer.is(':visible');};var lockBody=function lockBody(){return BODY.css('','');};var unlockBody=function unlockBody(){return BODY.css('','');};var showView=function showView(){$pictureViewer.show();lockBody();};var hideView=function hideView(){$pictureViewer.hide();$maximizationBtn.show();$miniaturizationBtn.hide();$pictureViewerContent.css({'width':defaultViewWidth,'height':defaultViewHeight});unlockBody();};var changeImage=function changeImage(index){$cover.attr('src',$images[index]);$nowImageIndex=index;changeImageNum();};var changeImageNum=function changeImageNum(){$num.text($nowImageIndex+1);};var toPrevImage=function toPrevImage(){return changeImage($nowImageIndex===0?$imagesTotal-1:$nowImageIndex-1);};var toNextImage=function toNextImage(){return changeImage($nowImageIndex===$imagesTotal-1?0:$nowImageIndex+1);};showView();changeImage($initImageIndex-1);$total.text($imagesTotal);$closeBtn.on('click',hideView);$maximizationBtn.on('click',function(){$(this).hide();$miniaturizationBtn.show();$pictureViewerContent.css({'width':'100%','height':'100%'});});$miniaturizationBtn.on('click',function(){$(this).hide();$maximizationBtn.show();$pictureViewerContent.css({'width':defaultViewWidth,'height':defaultViewHeight});});$(document).on('keydown',function(event){if(!viewIsShow())return;var keyCode=event.keyCode;if(keyCode===ESC_KEY_CODE)hideView();if(keyCode===LEFT_KEY_CODE)toPrevImage();if(keyCode===RIGHT_KEY_CODE)toNextImage();});$prevBtn.on('click',toPrevImage);$nextBtn.on('click',toNextImage);if($scrollSwitch){try{$pictureViewerContent.mousewheel(function(event,delta){if(delta===1)toPrevImage();if(delta===-1)toNextImage();});}catch(e){throw 'mousewheel plugin No import!';}}};})(jQuery,document,window); /** * jQuery.marquee - scrolling text like old marquee element * @author Aamir Afridi - aamirafridi(at)gmail(dot)com / http://aamirafridi.com/jquery/jquery-marquee-plugin */ (function($){$.fn.marquee=function(options){return this.each(function(){var o=$.extend({},$.fn.marquee.defaults,options),$this=$(this),$marqueeWrapper,containerWidth,animationCss,verticalDir,elWidth,loopCount=3,playState="animation-play-state",css3AnimationIsSupported=false,_prefixedEvent=function(element,type,callback){var pfx=["webkit","moz","MS","o",""];for(var p=0;p');var $el=$this.find(".js-marquee").css({"margin-right":o.gap,float:"left"});if(o.duplicated){$el.clone(true).appendTo($this)}$this.wrapInner('
');$marqueeWrapper=$this.find(".js-marquee-wrapper");if(verticalDir){var containerHeight=$this.height();$marqueeWrapper.removeAttr("style");$this.height(containerHeight);$this.find(".js-marquee").css({float:"none","margin-bottom":0,"margin-right":0});if(o.duplicated){$this.find(".js-marquee:last").css({"margin-bottom":0})}var elHeight=$this.find(".js-marquee:first").height()+o.gap;if(o.startVisible&&!o.duplicated){o._completeDuration=(parseInt(elHeight,10)+parseInt(containerHeight,10))/parseInt(containerHeight,10)*o.duration;o.duration=parseInt(elHeight,10)/parseInt(containerHeight,10)*o.duration}else{o.duration=(parseInt(elHeight,10)+parseInt(containerHeight,10))/parseInt(containerHeight,10)*o.duration}}else{elWidth=$this.find(".js-marquee:first").width()+o.gap;containerWidth=$this.width();if(o.startVisible&&!o.duplicated){o._completeDuration=(parseInt(elWidth,10)+parseInt(containerWidth,10))/parseInt(containerWidth,10)*o.duration;o.duration=parseInt(elWidth,10)/parseInt(containerWidth,10)*o.duration}else{o.duration=(parseInt(elWidth,10)+parseInt(containerWidth,10))/parseInt(containerWidth,10)*o.duration}}if(o.duplicated){o.duration=o.duration/2}if(o.allowCss3Support){var elm=document.body||document.createElement("div"),animationName="marqueeAnimation-"+Math.floor(Math.random()*1e7),domPrefixes="Webkit Moz O ms Khtml".split(" "),animationString="animation",animationCss3Str="",keyframeString="";if(elm.style.animation!==undefined){keyframeString="@keyframes "+animationName+" ";css3AnimationIsSupported=true}if(css3AnimationIsSupported===false){for(var i=0;i2){$marqueeWrapper.css("transform","translateY("+(o.direction==="up"?0:"-"+elHeight+"px")+")")}animationCss={transform:"translateY("+(o.direction==="up"?"-"+elHeight+"px":0)+")"}}else if(o.startVisible){if(loopCount===2){if(animationCss3Str){animationCss3Str=animationName+" "+o.duration/1e3+"s "+o.delayBeforeStart/1e3+"s "+o.css3easing}animationCss={transform:"translateY("+(o.direction==="up"?"-"+elHeight+"px":containerHeight+"px")+")"};loopCount++}else if(loopCount===3){o.duration=o._completeDuration;if(animationCss3Str){animationName=animationName+"0";keyframeString=$.trim(keyframeString)+"0 ";animationCss3Str=animationName+" "+o.duration/1e3+"s 0s infinite "+o.css3easing}_rePositionVertically()}}else{_rePositionVertically();animationCss={transform:"translateY("+(o.direction==="up"?"-"+$marqueeWrapper.height()+"px":containerHeight+"px")+")"}}}else{if(o.duplicated){if(loopCount>2){$marqueeWrapper.css("transform","translateX("+(o.direction==="left"?0:"-"+elWidth+"px")+")")}animationCss={transform:"translateX("+(o.direction==="left"?"-"+elWidth+"px":0)+")"}}else if(o.startVisible){if(loopCount===2){if(animationCss3Str){animationCss3Str=animationName+" "+o.duration/1e3+"s "+o.delayBeforeStart/1e3+"s "+o.css3easing}animationCss={transform:"translateX("+(o.direction==="left"?"-"+elWidth+"px":containerWidth+"px")+")"};loopCount++}else if(loopCount===3){o.duration=o._completeDuration;if(animationCss3Str){animationName=animationName+"0";keyframeString=$.trim(keyframeString)+"0 ";animationCss3Str=animationName+" "+o.duration/1e3+"s 0s infinite "+o.css3easing}_rePositionHorizontally()}}else{_rePositionHorizontally();animationCss={transform:"translateX("+(o.direction==="left"?"-"+elWidth+"px":containerWidth+"px")+")"}}}$this.trigger("beforeStarting");if(css3AnimationIsSupported){$marqueeWrapper.css(animationString,animationCss3Str);var keyframeCss=keyframeString+" { 100% "+_objToString(animationCss)+"}",$styles=$marqueeWrapper.find("style");if($styles.length!==0){$styles.filter(":last").html(keyframeCss)}else{$("head").append("")}_prefixedEvent($marqueeWrapper[0],"AnimationIteration",function(){$this.trigger("finished")});_prefixedEvent($marqueeWrapper[0],"AnimationEnd",function(){animate();$this.trigger("finished")})}else{$marqueeWrapper.animate(animationCss,o.duration,o.easing,function(){$this.trigger("finished");if(o.pauseOnCycle){_startAnimationWithDelay()}else{animate()}})}$this.data("runningStatus","resumed")};$this.on("pause",methods.pause);$this.on("resume",methods.resume);if(o.pauseOnHover){$this.on("mouseenter",methods.pause);$this.on("mouseleave",methods.resume)}if(css3AnimationIsSupported&&o.allowCss3Support){animate()}else{_startAnimationWithDelay()}})};$.fn.marquee.defaults={allowCss3Support:true,css3easing:"linear",easing:"linear",delayBeforeStart:1e3,direction:"left",duplicated:false,duration:5e3,speed:0,gap:20,pauseOnCycle:false,pauseOnHover:false,startVisible:false}})(jQuery); (function($) { $.fn.extend({ shows: function(divs) { var w = this.outerWidth(), h = this.outerHeight(), xpos = w / 2, ypos = h / 2, eventType = "", direct = ""; this.css({ "overflow": "hidden", "position": "relative" }); $(divs).css({ "position": "absolute", "top": this.outerHeight() }); this.on("mouseenter mouseleave", function(e) { var oe = e || event; var x = oe.offsetX; var y = oe.offsetY; var angle = Math.atan((x - xpos) / (y - ypos)) * 180 / Math.PI; if (angle > -45 && angle < 45 && y > ypos) { direct = "down"; } if (angle > -45 && angle < 45 && y < ypos) { direct = "up"; } if (((angle > -90 && angle < -45) || (angle > 45 && angle < 90)) && x > xpos) { direct = "right"; } if (((angle > -90 && angle < -45) || (angle > 45 && angle < 90)) && x < xpos) { direct = "left"; } moves(e.type, direct) }); function moves(eventType, direct) { if (eventType == "mouseenter") { switch (direct) { case "down": $(divs).css({ "left": "0px", "top": h }).stop(true, true).animate({ "top": "0px" }, 1200); break; case "up": $(divs).css({ "left": "0px", "top": -h }).stop(true, true).animate({ "top": "0px" }, 1200); break; case "right": $(divs).css({ "left": w, "top": "0px" }).stop(true, true).animate({ "left": "0px" }, 1200); break; case "left": $(divs).css({ "left": -w, "top": "0px" }).stop(true, true).animate({ "left": "0px" }, 1200); break; } } else { switch (direct) { case "down": $(divs).stop(true, true).animate({ "top": h }, 1200); break; case "up": $(divs).stop(true, true).animate({ "top": -h }, 1200); break; case "right": $(divs).stop(true, true).animate({ "left": w }, 1200); break; case "left": $(divs).stop(true, true).animate({ "left": -w }, 1200); break; } } } } }); })(jQuery);