元素
.siblings().hide(); //隐藏其它几个同辈的
元素
})/*.hover(function(){
$(this).addclass("hover");
},function(){
$(this).removeclass("hover");
})*/
//菜单
try{document.execcommand("backgroundimagecache", false, true);}catch(e){};
$('.head_menu>ul>li').each(function(i){
if(i!=0 && i!=5 && i!=6){
$(this).hover(function(){
$('#menu_bg').stop().animate({opacity: '0.9'},0).fadein(500);
$('.menu_ct .nav-child').stop().hide().eq(i).show();
})
}
if(i>=5 || i==0){
$(this).hover(function(){
$('.menu_ct .nav-child').stop().hide();
$('#menu_bg').stop().fadeout(500);
//temp_box.stop(true,true).animate({'bottom':'0px'},500).fadeout();
})
}
})
$('#header_flash').hover(function(){
},function(){
$('#menu_bg').fadeout(500);
})
//招聘页
// 变量
var accordion_head = $('.recruitment .accordion > li > div.acc_top'),
accordion_body = $('.recruitment .accordion li > .sub-menu');
// 打开第一个
//accordion_head.first().addclass('active').next().slidedown('normal');
// 点击
accordion_head.on('click', function(event) {
//event.preventdefault();
if ($(this).attr('class') != 'active'){
accordion_body.slideup('normal');
$(this).next().stop(true,true).slidetoggle('normal');
accordion_head.removeclass('active');
$(this).addclass('active');
}
});
//鼠标放到上面
accordion_head.hover(function(){
$(this).parent().addclass("on");
},function(){
$(this).parent().removeclass("on");
});
//集团历程
// 变量
var accordion_head2 = $('.group_course .accordion > li > a'),
accordion_body2 = $('.group_course .accordion li > .sub-menu');
// 打开第一个
accordion_head2.first().addclass('active').next().slidedown('normal');
// 点击
accordion_head2.on('click', function(event) {
//event.preventdefault();
if ($(this).attr('class') != 'active'){
accordion_body2.slideup('normal');
$(this).next().stop(true,true).slidetoggle('normal');
accordion_head2.removeclass('active');
$(this).addclass('active');
}
});
//加载flash
if($('#index_flash').length>0) {
var index_projects = new swfobject("/flash/kv.swf", "indexflash", "100%", "523", "9", "#000000");
index_projects.addparam("allowscriptaccess", "always");
index_projects.addparam("allowfullscreen", "true");
index_projects.addparam("wmode", "transparent");
index_projects.addparam("menu", "false");
// index_projects.addvariable("id","5");
index_projects.addvariable("path","/flash/xml/data.xml");
index_projects.write("index_flash");
}
if($('#culture_entertainment_flash').length>0) {
var index_projects = new swfobject("/flash/culture_entertainment.swf", "indexflash", "680", "450", "9", "#000000");
index_projects.addparam("allowscriptaccess", "always");
index_projects.addparam("allowfullscreen", "true");
index_projects.addparam("wmode", "transparent");
index_projects.addparam("menu", "false");
// index_projects.addvariable("id","5");
// index_projects.addvariable("path","/flash/xml/data.xml");
index_projects.write("culture_entertainment_flash");
}
});//end
/*~~~~~~~~~~~~~~~~~~~~~~~~~表单提交*/
//身份证与生日匹配
function autobirthday (form_id) {
var frmobj = document.getelementbyid(form_id);
if(frmobj.credentialstype.value == "居民身份证") {
cardid = checkid(frmobj.credentialsid.value);
flag = cardid.substring(0,1);
value = cardid.substring(1)
if(flag=="0") {
alert(value);
return;
}
else {
var birth = value.slice(6,10)+"-"+value.slice(10,12)+"-"+value.slice(12,14);
var sex = value.slice(16,17)%2==1?"0":"1";
frmobj.sex.value = sex;
frmobj.birth.value = birth;
}
}
}
function checkid(pid){
//检查身份证号码 go_rush(阿舜) from http://ashun.cnblogs.com
var arrverifycode = [1,0,"x",9,8,7,6,5,4,3,2];
var wi = [7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2];
var checker = [1,9,8,7,6,5,4,3,2,1,1];
if(pid.length != 15 && pid.length != 18) return "0身份证号共有15位或18位";
var ai=pid.length==18 ? pid.substring(0,17) : pid.slice(0,6)+"19"+pid.slice(6,16);
if (!/^\d+$/.test(ai)) return "0身份证除最后一位外,必须为数字!";
var yyyy=ai.slice(6,10), mm=ai.slice(10,12)-1, dd=ai.slice(12,14);
var d=new date(yyyy,mm,dd) , now=new date();
var year=d.getfullyear() , mon=d.getmonth() , day=d.getdate();
if (year!=yyyy || mon!=mm || day!=dd || d>now || year<1940) return "0身份证输入错误!";
for(var i=0,ret=0;i<17;i++) ret+=ai.charat(i)*wi[i];
ai+=arrverifycode[ret %=11];
return pid.length ==18 && pid != ai? "0身份证输入错误!":"1"+ai;
}
function cms_f_cs(){
if (document.cmsf.f1.value == '') {
alert('请填写您的姓名');
document.cmsf.f1.focus();
return false;
}
if (document.cmsf.f3.value == '') {
alert('请填写您的身份证号码');
document.cmsf.f3.focus();
return false;
} else{
var birth = checkid(document.cmsf.f3.value);
var flag = birth.substring(0,1);
var value = birth.substring(1)
if(flag == '0') {
alert(value);
return false;
}
}
if (document.cmsf.f4.value == '') {
alert('请填写您的电话号码');
document.cmsf.f4.focus();
return false;
} else{
var reg = /(^(\d{2,4}[-_-—]?)?\d{7,8}$)|(^0?1[35]\d{9}$)/;
if(!reg.test(document.cmsf.f4.value)) {
alert('请输入正确的电话号码');
document.cmsf.f4.focus();
return false;
}
}
if (document.cmsf.f5.value == '') {
alert('请填写您的email');
document.cmsf.f5.focus();
return false;
} else {
var reg = /^.+@.+(\.\w{2,3})$/;
if(!reg.test(document.cmsf.f5.value)) {
alert('请输入正确的email地址');
document.cmsf.f5.focus();
return false;
}
}
if (document.cmsf.f6.value == '') {
alert('请填写您的地址');
document.cmsf.f6.focus();
return false;
}
if (document.cmsf.f7.value == '') {
alert('请填写您的邮编');
document.cmsf.f7.focus();
return false;
}
document.getelementbyid('cmsf').submit();
return false;
}