$(function(){ $("a").focus(function(){ this.blur(); }); jquery(".homeban").slide({ titcell: ".hd ul", maincell: ".bd ul", effect: "fold", autoplay: true, autopage: true, trigger: "click", delaytime:200, intertime:4500, startfun: function(i) { if(i===0){ $(".homeban .bd .con").removeclass("con2"); $(".homeban .bd .con").find("span").attr("style",""); $(".homeban .bd li").eq(i).find(".con").addclass("con2"); $(".homeban .bd .con2").find("span").stop().animate({opacity:1},3000); }else if(i===1){ $(".homeban .bd .con").removeclass("con2"); $(".homeban .bd .con").find("span").attr("style",""); $(".homeban .bd li").eq(i).find(".con").addclass("con2"); $(".homeban .bd .con2").find(".bas2").stop().animate({opacity:1,width:53},840,function(){ $(".homeban .bd .con2").find(".bas3").stop().animate({opacity:1,right:92},800); }); }else if(i===2){ $(".homeban .bd .con").removeclass("con2"); $(".homeban .bd .con").find("span").attr("style",""); $(".homeban .bd li").eq(i).find(".con").addclass("con2"); $(".homeban .bd .con2").find(".bas4").stop().animate({opacity:1},1200,function(){ $(".homeban .bd .con2").find(".bas5").stop().animate({opacity:1},1000,function(){ $(".homeban .bd .con2").find(".bas6").stop().animate({opacity:1},800,function(){ $(".homeban .bd .con2").find(".bas7").stop().animate({opacity:1},600); }); }); }); }else{ $(".homeban .bd .con").removeclass("con2"); $(".homeban .bd .con").find("span").attr("style",""); $(".homeban .bd li").eq(i).find(".con").addclass("con2"); $(".homeban .bd .con2").find(".bas9").stop().animate({top:132,opacity:1},1000,function(){ $(".homeban .bd .con2").find(".bas10").stop().animate({top:132,opacity:1},800,function(){ $(".homeban .bd .con2").find(".bas11").stop().animate({top:132,opacity:1},600); }); }); } } });//banner jquery(".scroll").slide({ titcell:".hd ul", maincell:".bd ul",autoplay:true,effect:"toploop",autopage:true });//通知公告 jquery(".inbox").slide({ titcell:".inhd li",maincell:".inbd", effect:"leftloop", trigger:"click"}); jquery(".homenews").slide({ effect:"fold" }); jquery(".probox").slide({ trigger:"click"});//通知公告 $(".joblist li:first").addclass("current"); $(".joblist li:first").addclass("current"); $(".joblist li:first").find(".txtcont").show(); $(".ts1 li:first").addclass("big"); $(".ts2 li:first").addclass("big"); //图书红四方 jquery(".photobox").slide({ titcell:".num li", maincell:".pic", effect: "fold", autoplay: true, autopage: false, delaytime:200, intertime:2000, trigger:"click", startfun:function(i){ jquery(".photobox .txt li").eq(i).animate({"bottom":0}).siblings().animate({"bottom":-36}); } }); $(".photobox2 li a").hover( function () { $(this).children(".mask").stop().fadeto(400, 1); }, function () { $(this).children(".mask").stop().fadeto(400, 0); } ); }) $(".joblist li").each(function(){ var btn = $(this).find(".jobtitle").find("a"); btn.click(function(){ var statis = $(this).parents("li").find(".txtcont").css("display"); if(statis == "none"){ $(this).parents("li").siblings().removeclass("current"); $(this).parents("li").siblings().find(".txtcont").slideup(500); $(this).parents("li").addclass("current"); $(this).parents("li").find(".txtcont").slidedown(500); } else{ $(this).parents("li").find(".txtcont").slideup(500); $(this).parents("li").removeclass("current"); } }); }); //发展历程切换 var i=0; //图片标识 var img_num=$(".img_ul").children("li").length; //图片个数 $(".img_ul li").hide(); //初始化图片 play(); $(function(){ $(".date ul").css("width",($(".date ul li").outerwidth(true))*img_num); //设置ul的长度 if (!window.xmlhttprequest) {//对ie6设置a的位置 $(".change_a").css("height",$(".change_a").parent().height());} $(".change_a").focus( function() { this.blur(); } ); $(".date ul li").click(function(){ i=$(this).index(); play(); }); $(".prev_a").click(function(){ //i+=img_num; i--; //i=i%img_num; i=(i<0?0:i); play(); }); $(".next_a").click(function(){ i++; //i=i%img_num; i=(i>(img_num-1)?(img_num-1):i); play(); }); }); function play(){//动画移动 var img=new image(); //图片预加载 img.onload=function(){img_load(img,$(".img_ul").children("li").eq(i).find("img"))}; img.src=$(".img_ul").children("li").eq(i).find("img").attr("src"); //$(".img_ul").children("li").eq(i).find("img").(img_load($(".img_ul").children("li").eq(i).find("img"))); $(".date ul").children("li").eq(i).addclass("on").siblings().removeclass("on"); if(img_num>6){//大于9个的时候进行移动 if(i=img_num-2){//后3个 $(".date ul").animate({"marginleft":(-($(".date ul li").outerwidth()+2)*(img_num-6))}); } } if (!window.xmlhttprequest) {//对ie6设置a的位置 $(".change_a").css("height",$(".change_a").parent().height());} } function img_load(img_id,now_imgid){//大图片加载设置 (img_id 新建的img,now_imgid当前图片) if(img_id.width/img_id.height>1) { if(img_id.width >=$("#play").width()) $(now_imgid).width($("#play").width()); } else { if(img_id.height>=500) $(now_imgid).height(500); } $(".img_ul").children("li").eq(i).show().siblings("li").hide(); //大小确定后进行显示 }// jquery(".mainnav li").bind("mouseover", function () { jquery(this).find(".subnav").stop(true,true).slidedown(); jquery(this).addclass("onnav"); }) jquery(".mainnav li").bind("mouseleave", function () { jquery(this).find(".subnav").stop(true,true).slideup(); jquery(this).removeclass("onnav"); }) //news index jquery(".n-mainnav li").bind("mouseover", function () { jquery(this).find(".subnav").stop(true,true).slidedown(); jquery(this).addclass("onnav"); }) jquery(".n-mainnav li").bind("mouseleave", function () { jquery(this).find(".subnav").stop(true,true).slideup(); jquery(this).removeclass("onnav"); }) //news index $(".pastlist dl").each(function(){ var btn = $(this).find("dt"); btn.click(function(){ var statis = $(this).parents("dl").find("dd").css("display"); if(statis == "none"){ $(this).parents("dl").siblings().removeclass("on"); $(this).parents("dl").siblings().find("dd").hide(); $(this).parents("dl").addclass("on"); $(this).parents("dl").find("dd").show(); }else{ $(this).parents("dl").find("dd").hide(); $(this).parents("dl").removeclass("on"); } }); }); $('.jobcircle li:last-child').css('marginright','0'); //弹出层 s $(".morebtn1").click(function(){ $("#otherpop1").fadein(); $(".maskbg1").fadein(); }); $("#otherpop1 .close").click(function(){ $("#otherpop1").fadeout(); $(".maskbg1").fadeout(); }); //弹出层 end //弹出层 s $(".morebtn2").click(function(){ $("#otherpop2").fadein(); $(".maskbg2").fadein(); }); $("#otherpop2 .close").click(function(){ $("#otherpop2").fadeout(); $(".maskbg2").fadeout(); }); //弹出层 end //弹出层 s $(".morebtn3").click(function(){ $("#otherpop3").fadein(); $(".maskbg3").fadein(); }); $("#otherpop3 .close").click(function(){ $("#otherpop3").fadeout(); $(".maskbg3").fadeout(); }); //弹出层 end //弹出层 s $(".morebtn4").click(function(){ $("#otherpop4").fadein(); $(".maskbg4").fadein(); }); $("#otherpop4 .close").click(function(){ $("#otherpop4").fadeout(); $(".maskbg4").fadeout(); }); //弹出层 end //弹出层 s $(".morebtn5").click(function(){ $("#otherpop5").fadein(); $(".maskbg5").fadein(); }); $("#otherpop5 .close").click(function(){ $("#otherpop5").fadeout(); $(".maskbg5").fadeout(); }); //弹出层 end function zoompic () { this.initialize.apply(this, arguments) } zoompic.prototype = { initialize : function (id) { var _this = this; this.wrap = typeof id === "string" ? document.getelementbyid(id) : id; this.oul = this.wrap.getelementsbytagname("ul")[0]; this.ali = this.wrap.getelementsbytagname("li"); this.prev = this.wrap.getelementsbytagname("pre")[0]; this.next = this.wrap.getelementsbytagname("pre")[1]; this.timer = null; this.asort = []; this.icenter = 2; this._doprev = function () {return _this.doprev.apply(_this)}; this._donext = function () {return _this.donext.apply(_this)}; this.options = [ {width:165, height:218, top:106, left:139, zindex:3}, {width:189, height:249, top:92, left:165, zindex:4}, {width:257, height:339, top:45, left:191, zindex:5,}, {width:189, height:249, top:92, left:286, zindex:4}, {width:165, height:218, top:106, left:310, zindex:3}, ]; for (var i = 0; i < this.ali.length; i++) this.asort[i] = this.ali[i]; this.asort.unshift(this.asort.pop()); this.setup(); this.addevent(this.prev, "click", this._doprev); this.addevent(this.next, "click", this._donext); this.doimgclick(); this.timer = setinterval(function () { _this.donext() }, 3000); this.wrap.onmouseover = function () { clearinterval(_this.timer) }; this.wrap.onmouseout = function () { _this.timer = setinterval(function () { _this.donext() }, 3000); } }, doprev : function () { this.asort.unshift(this.asort.pop()); this.setup() }, donext : function () { this.asort.push(this.asort.shift()); this.setup() }, doimgclick : function () { var _this = this; for (var i = 0; i < this.asort.length; i++) { this.asort[i].onclick = function () { if (this.index > _this.icenter) { for (var i = 0; i < this.index - _this.icenter; i++) _this.asort.push(_this.asort.shift()); _this.setup() } else if(this.index < _this.icenter) { for (var i = 0; i < _this.icenter - this.index; i++) _this.asort.unshift(_this.asort.pop()); _this.setup() } } } }, setup : function () { var _this = this; var i = 0; for (i = 0; i < this.asort.length; i++) this.oul.appendchild(this.asort[i]); for (i = 0; i < this.asort.length; i++) { this.asort[i].index = i; if (i < 5) { this.css(this.asort[i], "display", "block"); this.domove(this.asort[i], this.options[i], function () { _this.domove(_this.asort[_this.icenter].getelementsbytagname("img")[0], {opacity:100}, function () { _this.domove(_this.asort[_this.icenter].getelementsbytagname("img")[0], {opacity:100}, function () { _this.asort[_this.icenter].onmouseover = function () { _this.domove(this.getelementsbytagname("div")[0], {bottom:0}) }; _this.asort[_this.icenter].onmouseout = function () { _this.domove(this.getelementsbytagname("div")[0], {bottom:-100}) } }) }) }); } else { this.css(this.asort[i], "display", "none"); this.css(this.asort[i], "width", 0); this.css(this.asort[i], "height", 0); this.css(this.asort[i], "top", 37); this.css(this.asort[i], "left", this.oul.offsetwidth / 2) } if (i < this.icenter || i > this.icenter) { this.css(this.asort[i].getelementsbytagname("img")[0], "opacity", 100) this.asort[i].onmouseover = function () { _this.domove(this.getelementsbytagname("img")[0], {opacity:100}) }; this.asort[i].onmouseout = function () { _this.domove(this.getelementsbytagname("img")[0], {opacity:30}) }; this.asort[i].onmouseout(); } else { this.asort[i].onmouseover = this.asort[i].onmouseout = null } } }, addevent : function (oelement, seventtype, fnhandler) { return oelement.addeventlistener ? oelement.addeventlistener(seventtype, fnhandler, false) : oelement.attachevent("on" + seventtype, fnhandler) }, css : function (oelement, attr, value) { if (arguments.length == 2) { return oelement.currentstyle ? oelement.currentstyle[attr] : getcomputedstyle(oelement, null)[attr] } else if (arguments.length == 3) { switch (attr) { case "width": case "height": case "top": case "left": case "bottom": oelement.style[attr] = value + "px"; break; case "opacity" : oelement.style.filter = "alpha(opacity=" + value + ")"; oelement.style.opacity = value / 100; break; default : oelement.style[attr] = value; break } } }, domove : function (oelement, oattr, fncallback) { var _this = this; clearinterval(oelement.timer); oelement.timer = setinterval(function () { var bstop = true; for (var property in oattr) { var icur = parsefloat(_this.css(oelement, property)); property == "opacity" && (icur = parseint(icur.tofixed(2) * 100)); var ispeed = (oattr[property] - icur) / 5; ispeed = ispeed > 0 ? math.ceil(ispeed) : math.floor(ispeed); if (icur != oattr[property]) { bstop = false; _this.css(oelement, property, icur + ispeed) } } if (bstop) { clearinterval(oelement.timer); fncallback && fncallback.apply(_this, arguments) } }, 30) } };