FOD={logPlay:function(_1){
new Ajax.Request("/webclient/logPlay",{method:"post",parameters:{id:_1.track,sk:_1.sk},onSuccess:FOD.onLogSuccess});
},onLogSuccess:function(_2){
},createLimitDialog:function(_3,_4){
var _5="FODDialogSuppress"+(_4?"FairUse":"");
log("createLimitDialog");
if(LFM.getCookie(_5)==1){
return;
}
function setSuppressCookie(){
var _6=$F("fodSuppressCheck")?1:0;
LFM.setCookie(_5,_6);
}
var _7=new LFM.Dialog({resource:{type:9,id:_3.id},type:LFM.Dialog.CUSTOM,classname:"fodDialog",onCancel:function(_8){
setSuppressCookie();
_8.hide();
},onConfirm:setSuppressCookie});
_7.show("/ajax/dialog/fodlimit"+(_4?"?fairuse=1":""));
}};
var UFO={req:["movie","width","height","majorversion","build"],opt:["play","loop","menu","quality","scale","salign","wmode","bgcolor","base","flashvars","devicefont","allowscriptaccess","seamlesstabbing","allowfullscreen"],optAtt:["id","name","align"],optExc:["swliveconnect"],ximovie:"ufo.swf",xiwidth:"215",xiheight:"138",ua:navigator.userAgent.toLowerCase(),pluginType:"",fv:[0,0],foList:[],create:function(FO,id){
if(!UFO.uaHas("w3cdom")||UFO.uaHas("ieMac")){
return;
}
UFO.getFlashVersion();
UFO.foList[id]=UFO.updateFO(FO);
UFO.createCSS("#"+id,"visibility:hidden;");
UFO.domLoad(id);
},updateFO:function(FO){
if(typeof FO.xi!="undefined"&&FO.xi=="true"){
if(typeof FO.ximovie=="undefined"){
FO.ximovie=UFO.ximovie;
}
if(typeof FO.xiwidth=="undefined"){
FO.xiwidth=UFO.xiwidth;
}
if(typeof FO.xiheight=="undefined"){
FO.xiheight=UFO.xiheight;
}
}
FO.mainCalled=false;
return FO;
},domLoad:function(id){
var _t=setInterval(function(){
if((document.getElementsByTagName("body")[0]!=null||document.body!=null)&&document.getElementById(id)!=null){
UFO.main(id);
clearInterval(_t);
}
},250);
if(typeof document.addEventListener!="undefined"){
document.addEventListener("DOMContentLoaded",function(){
UFO.main(id);
clearInterval(_t);
},null);
}
},main:function(id){
var _f=UFO.foList[id];
if(_f.mainCalled){
return;
}
UFO.foList[id].mainCalled=true;
document.getElementById(id).style.visibility="hidden";
if(UFO.hasRequired(id)){
if(UFO.hasFlashVersion(parseInt(_f.majorversion,10),parseInt(_f.build,10))){
if(typeof _f.setcontainercss!="undefined"&&_f.setcontainercss=="true"){
UFO.setContainerCSS(id);
}
UFO.writeSWF(id);
}else{
if(_f.xi=="true"&&UFO.hasFlashVersion(6,65)){
UFO.createDialog(id);
}
}
}
document.getElementById(id).style.visibility="visible";
},createCSS:function(_10,_11){
var _h=document.getElementsByTagName("head")[0];
var _s=UFO.createElement("style");
if(!UFO.uaHas("ieWin")){
_s.appendChild(document.createTextNode(_10+" {"+_11+"}"));
}
_s.setAttribute("type","text/css");
_s.setAttribute("media","screen");
_h.appendChild(_s);
if(UFO.uaHas("ieWin")&&document.styleSheets&&document.styleSheets.length>0){
var _ls=document.styleSheets[document.styleSheets.length-1];
if(typeof _ls.addRule=="object"){
_ls.addRule(_10,_11);
}
}
},setContainerCSS:function(id){
var _fo=UFO.foList[id];
var _w=/%/.test(_fo.width)?"":"px";
var _h=/%/.test(_fo.height)?"":"px";
UFO.createCSS("#"+id,"width:"+_fo.width+_w+"; height:"+_fo.height+_h+";");
if(_fo.width=="100%"){
UFO.createCSS("body","margin-left:0; margin-right:0; padding-left:0; padding-right:0;");
}
if(_fo.height=="100%"){
UFO.createCSS("html","height:100%; overflow:hidden;");
UFO.createCSS("body","margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0; height:100%;");
}
},createElement:function(el){
return (UFO.uaHas("xml")&&typeof document.createElementNS!="undefined")?document.createElementNS("http://www.w3.org/1999/xhtml",el):document.createElement(el);
},createObjParam:function(el,_1b,_1c){
var _p=UFO.createElement("param");
_p.setAttribute("name",_1b);
_p.setAttribute("value",_1c);
el.appendChild(_p);
},uaHas:function(ft){
var _u=UFO.ua;
switch(ft){
case "w3cdom":
return (typeof document.getElementById!="undefined"&&typeof document.getElementsByTagName!="undefined"&&(typeof document.createElement!="undefined"||typeof document.createElementNS!="undefined"));
case "xml":
var _m=document.getElementsByTagName("meta");
var _l=_m.length;
for(var i=0;i<_l;i++){
if(/content-type/i.test(_m[i].getAttribute("http-equiv"))&&/xml/i.test(_m[i].getAttribute("content"))){
return true;
}
}
return false;
case "ieMac":
return /msie/.test(_u)&&!/opera/.test(_u)&&/mac/.test(_u);
case "ieWin":
return /msie/.test(_u)&&!/opera/.test(_u)&&/win/.test(_u);
case "gecko":
return /gecko/.test(_u)&&!/applewebkit/.test(_u);
case "opera":
return /opera/.test(_u);
case "safari":
return /applewebkit/.test(_u);
default:
return false;
}
},getFlashVersion:function(){
if(UFO.fv[0]!=0){
return;
}
if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){
UFO.pluginType="npapi";
var _d=navigator.plugins["Shockwave Flash"].description;
if(typeof _d!="undefined"){
_d=_d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");
var _m=parseInt(_d.replace(/^(.*)\..*$/,"$1"),10);
var _r=/r/.test(_d)?parseInt(_d.replace(/^.*r(.*)$/,"$1"),10):0;
UFO.fv=[_m,_r];
}
}else{
if(window.ActiveXObject){
UFO.pluginType="ax";
try{
var _a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
}
catch(e){
try{
var _a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
UFO.fv=[6,0];
_a.AllowScriptAccess="always";
}
catch(e){
if(UFO.fv[0]==6){
return;
}
}
try{
var _a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
}
catch(e){
}
}
if(typeof _a=="object"){
var _d=_a.GetVariable("$version");
if(typeof _d!="undefined"){
_d=_d.replace(/^\S+\s+(.*)$/,"$1").split(",");
UFO.fv=[parseInt(_d[0],10),parseInt(_d[2],10)];
}
}
}
}
},hasRequired:function(id){
var _l=UFO.req.length;
for(var i=0;i<_l;i++){
if(typeof UFO.foList[id][UFO.req[i]]=="undefined"){
return false;
}
}
return true;
},hasFlashVersion:function(_2a,_2b){
return (UFO.fv[0]>_2a||(UFO.fv[0]==_2a&&UFO.fv[1]>=_2b))?true:false;
},writeSWF:function(id){
var _fo=UFO.foList[id];
var _e=document.getElementById(id);
if(UFO.pluginType=="npapi"){
if(UFO.uaHas("gecko")||UFO.uaHas("xml")){
while(_e.hasChildNodes()){
_e.removeChild(_e.firstChild);
}
var _2f=UFO.createElement("object");
_2f.setAttribute("type","application/x-shockwave-flash");
_2f.setAttribute("data",_fo.movie);
_2f.setAttribute("width",_fo.width);
_2f.setAttribute("height",_fo.height);
var _l=UFO.optAtt.length;
for(var i=0;i<_l;i++){
if(typeof _fo[UFO.optAtt[i]]!="undefined"){
_2f.setAttribute(UFO.optAtt[i],_fo[UFO.optAtt[i]]);
}
}
var _o=UFO.opt.concat(UFO.optExc);
var _l=_o.length;
for(var i=0;i<_l;i++){
if(typeof _fo[_o[i]]!="undefined"){
UFO.createObjParam(_2f,_o[i],_fo[_o[i]]);
}
}
_e.appendChild(_2f);
}else{
var _33="";
var _o=UFO.opt.concat(UFO.optAtt).concat(UFO.optExc);
var _l=_o.length;
for(var i=0;i<_l;i++){
if(typeof _fo[_o[i]]!="undefined"){
_33+=" "+_o[i]+"=\""+_fo[_o[i]]+"\"";
}
}
_e.innerHTML="<embed type=\"application/x-shockwave-flash\" src=\""+_fo.movie+"\" width=\""+_fo.width+"\" height=\""+_fo.height+"\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\""+_33+"></embed>";
}
}else{
if(UFO.pluginType=="ax"){
var _34="";
var _l=UFO.optAtt.length;
for(var i=0;i<_l;i++){
if(typeof _fo[UFO.optAtt[i]]!="undefined"){
_34+=" "+UFO.optAtt[i]+"=\""+_fo[UFO.optAtt[i]]+"\"";
}
}
var _35="";
var _l=UFO.opt.length;
for(var i=0;i<_l;i++){
if(typeof _fo[UFO.opt[i]]!="undefined"){
_35+="<param name=\""+UFO.opt[i]+"\" value=\""+_fo[UFO.opt[i]]+"\" />";
}
}
var _p=window.location.protocol=="https:"?"https:":"http:";
_e.innerHTML="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\""+_34+" width=\""+_fo.width+"\" height=\""+_fo.height+"\" codebase=\""+_p+"//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+_fo.majorversion+",0,"+_fo.build+",0\"><param name=\"movie\" value=\""+_fo.movie+"\" />"+_35+"</object>";
}
}
},createDialog:function(id){
var _fo=UFO.foList[id];
UFO.createCSS("html","height:100%; overflow:hidden;");
UFO.createCSS("body","height:100%; overflow:hidden;");
UFO.createCSS("#xi-con","position:absolute; left:0; top:0; z-index:1000; width:100%; height:100%; background-color:#fff; filter:alpha(opacity:75); opacity:0.75;");
UFO.createCSS("#xi-dia","position:absolute; left:50%; top:50%; margin-left: -"+Math.round(parseInt(_fo.xiwidth,10)/2)+"px; margin-top: -"+Math.round(parseInt(_fo.xiheight,10)/2)+"px; width:"+_fo.xiwidth+"px; height:"+_fo.xiheight+"px;");
var _b=document.getElementsByTagName("body")[0];
var _c=UFO.createElement("div");
_c.setAttribute("id","xi-con");
var _d=UFO.createElement("div");
_d.setAttribute("id","xi-dia");
_c.appendChild(_d);
_b.appendChild(_c);
var _3c=window.location;
if(UFO.uaHas("xml")&&UFO.uaHas("safari")){
var _3d=document.getElementsByTagName("title")[0].firstChild.nodeValue=document.getElementsByTagName("title")[0].firstChild.nodeValue.slice(0,47)+" - Flash Player Installation";
}else{
var _3d=document.title=document.title.slice(0,47)+" - Flash Player Installation";
}
var _3e=UFO.pluginType=="ax"?"ActiveX":"PlugIn";
var _uc=typeof _fo.xiurlcancel!="undefined"?"&xiUrlCancel="+_fo.xiurlcancel:"";
var _uf=typeof _fo.xiurlfailed!="undefined"?"&xiUrlFailed="+_fo.xiurlfailed:"";
UFO.foList["xi-dia"]={movie:_fo.ximovie,width:_fo.xiwidth,height:_fo.xiheight,majorversion:"6",build:"65",flashvars:"MMredirectURL="+_3c+"&MMplayerType="+_3e+"&MMdoctitle="+_3d+_uc+_uf};
UFO.writeSWF("xi-dia");
},expressInstallCallback:function(){
var _b=document.getElementsByTagName("body")[0];
var _c=document.getElementById("xi-con");
_b.removeChild(_c);
UFO.createCSS("body","height:auto; overflow:auto;");
UFO.createCSS("html","height:auto; overflow:auto;");
},cleanupIELeaks:function(){
var _o=document.getElementsByTagName("object");
var _l=_o.length;
for(var i=0;i<_l;i++){
_o[i].style.display="none";
for(var x in _o[i]){
if(typeof _o[i][x]=="function"){
_o[i][x]=null;
}
}
}
}};
if(typeof window.attachEvent!="undefined"&&UFO.uaHas("ieWin")){
window.attachEvent("onunload",UFO.cleanupIELeaks);
}
LFM.set("Flash",{Player:{radioPopup:null,radioPrefPopup:null,currentTrack:null,currentTrackNum:null,newTrack:null,previewRequest:false,is_ie:null,context:false,createRadioPopup:function(_47,_48,_49){
if(this.radioPopup==undefined||this.radioPopup.closed||(_48!=undefined&&_49!=undefined)){
this.radioPopup=window.open("/webclient/popup/?radioURL="+encodeURIComponent(_47)+"&resourceID="+_48+"&resourceType="+_49,"flashRadioPopup","toolbar=no, location=no, directories=no, status=no,menubar=no, scrollbars=no, resizable=no, width=320, height= 330");
this.radioPopup.moveTo(200,200);
this.radioPopup.focus();
}else{
if(navigator.appName.indexOf("Microsoft")!=-1){
this.radioPopup.close();
this.radioPopup=undefined;
createRadioPopup(_47);
}else{
if(!this.radioPopup.closed){
this.radioPopup.tune(unescape(_47));
this.radioPopup.focus();
}
}
}
},createShufflePopup:function(_4a){
var _4b=window.open("/webclient/shuffle/?user="+encodeURIComponent(_4a),"shuffleRadioPopup","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=372, height=293");
},onMouseDownViewport:function(){
},onMouseUpViewport:function(){
},createHomepageRadioPopup:function(_4c){
createRadioPopup(_4c);
if(radioPopup){
stopRadio();
}
},save:function(_4d){
s=s_gi("cbslastfm");
s.eVar26="FlashPlayerBtn";
LFM.Add(_4d);
},launchStation:function(url){
var s=s_gi("cbslastfm");
if(s.prop49){
s.events="event26";
s.eVar26="flashplayerRadioButton";
s.eVar49=s.prop49;
s.t();
}
window.open(url);
},send:function(_50){
s=s_gi("cbslastfm");
s.eVar26="FlashPlayerBtn";
LFM.Send(_50);
},add:function(_51){
s=s_gi("cbslastfm");
s.eVar26="FlashPlayerBtn";
LFM.Add(_51);
},tag:function(_52){
s=s_gi("cbslastfm");
s.eVar26="FlashPlayerBtn";
LFM.Tag(_52);
},buy:function(url){
s=s_gi("cbslastfm");
s.eVar26="FlashPlayerBtn";
s.events="event19";
s.t();
window.open(url);
},login:function(_54){
LFM.set("LoginDialog",LFM.AJAXDialogWrapper("/ajax/dialog/add",{title:"Log in to Last.fm",classname:"add"}));
LFM.LoginDialog(_54);
},stopRadio:function(){
var _55=$("lfmPlayer");
if(_55){
_55.TCallLabel("/","handleJSStopPlayback");
}
},createRadioPrefPopup:function(_56){
if((this.radioPopup==undefined||this.radioPopup.closed)){
radioPrefPopup=window.open("/webclient/pref/?radioURL="+encodeURIComponent(_56),"radioPrefPopup","toolbar=no, location=no, directories=no, status=no,menubar=no, scrollbars=no, resizable=no, width=320, height= 330");
radioPrefPopup.moveTo(200,200);
radioPrefPopup.focus();
}else{
LFM.Flash.Player.createRadioPopup(_56);
}
},setContext:function(_57){
this.context=_57;
},playPreview:function(_58){
this.context.playPreview(_58);
},getCurrentTrack:function(){
return Lastfm.resources[currentTrackNum-1];
},saveVolume:function(vol){
var _5a=new Date();
_5a.setFullYear(2010,1,1);
LFM.deleteCookie("lfmVol");
LFM.setCookie("lfmVol",vol,_5a);
},setVolume:function(vol){
log("set volume to "+vol);
var _5c=$("lfmPlayer");
_5c.SetVariable("jsVolume",parseInt(vol));
_5c.TCallLabel("/","handleJSVolume");
},initVolume:function(){
var vol=LFM.getCookie("lfmVol");
if(vol){
this.setVolume(parseInt(vol));
}
},highlightTrack:function(id){
this.context.scrollToCurrentTrack(currentTrack);
},scrollToCurrentTrack:function(_5f){
this.context.scrollToCurrentTrack(_5f);
},onNextTrack:function(_60){
this.context.onNextTrack(_60);
},onNextTrackHighlight:function(){
this.context.scrollToCurrentTrack(currentTrack);
},onStopTrack:function(){
this.context.onStopTrack();
},onLoad:function(){
this.initVolume();
},setPopupTitle:function(_61){
var _62=is_ie?decodeURIComponent(escape(_61)):_61;
$("radioTitle").innerHTML="Listening to "+_62;
},createLogPanel:function(){
if(!$("flashLog")){
var _63=document.createElement("div");
_63.id="flashLog";
$("flashContainer").appendChild(_63);
}else{
$("flashContainer").removeChild($("flashLog"));
}
},log:function(msg){
if($("flashLog")){
$("flashLog").innerHTML=$("flashLog").innerHTML.slice(-400)+msg+"<br />";
}
}}});
Event.observe(window,"beforeunload",function(_65){
if(Prototype.Browser.WebKit){
log("stopping radio");
LFM.Flash.Player.stopRadio();
}
});
var mouseOverFlash=false;
function SWFMacMouseWheel(id){
this.id=id;
this.mouseOverFlash=false;
var _67=navigator.appVersion.toLowerCase().indexOf("mac")!=-1;
if(_67){
this.init();
}
}
SWFMacMouseWheel.prototype={init:function(){
SWFMacMouseWheel.instance=this;
Event.observe(window,"onmousewheel",SWFMacMouseWheel.instance.wheel);
Event.observe(window,"DOMMouseScroll",SWFMacMouseWheel.instance.wheel);
Event.observe($("player"),"mouseover",SWFMacMouseWheel.instance.onHoverOverFlash);
Event.observe($("player"),"mouseout",SWFMacMouseWheel.instance.onHoverOutFlash);
},onHoverOverFlash:function(_68){
mouseOverFlash=true;
},onHoverOutFlash:function(_69){
mouseOverFlash=false;
},handle:function(_6a){
$(this.id).externalMouseEvent(_6a);
},wheel:function(_6b){
var _6c=0;
if(_6b.wheelDelta){
_6c=_6b.wheelDelta/120;
if(window.opera){
_6c=-_6c;
}
}else{
if(_6b.detail){
_6c=-_6b.detail/3;
}
}
if(/AppleWebKit/.test(navigator.userAgent)){
_6c/=3;
}
if(mouseOverFlash){
}
}};
LFM.set("Flash",{Metadata:Class.create({currentTrack:null,currentTrackNum:null,newTrack:null,playing:false,artistInfoBlinding:false,waitingShowResponseArg:false,shoutSuccess:"0",originalTitle:document.title,initialize:function(){
document.observe("click",function(_6d){
if(!_6d.isLeftClick()){
return;
}
if(!this.playing){
return;
}
var _6e=_6d.findElement("a");
if(!_6e){
return;
}
if(_6e.hasClassName("stationbutton")){
return;
}
if((_6e.up("#stationContainerContent")||_6e.up("#sampleContent"))&&_6e.href!=""&&_6e.href!="#"){
_6d.stop();
window.open(_6e.href);
}
}.bind(this));
},onNextTrack:function(_6f,_70){
log("called flash player next track");
if(!_70){
_70=0;
}
log("1");
this.currentTrack=_6f;
log("2");
this.playing=true;
log("3");
document.title=_6f.creator+" - "+_6f.name+" - Last.fm";
if(this.hasShout()){
log("has shout");
functionArguments=[_6f];
this.finishShout(LFM.Flash.Player.context.onNextTrack.bind(this),functionArguments);
}else{
log("else");
if(_6f.manual){
setTimeout(this.refreshAd,10000);
}
this.removeContent();
setTimeout(function(){
LFM.Flash.Player.context.getMetadata.bind(LFM.Flash.Player.context)(_6f.creator,_6f.name,_70);
},500);
log("2");
}
$("listenContent").stopObserving();
$("listenContent").observe("click",this.dontStopTheRock);
},finishShout:function(_71,_72){
if(!$("shoutOutOutOutOut").visible){
new Effect.BlindDown("shoutOutOutOutOut",{duration:0.3});
}
if(LFM.Page.Shoutboxen){
actsAsAspect(LFM.Page.Shoutboxen.shoutbox);
LFM.Page.Shoutboxen.shoutbox.after("addShout",function(){
$("shoutmsg").value="";
_72.push(1);
log("function arguments:");
_72.each(function(arg){
log(arg);
});
_71.apply(this,_72);
});
$$("#shoutOutOutOutOut a")[0].observe("click",function(e){
$("shoutmsg").value="";
_71.apply(this,_72);
e.stop();
}.bind(this));
}
},getMetadata:function(_75,_76,_77){
log("get meta data");
this.getArtistInfo(_75,_76,_77);
},onStopTrack:function(){
this.playing=false;
document.title=this.originalTitle;
if(this.hasShout()){
this.finishShout("onFlashPlayerStopTrack");
}else{
this.removeContent();
if($("calltoaction")){
new Effect.Appear("calltoaction",{duration:0.5,delay:1});
}
if($("launcher")){
new Effect.Appear("launcher",{duration:0.5,delay:1});
}
}
$("listenContent").stopObserving();
},getArtistInfo:function(_78,_79,_7a){
var url="/webclient/listeningNow";
log("get artist info: "+_78+", "+_79+", "+_7a);
if(isset(_78)&&isset(_79)){
new Ajax.Request(url,{method:"get",parameters:{"artist":_78,"track":_79,"shoutsuccess":_7a,"ajax":1},onSuccess:this.showResponse.bind(this)});
}
},waitedShowResponse:function(){
this.showResponse(this.waitingShowResponseArg);
},showResponse:function(_7c){
if(this.artistInfoBlinding){
this.waitingShowResponseArg=_7c;
setTimeout(this.waitedShowResponse(),1000);
}
if(this.playing){
var _7d=new LFM.Ajax.Response(_7c);
$("contentPane").update(_7d.get("html"));
if($("similarArtists")&&$("similarArtistsSource")){
$("similarArtists").update($("similarArtistsSource").innerHTML);
$("similarArtistsSource").remove();
new Effect.Appear("similarArtists",{duration:0.4});
}
new Effect.Appear("contentPane",{duration:0.5,afterFinish:function(){
this.artistInfoBlinding=false;
}.bind(this)});
if($("events")&&$("eventsSource")){
$("events").update($("eventsSource").innerHTML);
$("eventsSource").remove();
new Effect.Appear("events",{duration:0.4});
}
if($("topfans")&&$("topfansSource")){
$("topfans").update($("topfansSource").innerHTML);
$("topfansSource").remove();
new Effect.Appear("topfans",{duration:0.4});
}
if($("newShoutboxContainer")){
if($("shoutboxContainer")){
$("shoutboxContainer").remove();
}
$("newShoutboxContainer").id="shoutboxContainer";
$("listenContent").appendChild($("shoutboxContainer"));
new Effect.Appear("shoutboxContainer",{duration:0.4});
}
if($("shoutSuccess")){
new Effect.BlindUp("shoutSuccess",{duration:0.4,delay:7});
}
if($("sorryForTheInconvenience")){
var _7e=$("sorryForTheInconvenience");
if(_7e.facesExtinction){
new Effect.BlindUp("sorryForTheInconvenience",{duration:0.4,afterFinish:function(obj){
obj.element.remove();
}});
}else{
_7e.facesExtinction=true;
}
}
}
},hasShout:function(){
if($("shoutmsg")){
return shout=$F("shoutmsg").strip()!="";
}else{
return false;
}
},removeContent:function(){
if($("contentPane")){
this.artistInfoBlinding=true;
new Effect.Fade("contentPane",{duration:0.3,afterFinish:function(_80){
this.artistInfoBlinding=false;
_80.element.innerHTML="";
}.bind(this)});
}
if($("otherStations")){
new Effect.Fade("otherStations",{duration:0.3,afterFinish:function(_81){
_81.element.innerHTML="";
}});
}
if($("topfans")){
new Effect.Fade("topfans",{duration:0.3,afterFinish:function(_82){
_82.element.innerHTML="";
}});
}
if($("events")){
new Effect.Fade("events",{duration:0.3,afterFinish:function(_83){
_83.element.innerHTML="";
}});
}
if($("shoutboxContainer")){
new Effect.Fade("shoutboxContainer",{duration:0.3,afterFinish:function(_84){
_84.element.remove();
if(LFM.Page.Shoutboxen){
LFM.Page.Shoutboxen.shoutbox=false;
}
}});
}
if($("similarArtists")){
new Effect.Fade("similarArtists",{duration:0.3,afterFinish:function(_85){
_85.element.innerHTML="";
}});
}
if(this.playing&&$("calltoaction")){
new Effect.Fade("calltoaction",{duration:0.3});
}
if(this.playing&&$("launcher")){
new Effect.Fade("launcher",{duration:0.3});
}
log("removed contentz");
},refreshAd:function(){
var f=$("LastAd_TopRight");
if(f){
f.src=f.src;
}
var f=$("LastAd_Top");
if(f&&f.src){
f.src=f.src;
}
},dontStopTheRock:function(_87){
var _88=_87.findElement("a");
if(!_88){
return;
}
_87.stop();
window.open(_88.href);
}})});
LFM.set("Flash",{Overlay:Class.create()});
LFM.Flash.Overlay={Play:function(){
LFM.Flash.Overlay.Show();
if($("lfmPlayer")){
LFM.Flash.Player.playPreview(1);
}
},Overlay:function(){
},initialize:function(){
},PlayPreview:function(_89){
LFM.Flash.Player.playPreview(1);
},Show:function(){
LFM.Flash.Overlay.FadeIn();
},FadeIn:function(){
if(!$("lfmPlayer")){
UFO.create(FO,"flashContainer");
}else{
($("lfmPlayer").TCallLabel("/","showPlayer"));
}
Effect.Appear("handle",{duration:0.4,afterFinish:LFM.Flash.Overlay.showDragHandle});
},showDragHandle:function(){
$("handle").style.opacity=1;
new Draggable("player",{handle:"handle",zindex:10000,starteffect:LFM.Flash.Overlay.Move,endeffect:null});
},Move:function(){
$("player").style.position="none";
},Hide:function(){
$("handle").style.opacity=0;
$("lfmPlayer").TCallLabel("/","hidePlayer");
},onHideComplete:function(){
Effect.Fade("flashContainer");
}};
function hidePlayer(){
LFM.Flash.Overlay.Hide();
}
LFM.set("Flash",{Playlist:Class.create({initialize:function(id){
this.tracks=[];
this.trackTable=$(id);
this.currentTrack=null;
this.currentTrackNum=null;
this.newTrack=null;
this.previewRequest=false;
this.trackTable.observe("click",function(_8b){
if(!_8b.element().match("td")){
return;
}
var row=_8b.findElement("tr.streamable:not(.highlight)");
if(!row){
return;
}
_8b.stop();
this.playPreview(row);
}.bind(this));
},playPreview:function(_8d){
var res=_8d.getResource();
var _8f=$("lfmPlayer");
_8f.SetVariable("previewTrackId",parseInt(res.id));
_8f.TCallLabel("/","HandleJSPreview");
if(this.currentTrack){
this.clearHighlight(this.currentTrack);
}
},highlightTrack:function(id){
if(this.currentTrack){
this.clearHighlight(this.currentTrack);
}
var _91=this.getTrackRow(id);
if(_91){
_91.addClassName("highlight");
}
this.scrollToTrack(_91);
},getTracks:function(){
return this.trackTable.select("tr");
},getTrackRow:function(id){
return this.getTracks().find(function(_93){
return _93.id.include(id);
});
},onNextTrack:function(_94){
if(this.currentTrack){
this.clearHighlight(this.currentTrack);
}
this.currentTrack=_94;
this.highlightTrack(this.getResourceId(_94));
},clearHighlight:function(_95){
var _96=this.getTrackRow(this.getResourceId(_95));
if(_96){
_96.removeClassName("highlight");
}
},getResourceId:function(res){
return "r"+res.type+"_"+res.id;
},onLoad:function(){
},onStopTrack:function(){
if(this.currentTrack){
this.clearHighlight(this.currentTrack);
}
this.currentTrack=null;
},scrollToTrack:function(_98){
var _99=document.viewport.getHeight();
var _9a=document.viewport.getScrollOffsets().top;
var _9b=_98.cumulativeOffset().top;
if(_9b>_99+_9a){
new Effect.ScrollTo(_98);
}
}})});


