if(navigator.appName=='Microsoft Internet Explorer') flashvars.file=code;
else flashvars.pl='{"playlist":[{"file":"'+code+'","comment":"'+comment+'"}]}';
if(typeof poster=='string') flashvars.poster=poster;
var params = {allowFullScreen:'true',allowScriptAccess:'always',wmode:'auto',bgColor:'#000000'};
new swfobject.embedSWF('/engine/classes/flashplayer/uppod.swf', 'uppod_player', viWidth, viHeight, '9.0.115', false, flashvars, params);
} else {
if(navigator.appName=='Microsoft Internet Explorer') {
uppodSend('uppod_player','file:'+code);
uppodSend('uppod_player','play');
} else {
uppodSend('uppod_player','pl:{"file":"'+code+'","comment":"'+comment+'"}');
if(typeof poster=='string') uppodSend('uppod_player','poster:'+poster);
uppodSend('uppod_player','start_1');
}
}
} else if(code.search(/video\.rutube\.ru/i) != -1) {
code=code.replace(/^.*?(http:[^"]+).*?$/,'$1');
vidWrapper.innerHTML='<OBJECT '+viDims+'><PARAM name="movie" value="'+code+'"></PARAM><PARAM name="wmode" value="window"></PARAM><PARAM name="allowFullScreen" value="true"></PARAM><EMBED src="'+code+'" type="application/x-shockwave-flash" wmode="window" '+viDims+' allowFullScreen="true" ></EMBED></OBJECT>';
} else {
code=code.replace(/youtube\.com\/watch\?v=/,'youtube.com/embed/');
code=code.replace(/w=[0-9]+px&h=[0-9]+px/, 'w='+viWidth+'px&h='+viHeight+'px').replace(/w=[0-9]+&h=[0-9]+/, 'w='+viWidth+'&h='+viHeight).replace(/width=[0-9]+&height=[0-9]+/, 'width='+viWidth+'&height='+viHeight);
vidWrapper.innerHTML='<if'
+'rame src="'+code+'" '+viDims+' frameborder="0" scrolling="no" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" style="overflow:hidden;"></if'
+'rame>';
}
vidClicked=0;
}
var vkArr='http://moonwalk.cc/serial/ae2bd003bbca77e1b4502c9e3fea6b1f/iframe';
function formatPlaylist(a,lvl,nr) {
var cls=(lvl?'series':'seasons');
vidBtns += '<div id="bar'+nr+'" class="'+cls+' tabs_container lvl'+lvl+'" lvl='+lvl+' style="visibility:hidden;width:'+viWidth+'px;"><div id="tab'+nr+'" class="tabs">';
for(var i=0; i < a.length; i++) {
if(typeof a[i].file != 'undefined' && a[i].file!='') {
a[i].file=a[i].file.replace(/'/g, "\\'");
if(typeof a[i].poster=='string') vidBtns += '<div class="serieTab" on'+mouse_evt+'="loadVideo(this,\''+a[i].file+'\',\''+a[i].poster+'\')">'+a[i].comment+'</div>';
else vidBtns += '<div class="serieTab" on'+mouse_evt+'="loadVideo(this,\''+a[i].file+'\')">'+a[i].comment+'</div>';
} else if(typeof a[i].link != 'undefined') {
vidBtns += '<div class="serieTab"><a href="'+a[i].link+'" target="_blank" rel="nofollow">'+a[i].comment+'</a></div>';
} else if(typeof a[i].playlist != 'undefined') {
barNr++;
a[i].barNr=barNr;
vidBtns += '<div class="serieTab" on'+mouse_evt+'="showSeason(this,'+barNr+','+nr+')">'+a[i].comment+'</div>';
}
}
vidBtns += '</div></div>';
for(var i=0; i < a.length; i++) {
if(typeof a[i].playlist != 'undefined') {
formatPlaylist(a[i].playlist,lvl+1,a[i].barNr);
}
}
}
function showSeason(current,nr,parent) {
if($(current).hasClass('inset')) return;
$(current).siblings('.serieTab').removeClass('inset');
$(current).addClass('inset');
$('.series.tabs_container').removeClass('current').hide();
$('#bar'+parent).addClass('current').show();
$('#bar'+nr+' .serieTab').removeClass('inset');
$('#bar'+nr).addClass('current').show();
if(touch_device) $('#bar'+nr+' .tabs').niceScroll({cursorcolor:'#1A1D22',cursoropacitymax:0.7,touchbehavior:true,smoothscroll:true,autohidemode:true,enablemousewheel:false,cursorborder:'1px solid #777'});
$('#bar'+nr+' .serieTab:first').trigger(mouse_evt);
}
if(is_series){
var lastSerie='';
$('#vid').after('<div class="last_serie" style="display:none;width:'+viWidth+'px;">Последняя просмотренная вами серия: <span></span> <font>[ <a onclick="return resetCounter(3980,this);">сбросить счетчик</a> ]</font></div>');
if(typeof a_serie[3980]!='undefined'){
lastSerie=a_serie[3980].replace(/([0-9]+)v/,'$1 выпуск').replace(/([0-9]+)c/,'$1 часть').replace(/([0-9]+)r/,'$1 серия').replace(/([0-9]+)z/,'$1 сезон').replace(/t([0-9]+)/,'ТВ-$1').replace(/_o$/,' ОВА').replace(/_/g,' ');
if(lastSerie!='') $('div.last_serie').show().children('span').text(lastSerie);
}
}
function startPlayers() {
if(typeof vkArr == 'string') {
if(vkArr.search(/(moonwalk\.cc|serpens\.nl|[0-9\.]{8,})\/serial\/[a-z0-9]+\/iframe/i) != -1) {
loadVideo(null,vkArr);
} else {
makePlayer(vkArr);
}
} else if(typeof vkArr[0] != 'undefined') {
formatPlaylist(vkArr,0,0);
$('#btns_wrapper').append(vidBtns);
} else return;
initBtns();
for(var i=0; i < vkArr.length; i++) {
if(typeof vkArr[i].playlist != 'undefined') {showSeason($('.seasons .serieTab:first'),0,null); break;}
if(typeof vkArr[i].file != 'undefined') {loadVideo($('.serieTab:first'),vkArr[i].file.replace(/\\'/g, "'")); break;}
}
firstVideo=0;
};
function initBtns() {
if(touch_device) {
$('#vid .tabs').css('padding-bottom','10px');
$('.seasons .tabs').niceScroll({cursorcolor:'#1A1D22',cursoropacitymax:0.7,touchbehavior:true,smoothscroll:true,autohidemode:true,enablemousewheel:false,cursorborder:'1px solid #777'});
//$('.series .tabs').niceScroll({cursorcolor:'#1A1D22',cursoropacitymax:0.7,touchbehavior:true,smoothscroll:true,autohidemode:true,enablemousewheel:false,cursorborder:'1px solid #777'});
} else {
$('.tabs_container').not('.ovfHid').each(function() {
var container = this;
$(container).addClass('ovfHid').css({'overflow':'hidden'});
var cont_width = $(container).width();
var elem_width = 0;
$(container).find('.serieTab').each(function() {
elem_width += $(this).outerWidth(true);
});
var max_scroll = elem_width - cont_width;
var correction = parseInt(max_scroll / 12);
max_scroll += correction * 2;
var differential = max_scroll / cont_width;
$(this).on('mousemove', function(e){
var pos = (e.pageX - $(this).offset().left) + 1;
var scr = Math.round(pos * differential) - correction;
if(scr < 0) scr=0; else if(scr > max_scroll - correction * 2) scr = max_scroll - correction * 2;
$(this).scrollLeft(scr);
//$('.related').html('cont_width: '+cont_width+'<br>elem_width: '+elem_width+'<br>max_scroll: '+max_scroll+'<br>differential: '+differential+'<br>pos: '+pos+'<br>scr: '+scr);
//$('.related').append('<br>e.offsetX: '+e.offsetX+'<br>e.pageX: '+e.pageX+'<br>offset.left: '+$(this).offset().left);
});
})
}
$('.tabs_container').css('visibility','visible');
}
$('#video_wrapper').hover(function() {
overVid=$(this).closest('#video_wrapper').attr('id');
}, function() {
overVid='';
});
$(window).blur(function() {
if(overVid=='video_wrapper'){vidClicked=1;if(currBtn!=null) startCounter(currBtn);}
});
$(function(){
getSchedule(3980,'1848220','4','36','2014-03-26 14:16:06',null);
});
$(function(){getMoonList();});
</script>
Вот сайт на котором нашёл
[red]Тык[/red]
Помоги плиз больше не знаю к кому обратится
!!!!Знал бы js не просил бы ни кого а так дуб полный
!!!!Во век не забуду!!!!!!!!