// javascript document /* 爵士舞导师团队点击切换滚动动画 */ 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=3;this._doprev=function(){return _this.doprev.apply(_this)};this._donext=function(){return _this.donext.apply(_this)};this.options=[{width:124,height:124,top:152,left:310,zindex:1},{width:100,height:100,top:152,left:128,zindex:2},{width:124,height:124,top:152,left:200,zindex:3},{width:248,height:248,top:124,left:292,zindex:4},{width:124,height:124,top:152,left:508,zindex:3},{width:100,height:100,top:152,left:604,zindex:2},{width:124,height:124,top:152,left:400,zindex:1},];for(var i=0;i_this.icenter) {for(var i=0;ithis.icenter) {this.css(this.asort[i].getelementsbytagname("img")[0],"opacity",30) 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:35})};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;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)}}; /*导师动画调用*/ function chekmsg(o) { if(o.contact.value=="") { alert('请填写昵称') return false } /*var mail = /^\w+((-\w+)|(\.\w+))*\@[a-za-z0-9]+((\.|-)[a-za-z0-9]+)*\.[a-za-z0-9]+$/; if(!mail.test(o.email.value)){ alert("请填写邮箱");return false; }*/ if(o.qq.value=="") { alert('请填写qq') return false; } if(o.title.value=="") { alert('请填写主题') return false; } if(o.content.value=="") { alert('请填写内容') return false } if(o.code.value=="") { alert('请填写验证码') return false } } function chekbook(o) { if(o.contact.value=="") { alert('请填写姓名') return false; } if(o.tel.value=="") { alert('请填写联系方式') return false; } } function getvideo(c,i) { $.post("server.php",{action:'getvideo',channel:c,id:i},function(data){ arr=data.split("||") str='' $("#v").html(str) }) } function loads() { $('#slides').slides({ preload: false, preloadimage: '/images/loading.gif', effect: 'fade', slidespeed: 400, fadespeed: 100, play: 3000, pause: 100, hoverpause: true }); } 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