
$(document).ready(function(){$("tr.borders_main_games:last").css('border-bottom','0 none');$("div.game-box:last").css('border-bottom','0 none');if($("#content-bottom-table"))
$("#content-bottom-table").css('width',$('.box:first').css('width'));if($('div.sub-borders'))
$('div.sub-borders').after('<table cellspacing="0" border="0" cellpadding="0" width="100%"><tr><td width="12" height="12" class="corner-left-bottom">&nbsp;</td><td class="corner-bottom-line" height="12">&nbsp;</td><td width="12" height="12" class="corner-right-bottom">&nbsp;</td></tr></table><br />');if($('td.coner-left')){$('td.coner-left').remove();$('td.coner-right').remove();}
function checkstatus_project(){var status=ProdownFrame.getStatus();switch(status){case Events.Plugin.Loading:case Events.Plugin.Ready:case Events.Plugin.Launched:$("#tr_loader").hide();break;case Events.Plugin.Idle:$("#tr_loader").hide();break;}
status=null;gameTitle=null;return null;}
if(SysreqManager.IsPluginInit){var localImagesTimer=$.timer(1000,function(timer){checkstatus_project();timer.reset(1000);});}
$(".publishers_menu .slided").hover(function(){$(this).addClass("active");if(jQuery.browser.msie&&jQuery.browser.version==7)
{var offset=$(this).offset();var $menu=$(this).children(".menu-slider").addClass("ie7");if($(this).parents(".menu-pub-green").length)
$menu.addClass("green");$(".menu-slider.active").removeClass("active").mouseleave();$menu.css("top",offset.top+"px").css("left",offset.left+"px").appendTo("body").addClass("active").show();$menu.one("mouseleave",function($wrapper){return function(){$(this).css("top","auto").css("left","auto").hide().appendTo($wrapper.removeClass("active"));}}($(this)));}},function(){$(this).removeClass("active");});});function getBrowserInfo(){var t,v=undefined;if(window.chrome)t='Chrome';else if(window.opera)t='Opera';else if(document.all){t='IE';var nv=navigator.appVersion;var s=nv.indexOf('MSIE')+5;v=nv.substring(s,s+1);}
else if(navigator.appName)t='Netscape';return{type:t,version:v};}
function bookmark(a){var url=window.document.location;var title=window.document.title;var b=getBrowserInfo();if(b.type=='IE'&&b.version>=4)window.external.AddFavorite(url,title);else if(b.type=='Opera'){a.href=url;a.rel="sidebar";a.title=url+','+title;return true;}
else if(b.type=="Netscape")window.sidebar.addPanel(title,url,"");else jAlert(bookmarkAlert,bookmarkHeader);return false;};;(function($){$.fn.tMask=function(options){var options=$.extend({radius:'50'},options);return this.each(function(){var tmp=navigator.appName=='Microsoft Internet Explorer'&&navigator.userAgent.indexOf('Opera')<1?1:0;if(tmp)var isIE=document.namespaces&&!window.opera?1:0;if(isIE){$(this).hide();var image=this;var radius=options.radius;var height=image.height;var width=image.width;vml=document.createElement(['<var style="zoom:1;display: block; width:150px;height:150px;padding:0;">'].join(''));var path="m 0,"+radius;path+=" l 0,"+(height-radius)+" qy "+radius+","+height;path+=" l "+(width-radius)+","+height+" qx "+width+","+(height-radius);path+=" l "+width+","+radius+" qy "+(width-radius)+",0";path+=" l "+radius+",0 qx 0,"+radius;path+=" x e";data='<v:shape stroked="f" filled="t" fillcolor="#fff" coordorigin="0,0" coordsize="'+width+','+height+'" path="'+path+'" style="zoom:1;padding: 0;display: block; width:'+width+'px;height:'+height+'px;"><v:fill src="'+image.src+'" type="frame"/></v:shape>';vml.innerHTML=[data].join('');image.insertAdjacentElement('BeforeBegin',vml);}else{$(this).hide();var canvas=document.createElement('canvas');canvas.setAttribute('width',options.radius*2);canvas.setAttribute('height',options.radius*2);this.parentNode.insertBefore(canvas,this);ctx=canvas.getContext('2d');ctx.beginPath();ctx.arc(options.radius,options.radius,options.radius,0,Math.PI*2,true);ctx.fill();ctx.globalCompositeOperation='source-atop';ctx.drawImage(this,0,0);}});};})(jQuery);;function loadOnairContent(){jQuery("div#on-air-container").load("http://muz-tv.ru/onair/ajax",function()
{jQuery(".current-song img").load(function()
{round250();});jQuery(".next-song img").load(function()
{round190();});animateCurrentSong();animateNextSong();});}
function round250(){jQuery(".current-song canvas").remove();try{jQuery(".current-song img").tMask({radius:'125'});}
catch(e){setTimeout('round250',1500);}}
function round190(){jQuery(".next-song canvas").remove();try{jQuery(".next-song img").tMask({radius:'95'});}
catch(e){setTimeout('round190',1500);}}
function animateCurrentSong(){var nextout=jQuery(".current-song-name-inner").width();var nextin=jQuery(".current-song-name-inner div").width();var raz=nextin-nextout;if(nextout<nextin)
{jQuery(".current-song-name-inner div").delay(2000).animate({"left":-raz},2100).delay(2000).animate({"left":"0"},2100).delay(2000);setTimeout("animateCurrentSong()",9000);}}
function animateNextSong(){var nextout=jQuery(".next-song-name-inner").width();var nextin=jQuery(".next-song-name-inner div").width();var raz=nextin-nextout;if(nextout<nextin)
{jQuery(".next-song-name-inner div").delay(2000).animate({"left":-raz},2100).delay(2000).animate({"left":"0"},2100).delay(2000);setTimeout("animateNextSong()",9000);}}
jQuery(document).ready(function(){loadOnairContent();window.setInterval(loadOnairContent,2*60*1000);});;
