');
mask.css({
'background-color': '#000',
'position': 'absolute',
'z-index': 999,
'left': 0,
'top': 0,
'bottom': 0,
'width': '100%',
'height': jQuery('body').height(),
'opacity': '0.5'
}).appendTo(jQuery('body'))
},
off: function() {
jQuery('.mask_cover').remove();
}
}
jQuery(function() {
//视频播放
window.palyerConf = {
container: "movie_play_cont",
//Div容器的id
playerWidth: 600,
//宽
playerHeight: 490,
//高
autoLoad: 1,
//自动加载
autoPlay: 1,
//自动播放
pid: 28,
as: 0,
//广告
tjAD: 0,
//显示擎天柱广告
tj: 1,
//片尾推荐
continuePlayer: 1,
//连续播放
casualPlay: 1,
//任意拖动视频
head: 0,
//播放片头动画
logo: 0
//显示logo
};
var player;
jQuery('body').delegate('.movie_close', 'click',
function() {
cover.off();
jQuery('.movie_play').empty().remove();
}).delegate('.move_play', 'click',
function() {
cover.on();
palyerConf.container = 'movie_play_cont';
jQuery('
').appendTo(jQuery('body'));
player = null;
player = sinaVideoPlayer(palyerConf);
var vid = jQuery(this).attr('data-vid');
player.on("flashInitCompleted",
function() {
player.playVideo(vid, "0", 0);
vid = null;
});
player.init();
});
jQuery('.video_box').click(function() {
palyerConf.container = 'movie_play_cont2';
jQuery('.movie_play2').show(0);
player = null;
player = sinaVideoPlayer(palyerConf);
var vid = jQuery(this).attr('data-vid');
player.on("flashInitCompleted",
function() {
player.playVideo(vid, "0", 0);
vid = null;
});
player.init();
})
jQuery('.video_box_btn').click(function() {
jQuery('.video_box').trigger('click');
});
jQuery('.page_arrow').each(function(index, element) {
window['auto_ele_' + index] = function() {
this.index = index,
this.ele = jQuery(element);
this.play();
};
window['auto_ele_' + index].prototype = {
'play': function() {
var that = this;
that.ele.animate({
'top': '3px'
},
400,
function() {
that.ele.animate({
'top': '-3px'
},
400,
function() {
that.play();
})
})
}
}
new window['auto_ele_' + index]();
});
jQuery('.menu_list div').each(function(index, element) {
jQuery(this).mouseenter(function() {
var index = jQuery.inArray(this, jQuery('.menu_list div'));
! jQuery(this).hasClass('active') && jQuery(this).addClass('item0' + (index + 1) + '_hover');
}).mouseleave(function() {
var index = jQuery.inArray(this, jQuery('.menu_list div'));
! jQuery(this).hasClass('active') && jQuery(this).removeClass('item0' + (index + 1) + '_hover');
}).click(function() {
var index = jQuery.inArray(this, jQuery('.menu_list div'));
if (index == GOLOBAL_INDEX) return;
GOLOBAL_INDEX = index;
IS_SCROLL = false;
jQuery('#movie_play_cont2').empty();
jQuery('.menu_list div').each(function(i, element) {
jQuery(element).removeClass('item0' + (i + 1) + '_active')
});
jQuery(this).addClass('item0' + (index + 1) + '_active');
jQuery("html, body").animate({
scrollTop: jQuery('.slide').eq(index).offset().top
},
500,function(){IS_SCROLL = true})
})
});
/*加载评论*/
/* (function() {
function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var linkhref = jQuery('.side_cmt').attr('href');
var tempr = linkhref.substring(linkhref.indexOf("?"));
var r = tempr.substr(1).match(reg);
if (r != null) {
return unescape(r[2]);
}
return null;
}
var channel,
newsid,
group;
channel = getUrlParam('channel')
//频道
newsid = getUrlParam('newsid')
//新闻id
group = '0'
//0为新闻留言,1为专题留言
var url = 'http://comment5.news.sina.com.cn/page/info';
var para = '?format=js&channel=' + channel + '&jsvar=pagedata&newsid=' + newsid + '&group=' + group + '&page=1&list=all';
var {
if (pagedata.result.status.code == 0) {
jQuery('.side_cmt').html(pagedata.result.count.total)
}
}
jQuery.getScript(url + para, onSuccess)
})();*/
var a = jQuery("body");
var c = navigator.appVersion.indexOf("MSIE 6") != -1 ? true: false;
a.delegate(".side_share", "click",
function(i) {
var g = window.locations.href;
var f = jQuery(this).attr("s_img");
var j = jQuery(this).attr("s_name");
j += "";
var h = "1765148101";
var d = "http://service.t.sina.com.cn/share/share.php?url=" + encodeURIComponent(g) + "&title=" + encodeURIComponent(j) + "&ralateUid=" + h;
if (typeof f != "undefined") {
d += "&pic=" + encodeURIComponent(f)
}
window.open(d, "_blank", "width=615,height=505")
});
a.delegate(".side_totop", "click",
function(d) {
try {
document.documentElement.scrollTop = 0
} catch(e) {};
jQuery("html, body").animate({
scrollTop: 0
},
500)
});
var slidePos = [];
jQuery('.slide').each(function(index, element) {
slidePos.push(jQuery(this).offset().top);
});
function ArrayPostion(){
var cur = 0;
var e = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
e=e+350;
for (var i=1; i<=slidePos.length; i++){
if(e
49 ? jQuery(".side").css("top",e) : jQuery(".side").css('top',50)
} else {
e > 49 ? jQuery(".side").addClass('side-fix') : jQuery(".side").removeClass('side-fix')
}
var current = ArrayPostion();
if(IS_SCROLL){
jQuery('.menu_list div').each(function(i, element) {
jQuery(element).removeClass('item0' + (i + 1) + '_active')
});
jQuery('.menu_list div').eq(current-1).addClass('item0' + (current) + '_active');
}
var d = document.documentElement.clientHeight;
if (e < d) {
jQuery(".side_totop").hide();
return
} else {
jQuery(".side_totop").show().css("display", "block")
}
})
})