function stripslashes(str){return(str+'').replace(/\0/g,'0').replace(/\\([\\'"])/g,'$1')}function opWin(to){var win=null;var w=600;var h=350;var features='resizable,scrollbars';var winl=(screen.width-w)/2;var wint=(screen.height-h)/2;if(winl<0)winl=0;if(wint<0)wint=0;var settings='height='+h+',';settings+='width='+w+',';settings+='top='+wint+',';settings+='left='+winl+',';settings+=features;win=window.open(to,'Playlist',settings);win.window.focus();return false};var bxRef;var showLogin=function(){new Boxy('<div style="margin:0 5px 10px 5px;"><form method="post" enctype="multipart/form-data" action="http://www.mixpod.com/login.php"><div style="margin:3px 0 3px 0;border:1px solid #dbdbdb; background:#fbfdd0;padding:3px 0 3px 7px;">You must be logged in to use this feature.</div><br /><p><label><b>Email:</b></label><input type="text" name="email" value="" size="25" maxlength="100"></p><br /><p><label><b>Password:</b></label><input type="password" name="password" size="25" maxlength="60"> </p><br />	<p><label><b>&nbsp;</b></label><input type="checkbox"  name="remember" id="remember"> Remember Me</input></p><br /><p><label>&nbsp;</label><input type="image" src="http://www.mixpod.com/images/btn-signin.png" width="80" height="26" name="log"></p><br /><p><a href="http://mixpod.com/signup.php" style="color:#d50091;"><b>Sign Up</b></a> | <a href="http://mixpod.com/account-forgotpass.php">Forgot Password?</a></p></form></div>',{title:"Log in to MixPod"})};$jq(document).ready(function(){$stclr=$jq("#statusClear");if($stclr.length>0){$stclr.click(function(){$jq.post($jq("#statusClear").attr("href"),{uClear:'1'},function(data){if(data.status=='ok'){$jq("#statusClear").parent().slideUp('slow')}else{alert("error")}},"json");return false})}if($jq("#profileForm").length>0){$jq("#profileForm textarea").focus(function(){if(this.value=='Post a comment...')this.value=''});$jq("#profileForm textarea").blur(function(){if(this.value=='')this.value='Post a comment...'});$jq("#profileForm").submit(function(){$jq("#profileForm textarea").attr("disabled","disabled");var cv=$jq("#profileForm textarea").val();if(cv==''||cv=='Post a comment...'){Boxy.alert("Please enter a comment",null,{title:'Error',modal:false});$jq("#profileForm textarea").val('Post a comment...');$jq("#profileForm textarea").removeAttr("disabled");return false}var prid=$jq("#proId").val();$jq.ajax({url:'http://www.mixpod.com/user-addcomment.php?id='+prid,type:'POST',data:{comments:cv},dataType:'json',timeout:12000,beforeSend:function(){},error:function(XMLHttpRequest,textStatus,errorThrown){Boxy.alert("Error. Please wait and try again.",null,{title:'Error',modal:false})},success:function(json){if(json.status=='ok'){$jq("#commentContainer div.comBox:first").before(stripslashes(json.comment));$jq("#commentContainer div.comBox:first").hide().fadeIn("normal");$jq("#profileForm textarea").val('Post a comment...');$jq("#profileForm textarea").removeAttr("disabled")}else if(json.status=='nofriend'){Boxy.alert("You must add this person as a friend to comment!",null,{title:'Error',modal:false})}else{Boxy.alert("Error. Please wait and try again.",null,{title:'Error',modal:false})}}});return false})}if($jq("#blogCommentBox").length>0){$jq("#blogCommentBox").hide();$jq("#blogComment").click(function(){$jq('#blogCommentBox').slideDown('normal',function(){$jq('#blogCommentBox :input:first').focus()});return false})}var dcom=$jq("#commentContainer div.dcom");if(dcom.length){dcom.hide();$jq("#commentContainer div.comBox, #commentContainer div.lstream").mouseenter(function(){$jq(this).find("div.dcom").show()}).mouseleave(function(){$jq(this).find("div.dcom").hide()});dcom.click(function(){dref=$jq(this);var dlid=dref.attr('id').toString();var type=1;if(dlid.indexOf("com_")!=-1){type=1;dlid=dlid.replace(/com_/,"")}else if(dlid.indexOf("act_")!=-1){type=2;dlid=dlid.replace(/act_/,"")}Boxy.ask('Are you sure you want to delete this item?',["Delete","Cancel"],function(val){if(val=='Delete'){$jq.ajax({url:'http://www.mixpod.com/search-addSong.php?action=22',type:'POST',data:{id:dlid,type:type},dataType:'json',timeout:8000,error:function(XMLHttpRequest,textStatus,errorThrown){Boxy.alert("An error occured.",null,{title:'Error',modal:false})},success:function(json){if(json.status=='ok'){if(type=='2'){dref.parent().fadeOut('normal',function(){$jq(this).remove()})}else{dref.parent().parent().fadeOut('normal',function(){$jq(this).remove()})}}else{}}})}},{title:"Delete Item",modal:false});return false})}var repcom=$jq("#commentContainer a.replycom");if(repcom.length){repcom.click(function(){$jq(this).blur();var thisRef=$jq(this);var cmid=thisRef.attr('id').toString().replace(/scom_/,"");$jq("#commentContainer #com-"+cmid).toggle("fast");return false})}var repcom=$jq("#commentContainer a.yt_inpost");if(repcom.length){repcom.click(function(){var thisRef=$jq(this);var cmid=thisRef.attr('href').toString().replace(/http\:\/\/www\.youtube\.com\/watch\?v\=/,"");thisRef.parent().replaceWith('<object width="380" height="265"><param name="movie" value="http://www.youtube.com/v/'+cmid+'&hl=en&fs=1&autoplay=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/'+cmid+'&hl=en&fs=1&autoplay=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="380" height="265"></embed></object>');return false})}$cmfrm=$jq("#commentContainer form.comform");if($cmfrm.length){var frstT=$cmfrm.find("textarea");frstT.click(function(){$jq(this).parent().find("input.faccept").show();if($jq(this).val()=='Write your comment...')$jq(this).val('');$jq(this).height(35)});frstT.blur(function(){if($jq(this).val()=='Write your comment...'||$jq(this).val()==''){$jq(this).val('Write your comment...');$jq(this).height(15);$jq(this).parent().find("input.faccept").hide()}});$cmfrm.submit(function(){var thisRef=$jq(this);var txtRef=thisRef.find("textarea");var cmid=thisRef.parent().parent().parent().attr('id').toString().replace(/com-/,"");var inloc=$jq("#commentContainer #com-"+cmid+" div.subprocommentx");txtRef.attr("disabled","disabled");var cv=txtRef.val();if(cv==''||cv=='Write your comment...'){$jq.prompt('Please write your comment').children('#jqi').corner('cc:#666666');txtRef.val('Write your comment...');txtRef.removeAttr("disabled")}else{txtRef.removeAttr("disabled");txtRef.val('Write your comment...');txtRef.height(15);txtRef.parent().find("input.faccept").hide();$jq.ajax({url:'http://www.mixpod.com/search-addSong.php?action=26',type:'POST',data:{id:cmid,comments:cv},dataType:'json',timeout:12000,beforeSend:function(){},error:function(XMLHttpRequest,textStatus,errorThrown){Boxy.alert("An error occured.",null,{title:'Error',modal:false})},success:function(json){if(json.status=='ok'){inloc.before(stripslashes(json.comment));inloc.hide().fadeIn("normal")}else if(json.status=='nfriend'){Boxy.alert("Error. You must be friends with this user to comment.",null,{title:'Error',modal:false})}else{Boxy.alert("Error. Please check your comment and try again.",null,{title:'Error',modal:false})}}})}return false});$jq("#commentContainer a.subfetch").click(function(){$jq(this).blur();var fIndex=$jq("#commentContainer a.subfetch").index(this);var fetchid=$jq(this).attr('id').toString().replace(/fetch_/,"");$jq(this).after('<img src="http://www.mixpod.com/images/ajcom.gif" style="padding-left:6px;" width="10" height="10" />');var pref=$jq(this).parent();var dref=pref.parent();var cam=dref.find("div.subprocomment").length;$jq.ajax({url:'http://www.mixpod.com/search-addSong.php?action=25',type:'POST',data:{id:fetchid,cam:cam},dataType:'html',timeout:12000,beforeSend:function(){},error:function(XMLHttpRequest,textStatus,errorThrown){Boxy.alert("Error. Please wait and try again.",null,{title:'Error',modal:false})},success:function(html){pref.remove();dref.find("div.subprocomment:first").after(html)}});return false})}$jq('#profTabs').tabs({selected:0,cache:true,spinner:''});$jq('#profTabs').bind('tabsselect',function(event,ui){ui.tab.blur()});$jq('#menuPlist').bind('click',function(e){var target=e.target,$target=$jq(e.target);if($target.is('a')){if($target.hasClass('comc')){if($target.hasClass('nlogin')){showLogin();return false}var plid=$target.attr('href').replace(/http:\/\/www\.mixpod.com\/playlist\//,'');var boxy_content;boxy_content="<div style=\"width:300px;\"><form id=\"feedback\">";boxy_content+='<textarea id="minrev" rows="2" cols="45" style="width:295px;height:45px;margin:0 0 15px 0;color:#888;" onfocus="this.value=\'\'">Write your comment...</textarea><br /><input type="submit" name="submit" value="Add Comment" />';boxy_content+="</form></div>";bxRef=new Boxy(boxy_content,{title:'Comment Playlist',draggable:false,modal:false,behaviours:function(c){c.children('#feedback').submit(function(){var nV=c.find("#minrev").val();if(nV=='Write your comment...')nV='';bxRef.setTitle('Saving');bxRef.setContent("<div style=\"width: 300px; height: 80px;text-align:center;padding-top:20px;\"><img src=\"http://www.mixpod.com/images/ajload_small.gif\" style=\"margin-bottom:8px;\" /><br /></div>");$jq.post("http://www.mixpod.com/api/playlist/actions.php?action=1",{myid:plid,comment:nV},function(json){if(json.status=='ok'){bxRef.setTitle('Success')}else{bxRef.setTitle('Error');bxRef.setContent("<div style=\"width: 300px; height: 100px\">"+json.msg+"</div>")}},"json");setTimeout("bxRef.hide()",1200);return false})}})}else if($target.hasClass('propsIco')){if($target.hasClass('nlogin')){showLogin();return false}var plid=$target.attr('href').replace(/http:\/\/www\.mixpod.com\/playlist\//,'');$target.replaceWith('<span class="propsIco">Props</span>');$jq.post("http://www.mixpod.com/search-addSong.php?action=15",{id:plid},function(json){if(json.status=='ok'){}},"json")}else if($target.hasClass('heartIco')){if($target.hasClass('nlogin')){showLogin();return false}var plid=$target.attr('href').replace(/http:\/\/www\.mixpod.com\/playlist\//,'');$target.replaceWith('<span class="heartIco">Favorite</span>')}else if($target.hasClass('toggleIco')){opWin($target.attr('href'))}}return false})});
