var MusicManager=function(){var self={$el:null,el:null,$player:null,player:null,mp3file:null,options:[],style:[],loaded:!1,_basicInit:function(el){self.el=void 0!==el?el:"#music_player",self.$el=$(self.el),self.player="#jplayer",self.$player=$(self.player)},_playerSetup:function(){self.$el.html(self.load(self.options.type)),self.applyCSS(),self.playerInit(),self.cookieControls()},init:function(el,mp3file,options,style){self._basicInit(),options=void 0===options?[]:options,self.mp3file=void 0!==mp3file?mp3file:null,self.options.type=void 0!==options.type?options.type:"web",self.options.music_note=void 0!==options.music_note?options.music_note:null,self.options.corners=void 0===options.corners||options.corners,self.options.autoplay=void 0===options.autoplay||options.autoplay,self.options.loop=void 0===options.loop||options.loop,self.options.progress=void 0!==options.progress&&options.progress,self.options.time=void 0!==options.time&&options.time,self.options.title=void 0!==options.title&&options.title,self.style=style,self.options.autoplay="no"!==cookieManager.get("music-autoplay")&&"gestion"!=self.options.type&&self.options.autoplay,self._playerSetup()},initSimple:function(el,mp3file,options){self._basicInit(),self.mp3file=void 0!==mp3file?mp3file:null,self.options.type=void 0!==options&&void 0!==options.type?options.type:"simple",self.options.music_note=null,self.options.corners=!0,self.options.autoplay=!0,self.options.loop=!0,self.options.progress=!1,self.options.time=!1,self.options.title=!1,self.options.autoplay="no"!==cookieManager.get("music-autoplay")&&self.options.autoplay,cookie_autoplay=cookieManager.get("music-autoplay"),"no"==cookie_autoplay&&(self.options.autoplay=!1),self._playerSetup(),self.$el.parent().fadeIn(),self.setCustomIcons()},setCustomIcons:function(){self.options.autoplay?"undefined"!=typeof jplayerPlay&&jplayerPlay():"undefined"!=typeof jplayerPause&&jplayerPause()},setMedia:function(mp3filename){self.mp3file=mp3filename,self.$player.jPlayer("setMedia",{mp3:self.mp3file})},playerInit:function(){self.loaded&&(self.$player.jPlayer("destroy"),self.$player=null,self._basicInit(self.el),self.loaded=!1),self.$player.jPlayer({preload:"auto",loadeddata:function(){},setmedia:function(){},ready:function(){$(this).jPlayer("setMedia",{mp3:self.mp3file}),self.options.autoplay&&$(this).jPlayer("play"),$(".jp-progress-slider").toggle(self.options.progress),$(".jp-current-time,.jp-duration").toggle(self.options.time),$(".jp-title").toggle(self.options.title),self.loaded=!0},timeupdate:function(event){self.options.progress&&self.progress(event.jPlayer.status.currentPercentAbsolute,event.jPlayer.status.seekPercent)},cssSelectorAncestor:"#jp_container",supplied:"mp3",wmode:"window",loop:self.options.loop})},progress:function(percentDuration,seekPercent){containter_progress=$(".jp-progress-slider"),containter_progress.slider({animate:"fast",max:100,range:"min",step:.1,value:percentDuration,slide:function(event,ui){seekPercent>0?self.$player.jPlayer("playHead",ui.value*(100/seekPercent)):setTimeout((function(){containter_progress.slider("value",0)}),0)}})},applyCSS:function(){void 0!==self.style&&(void 0!==self.style.backgroundColor&&(bgColor="transparent"==self.style.backgroundColor?self.style.backgroundColor:"#"+self.style.backgroundColor,$(".music-web ul li").css({backgroundColor:bgColor})),void 0!==self.style.backgroundHover&&void 0!==self.style.backgroundColor&&$(".music-web ul li").hover((function(){$(this).css({backgroundColor:"#"+self.style.backgroundHover})}),(function(){$(this).css({backgroundColor:"#"+self.style.backgroundColor})})),void 0!==self.style.color&&($(".music-web .jp-play").css({color:"#"+self.style.color.split("#")[1]}),$(".music-web .jp-pause").css({color:"#"+self.style.color.split("#")[1]})))},load:function(type){return"single_icon"==type?div='
":(cssFA="font-size: 13pt; margin-top: 3px; margin-right:8px;",cssDiv="height: 25px; margin-top: 5px; float:left;","string"==typeof DINA_THEME_NAME&&"tokyo"==DINA_THEME_NAME&&(cssDiv="float:left;"),music_note=null!=self.options.music_note?'':' ",music_note_simple=' ",corners=self.options.corners?"ui-corner-all":"",div="gestion"==type?'