$(function(){ //集团概况文字效果 function group_font(){ var a_11 = $(".a_11"), a_12 = $(".a_12"); a_11.animate({top:'88px',opacity:'1'},1200); a_12.animate({bottom:'115px',opacity:'1'},1200); } //总经理效果 function chief_move(){ var cm_temp = ($("body").width() - 1100) / 2; $(".ps_left").animate({marginLeft:cm_temp},1600); $(".ps_left").css({opacity:'1'}); $(".ps_right").animate({marginRight:cm_temp},1600); $(".ps_right").css({opacity:'1'}); } //管理团队出现效果 function team_list_show(){ var idx = 0, team_li = $(".team_list li"), max = team_li.length - 1; if(idx <= max){ setInterval(function(){ team_li.eq(idx).animate({marginTop:'0'},400); idx++; },200); }else{ return false; } }; //集团业务项目切换 function business_pro_slider(){ var pro_box = $(".business_pro_box"), navli = $(".business_pro_nav li"),//项目分类选择 ul = $(".business_pro_list"),//项目集合 nowul = ul.eq(0),//当前项目集合 len = nowul.children().length,//项目数 idx = 0,//项目下标 pidx = 0,//索引值 prebtn = $(".business_probtn a#probtn_left"), nextbtn = $(".business_probtn a#probtn_right"), delay = 600; navli.eq(0).addClass("on");//初始化项目分类第一个开启 nowul.fadeIn(delay);//初始化显示第一个项目分类 len = Math.ceil(len/4); //加载动画 pro_box.animate({marginLeft:'0'},1200,'easeOutBack'); navli.on('click',function(){ $(this).addClass("on").siblings().removeClass("on"); idx = $(this).index(); ul.eq(idx).fadeIn(delay).siblings().fadeOut(delay); ul.animate({left:'0'},delay);//切换时全场重置位置 nowul = ul.eq(idx); len = nowul.children().length; len = Math.ceil(len/4);//切换四个算法 pidx = 0; return false; }); nextbtn.on('click',function(){ if(len > 0){ if(pidx == len - 1 ){ return false; }else{ pidx++; nowul.animate({left:'-=1108px'},delay); } } return false; }); prebtn.on('click',function(){ if(pidx == 0){ return false; }else{ pidx --; nowul.animate({left:'+=1108px'},delay); } return false; }); }; //金融切换 function business_2_select(){ var b_con = $(".business_2_intro"), b_select = $(".business_2_nav li"), b_idx = 0; b_show(0); b_select.on('click',function(){ b_idx = $(this).index(); b_show(b_idx); }); function b_show(b_idx){ b_select.eq(b_idx).addClass("on").siblings().removeClass("on"); b_con.eq(b_idx).slideDown(300).siblings().slideUp(300); } } //新闻列表位置处理 function news_list_unit(){ var news_box = $(".news_box"), news_list = $(".news_list"), mt = $(".news_intro").height(), mt = -mt, news_width = 0, half_w = 0; news_box.css({marginTop:mt});//新闻列表垂直位置处理 setTimeout(function(){//渐显 //news_box.fadeIn(600); },100); half_w = ($(window).width() - 1100) / 2;//算出单侧空白位置 news_width = $(window).width() - half_w - 356 - 28;//计算职位选项卡宽度 news_list.width(news_width); //改变窗口大小时 $(window).resize(function(){ half_w = ($(window).width() - 1100) / 2;//算出单侧空白位置 news_width = $(window).width() - half_w - 356 - 28;//计算职位选项卡宽度 news_list.width(news_width); }); }; //医疗健康文字效果 function health_font(){ var b_41 = $(".b_41"), b_42 = $(".b_42"); b_41.animate({left:'0'},800,function(){ b_42.animate({left:'0'},800); }); } //视频中心滚动切换 function video_scroll(){ var v_ul = $(".video_list"), v_idx = 0, v_max = v_ul.find("li").length - 5, v_pre = $("#v_pre"), v_next = $("#v_next"); v_pre.on('click',function(){ if(v_idx == 0){ v_idx = 0; }else{ v_idx--; v_ul.animate({marginLeft:'+=201px'},300); } return false; }); v_next.on('click',function(){ if(v_max >= 1){ if(v_idx == v_max){ v_idx = v_max; }else{ v_idx++; v_ul.animate({marginLeft:'-=201px'},300); } } return false; }); } //页面左侧色块 function left_color_unit(){ var half_w = 0; half_w = ($(window).width() - 1100) / 2;//算出单侧空白位置 $("#color_lbg").width(half_w); //改变窗口大小时 $(window).resize(function(){ half_w = ($(window).width() - 1100) / 2;//算出单侧空白位置 $("#color_lbg").width(half_w); }) }; //页面右侧色块 function right_color_unit(){ var half_w = 0, //h = 0; //h = $(".container").height() + 78 + 10;//算出单侧空白位置 加十为避免出现空隙 half_w = ($(window).width() - 1100) / 2 + 50;//算出单侧空白位置 加五十为避免出现空隙 $("#color_rbg").width(half_w); //$("#color_rbg").height(h); //改变窗口大小时 $(window).resize(function(){ //h = $(".container").height() + 78 + 10;//算出单侧空白位置 加十为避免出现空隙 half_w = ($(window).width() - 1100) / 2 + 50;//算出单侧空白位置 加五十为避免出现空隙 $("#color_rbg").width(half_w); //$("#color_rbg").height(h); }) }; //人才理念文字效果 function career_font(){ var career_font1 = $(".career_font1"), career_font2 = $(".career_font2"); career_font1.animate({left:'0'},800,function(){ career_font2.animate({left:'0'},800); }); } //职位选项卡位置处理 function job_list_unit(){ var job_box = $(".job_box"), job_list = $(".job_list"), mt = $(".job_intro").height() + 40, mt = - mt; job_width = 0, half_w = 0; job_box.css({marginTop:mt});//职位选项卡垂直位置处理 half_w = ($(window).width() - 1100) / 2;//算出单侧空白位置 job_width = $(window).width() - half_w - 356 - 28;//计算职位选项卡宽度 job_list.width(job_width); //改变窗口大小时 $(window).resize(function(){ half_w = ($(window).width() - 1100) / 2;//算出单侧空白位置 job_width = $(window).width() - half_w - 356 - 28;//计算职位选项卡宽度 job_list.width(job_width); }); }; //职位选项卡折叠 function job_list_toggle(){ var job_list_btn = $(".job_list dt"), pre_btn = $(".job_list dt").eq(0), pre_dd = $(".job_list dd").eq(0), job_delay = 300; pre_btn.addClass("on");//初始化第一个dt pre_dd.slideDown(job_delay);//展开第一个dd job_list_btn.on('click',function(){ if($(this).hasClass("on")){ $(this).removeClass("on"); $(this).next().slideUp(job_delay); }else{ pre_btn.removeClass("on"); pre_dd.slideUp(job_delay); $(this).addClass("on"); pre_btn = $(this); pre_dd = $(this).next(); $(this).next().slideDown(job_delay); } }); }; //地产开发图片切换 function pro_pic(){ var p_pic = $(".pro_pic_list li"), p_idx = 0, p_max = p_pic.length -1, p_pre = $("a.pro_pre"), p_next = $("a.pro_next"); pro_show(0); p_pre.on('click',function(){ if(p_idx ==0 ){ return false; }else{ p_idx--; pro_show(p_idx); } return false; }); p_next.on('click',function(){ if(p_idx == p_max){ return false; }else{ p_idx++; pro_show(p_idx); } return false; }); function pro_show(p_idx){ p_pic.eq(p_idx).stop().fadeIn(300).siblings().fadeOut(300); } } //项目内页切换 function proshow(){ var proshow = $(".pro_show"), pli = $(".pro_show_list li"), pidxli = $(".pro_show_idx li"), pidx = 0, pmax = pli.length; pro_show(0); pinter = setInterval(pauto,3000); proshow.hover(function(){ clearInterval(pinter); },function(){ pinter = setInterval(pauto,3000); }); pidxli.on('click',function(){ pidx = $(this).index(); pro_show(pidx); }); function pro_show(pidx){ pidxli.eq(pidx).addClass("on").siblings().removeClass("on"); pli.eq(pidx).fadeIn(400).siblings().fadeOut(400); } function pauto(){ if(pidx == pmax -1){ pidx = 0; }else{ pidx++ } pro_show(pidx); pidxli.eq(pidx).addClass("on").siblings().removeClass("on"); pli.eq(pidx).fadeIn(400).siblings().fadeOut(400); } } //员工风采切换 function mien_scroll(){ var m_tag = 0, mbox = $(".mien_box"), m_ul = $(".mien_list"), m_li = $(".mien_list li"), m_idx = 0, m_max = m_ul.find("li").length - 5, m_pre = $("#m_pre"), m_next = $("#m_next"), m_pic = $(".mien_tag_inner"), m_nowpic = m_pic.eq(0), m_picul = m_nowpic.find("ul"), m_picul_pre = m_nowpic.find("ul"), m_nowpic_i = 0, m_nowpic_max = 0, m_nowleft = $(".mien_box .pic_left"), m_nowright = $(".mien_box .pic_right"); m_li.eq(0).addClass("on"); mien_show(0); m_li.on('click',function(){ $(this).addClass("on").siblings().removeClass("on"); m_tag = $(this).index(); mien_show(m_tag); }); function mien_show(m_tag){ m_pic.eq(m_tag).fadeIn(800).siblings().hide(); m_picul_pre.css({marginLeft:0},800); m_nowpic = m_pic.eq(m_tag); m_picul = m_nowpic.find("ul"); m_picul_pre = m_picul m_nowpic_i = 0; m_nowpic_max = m_nowpic.find("li").length; } mbox.hover(function(){ m_nowleft.stop(true,false).animate({left:'0'},300); m_nowright.stop(true,false).animate({right:'0'},300); },function(){ m_nowleft.stop(true,false).animate({left:'-46px'},300); m_nowright.stop(true,false).animate({right:'-46px'},300); }).trigger('mouseleave'); m_pre.on('click',function(){ if(m_idx == 0){ m_idx = 0; }else{ m_idx--; m_ul.animate({marginLeft:'+=201px'},300); } return false; }); m_next.on('click',function(){ if(m_max >= 1){ if(m_idx == m_max){ m_idx = m_max; }else{ m_idx++; m_ul.animate({marginLeft:'-=201px'},300); } } return false; }); m_nowleft.on('click',function(){ if(m_nowpic_i == 0){ return false; }else{ m_nowpic_i--; m_picul.stop(false,true).animate({marginLeft:'+=1100px'},600); } return false; }); m_nowright.on('click',function(){ if(m_nowpic_i == m_nowpic_max -1){ return false; }else{ m_nowpic_i++; m_picul.stop(false,true).animate({marginLeft:'-=1100px'},600); } return false; }); } //图片放大位置调整 function scale_config(){ var winw = $(window).width(), sleft = (winw - 1100) / 2; $(".img_scale").css({left:sleft}); $(window).resize(function(){ winw = $(window).width(); sleft = (winw - 1100) / 2; $(".img_scale").css({left:sleft}); }); } group_font();//集团概况文字效果 chief_move();//总经理效果 team_list_show();//管理团队出现效果 business_pro_slider();//集团业务项目切换 business_2_select();//金融切换 health_font();//医疗健康文字效果 news_list_unit();//新闻列表位置处理 video_scroll();//视频中心滚动切换 left_color_unit();//初始化页面左侧色块 right_color_unit();//初始化页面右侧色块 career_font();//人才理念文字效果 job_list_unit();//职位选项卡位置处理 job_list_toggle();//职位选项卡折叠 mien_scroll();//员工风采切换 pro_pic();//地产开发图片切换 proshow();//项目内页切换 //scale_config();//图片放大位置调整 })