var $tid="",$state="",global_lp=0,pp_playerID,pp_startplaying,player_height=100,popout_height,$link_playID="";jQuery(document).ready(function(){typeof mp3j_info!=="undefined"&&(mp3j_setup(),jQuery("#jquery_jplayer").jPlayer({ready:function(){mp3j_init()},oggSupport:!1,volume:100,swfPath:foxpathtoswf}).jPlayer("onProgressChange",function(a,b,c,e,d){run_progress_update($tid,a,b,c,e,d)}).jPlayer("onSoundComplete",function(){run_sound_complete()}),typeof window.mp3j_footerjs==="function"&&mp3j_footerjs())});
function mp3j_setup(){I_images();I_unwrap();typeof mp3j_info!=="undefined"&&I_setup_players()}function mp3j_init(){var a;for(a=0;a<mp3j_info.length;a++)if(mp3j_info[a].autoplay){mp3j_info[a].autoplay=!1;E_playpause_click(a);break}}
function make_slider(a){mp3j_info[a].status==="basic"&&jQuery("#posbar_mp3j_"+a).css("visibility","hidden");jQuery("#posbar_mp3j_"+a).slider({max:1E3,range:"min",animate:FoxAnimSlider,slide:function(b,c){$state==="paused"&&pause_button(a,mp3j_info[a].play_txt,mp3j_info[a].pause_txt);jQuery("#jquery_jplayer").jPlayer("playHead",c.value*(10/global_lp));$state="playing"}})}
function change_list_classes(a,b){jQuery("#mp3j_A_"+a+"_"+mp3j_info[a].tr).removeClass("mp3j_A_current").parent().removeClass("mp3j_A_current");jQuery("#mp3j_A_"+a+"_"+b).addClass("mp3j_A_current").parent().addClass("mp3j_A_current")}
function run_progress_update(a,b,c,e,d,f){if(a!=="")global_lp=b,jQuery("#posbar_mp3j_"+a).slider("option","value",e*10),c=mp3j_info[a].download,mp3j_info[a].status==="basic"&&(jQuery("#indi_mp3j_"+a).empty(),jQuery("#jquery_jplayer").jPlayer("getData","diag.isPlaying")?(d===0&&b===0&&(jQuery("#indi_mp3j_"+a).append('<span style="margin-left:6px;"><span class="mp3-finding"></span><span class="mp3-tint" style="background:#999;"></span></span>'),c&&(jQuery("#download_mp3j_"+a).removeClass("whilelinks"),
jQuery("#download_mp3j_"+a).addClass("betweenlinks"))),d===0&&b>0&&(jQuery("#indi_mp3j_"+a).append('<span style="margin-left:6px;"><span class="mp3-finding"></span><span class="mp3-tint" style="background:#999;"></span></span>'),c&&(jQuery("#download_mp3j_"+a).removeClass("betweenlinks"),jQuery("#download_mp3j_"+a).addClass("whilelinks"))),d>0&&(jQuery("#posbar_mp3j_"+a).css("display","none"),jQuery("#indi_mp3j_"+a).append('<span style="margin-left:6px;"><span class="mp3-tint" style="opacity:.8; filter:alpha(opacity=80);"></span></span>'),
jQuery("#indi_mp3j_"+a).append("<span> "+jQuery.jPlayer.convertTime(d)+"</span>"),c&&(jQuery("#download_mp3j_"+a).removeClass("betweenlinks"),jQuery("#download_mp3j_"+a).addClass("whilelinks")))):(jQuery("#indi_mp3j_"+a).empty(),d>0&&(jQuery("#indi_mp3j_"+a).append('<span style="margin-left:6px;"><span class="mp3-tint" style="opacity:.8; filter:alpha(opacity=80);"></span></span>'),jQuery("#indi_mp3j_"+a).append("<span> "+jQuery.jPlayer.convertTime(d)+"</span>"),c&&(jQuery("#download_mp3j_"+a).removeClass("betweenlinks"),
jQuery("#download_mp3j_"+a).addClass("whilelinks"))),d===0&&b>0&&c&&(jQuery("#download_mp3j_"+a).removeClass("betweenlinks"),jQuery("#download_mp3j_"+a).addClass("whilelinks")))),mp3j_info[a].status==="full"&&(jQuery("#T-Time-MI_"+a).hide(),jQuery("#T-Time-MI_"+a).text(jQuery.jPlayer.convertTime(f)),jQuery("#P-Time-MI_"+a).text(jQuery.jPlayer.convertTime(d)),jQuery("#statusMI_"+a).empty(),jQuery("#jquery_jplayer").jPlayer("getData","diag.isPlaying")?(d===0&&b===0&&(jQuery("#statusMI_"+a).append('<span class="mp3-finding"></span><span class="mp3-tint"></span>Connecting'),
c&&(jQuery("#download_mp3j_"+a).removeClass("whilelinks"),jQuery("#download_mp3j_"+a).addClass("betweenlinks"))),d===0&&b>0&&(jQuery("#statusMI_"+a).append('<span class="mp3-loading"></span><span class="mp3-tint"></span>Buffering'),jQuery("#T-Time-MI_"+a).show(),c&&(jQuery("#download_mp3j_"+a).removeClass("betweenlinks"),jQuery("#download_mp3j_"+a).addClass("whilelinks"))),d>0&&(jQuery("#statusMI_"+a).append("Playing"),jQuery("#T-Time-MI_"+a).show(),c&&(jQuery("#download_mp3j_"+a).removeClass("betweenlinks"),
jQuery("#download_mp3j_"+a).addClass("whilelinks")))):(d>0&&(jQuery("#statusMI_"+a).append("Paused"),jQuery("#T-Time-MI_"+a).show(),c&&(jQuery("#download_mp3j_"+a).removeClass("betweenlinks"),jQuery("#download_mp3j_"+a).addClass("whilelinks"))),d===0&&(b>0?(jQuery("#statusMI_"+a).append("Stopped"),jQuery("#T-Time-MI_"+a).show(),c&&(jQuery("#download_mp3j_"+a).removeClass("betweenlinks"),jQuery("#download_mp3j_"+a).addClass("whilelinks"))):jQuery("#statusMI_"+a).append("Ready"))))}
function launch_mp3j_popout(a,b){player_height=100+mp3j_info[b].height;popout_height=mp3j_info[b].list.length>1?player_height+mp3j_info[b].list.length*28:player_height;popout_height>popup_maxheight&&(popout_height=popup_maxheight);var c=mp3j_info[b].lstate?popout_height:player_height;pp_startplaying=jQuery("#jquery_jplayer").jPlayer("getData","diag.isPlaying")?!0:!1;pp_playerID=b;play_button($tid);clear_bars($tid);clear_status($tid);$link_playID=$state=$tid="";jQuery("#jquery_jplayer").jPlayer("setFile",
silence_mp3);jQuery("#jquery_jplayer").jPlayer("play");jQuery("#jquery_jplayer").jPlayer("clearFile");newwindow=window.open(a,"mp3jpopout","height=100,width=100,location=1,status=1,scrollbars=1,resizable=1,left=25,top=25");newwindow.resizeTo(popup_width,c);window.focus&&newwindow.focus();return!1}
function MI_toggleplaylist(a,b){if(mp3j_info[b].lstate)a===""&&(a="SHOW"),jQuery("#L_mp3j_"+b).fadeOut(300),jQuery("#playlist-toggle_"+b).empty(),jQuery("#playlist-toggle_"+b).append(a),mp3j_info[b].lstate=!1;else if(!mp3j_info[b].lstate)a===""&&(a="HIDE"),jQuery("#L_mp3j_"+b).fadeIn("slow"),jQuery("#playlist-toggle_"+b).empty(),jQuery("#playlist-toggle_"+b).append(a),mp3j_info[b].lstate=!0}
function link_plays_track(a,b){typeof mp3j_info!=="undefined"&&(a--,b--,!(a===$link_playID&&b===mp3j_info[a].tr&&$state!=="")&&typeof mp3j_info[a].has_ul!=="undefined"&&mp3j_info[a].has_ul===1&&b>=0&&b<mp3j_info[a].list.length&&(E_change_track(a,b),$link_playID=a))};

