var adurl=[{"img":"\/\/cdn.51img1.com\/v6\/v5o\/video\/images\/v_head_ad1.png","url":"http:\/\/guibin.51.com\/pay\/wage\/","use":true,"isjs":false,"js":"headerforv.fovTJ(1,1);"}];
var ic=0;
intervalProcess=setInterval('headerforv.lunbo()',3000);
(function(){
var location_1 = location.href;
if (location_1.indexOf('v.51.com')>=0)
{
$('#sola_url').attr('href',"http://passport.51.com/logout/index?gourl=http://v.51.com/");
}
else
{
$('#sola_url').attr('href',"http://passport.51.com/logout/index?gourl=http://v1.51.com/");
}
var headerforv = {
lunbo:function(){
var ads=$('.ad img');
var ad=$('.ad');
var adurls=$('.ad a');
if(adurl.length==1){
return false;
}
if(ic==adurl.length){
ic=0;
}
var htmlads;
if(adurl[ic]['isjs']){
htmlads="";
}else{
htmlads="";
}
ad.html(htmlads);
ic++;
},
fovTJ:function(type,name){
$.getJSON('http://video.51.com/vheadone/fovTJ?type='+type+'&name='+name+'&callback=?',function(data){
return false;
});
},
v_login:function(type){
if(type=='0'){
v_reglogin.newInit({showPanel:'login',loginFrom:'login_v',regFrom:'reg_v'});
}else{
window.location.href='http://passport.51.com/login/index?gourl=http://v.51.com';
}
headerforv.fovTJ(1,5);
},
v_reg:function(type){
if(type=='0'){
v_reglogin.newInit({showPanel:'reg',loginFrom:'login_v',regFrom:'reg_v'});
}else{
window.location.href='http://passport.51.com/reg/username?gourl=http://v.51.com';
}
headerforv.fovTJ(1,4);
},
qqlogin:function(gourl,from){
var neww=window.open('http://passport.51.com/connect/auth/qq?g='+gourl+'&s='+from,'51QqLogin','width=550,height=450,menubar=0,scrollbars=1, resizable=1,status=1,titlebar=0,toolbar=0,location=1');
},
sinalogin:function(gourl,from){
window.open('http://passport.51.com/connect/auth/sina?s='+from+'&g='+gourl, 'sinaLogin', 'width=650,height=450,menubar=0,scrollbars=1,resizable=1,status=1,titlebar=0,toolbar=0,location=1');
}
};
window.headerforv = headerforv;
})();
jQuery.getScript("//cdn.51img1.com/v6/video/js/login.js?v=2017")
.done(function(script, textStatus) {
jQuery('#v_head_reg').click(function() {
headerforv.v_reg(0);
});
jQuery('#v_head_login').click(function() {
headerforv.v_login(0);
});
jQuery('#v_qq_login').click(function() {
headerforv.qqlogin(location.href,'v');
});
jQuery('#v_sina_login').click(function() {
headerforv.sinalogin(location.href,'v');
});
}).fail(function(script, textStatus) {
jQuery('#v_head_reg').click(function() {
wheaderforv.v_reg(1);
});
jQuery('#v_head_login').click(function() {
headerforv.v_login(1);
});
jQuery('#v_qq_login').click(function() {
headerforv.qqlogin(location.href,'v');
});
jQuery('#v_sina_login').click(function() {
headerforv.sinalogin(location.href,'v');
});
});