jQuery(function($){
if($('.panel').length>0){
$('.panel').css({'display': 'none'}).first().css({'display': 'block'});
}
$('.head-tab li').each(function(index) {
var nc = index;
$(this).click(function() {
if(nc == 2){
$("html, body").animate({scrollTop: $(".txtboxs.ta").offset().top }, 500);
return false;
}else if(nc == 3){
$("html, body").animate({scrollTop: $(".txtboxs.ts").offset().top }, 500);
return false;
}else if(nc == 4){
$("html, body").animate({scrollTop: $(".comment").offset().top }, 500);
return false;
}else{
$('.head-tab li').removeClass("on").eq(nc).addClass("on");
$('.panel').css({
'display': 'none'
}).eq(nc).css({
'display': 'block'
});
}
});
});
if($('.panels').length>0){
$('.panels').css({'display': 'none'}).first().css({'display': 'block'});
}
$('.head-tabs li').each(function(index) {
var nc = index;
$(this).click(function() {
if(nc == 1){
$("html, body").animate({scrollTop: $(".t1").offset().top }, 500);
return false;
}else if(nc == 2){
$("html, body").animate({scrollTop: $(".t2").offset().top }, 500);
return false;
}else if(nc == 3){
$("html, body").animate({scrollTop: $(".t3").offset().top }, 500);
return false;
}else if(nc == 4){
$("html, body").animate({scrollTop: $(".t4").offset().top }, 500);
return false;
}else if(nc == 5){
$("html, body").animate({scrollTop: $(".t5").offset().top }, 500);
return false;
}
});
});
$('.dian').each(function(index) {
var nc = index;
$(this).click(function() {
if(nc == 0){
$("html, body").animate({scrollTop: $(".commentbox").offset().top }, 500);
return false;
}
});
});
$('#dianping').each(function(index) {
var nc = index;
$(this).click(function() {
if(nc == 0){
$("html, body").animate({scrollTop: $(".commentbox").offset().top }, 500);
return false;
}
});
});
$('p.dians').each(function(index) {
var nc = index;
$(this).click(function() {
if(nc == 0){
$("html, body").animate({scrollTop: $(".txtboxs").offset().top }, 500);
return false;
}
});
});
$('em.dianji').each(function(index) {
var nc = index;
$(this).click(function() {
if(nc == 0){
$("html, body").animate({scrollTop: $(".header").offset().top }, 500);
return false;
}
});
});
$('#btndowns').each(function(index) {
var nc = index;
$(this).click(function() {
if(nc == 0){
$("html, body").animate({scrollTop: $(".downbox").offset().top }, 500);
return false;
}
});
});
//直接显示遮罩效果开始
$(".con-two").hover(function(){
$(this).find(".txt-two").css("display","block");
},function(){
$(this).find(".txt-two").css("display","none");
})
//直接显示遮罩效果结束
/*下载详情页选项卡*/
/*预约*/
if($('.btns').length>0){
$(".btns").click(function(){
YuYueBox();
})
}
function YuYueBox(){
$(".yuyue_bg").show();
$(".yuyue_box").show();
$('.yuyue_box .btn_c,.yuyue_bg').click(function(){
$('.yuyue_bg,.yuyue_box').hide();
});
$('.yuyue_box .btn_q').click(function(){
var sTel = $('#yuyueval').val();
var zTel = /^1[34578]\d{9}$/.test(sTel);
if(!zTel){
alert('请填写正确的手机号!');
$('#yuyueval').focus();
return false;
}
$('#yuyue').text('预约成功');
$('.yuyue_bg,.yuyue_box').remove();
// $('.yuyue_bg').click();
$('#yuyue').removeClass('yuyue');
});
}
});
/*列表页选项卡*/
$(function(){
var arr=[];
$(".nav_top").each(function(liindex,element){
$(element).find("a").each(function(aindex,aelement){
if($(aelement).hasClass("currents")){
var obj={liindex:liindex,
aelement : aelement,
aindex:aindex
};
arr[liindex]=obj;
};
});
});
$(".currents").removeClass("currents");
for( key in arr){
$(arr[key].aelement).addClass("currents")
}
});
if(jQuery('#specialbox').length > 0){
var hdHtml = '';
jQuery('#specialbox .bd ol img').each(function() {
hdHtml += '' + jQuery(this).attr('alt') + '';
});
jQuery('#specialbox .hd ul').append(hdHtml);
}
/*库列表选项卡*/
$(function(){
var arr=[];
$(".screen ul li").each(function(liindex,element){
$(element).find("a").each(function(aindex,aelement){
if($(aelement).hasClass("on2")){
var obj={liindex:liindex,
aelement : aelement,
aindex:aindex
};
arr[liindex]=obj;
};
});
});
$(".on2").removeClass("on2");
for( key in arr){
$(arr[key].aelement).addClass("on2")
}
var st = 180;
$('#softewm>li').mouseenter(function () {
$(this).find('ul').stop(false, true).slideDown(st);
}).mouseleave(function () {
$(this).find('ul').stop(false, true).slideUp(st);
});
$('#qs').qrcode({
text: window.location.href,
width: 90,
height: 90
});
});
/*滚动*/
jQuery(".carousel").slide({titCell:".hds ul",mainCell:".bds ul",autoPage:true,effect:"left",vis:3,easing:"easeOutCirc"});
jQuery(".slideBox").slide({ mainCell:"ul",vis:3,prevCell:".sPrev",nextCell:".sNext",effect:"leftLoop"});
/* 外层tab切换 */
jQuery(".slideGroup").slide({titCell:".parHd li",mainCell:".parBd"});
/*选项卡*/
jQuery(".special02").slide();
jQuery(".gameku").slide();
jQuery(".links").slide();
jQuery(".content").slide();
jQuery(".txtboxe").slide();
jQuery(".option_left").slide();
jQuery(".first_centre").slide();
jQuery(".pack_right").slide();
jQuery(".pack_left").slide();
jQuery(".tab").slide();
jQuery(".tab1").slide();
jQuery(".slidetxtbox").slide();
/*轮播*/
jQuery(".scroll").slide({mainCell:".bd ul",autoPlay:true});
/*风车*/
jQuery(".sidemenu").slide({
titCell:"h3",
targetCell:"div",
effect:"slideDown",
delayTime:300 , //效果时间
triggerTime:150, //鼠标延迟触发时间(默认150)
defaultPlay:true,
returnDefault:true
});
var lent = $('li[name=downtype]').length;
if(lent < 2){
var iddesc = $('li[name=downtype]').attr('iddesc');
if(iddesc == 'down-android'){
$('li[name=downtype]').after('暂无苹果版下载');
}
if(iddesc == 'down-appstore'){
$('li[name=downtype]').after('暂无安卓版下载');
}
}