Do.add('layer', {
path: 'https://img.pubyun.com/pubyun/lib/layer/layer.js',
type: 'js'
})
Do('layer', function() {
layer.config({
path: 'https://img.pubyun.com/pubyun/lib/layer/'
});
$('.service01').click(function(){
layer.open({
type: 1,
title: false,
area: ['570px', ''],
content: '
'
});
});
});
Do(function() {
$(".gy_host_advanced dl").hover(function() {
$("img").data("old_src", $("dt img", this).attr("src"));
$("img").data("new_src", $("img").data("old_src").split(".jpg")[0] + "_red" + ".jpg");
$("dd", this).css({
"color": "#333"
});
$("dt,dd a", this).css({
"color": "#be1416"
});
$("dt img", this).attr("src", $("img").data("new_src"));
}, function() {
$("dd", this).css({
"color": "#686868"
});
$("dt,dd a", this).css({
"color": "#333"
});
$("dt img", this).attr("src", $("img").data("old_src"));
});
});
Do(function() {
//首页广告轮播
(function() {
var loe_slide = $('#loe_slide');
var len = loe_slide.find('li').length;
var loe_show = $('
');
loe_slide.after(loe_show);
for (var i = 0; i < len; i++) {
loe_show.append('' + i + '');
};
var timer, flag = 0,
interval = 2000;
init();
function init() {
loe_show.children(':first').addClass('current');
loe_slide.find('li').eq(flag).show();
autoMove();
loe_slide.hover(function() {
timer && clearTimeout(timer);
}, function() {
autoMove();
})
$('#loe_show li').each(function(index) {
$(this).hover(function() {
timer && clearTimeout(timer);
flag = index;
doMove();
}, function() {
autoMove();
})
})
}
function autoMove() {
timer = setInterval(next, interval);
}
function next() {
flag++;
flag == len && (flag = 0);
doMove();
}
function doMove() {
loe_slide.find('li').eq(flag).fadeIn()
.siblings().fadeOut();
loe_show.find('li').eq(flag).addClass('current')
.siblings().removeClass('current');
}
})()
// 公告
var oMarquee = $('.web_notice .column1 div'),
iLineHeight = 60,
iLineCount = $('.web_notice .column1 div').children().length;
var height = (iLineCount - 1) * iLineHeight;
function run() {
if (parseFloat(oMarquee.css('top')) == -height) {
oMarquee.css('top', '0px');
}
oMarquee.css('top', function(i, n) {
return parseFloat(n) - iLineHeight;
});
}
var marq = window.setInterval(function() {
run();
}, 5000);
$('.web_notice .column1,.web_notice .column2').hover(function() {
clearInterval(marq);
}, function() {
marq = setInterval(function() {
run();
}, 5000);
});
$('.web_notice .column2 .left').click(function() {
if (parseFloat(oMarquee.css('top')) != 0) {
oMarquee.css(
'top',
function(i, n) {
return parseFloat(n) + iLineHeight;
}
);
}
});
$('.web_notice .column2 .right').click(function() {
if (parseFloat(oMarquee.css('top')) != -height) {
oMarquee.css('top', function(i, n) {
return parseFloat(n) - iLineHeight;
});
}
});
/* 云主机和动态域名套餐切换 */
// 点击非激活按钮
$('#body .gy_link a').click(function() {
$('#body .gy_link a').removeClass('active');
$(this).addClass('active');
// 套餐列表
var index = $('#body .gy_link a').index(this);
$('.gy_service_plan .plan_choose').hide().eq(index).show();
});
/* 云主机滑动 */
$('#body .list1 ul').hover(function() {
$(this).addClass('hover');
}, function() {
$(this).removeClass('hover');
});
});