text: function Confirm_Delete(e){confirm("Are you sure you want to delete")&&(document.location=e)}function Confirm_Uninstall(e){confirm("Are you sure you want to uninstall this plugin ?")&&(document.location=e)}function confirm_it(e){var t=confirm(e);return t?!0:!1}function reloadImage(e,t){img=document.getElementById(t),img.src=e+"?"+Math.random()}function validate_category_form(thisform){with(thisform){if(0==validate_required(title,"Title must be filled out!"))return title.focus(),!1;if(0==validate_required(description,"Description must be filled out!"))return description.focus(),!1}}function validate_ad_form(thisform){with(thisform){if(0==validate_required(name,"Name must be filled out!"))return name.focus(),!1;if(0==validate_required(type,"Type must be filled out!"))return type.focus(),!1;if(0==validate_required(syntax,"Syntax Must Be Filled Out"))return syntax.focus(),!1;if(0==validate_required(code,"Code Must Be Filled Out"))return code.focus(),!1}}function load_more(e,t,o,a,n,i,l){$.ajax({beforeSend:function(e){$("#"+o).html("loading")},type:"POST",url:baseurl+"/ajax.php",data:{limit:e,mode:t,inner_mode:o,cat_id:i,total:l},dataType:"json",success:function(e){e&&($("#"+a).append(e.template),$(n).attr({limit:parseInt(e.count)+parseInt(e.total)})),1==e.limit_exceeds&&n.css("display","none"),"limit_exceeds"==e&&n.css("display","none"),$("#"+o).html("Laod More...")}})}function randomString(){for(var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",t=8,o="",a=0;t>a;a++){var n=Math.floor(Math.random()*e.length);o+=e.substring(n,n+1)}return o}function check_remote_url(){$("#remoteUploadBttn").attr("disabled","disabled").hide(),$("#ytUploadBttn").attr("disabled","disabled"),$("#remoteUploadBttnStop").show();var e=$("#remote_file_url").val();if(force_stop=!1,!e||"undefined"==e)return $("#error_msgs").html('<div class="alert alert-danger" role="alert"> Please enter valid remote URL</div>'),$("#remoteUploadBttn").attr("disabled","").show(),$("#remoteUploadBttnStop").attr("disabled","disabled").hide(),!1;var t=$.ajax({url:download_page,type:"POST",data:{file:e,file_name:file_name},dataType:"json",beforeSend:function(){status_update();var t=getName(e);$("#loading").html('<div style="float: left; display: inline-block;"><img src="'+imageurl+'/ajax-loader.gif"></div><div style="float: left; line-height: 16px; padding-left:5px">'+lang.remoteUploadFile+'</div><div class="clear"></div>'),$("#remoteFileName").replaceWith('"'+t+'"')},success:function(e){e.error&&(force_stop=!0,$("#remoteUploadBttn").attr("disabled",""),$("#ytUploadBttn").attr("disabled",""),alert(e.error)),$("#loading").html("");var t=e.vid;$.post(baseurl+"/actions/file_uploader.php",{getForm:"get_form",title:$("#remote_file_url").val(),objId:remoteObjID,vid:t},function(e){$("#remoteUploadBttnStop").hide(),$("#ytUploadBttn").hide(),$("#remoteForm").append(e),$("#cbSubmitUpload"+remoteObjID).before('<span id="updateVideoDataLoading" style="margin-right:5px"></span>').attr("disabled","").attr("value",lang.saveData).attr("onClick","doUpdateVideo('#uploadForm"+remoteObjID+"','"+remoteObjID+"')").after('<input type="hidden" name="videoid" value="'+t+'" id="videoid" />').after('<input type="hidden" name="updateVideo" value="yes" id="updateVideo" />')},"text")}});$("#remoteUploadBttnStop").click(function(){t.abort(),force_stop=!0,$("#loading").html(""),$("#remoteDownloadStatus").hide(),$(this).hide(),$("#remoteUploadBttn").attr("disabled","").show()})}function youtube_upload(){$("#remoteUploadBttn").attr("disabled","disabled"),$("#ytUploadBttn").attr("disabled","disabled");var e=$("#remote_file_url").val();if(force_stop=!1,!e||"undefined"==e)return"#error_msgs".html('<div class="alert alert-danger" role="alert"> Please enter valid URL</div>'),$("#remoteUploadBttn").button("reset"),$("#ytUploadBttn").button("reset"),force_stop=!0,!1;$.ajax({url:download_page,type:"POST",data:{file:e,file_name:file_name,youtube:"yes"},dataType:"json",beforeSend:function(){$("#loading").html('<div style="float: left; display: inline-block;"><img src="'+imageurl+'/ajax-loader.gif"></div><div style="float: left; line-height: 16px; padding-left:5px">Uploading video from youtube, please wait...</div><div class="clear"></div>')},success:function(e){if("undefined"!=typeof extract_yt_url_ajax&&extract_yt_url_ajax(e),e.error)force_stop=!0,$("#remoteUploadBttn").button("reset"),$("#ytUploadBttn").button("reset"),alert(e.error);else if(e.vid){vid=e.vid,$("#remoteUploadBttn").hide(),$("#ytUploadBttn").hide();var t=$("#updateVideoInfoForm").clone(),o=$(t).clone().get(0),a=document.createElement("div"),n=0;0==n?a.className="tab-pane active uploadFormContainer":a.className="tab-pane uploadFormContainer",a.id="tab"+n,o.className="",$(o).find("input[name='title']").val(e.title),$(o).find("textarea#desc").val(e.desc),$(o).find("input[name='category[]']:first").attr("checked","checked"),a.appendChild(o),$(a).appendTo("#remote_upload_div"),$(o).find("#saveVideoDetails").removeAttr("disabled")}$("#loading").html("")}})}function status_update(){$.ajax({url:result_page,type:"POST",data:{file_name:file_name},dataType:"json",success:function(e){if(e){var t=e.total_size,o=e.downloaded,a=e.total_size_fm,n=e.downloaded_fm,i=e.speed_download,l=(e.time_eta,e.time_eta_fm),r=(e.time_took,e.time_took_fm);if(i/1024/1024>1)var s=Math.round(i/1024/1024)+" Mbps";else var s=Math.round(i/1024)+" Kbps";perc_download=Math.round(o/t*100),$("#remoteDownloadStatus").show(),$("#prog_bar").animate({width:perc_download+"%"},1e3),$("#prog_bar").html(perc_download+"%"),$("#dspeed").html(s),$("#eta").html(l),$("#status").html(n+" of "+a)}var d=1e3*status_refesh;100>perc_download&&!force_stop?setTimeout(function(){status_update()},d):100==perc_download&&t>1&&$("#time_took").html("Time Took : "+r)}})}function upload_file(e,t){var o=baseurl+"/actions/file_downloader.php";$.post(o,{file_url:e,file_name:t},function(e){e?submit_upload_form():alert("No data")},"text")}function delete_item(e,t,o,a){$("#"+e+"-"+t).click(function(){confirm(o)&&(document.location=a)})}function delete_video(e,t,o,a){return delete_item(e,t,o,a)}function get_video(e,t){$(t).css("display","block"),$(t).html(loading),$(t).html(loading),$.post(page,{mode:e},function(e){$(t).html(e)},"text")}function getAjaxPhoto(e,t){$(t).css("display","block");var o=$(t).html();$.ajax({url:page,type:"POST",dataType:"json",data:{mode:"loadAjaxPhotos",photosType:e},beforeSend:function(){$(t).html(loading)},success:function(e){e.failed&&$(t).html(o),e.completed&&$(t).html(e.photoBlocks)}})}function rating_over(e,t){"disabled"!=t&&$("#rating_result_container").html(e)}function rating_out(e,t){"disabled"!=t&&$("#rating_result_container").html(e)}function submit_share_form(e,t){$("#share_form_results").css("display","block"),$("#share_form_results").html(loading),$.post(page,{mode:"share_object",type:t,users:$("#ShareUsers").val(),message:$("#message").val(),id:$("#objectid").val()},function(e){e?$("#share_form_results").html(e):alert("No data")},"text")}function flag_object(e,t,o){$("#flag_form_result").css("display","block"),$("#flag_form_result").html(loading),$.post(page,{mode:"flag_object",type:o,flag_type:$("#"+e+" select option:selected").val(),id:t},function(e){e?($("#flag_form_result").css("display","block"),$("#flag_form_result").html(e)):alert("No data")},"text")}function slide_up_watch_video(e){"block"!=$(".video_action_result_boxes "+e).css("display")&&$(".video_action_result_boxes > *").slideUp()}function add_to_fav(e,t){$("#video_action_result_cont").css("display","block"),$("#video_action_result_cont").html(loading),$.post(page,{mode:"add_to_fav",type:e,id:t},function(e){e?($("#video_action_result_cont").css("display","block"),$("#video_action_result_cont").html(e)):alert("No data")},"text")}function subscriber(e,t,o){$("#"+o).css("display","block"),$("#"+o).html(loading),$.post(page,{mode:t,subscribe_to:e},function(e){e?($("#"+o).css("display","none"),$("#"+o).html(e),$("#result_cont").html(e),$("#result_cont").show(0).delay(3e3).fadeOut("slow")):alert("No data")},"text")}function add_friend(e,t){$("#"+t).css("display","block"),$("#"+t).html(loading),$.post(page,{mode:"add_friend",uid:e},function(e){e?($("#result_cont").append(e),$("#result_cont").show(0).delay(3e3).fadeOut("slow")):alert("No data")},"text")}function block_user(e,t){$("#"+t).css("display","block"),$("#"+t).html(loading),$.post(page,{mode:"ban_user",user:e},function(e){e?($("#"+t).css("display","block"),$("#"+t).html(e)):alert("No data")},"text")}function rate_comment(e,t,o,a){$.post(page,{mode:"rate_comment",thumb:t,cid:e,type:o,typeid:a},function(t){t?(""!=t.msg&&alert(t.msg),""!=t.rate&&$("#comment_rating_"+e).html(t.rate)):alert("No data")},"json")}function delete_comment(e,t){$.post(page,{mode:"delete_comment",cid:e,type:t},function(t){t?(t.msg&&($(".reply-"+e).fadeOut("slow"),$("#comment_"+e).fadeOut("slow"),$("#comment_msg_output").html(t.msg+" !"),$("#comment_msg_output").fadeIn("slow"),setTimeout(function(){$("#comment_msg_output").fadeOut()},3e3)),t.err&&alert(t.err)):alert("No data")},"json")}function add_playlist(e,t,o,a){switch($("#playlist_form_result").css("display","block"),$("#playlist_form_result").html(loading),e){case"add":$.post(page,{mode:"add_playlist",id:t,objtype:a,pid:$("#playlist_id option:selected").val()},function(e){e?(""!=e.err&&($("#playlist_form_result").css("display","block"),$("#playlist_form_result").html(e.err)),""!=e.msg&&($("#playlist_form_result").css("display","block"),$("#playlist_form_result").html(e.msg),$("#"+o).css("display","none"))):alert("No data")},"json");break;case"new":$.post(page,{mode:"add_new_playlist",id:t,objtype:a,plname:$("#playlist_name").val()},function(e){e?(e.err&&($("#playlist_form_result").css("display","block"),$("#playlist_form_result").html(e.err)),e.msg&&($("#playlist_form_result").css("display","block"),$("#playlist_form_result").html(e.msg),$("#"+o).css("display","none"))):alert("No data")},"json")}}function add_quicklist(e,t){$(e).attr("src",imageurl+"/ajax-loader.gif"),$(e).css("background-position","-200px 200px"),$.cookie("btn-q-"+t,"yes",{expires:10}),$.post(page,{mode:"quicklist",todo:"add",vid:t},function(t){t?($(e).attr("src",imageurl+"/dot.gif"),$(e).css("background-position","-0px -0px"),$(e).removeClass("add_icon"),$(e).addClass("check_icon"),$(e).removeAttr("title"),load_quicklist_box()):alert("No data")},"text")}function remove_qucklist(e,t){$.cookie("btn-q-"+t,null),$.post(page,{mode:"quicklist",todo:"remove",vid:t},function(o){o?($(e).slideUp(),$(e).hide(),$(".cb-btn-quick-"+t).addClass("add_icon"),$(".cb-btn-quick-"+t).removeClass("check_icon")):alert("No data")},"text")}function quicklist_videos_check(e){var t=JSON.parse(e.trim());t&&$.each(t,function(){"yes"==$.cookie("btn-q-"+this)&&($(".cb-btn-quick-"+this).removeClass("add_icon"),$(".cb-btn-quick-"+this).addClass("check_icon"))})}function load_quicklist_box(){$.post(page,{mode:"getquicklistbox"},function(e){e=$.trim(e),e?($("#quicklist_box").css("display","block"),$("#quicklist_box").html(e),"hide"!=$.cookie("quick_list_box")?($("#quicklist_cont").css("display","block"),$(".ql_show-hide").html("hide")):$(".ql_show-hide").html("show")):$("#quicklist_box").css("display","none")},"text")}function clear_quicklist(e){$.post(page,{mode:"clear_quicklist"},function(t){load_quicklist_box(),$.each(e,function(){$.cookie("btn-q-"+this,null),$(".cb-btn-quick-"+this).addClass("add_icon"),$(".cb-btn-quick-"+this).removeClass("check_icon")})},"text")}function quick_show_hide_toggle(e){$(e).slideToggle(),"show"==$.cookie("quick_list_box")?($.cookie("quick_list_box","hide"),$(".ql_show-hide").html("show")):($.cookie("quick_list_box","show"),$(".ql_show-hide").html("hide"))}function ini_cookies(){$.cookie("quick_list_box")||$.cookie("quick_list_box","show")}function get_group_info(e,t){"none"==$(e).css("display")&&($("#group_info_cont > div").slideUp(),$("#group_info_cont "+e).slideDown(),$(".group_detail_tabs .selected").removeClass("selected"),$(t).addClass("selected"))}function show_menu(e,t){if(window.location.hash&&t){var o=window.location.hash;return show_menu(o.substr(9),!1),!1}window.location.hash="current_"+e,current_menu!=e&&hide_menu(),$("#"+e).show(),current_menu=e,$("."+e).addClass("selected")}function hide_menu(){return""!=current_menu?($("#"+current_menu).hide(),$("."+current_menu).removeClass("selected"),!0):void 0}function to_reply(e){$("#reply_to").val(e),window.location="#reply",$("#reply_to_img").fadeIn(1500),setTimeout(function(){$("#reply_to_img").fadeOut(500)},7e3)}function spam_comment(e,t,o){$.post(page,{mode:"spam_comment",cid:e,type:t,typeid:o},function(t){t?(t.msg&&($("#comment_"+e).hide(),$("#spam_comment_"+e).fadeIn("slow")),t.err&&($("#comment_err_output").fadeIn("slow"),$("#comment_err_output").html(t.err))):alert("No data")},"json")}function reply_box(e){$.ajax({url:page,type:"POST",dataType:"json",data:{mode:"get_reply_box",cid:e},success:function(t){console.log("dfjkdfk"),$(".reply-box-"+e).html(t.form).slideDown("slow"),$("#reply_box_"+e).focus()}})}function remove_reply_box(e){$(".reply-box-"+e).slideUp("slow")}function show_replies(e){$(".more-comments-"+e).show()}function hq_toggle(e,t){if(has_hq_function){var e=e,t=t;return hq_function(),!1}"block"==$(e).css("display")?(""==normal_player_html&&(normal_player_html=$(e).html()),$(e).html("")):""!=normal_player_html&&$(e).html(normal_player_html),"block"==$(t).css("display")?(""==hq_player_html&&(hq_player_html=$(t).html()),$(t).html("")):""!=hq_player_html&&$(t).html(hq_player_html),$(e+","+t).toggle()}function swap_auto_play(){"true"==$.cookie("auto_play_playlist")?($.cookie("auto_play_playlist","false",{path:"/"}),window.location=document.location,$("#ap_status").html("off")):($.cookie("auto_play_playlist","true",{path:"/"}),window.location=document.location,$("#ap_status").html("on"))}function collection_actions(e,t,o,a,n,i){switch($(a).css("display","block"),$(a).html(loading),t){case"add_new_item":$.post(page,{mode:t,cid:$("#"+e+" #collection").val(),obj_id:o,type:n},function(e){e?(e.msg&&$(a).html(e.msg),e.err&&$(a).html(e.err)):alert("No Data returned")},"json");break;case"remove_collection_item":$("#"+e).hide(),$.post(page,{mode:t,obj_id:o,type:n,cid:i},function(t){t?(t.err&&(alert(t.err),$(a+"_"+o).hide(),$("#"+e+o).show()),t.msg&&($(a).html(t.msg),$("#"+e+"_"+o).slideUp(350))):(alert("No Data Returned"),$(a+"_"+o).hide(),$("#"+e).show())},"json")}return!1}function openURL(e){document.location=e}function get_item(e,t,o,a,n){var i=$(e).html();$(e).html(loading),$.post(page,{mode:"get_item",ci_id:t,cid:o,type:a,direction:n},function(t){if(t){var o=new Array(a,t.cid,t.key);construct_url(o),$("#collectionItemView").html(t.content)}else alert("No "+a+" returned"),$(e).text(i)},"json")}function construct_url(e){var t;"yes"==Seo?(t="#!/item/"+e[0]+"/"+e[1]+"/"+e[2],window.location.hash=t):(t="#!?item="+e[2]+"&type="+e[0]+"&collection="+e[1],window.location.hash=t)}function onReload_item(){var e,t;window.location.hash&&(e=window.location.href,"yes"==Seo?(t=RegExp("/item.+#!"),t.test(e)&&(e=e.replace(t,""),window.location.href=e)):(t=RegExp("\\?item.+#!"),t.test(e)&&(e=e.replace(t,""),window.location.href=e)))}function pagination(e,t,o,a){var n,i=$(e),l=(i.id,i.parent()),r=i.html();l.attr("id")?n=parent.attr("id"):(l.attr("id","loadMoreParent"),n=l.attr("id")),newCall=$.ajax({url:page,type:"post",dataType:"json",data:{mode:"moreItems",page:a,cid:t,type:o},beforeSend:function(){i.removeAttr("onClick"),i.html(loading)},success:function(t){t.error?("BUTTON"==e.tagName&&i.attr("disabled","disabled"),i.removeAttr("onClick"),i.html("No more "+o)):($("#collectionItemsList").append(t.content),$("#NewPagination").html(t.pagination),i.html(r))}})}function ajax_add_collection(e){var t,o=e.form.id,a=$("#"+o),n=$(e),i=n.html(),l=$("#CollectionResult");t=$.ajax({url:page,type:"post",dataType:"json",data:"mode=add_collection&"+a.serialize(),beforeSend:function(){"block"==l.css("display")&&l.slideUp("fast"),n.attr("disabled","disabled"),n.html(loading)},success:function(e){e.msg?($("#CollectionDIV").slideUp("fast"),l.html(e.msg).slideDown("fast"),collectionID=e.id):(l.html(e.err).slideDown("fast"),n.removeAttr("disabled"),n.html(i))}})}function getDetails(e){var t=getInputs(e),o=new Array(t.length);return $.each(t,function(e,t){query=$("#"+t.id+" *").serialize(),query+="&mode=ajaxPhotos",o[e]=query}),o}function getName(e){var t=e,o=t.substring(t.lastIndexOf("/")+1);return o}function viewRatings(e,t){var o=$(e),a=o.html();document.getElementById("RatingStatContainer")?$("#RatingStatContainer").toggle():loadAjax=$.ajax({url:page,type:"post",dataType:"text",data:{mode:"viewPhotoRating",photoid:t},beforeSend:function(){o.html(loading)},success:function(e){o.html(a),e?$("<div />").attr("id","RatingStatContainer").addClass("clearfix").css({padding:"8px",font:"normal 11px Tahoma",border:"1px solid #ccc",backgroundColor:"#FFF"}).html(e).fadeIn(350).insertAfter(o):(o.removeAttr("onclick"),alert("Photo has not recieved any rating yet."))}})}function showAdvanceSearch(e,t,o,a){var n=$("#"+e),i=$("#"+t),l=$("#SearchType").val();n.toggle(),i.toggle(),"block"==i.css("display")&&i.children().hide().filter("#"+l).show(),$("."+o).toggleClass(a)}function toggleCategory(e,t){var o=$(e),a=o.attr("alt"),n=$("#"+a),i=a.split("_"),l=i[0],r=$.browser.msie,s=$.browser.version;"none"==n.css("display")?(n.slideDown(350),r&&"7.0"==s&&n.addClass("internetExplorer7CategoryToggleFix"),$.cookie(l,"expanded",{expires:1,path:"/"}),o.removeClass("none").addClass("block")):(n.slideUp(350),r&&"7.0"==s&&n.removeClass("internetExplorer7CategoryToggleFix"),$.cookie(l,"collapsed",{expires:1,path:"/"}),o.removeClass("block").addClass("none"))}function loadObject(e,t,o,a){var n=new Array(4);n["this"]=e,n.type=t,n.objID=o,n.container=a;var i=$(n["this"]);i.parent().css("position","relative"),$.ajax({url:page,type:"POST",dataType:"json",data:{mode:"channelFeatured",contentType:n.type,objID:n.objID},beforeSend:function(){i.find("img").animate({opacity:.5}),$("#"+n.container).animate({opacity:.5})},success:function(e){e.error?(i.find("img").animate({opacity:1}),$("#"+n.container).animate({opacity:1}),alert(e.error)):(i.parent().children(".selected").removeClass("selected"),i.addClass("selected"),i.find("img").animate({opacity:1}),$("#"+n.container).html(e.data),$("#"+n.container).animate({opacity:1}))}})}function channelObjects(e,t,o,a,n){var i=$(e),l=i.attr("rel"),r=$(t),s=i.parents("ul").find("a.selected").attr("rel");if(l){if("block"==$("#"+l).css("display"))return!1;i.parents("ul").find("a.selected").removeClass("selected"),i.addClass("selected"),$("#"+s).hide(),$("#"+l).show()}else{var d=o+"DIV";i.attr("rel",d),$.ajax({url:page,type:"POST",dataType:"json",data:{mode:"channelObjects",content:o,user:a,assign:n},beforeSend:function(){i.append(loading_img_2)},success:function(e){i.find("img").remove(),i.parents("ul").find("a.selected").removeClass("selected"),i.addClass("selected"),$("#"+s).hide(),$("<div></div>").attr("id",d).addClass($("#"+s).attr("class")).html(e.html).appendTo(r)}})}}function getComments(e,t,o,a,n,i,l){$("#comments").html("<div style='padding:5px 0px;'>"+loading+"</div>"),$.ajax({type:"POST",url:page,data:{mode:"getComments",page:a,type:e,type_id:t,object_type:i,last_update:o,total_comments:n,comments_voting:comments_voting,admin:l},success:function(e){$("#comments").hide(),$("#comments").html(e),$("#comments").fadeIn("slow")},dataType:"text"})}function checkUncheckAll(e){var t=e.form,o=0;for(o=0;o<t.length;o++)"checkbox"==t[o].type&&"checkall"!=t[o].name&&(t[o].checked=e.checked)}function rate(e,t,o){var a=baseurl+"/ajax.php";$.post(a,{mode:"rating",id:e,rating:t,type:o},function(e){e?$("#rating_container").html(e):alert("No data")},"text")}function setPageHash(e){var t=e.replace(baseurl,"");window.location.hash.replace("#!","");window.location.hash="#!"+t}function callURLParser(){var e,t=/(\#![\/a-zA-Z0-9=\.\&\-\_\?]*)/g,o=window.location.href,a=o.match(t);a&&(e=a[a.length-1],e&&(window.location.href=baseurl+e.replace("#!","")))}function groupsAjax(e,t,o){e.preventDefault();var a,n,i,l=!1;return void 0==o&&(o="ajaxGroupResultContainer"),t.href?(a=t.href,l=!0,jqueryObj=$(t),javaObj=t):(a=t.childNodes[0].href,jqueryObj=$(t.childNodes[0]),javaObj=t.childNodes[0]),"undefined"==a?(alert("URL not found"),!1):(n=jqueryObj.html(),setPageHash(a),1==l?(i=jqueryObj.parent().parent(),i.children().filter(".selected").removeClass("selected"),jqueryObj.parent().addClass("selected")):(i=jqueryObj.parent(),i.children().filter(".selected").removeClass("selected"),jqueryObj.addClass("selected")),jqueryObj.html(loading_new),$("#"+o).load(a+" #"+o,function(e,t,o){jqueryObj.html(n),document.getElementById("flag_item")&&$("#flag_item").show()}),void 0)}function encode64(e){for(var t,o,a,n,i,l,r,s=new StringMaker,d=0;d<e.length;)t=e.charCodeAt(d++),o=e.charCodeAt(d++),a=e.charCodeAt(d++),n=t>>2,i=(3&t)<<4|o>>4,l=(15&o)<<2|a>>6,r=63&a,isNaN(o)?l=r=64:isNaN(a)&&(r=64),s.append(keyStr.charAt(n)+keyStr.charAt(i)+keyStr.charAt(l)+keyStr.charAt(r));return s.toString()}function decode64(e){var t,o,a,n,i,l,r,s=new StringMaker,d=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");d<e.length;)n=keyStr.indexOf(e.charAt(d++)),i=keyStr.indexOf(e.charAt(d++)),l=keyStr.indexOf(e.charAt(d++)),r=keyStr.indexOf(e.charAt(d++)),t=n<<2|i>>4,o=(15&i)<<4|l>>2,a=(3&l)<<6|r,s.append(String.fromCharCode(t)),64!=l&&s.append(String.fromCharCode(o)),64!=r&&s.append(String.fromCharCode(a));return s.toString()}function get_ep_video(e){$("#ep_video_container").html(loading);var t=baseurl+"/plugins/editors_pick/get_ep_video.php";$.ajax({url:t,type:"POST",dataType:"json",timeout:8e3,data:{vid:e},success:function(e){e.data?$("#ep_video_container").html(e.data):alert("No data")}})}function add_comment_js(e,t){$("#add_comment_result").css("display","block"),$("#add_comment_button").val("Adding..."),$("#add_comment_button").attr("disabled",!0),$(".add-reply").attr("disabled",!0);var o=$("#"+e).serialize()+"&mode=add_comment";$.post(page,o,function(e){if(e){if($("#add_comment_result").css("display","block"),""!=e.err){$("#comment_err_output").fadeIn(),$("#comment_err_output").html(e.err),setTimeout(function(){$("#comment_err_output").fadeOut()},1e4);var t=e.err,o=t.substring(0,12);"Mailer Error"!=o&&clear_comment_form()}""!=e.msg&&$("#comment_box").val(""),e.cid&&($(".no-comments").remove(),get_the_comment(e.cid,e.type_id,"#comments-ul"))}else alert("No data")},"json")}function get_the_comment(e,t,o){$.post(page,{mode:"get_comment",cid:e,type_id:t},function(t){t?t.parent_id?($(".reply-box-"+t.parent_id).hide(),$(".comments-reply-"+t.parent_id).append(t.li_data).slideDown(),$("html, body").animate({scrollTop:$("#reply-"+e).offset().top},1e3),comment_transition(".reply-",e)):$(t.li_data).hide().prependTo("#comments-ul").slideDown("slow"):alert("No data"),clear_comment_form()},"json")}function reply_box(e,t,o){var a='<form name="reply_form" method="post" id="reply_form_'+e+'" onsubmit="return false;">';a+='<input type="hidden" name="reply_to" id="reply_to" value="'+e+'">',a+='<input type="hidden" name="obj_id" id="obj_id" value="'+o+'">',a+='<input type="hidden" name="type" value="'+t+'" />',a+='<div class="textarea-comment clearfix">',a+='<textarea name="comment" id="reply_box_'+e+'" class="form-control" placeholder="Reply..."></textarea>',a+='<i class="remove-'+e+' remove-icon" onclick="remove_reply_box('+e+')">',a+='<span style="color:#e50000;cursor:pointer">',a+="<strong>X</strong>",a+="</span>",a+="</i>",a+="</div>",a+='<input type="button" name="add_reply" id="add_reply_button_'+e+'" class="btn btn-danger pull-right add-reply" onclick="add_comment_js(\'reply_form_'+e+"','"+t+'\')" value="Reply">',a+="</form>",$(".reply-box-"+e).html(a).slideDown("slow"),$("#reply_box_"+e).focus()}function remove_reply_box(e){$(".reply-box-"+e).slideUp("slow")}function show_replies(e){$(".more-comments-"+e).show()}function comment_transition(e,t){$(e+t).addClass("border-transition"),setTimeout(function(){$(e+t).removeClass("border-transition")},3e3)}function clear_comment_form(){$("#add_comment_button").val("Add Comment"),$("#add_comment_button").attr("disabled",!1),$(".add-reply").attr("disabled",!1)}function isValidEmail(e){return e.match(/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/)?e:!1}var page=baseurl+"/ajax.php",loading_img="<img style='vertical-align:middle' src='"+imageurl+"/ajax-loader.gif'>",loading=loading_img+" Loading...",loading_img_2="<img style='vertical-align:middle' src='"+imageurl+"/ajax-loader-big.gif'>",download=0,total_size=0,cur_speed=0,status_refesh=1,result_page=baseurl+"/actions/file_results.php",download_page=baseurl+"/actions/file_downloader.php",count=0,force_stop=!1,remoteObjID=randomString(),hasLoaded=!1,perc_download=0,current_menu="",normal_player_html="",hq_player_html="",has_hq_function=!1,collectionID,comments_voting="no",loading_new="<img style='vertical-align:middle' src='"+imageurl+"/view_group.gif' height='22'>",ua=navigator.userAgent.toLowerCase();if(ua.indexOf(" chrome/")>=0||ua.indexOf(" firefox/")>=0||ua.indexOf(" gecko/")>=0)var StringMaker=function(){this.str="",this.length=0,this.append=function(e){this.str+=e,this.length+=e.length},this.prepend=function(e){this.str=e+this.str,this.length+=e.length},this.toString=function(){return this.str}};else var StringMaker=function(){this.parts=[],this.length=0,this.append=function(e){this.parts.push(e),this.length+=e.length},this.prepend=function(e){this.parts.unshift(e),this.length+=e.length},this.toString=function(){return this.parts.join("")}};var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";