$(document).ready(function(){initPlayer();});function initPlayer(){$('div#am_Heckscher').hide();$("a").click(function(e){if($(this).hasClass("linkListen")||$(this).hasClass("am_blocContentRadioPlay")||$(this).hasClass("playlistTrackListen")||$(this).hasClass("playMyPlaylist")){e.preventDefault();dialogBox("Extinction de voix : pour achever sa mue, Allomusic va se taire très provisoirement. Pour revenir très vite avec une offre <b>d'écoute de musique gratuite, légale, complète et actualisée chaque semaine</b> :  tous les singles et albums des Majors (Universal, Sony, EMI, Warner) et toujours plus de jeunes talents et d'indépendants... Dès le mois d'août, tous les titres, toutes les nouveautés, bref, toute la musique sera sur AlloMusic. En prime, une surprise sonnante et trébuchante : <b>sur AlloMusic, on gagnera à écouter !</b>","Extinction de voix");return false;}});$(".addToMyPlaylist").click(function(e){e.preventDefault();var element=$(this);var urlChange=element.attr('href');var urlBack=top.frames['am_frmContent'].location.pathname;dialogAjaxCall(urlChange,'Ajouter à ma playlist  ',urlBack);return false;});$("a#am_ohlinVideoPlayFromArtist").click(function(e){if(typeof(top.frames['am_frmOhlin'])!="undefined"){e.preventDefault();var data=$('a#am_ohlinVideoPlayFromArtist').attr('accesskey');data=urldecode(data);var evaledData=eval('('+data+')');$.each(evaledData.items,function(i,item){var jiwaTrack;if(item.link!=null&&item.type=="video"){href=item.link;replaceExpr=new RegExp("&width=335","i");videoSrc=href.replace(replaceExpr,"&width=290px");video='<div style="width:390px;height:285px;"><iframe src="'+videoSrc+'" width="290px" height="100%" frameborder="0" scrolling="no" marginwidth="0" marginheight="0" hspace="0" vspace="0"></iframe>';$('div#am_HeckscherContent').empty().html(video);var offset=$('a#am_HeckscherVideoHead').offset();if(offset==null){var destination=0;}else{var destination=offset.top;}
$("html:not(:animated),body:not(:animated)").animate({scrollTop:destination},1000)
$('div#am_Heckscher').show();}
else{}});}});$('li > a#am_HeckscherLink').click(function(e){e.preventDefault();href=($(this).attr("href"));replaceExpr=new RegExp("&width=335","i");videoSrc=href.replace(replaceExpr,"&width=290px");video='<div style="width:390px;height:285px;"><iframe src="'+videoSrc+'" width="290px" height="100%" frameborder="0" scrolling="no" marginwidth="0" marginheight="0" hspace="0" vspace="0"></iframe>';$('div#am_HeckscherContent').html(video);var offset=$('a#am_Heckscher').offset();if(offset==null){var destination=0;}else{var destination=offset.top;}
$("html:not(:animated),body:not(:animated)").animate({scrollTop:destination},1000);$('div#am_Heckscher').show();});$('div > a#am_HeckscherLink').click(function(e){e.preventDefault();href=($(this).attr("href"));replaceExpr=new RegExp("&width=335","i");videoSrc=href.replace(replaceExpr,"&width=290px");video='<div style="width:390px;height:285px;"><iframe src="'+videoSrc+'" width="290px" height="100%" frameborder="0" scrolling="no" marginwidth="0" marginheight="0" hspace="0" vspace="0"></iframe>';$('div#am_HeckscherContent').html(video);var offset=$('a#am_Heckscher').offset();if(offset==null){var destination=0;}else{var destination=offset.top;}
$("html:not(:animated),body:not(:animated)").animate({scrollTop:destination},1000);$('div#am_Heckscher').show();});$('li > a#am_HeckscherLinkLarge').click(function(e){e.preventDefault();href=($(this).attr("href"));replaceExpr=new RegExp("&width=335","i");videoSrc=href.replace(replaceExpr,"&width=749px");replaceExpr=new RegExp("&height=285","i");videoSrc=videoSrc.replace(replaceExpr,"&height=435px");video='<div style="width:749px;height:435px;"><iframe src="'+videoSrc+'" width="749px" height="100%" frameborder="0" scrolling="no" marginwidth="0" marginheight="0" hspace="0" vspace="0"></iframe>';$('div#am_HeckscherLargeContent').empty().html(video);var offset=$('a#am_HeckscherVideoHeadLarge').offset();if(offset==null){var destination=0;}else{var destination=offset.top;}
$("html:not(:animated),body:not(:animated)").animate({scrollTop:destination},1000)
$('div#am_HeckscherLarge').show();});$('li > a#am_HeckscherLinkPopup').click(function(e){e.preventDefault();href=($(this).attr("href"));replaceExpr=new RegExp("&width=335","i");videoSrc=href.replace(replaceExpr,"&width=290px");video='<div style="width:749px;height:435px;"><iframe src="'+videoSrc+'" width="749px" height="100%" frameborder="0" scrolling="no" marginwidth="0" marginheight="0" hspace="0" vspace="0"></iframe>';dialogBoxVideo(video,'');pageTracker._trackPageview();});$('div > a#am_HeckscherLinkPopup').click(function(e){e.preventDefault();href=($(this).attr("href"));replaceExpr=new RegExp("&width=335","i");videoSrc=href.replace(replaceExpr,"&width=290px");video='<div style="width:749px;height:435px;"><iframe src="'+videoSrc+'" width="749px" height="100%" frameborder="0" scrolling="no" marginwidth="0" marginheight="0" hspace="0" vspace="0"></iframe>';dialogBoxVideo(video,'');pageTracker._trackPageview();});}
function dialogAjaxCall(url,dialogtitle,urlback)
{$.ajax({type:"GET",url:url,data:{backurl:urlback},cache:false,beforeSend:function(msg){},success:function(result){dialogBox(result,dialogtitle);}});}
function dialogBox(txt,dialogtitle)
{$("#dialog").html(txt);$("#dialog").dialog({bgiframe:true,autoOpen:false,draggable:true,modal:true,resizable:false,title:dialogtitle,closeOnEscape:true,buttons:{"fermer":function(){$(this).dialog('destroy');}}});$("#dialog").dialog('open');}
function dialogBoxVideo(txt,dialogtitle)
{$("#dialog").html(txt);$("#dialog").dialog({bgiframe:true,autoOpen:false,draggable:true,modal:true,resizable:false,width:780,height:560,title:dialogtitle,closeOnEscape:true,buttons:{"fermer":function(){$(this).dialog('destroy');}}});$("#dialog").dialog('open');}
function urldecode(str){var hash_map={},ret=str.toString(),unicodeStr='',hexEscStr='';var replacer=function(search,replace,str){var tmp_arr=[];tmp_arr=str.split(search);return tmp_arr.join(replace);};hash_map["'"]='%27';hash_map['(']='%28';hash_map[')']='%29';hash_map['*']='%2A';hash_map['~']='%7E';hash_map['!']='%21';hash_map['%20']='+';hash_map['\u00DC']='%DC';hash_map['\u00FC']='%FC';hash_map['\u00C4']='%D4';hash_map['\u00E4']='%E4';hash_map['\u00D6']='%D6';hash_map['\u00F6']='%F6';hash_map['\u00DF']='%DF';hash_map['\u20AC']='%80';hash_map['\u0081']='%81';hash_map['\u201A']='%82';hash_map['\u0192']='%83';hash_map['\u201E']='%84';hash_map['\u2026']='%85';hash_map['\u2020']='%86';hash_map['\u2021']='%87';hash_map['\u02C6']='%88';hash_map['\u2030']='%89';hash_map['\u0160']='%8A';hash_map['\u2039']='%8B';hash_map['\u0152']='%8C';hash_map['\u008D']='%8D';hash_map['\u017D']='%8E';hash_map['\u008F']='%8F';hash_map['\u0090']='%90';hash_map['\u2018']='%91';hash_map['\u2019']='%92';hash_map['\u201C']='%93';hash_map['\u201D']='%94';hash_map['\u2022']='%95';hash_map['\u2013']='%96';hash_map['\u2014']='%97';hash_map['\u02DC']='%98';hash_map['\u2122']='%99';hash_map['\u0161']='%9A';hash_map['\u203A']='%9B';hash_map['\u0153']='%9C';hash_map['\u009D']='%9D';hash_map['\u017E']='%9E';hash_map['\u0178']='%9F';hash_map['\u00C6']='%C3%86';hash_map['\u00D8']='%C3%98';hash_map['\u00C5']='%C3%85';for(unicodeStr in hash_map){hexEscStr=hash_map[unicodeStr];ret=replacer(hexEscStr,unicodeStr,ret);}
ret=decodeURIComponent(ret);return ret;}
function isArray(obj){return obj.constructor==Array;}