function showEmbed(){$("#thisTabContent").hide();$("#embedTabContent").show();$("#thisTab").removeClass("selected");var A=$("#thisTab > div").html();$("#thisTab").html('<a href="javascript:;" onclick="hideEmbed()"><div>'+A+"</div></a>");$("#embedTab").addClass("selected");var B=$("#embedTab > a").html();$("#embedTab").html(B)}function hideEmbed(){$("#thisTabContent").show();$("#embedTabContent").hide();$("#thisTab").addClass("selected");var A=$("#thisTab > a").html();$("#thisTab").html(A);$("#embedTab").removeClass("selected");var B=$("#embedTab > div").html();$("#embedTab").html('<a href="javascript:;" onclick="showEmbed()"><div>'+B+"</div></a>")}function getUserToken(){return top.USER_TOKEN}function getUserName(){return top.USER_NAME}function getUserBandlistUrl(A){return"/user/"+A+"/bandlist/"}function getArtistUrl(A){return"/band/"+A+"/"}function getSongUrl(A,B){return getArtistUrl(A)+"music/"+B+"/"}function getPushSongUrl(A,B){return getSongUrl(A,B)+"push/"}function getUnPushSongUrl(A,B){return getSongUrl(A,B)+"unpush/"}function getMuteSongUrl(A,B){return getSongUrl(A,B)+"mute/"}function getUnMuteSongUrl(A,B){return getSongUrl(A,B)+"unmute/"}function getAddBandlistUrl(A){return getUserBandlistUrl(getUserName())+"add/"+A+"/"}function getRemoveBandlistUrl(A){return getUserBandlistUrl(getUserName())+"remove/"+A+"/"}function doPost(A,C,D,B){return $.ajax({async:true,type:"POST",url:A,data:C,error:B,success:D})}function updateSongCounter(A,B,C){document.getElementById(["votes",A,B].join(".")).innerHTML=C}function doPushSong(B,C,D){updateSongCounter(B,C,D);var A=document.getElementById(["pbutton",B,C].join("."));A.href="javascript:ups('"+B+"','"+C+"')";A.innerHTML='<img src="/static/_img/btn_unpush.jpg" alt="Unpush" title="Unpush" />'}function doUnPushSong(A,C,D){updateSongCounter(A,C,D);var B=document.getElementById(["pbutton",A,C].join(".")).parentNode;B.innerHTML='<img src="/static/_img/btn_push_disabled.jpg" alt="Already unpushed" title="Already unpushed" />'}function psnl(){alert("Please login to push a song.")}function ps(A,B){document.getElementById(["pbutton",A,B].join(".")).href="javascript:void(0)";doPost(getPushSongUrl(A,B),{token:getUserToken()},function(C){doPushSong(A,B,parseInt(C))},function(E,D,C){alert("ERROR: "+D+"\nStatus code: "+E.status+"\nText: "+E.responseText)})}function ups(A,B){document.getElementById(["pbutton",A,B].join(".")).href="javascript:void(0)";doPost(getUnPushSongUrl(A,B),{token:getUserToken()},function(C){doUnPushSong(A,B,parseInt(C))},function(E,D,C){alert("ERROR: "+D+"\nStatus code: "+E.status+"\nText: "+E.responseText)})}function ablnl(){alert("Please login to add to artistlist.")}function doAddBandlist(B){var A=document.getElementById(["bl",B].join("."));A.innerHTML='<img src="/static/_img/ico_remove.jpg" class="ico" />Remove from artistlist';A.href="javascript:rbl('"+B+"')"}function doRemoveBandlist(B){var A=document.getElementById(["bl",B].join("."));A.innerHTML='<img src="/static/_img/ico_add.jpg" class="ico" />Add to artistlist';A.href="javascript:abl('"+B+"')"}function abl(A){document.getElementById(["bl",A].join(".")).href="javascript:void(0)";doPost(getAddBandlistUrl(A),{token:getUserToken()},function(B){doAddBandlist(A)},function(D,C,B){alert("ERROR: "+C+"\nStatus code: "+D.status+"\nText: "+D.responseText)})}function rbl(A){document.getElementById(["bl",A].join(".")).href="javascript:void(0)";doPost(getRemoveBandlistUrl(A),{token:getUserToken()},function(B){doRemoveBandlist(A)},function(D,C,B){alert("ERROR: "+C+"\nStatus code: "+D.status+"\nText: "+D.responseText)})}function getPlaylistPlayer(){var A;if(navigator.appName.indexOf("Microsoft")!=-1){A=top.player.window.mplayer}else{A=top.player.document.mplayer}return A}function eap(A,C){var B=getPlaylistPlayer();B.SetVariable("_root.playIt","true");B.SetVariable("_root.band",A);B.SetVariable("_root.song",C)}function es(A,C){var B=getPlaylistPlayer();B.SetVariable("_root.playIt","false");B.SetVariable("_root.band",A);B.SetVariable("_root.song",C)}function argm(B){var A=getPlaylistPlayer();A.SetVariable("_root.randomCategory",B)}function pas(){$(".votes[@id]").each(function(B){var A=$(this).attr("id").split(".");es(A[1],A[2])})}function clp(){var A=getPlaylistPlayer();A.SetVariable("_root.reloadMainPage","true");A.SetVariable("_root.clearPlaylist","true")};