var imgArray = [ {title:"“冰雪产业发展国际论坛”正式落户贵州六盘水",img:"http://www.gzec.com.cn/upload/jpg/00302166117_16cbbde201.jpg",link:"http://www.gzec.com.cn/dp-0000000000142636.xhtml"}, {title:"成品油今迎2017年首次调价 机构预测跨年“四连涨",img:"http://www.gzec.com.cn/upload/jpg/00302151240_c86c236800.jpg",link:"http://www.gzec.com.cn/dp-0000000000142634.xhtml"}, {title:"网购七日无理由退货暂行办法:明确不适用退货商品范围",img:"http://www.gzec.com.cn/upload/jpg/00302151795_91d29bc300.jpg",link:"http://www.gzec.com.cn/dp-0000000000142632.xhtml"}, {title:"“滞销鸡”触电成“网红” 贵州剑河2万余土鸡一夜“飞”全国",img:"http://www.gzec.com.cn/upload/jpg/00302089307_4f729b0e00.jpg",link:"http://www.gzec.com.cn/dp-0000000000142593.xhtml"}, {title:"锦上添花绣“黔”程 贵州省妇女特色手工产业产值达50亿",img:"http://www.gzec.com.cn/upload/jpg/00302067673_fadc27cc00.jpg",link:"http://www.gzec.com.cn/dp-0000000000142588.xhtml"} ]; var photoMarquee = function (){ if($('run-photo-plane').scrollLeft>=($('run-photo').getStyle('width').toInt() - $('run-photo-plane').getStyle('width').toInt()) -5) { $('run-photo-plane').scrollLeft=1; } else{ $('run-photo-plane').scrollLeft++; } } window.addEvent('domready', function() { if (imgArray.length>0) new JChangeIMG({container:$("put-photo-here"),data:imgArray,sleep:3500}); var photoPanle = $('run-photo'); if (photoPanle) photoPanle.setStyle('width',$('run-photo-plane').getStyle('width').toInt() *2); photoMarquee.periodical(50);//滚动 var titleList = $$('.menuPanel li.pTitle');//选择触发层 var pnodeChilds = $$('#pNodePanel div.pnode');//定义显示层 pnodeChilds.setStyle('display', 'none'); titleList.each(function(e,index)//设置触发层和显示层对应数组 { var pe = pnodeChilds[index]; e.addEvent('mouseenter', function(){//鼠标触发事件 pnodeChilds.setStyle('display', 'none'); pe.setStyle('display', 'block');//设置操作层为显示 }); }) titleList[2].fireEvent('mouseenter'); });