function I_unwrap(){if(fox_playf==="true"){var a,c;if(typeof foxInline!=="undefined")for(a=0;a<foxInline.length;a++)foxInline[a].mp3=f_arr.f_con(foxInline[a].mp3);if(typeof mp3j_info!=="undefined")for(a=0;a<mp3j_info.length;a++)if(mp3j_info[a].has_ul===1){var b=mp3j_info[a].list;for(c=0;c<b.length;c++)b[c].mp3=f_arr.f_con(b[c].mp3)}if(typeof mp3j_fields!=="undefined")for(a=0;a<mp3j_fields.length;a++){b=mp3j_fields[a].list;for(c=0;c<b.length;c++)b[c].mp3=f_arr.f_con(b[c].mp3)}}}
function I_setup_players(){var a;for(a=0;a<mp3j_info.length;a++)i_make_volume(a),i_write_download(a),i_write_stop_buttons(a),mp3j_info[a].has_ul===0&&(jQuery("#playpause_wrap_mp3j_"+a).data("player",{id:a}).click(function(){E_playpause_click(jQuery(this).data("player").id);jQuery(this).blur();return!1}),jQuery("#playpause_wrap_mp3j_"+a).data("player",{id:a}).dblclick(function(){$state!=="playing"&&E_playpause_click(jQuery(this).data("player").id);jQuery(this).blur();return!1})),mp3j_info[a].has_ul===
1&&(i_write_lists_controls(a),jQuery("#playpause_mp3j_"+a).data("player",{id:a}).click(function(){E_playpause_click(jQuery(this).data("player").id);jQuery(this).blur();return!1}),jQuery("#playpause_mp3j_"+a).data("player",{id:a}).dblclick(function(){$state!=="playing"&&E_playpause_click(jQuery(this).data("player").id);jQuery(this).blur();return!1})),mp3j_info[a].status==="full"&&(jQuery("#P-Time-MI_"+a).text("00:00"),jQuery("#statusMI_"+a).append("Ready"))}
function I_images(){if(document.images)pic1=new Image(4,4),pic1.src=foxpathtoimages+"t30w.png"}function i_make_volume(a){jQuery("#vol_mp3j_"+a).slider({value:mp3j_info[a].vol,max:100,range:"min",animate:FoxAnimSlider,slide:function(c,b){mp3j_info[a].vol=b.value;a===$tid&&jQuery("#jquery_jplayer").jPlayer("volume",b.value)}})}
function i_write_download(a){if(mp3j_info[a].download===!0){var c=mp3j_info[a].list,b=mp3j_info[a].tr;jQuery("#download_mp3j_"+a).empty();jQuery("#download_mp3j_"+a).append('<a href="'+c[b].mp3+'">DOWNLOAD MP3</a>')}}
function i_write_stop_buttons(a){jQuery("#stop_mp3j_"+a).data("player",{pid:a}).click(function(){E_stop_click(jQuery(this).data("player").pid);jQuery(this).blur();return!1});jQuery("#stop_mp3j_"+a).data("player",{pid:a}).dblclick(function(){E_stop_doubleclick(jQuery(this).data("player").pid);jQuery(this).blur();return!1})}
function i_write_lists_controls(a){var c=mp3j_info[a].list,b;if(c.length>1){jQuery("#UL_mp3j_"+a).empty();for(b=0;b<c.length;b++){var d=b===c.length-1?"<li class='mp3j_LI_last'>":"<li>";d+="<a href='#' id='mp3j_A_"+a+"_"+b+"' tabindex='1'>"+c[b].name+"</a></li>";jQuery("#UL_mp3j_"+a).append(d);b===0&&jQuery("#mp3j_A_"+a+"_"+b).addClass("mp3j_A_current").parent().addClass("mp3j_A_current");jQuery("#mp3j_A_"+a+"_"+b).data("player",{index:b,pid:a}).click(function(){($tid!==a||$tid===a&&jQuery(this).data("player").index!==
mp3j_info[a].tr)&&E_change_track(jQuery(this).data("player").pid,jQuery(this).data("player").index);jQuery(this).blur();return!1})}jQuery("#Next_mp3j_"+a).data("player",{pid:a}).click(function(){E_change_track(jQuery(this).data("player").pid,"next");jQuery(this).blur();return!1});jQuery("#Prev_mp3j_"+a).data("player",{pid:a}).click(function(){E_change_track(jQuery(this).data("player").pid,"prev");jQuery(this).blur();return!1});if(!mp3j_info[a].lstate)mp3j_info[a].lstate=!0,MI_toggleplaylist("SHOW PLAYLIST",
a)}else jQuery("#UL_mp3j_"+a).hide(),jQuery("#playlist-toggle_"+a).hide();jQuery("#T_mp3j_"+a).append(c[mp3j_info[a].tr].name);c[mp3j_info[a].tr].artist!==""&&(mp3j_info[a].type==="MI"?jQuery("#C_mp3j_"+a).append(c[mp3j_info[a].tr].artist):jQuery("#T_mp3j_"+a).append(" - "+c[mp3j_info[a].tr].artist))}
function E_playpause_click(a){if($tid===a&&$state==="playing")jQuery("#jquery_jplayer").jPlayer("pause"),play_button(a),$state="paused",$link_playID="";else{if($tid!==a){var c=$tid;$tid="";var b=mp3j_info[a].list,d=mp3j_info[a].tr;jQuery("#jquery_jplayer").jPlayer("volume",100);jQuery("#jquery_jplayer").jPlayer("setFile",b[d].mp3);play_button(c);clear_bars(c);clear_status(c);make_slider(a)}pause_button(a);jQuery("#jquery_jplayer").jPlayer("play");jQuery("#jquery_jplayer").jPlayer("volume",mp3j_info[a].vol);
$state="playing";$link_playID="";$tid=a}}function E_stop_click(a){$tid===a&&(play_button(a),clear_bars(a),clear_status(a),$tid="",jQuery("#jquery_jplayer").jPlayer("clearFile"),mp3j_info[a].status==="full"&&jQuery("#statusMI_"+a).text("Stopped"),$link_playID=$state="")}
function E_stop_doubleclick(a){change_list_classes(a,0);change_titles(a,0);change_dload_link(a,0);clear_status(a);mp3j_info[a].tr=0;$tid===a&&(play_button(a),clear_bars(a),$tid="",jQuery("#jquery_jplayer").jPlayer("clearFile"),$link_playID=$state="")}
function E_change_track(a,c){var b=mp3j_info[a].list,d,e=$tid;d=c==="next"?mp3j_info[a].tr+1<b.length?mp3j_info[a].tr+1:0:c==="prev"?mp3j_info[a].tr-1<0?b.length-1:mp3j_info[a].tr-1:c;change_list_classes(a,d);change_titles(a,d);change_dload_link(a,d);play_button(e);$tid!==a&&jQuery("#jquery_jplayer").jPlayer("volume",100);$tid=a;jQuery("#jquery_jplayer").jPlayer("setFile",b[d].mp3);pause_button(a);jQuery("#jquery_jplayer").jPlayer("play");jQuery("#jquery_jplayer").jPlayer("volume",mp3j_info[a].vol);
mp3j_info[a].tr=d;clear_bars(e);clear_status(e);make_slider(a);$state="playing";$link_playID=""}
function run_sound_complete(){if(mp3j_info[$tid].has_ul===1){var a=mp3j_info[$tid].list;(mp3j_info[$tid].loop||mp3j_info[$tid].tr+1!==a.length)&&$link_playID===""?E_change_track($tid,"next"):(change_list_classes($tid,0),change_titles($tid,0),change_dload_link($tid,0),mp3j_info[$tid].tr=0,play_button($tid),clear_bars($tid),clear_status($tid),$link_playID=$tid="",jQuery("#jquery_jplayer").jPlayer("setFile",silence_mp3),jQuery("#jquery_jplayer").jPlayer("play"),jQuery("#jquery_jplayer").jPlayer("clearFile"),
$state="",mp3j_init())}else play_button($tid),clear_bars($tid),clear_status($tid),a=$tid,$tid="",jQuery("#jquery_jplayer").jPlayer("setFile",silence_mp3),jQuery("#jquery_jplayer").jPlayer("play"),jQuery("#jquery_jplayer").jPlayer("clearFile"),$state="",mp3j_info[a].loop?E_playpause_click(a):mp3j_init()}
function change_titles(a,c){var b=mp3j_info[a].list;jQuery("#T_mp3j_"+a).empty();jQuery("#T_mp3j_"+a).append(b[c].name);jQuery("#C_mp3j_"+a).empty();b[c].artist!==""&&jQuery("#C_mp3j_"+a).append(b[c].artist)}function change_dload_link(a,c){if(mp3j_info[a].download){var b=mp3j_info[a].list;jQuery("#download_mp3j_"+a).empty();jQuery("#download_mp3j_"+a).removeClass("whilelinks");jQuery("#download_mp3j_"+a).append('<a href="'+b[c].mp3+'">DOWNLOAD MP3</a>')}}
function clear_bars(a){a!==""&&(jQuery("#load_mp3j_"+a).css("width","0"),jQuery("#posbar_mp3j_"+a).slider("destroy"))}function clear_status(a){a!==""&&(mp3j_info[a].status==="basic"&&jQuery("#indi_mp3j_"+a+" span").replaceWith(""),mp3j_info[a].status==="full"&&(jQuery("#T-Time-MI_"+a).empty(),jQuery("#statusMI_"+a).text("Ready"),jQuery("#P-Time-MI_"+a).text("00:00")))}
function pause_button(a){mp3j_info[a].play_txt==="#USE_G#"?(jQuery("#playpause_mp3j_"+a).removeClass("buttons_mp3j"),jQuery("#playpause_mp3j_"+a).addClass("buttons_mp3jpause")):(jQuery("#playpause_mp3j_"+a).empty(),jQuery("#playpause_mp3j_"+a).append(mp3j_info[a].pause_txt))}
function play_button(a){a!==""&&(mp3j_info[a].play_txt==="#USE_G#"?(jQuery("#playpause_mp3j_"+a).removeClass("buttons_mp3jpause"),jQuery("#playpause_mp3j_"+a).addClass("buttons_mp3j")):(jQuery("#playpause_mp3j_"+a).empty(),jQuery("#playpause_mp3j_"+a).append(mp3j_info[a].play_txt)))}function stop_popout(){typeof newwindow!=="undefined"&&!newwindow.closed&&newwindow.jQuery("#jquery_jplayer").jPlayer("getData","diag.isPlaying")&&newwindow.jQuery("#jquery_jplayer").jPlayer("clearFile")}
var f_arr={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",f_con:function(a){for(var c="",b,d,e,g,h,f=0,a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");f<a.length;)b=this._keyStr.indexOf(a.charAt(f++)),d=this._keyStr.indexOf(a.charAt(f++)),g=this._keyStr.indexOf(a.charAt(f++)),h=this._keyStr.indexOf(a.charAt(f++)),b=b<<2|d>>4,d=(d&15)<<4|g>>2,e=(g&3)<<6|h,c+=String.fromCharCode(b),g!==64&&(c+=String.fromCharCode(d)),h!==64&&(c+=String.fromCharCode(e));return c=f_arr._utf8_f_con(c)},
_utf8_f_con:function(a){for(var c="",b=0,d=0,e=0;b<a.length;)e=a.charCodeAt(b),e<128?(c+=String.fromCharCode(e),b++):e>191&&e<224?(d=a.charCodeAt(b+1),c+=String.fromCharCode((e&31)<<6|d&63),b+=2):(d=a.charCodeAt(b+1),c3=a.charCodeAt(b+2),c+=String.fromCharCode((e&15)<<12|(d&63)<<6|c3&63),b+=3);return c}};

