﻿var flashs=[["1","<h3>爱心网盟</h3><p>润衡爱心网盟于2003年经广州市文化局批准设立，由广州润衡软件连锁有限公司负责运营管理。爱心网盟目前在广州市有40余间网吧门店，营业总面积3万余平方米，计算机营运终端数8000余台，员工总数600余人，为广州市门店最多、规模最大的连锁网吧企业。2010年，爱心网盟获准在佛山建立5家门店、在汕尾建立5家门店，在茂名建立一批门店，开始向全省发展。</p>"],
            ["2","<h3>教育培训</h3><p>华南师范大学是一所文、理、工、法、历史、经济、管理、体育、教育、艺术等学科齐全的国家“211工程”重点建设大学，学校师资力量雄厚，教育质量高。华南师范大学网络教育学院，经国家教育部批准设立，通过网络教学方式开展学历和学位教育。</p>"],
            ["3","<h3>呼叫中心</h3><p>广州润宝信息科技有限公司（简称 “润宝科技”）为中外合资企业。由香港易宝国际集团 (简称 “易宝”) 和广州润衡软件连锁有限公司（简称 “润衡”）于2009年成立。<br/>在呼叫服务行业，润宝科技的经营业务属高技术服务业务。润宝科技已开始申请成为双软认证企业、高新技术企业和现代服务业企业。</p>"],
            ["4","<h3>软件产品</h3><p>广州润衡软件连锁有限公司是广州软件行业协会监事长单位、广州市文化娱乐业协会副会长单位和广州市计算机网络信息安全协会副会长单位。公司具有软件企业双软认定资质、增值电信业务经营许可（ICP/ISP）资质、互联网上网服务（连锁经营总部）资质、普通商品进出口资质和 ISO9001认证资质等。</p>"],
            ["5","<iframe style='margin:auto;' src='js/indexvideo/5.htm' width='500px' height='280px' frameborder='no' border='0' marginwidth='0' marginheight='0' scrolling='no'></iframe>"],
            ["6","<h3>庆祝南沙产业园开园</h3><p>在广东省残疾人联合会的大力支持下，经过十个月的筹建工作，建筑面积7000平方米的“广东省残疾人信息产业园”一期工程全部完工，完成投资近1000万元。已有近百名残疾人员工在园区工作和生活。</p>"]];
var len = flashs.length;
var index = 6;
var onMouse=0,alearPlay=0,isStop=0;
$(function(){
    $("#earth").removeClass("earth");
    $("#earth").addClass("earthT");
   setImg(index,len);
   $(".indexImgShow1 img").show();
   $(".indexImgShow2 img").show();
   $(".indexImgShow3 img").show();
   $(".indexImgShow4 img").show();
   setVideo(index,len);
   //滑入 停止动画，滑出开始动画.
    $(".indexImgShow1,.indexImgShow2,.indexImgShow3,.indexImgShow4").hover(function(){
        onMouse=1;
    },function(){
        onMouse=0;
    });
    $(".indexImgShow1").mouseover(function(){setVideo(index,len)});
    $(".indexImgShow2").mouseover(function(){setVideo(index+1,len)});
    $(".indexImgShow3").mouseover(function(){setVideo(index+2,len)});
    $(".indexImgShow4").mouseover(function(){setVideo(index+3,len)});
    $(".indexImgShow1,.indexImgShow2,.indexImgShow3,.indexImgShow4").click(function(){
        if (isStop==0)
        {
        isStop=1;
        $("#earth").removeClass("earthT");
        $("#earth").addClass("earth");
        }
        else
        {
        isStop=0;
        $("#earth").removeClass("earth");
        $("#earth").addClass("earthT");
        }
    });
   setInterval(moveImage, 1000);
})
setInterval(function(){alearPlay=1}, 2500);
function moveImage()
{
    if (onMouse==0 && alearPlay==1 && isStop==0)
    {
        setImg(index+1,len);
        setVideo(index,len);
        index++;
        alearPlay=0;
    }
}
function setImg(i,len)
{
    setImg1(i,len);
    setImg2(i+1,len);
    setImg3(i+2,len);
    setImg4(i+3,len);
}
function setImg1(i,len){
i=i%len;
if (i==0) i=len;
    $(".indexImgShow1 img").attr("src","js/indexvideo/img"+flashs[i-1][0]+"a.png"); 
}
function setImg2(i,len){
i=i%len;
if (i==0) i=len;
    $(".indexImgShow2 img").attr("src","js/indexvideo/img"+flashs[i-1][0]+"a.png"); 
}
function setImg3(i,len){
i=i%len;
if (i==0) i=len;
    $(".indexImgShow3 img").attr("src","js/indexvideo/img"+flashs[i-1][0]+"b.png"); 
}
function setImg4(i,len){
i=i%len;
if (i==0) i=len;
    $(".indexImgShow4 img").attr("src","js/indexvideo/img"+flashs[i-1][0]+"b.png"); 
}
function setVideo(i,len)
{
i=i%len;
if (i==0) i=len;
$(".indexVideo").html(flashs[i-1][1]);

}
