var ac_server = 'http://149.13.65.144:8087';
var n=true;
(function(a){a.fn.e=function(b){var d=this;b=a.extend({c:"tactive",a:"tnactive",f:".toptions",d:0,b:"href"},b||{});a(this).each(function(){var i=a(this).find(b.f).children(),e;i.each(function(h){a(this).addClass(b.a);a(this).click(function(c){c.preventDefault();a(this).addClass(b.a);c=d.find(a(this).attr(b.b));if(c.length===0)throw"Could not find matching tab content for id: "+a(this).attr(b.b);e.removeClass(b.c).addClass(b.a);a(e.attr(b.b)).hide();a(this).removeClass(b.a).addClass(b.c);c.show();
e=a(this)});if(h===b.d||h===0&&i.length-1<b.d){e=a(this);a(this).trigger("click")}})})}})(jQuery);function o(a,b,d,i){var e=new Date,h=new Date;if(d==null)d=1;h.setTime(e.getTime()+864E5*d);cookieStr="";cookieStr=a+"="+escape(b);if(d>0)cookieStr+=";expires="+h.toGMTString();cookieStr+=";path="+i+";domain="+cookie_domain;document.cookie=cookieStr}
var s=function(a){function b(g,j){var f=$("#ac_results").empty().width(k.width());l=g.length;c=-1;if(l===0)e();else if(l>0){j=$.trim(k.val());j=j.toLowerCase();if(j.length>0){var m=k.position();f.css({top:m.top+24,left:m.left});for(m=0;m<l;++m)f.append($("<p></p>").attr("id","ac_opt_"+m).attr("class","ac_inactive").html(unescape(g[m].replace(j,"<b>"+j+"</b>"))).bind("mouseover",function(){$(".ac_active").attr("class","ac_inactive");$(this).attr("class","ac_active")}).bind("mouseout",function(){$(this).attr("class",
"ac_inactive")}).bind("click",function(){i($(this),2)}));f.append($("<a></a>").attr({href:"#","class":"ac_close"}).text("Close").bind("click",function(){d();return false}));f.css("display","block")}else e()}}function d(){q=false;e();k.attr("autocomplete","on");return this}function i(g,j){if(g.html()!=null){var f=g.html().replace(/<B>|<\/B>/gi,"");if(j==undefined||j==2)k.val(f);if(j!=undefined){e();f=$("#ac_form");if(f.length)f=k.parent();f.length&&f.submit()}}}function e(){c=-1;$("#ac_results").css("display",
"none")}function h(g,j){$.trim(k.val().toLowerCase())===g.toLowerCase()&&$.ajax({dataType:"jsonp",url:ac_server+"/"+encodeURIComponent(g)+"?callback=?&t="+j,success:function(f){var m=parseInt(f.t);if(m>=r){r=m;p[g]=f.r;++t;b(f.r,g)}}})}var c=-1,l=0,q=n,r=0,p=[],t=0,k;return{bind:function(){k=$(a);if(typeof ac_server==="undefined")return d();k.attr("autocomplete","off");k.bind("keyup",function(g){var j=(new Date).getTime(),f=$.trim($(this).val());f=f.toLowerCase();if(!(g.keyCode in[40,38,13,27]||!q))if(f.length>
0)p[f]!==undefined?b(p[f],f):setTimeout(function(){h(f,j)},0);else e()});$(document).bind("keyup",function(g){if(g.keyCode===27)e();else if(g.keyCode!=undefined){$(".ac_active").attr("class","ac_inactive");switch(g.keyCode){case 40:if(c==-1)c=0;else if(++c>=l)c=0;$("#ac_opt_"+c).attr("class","ac_active");i($("#ac_opt_"+c));break;case 38:if(c==-1)c=l-1;else if(--c<0)c=l-1;$("#ac_opt_"+c).attr("class","ac_active");i($("#ac_opt_"+c));break;case 13:if(c!=-1){g=$("#ac_opt_"+c);g.length&&i(g,1)}else e()}}});
$("body").bind("click.autocompleter",function(){$(this).attr("id").indexOf("ac_")===-1&&e()});return this},g:d}}("#ac_q"),u=function(){function a(e){$(e).bind("mousemove.stars",function(h){h=h.pageX-$(this).offset().left;for(var c=i.length-1;c>=0;c--)if(i[c]<h){d=c+1;break}$(this).attr("class","star"+d)});$(e).bind("mouseout.stars",function(){d=b;$(this).attr("class","star"+d)});$(e).bind("click.stars",function(){var h=$(e).parent();h.empty().append($("<img>").attr("src",static_path+"images/ajax-loader.gif"));
$.ajax({url:global_path+"ajax_link_rate.html?link_id="+$(this).attr("id")+"&rate="+d,success:function(c){c=c.split("-");var l=parseFloat(c[0]);h.empty().append($("<div>").css({margin:"0px 10px 0 0","float":"left","line-height":"22px"}).text("Thanks for your rate")).append($("<div>").attr("class","star"+Math.round(l)).css({"float":"left","line-height":"22px"})).append($("<div>").addClass("votes_info").text("("+c[1]+" votes, average: "+l+" out of 5)"))}})})}var b,d,i=[0,17,33,49,66];return{bind:function(e,
h){b=d=parseInt(h.replace("star",""));a(e)}}}();$(document).ready(function(){s.bind();$(".trends").e();$("#ac_q").focus()});
window.resultsLeftShowSwitch=function(){var a=$("#results_left"),b=$("#results"),d=$("#results_box"),toggle=$("#toggle");if(a.is(":visible")){a.hide();b.css("width","995px");b.addClass("optionsInvisible");d.css("width","986px");toggle.text("Show options").css("background-position","left 0px");o("DISPLAY_RESULTS_LEFT","0",365,"/")}else{a.show();b.css("width","794px");d.css("width","840px");b.removeClass("optionsInvisible");toggle.text("Hide options").css("background-position","left -30px");o("DISPLAY_RESULTS_LEFT",
"1",365,"/")}};window.SetCookie=o;window.showSizeFilter=function(){$("#size_filter_custom").show()};
window.applySizeFilter=function(){var a=Math.pow(2,21),b=$("#size_filter_from"),d=$("#size_filter_to"),i=$("#size_filter_from_error").hide(),e=$("#size_filter_to_error").hide();error=false;if(/[^\d]+/.test(b.val())||parseInt(b.val())>a){i.text("Enter correct size").show();error=n}if(/[^\d]+/.test(d.val())||parseInt(d.val())>a||parseInt(d.val())==0){e.text("Enter correct size").show();error=n}if(!error&&parseInt(b.val())>parseInt(d.val())){e.text("Invalid range").show();error=n}if(!error){a=window.location.href;
a=a.replace(/#.+/,"");if(/sizefrom=[^\/&]+/i.test(a))a=a.replace(/sizefrom=[^\/&]+/i,"sizefrom="+b.val());else a+="&sizefrom="+b.val();if(/sizeto=[^\/&]+/i.test(a))a=a.replace(/sizeto=[^\/&]+/i,"sizeto="+d.val());else a+="&sizeto="+d.val();window.location.replace(a)}};window.Autocompleter=s;window.Stars=u;
window.initCopyToClipboard=function(){var a=new ZeroClipboard.Client;a.setHandCursor(n);a.setCSSEffects(n);a.addEventListener("mouseDown",function(){a.setText($("#copy_paste_links").html());$("#d_clip_msg_copied").show();setTimeout(function(){$("#d_clip_msg_copied").hide()},2E3)});a.glue("d_clip_button","d_clip_container")};window.jumpto_groupfile=function(a){window.location=global_path+a.options[a.selectedIndex].value+"/go.html"};
window.showHideRecentSearches=function(){var a=$("#recent");if(a.length!==0){a.toggle();o("DISPLAY_RECENT_SEARCHES",a.is(":visible")===n?1:0,365,"/")}};

function addCommas(a){a+="";x=a.split(".");x1=x[0];x2=x.length>1?"."+x[1]:"";var b=/(\d+)(\d{3})/;while(b.test(x1)){x1=x1.replace(b,"$1"+","+"$2")}return x1+x2}function sendme(a,b,c,d,e){var f="http://www.fileshut.com/find_files.php?q="+e+"&si="+b+"&s="+a+"&o="+c+"&p="+d;location.href=f}$(function(){$("#sharesToggle").click(function(){var a=$("#sharesBox");if(a.is(":visible")){$("#sharesToggle a").html("More")}else{$("#sharesToggle a").html("Less")}a.toggle(500);$("#sharesToggle img").toggle()});$(".showmorebutt").click(function(){var a=$(".showmorecont");if(a.is(":visible")){$(".showmorebutt span").html("Show more")}else{$(".showmorebutt span").html("Show less")}a.slideToggle("fast");$(".showmorebutt img").toggle()})})
