blob: d07f4c5bac9bea6624d9302ff527d206800fc8b7 [file] [log] [blame]
!function(jQuery,window,document){jQuery(document).ready(function($){$(".btn-ajax-checksum").click(function(){var location=$(this).attr("href"),file=$(this).data("checksum-file"),type=$(this).data("checksum-type");if(-1===$.inArray(type,["md5","sha512","sha1"])||void 0===file)return!1;$.ajax({url:"sums.php",data:{file:file,type:type},dataType:"text",type:"GET",beforeSend:function(){$(location+" p").html('<i class="fa fa-spinner fa-spin"></i>')},success:function(response){$(location+" p").html(response.replace(/\s/g,"&nbsp;"))},error:function(){$(location+" p").text("An error has occurred.")}})}),$(".mirror-continent").slice(1).hide(),$("#show_all_mirrors").click(function(e){return e.preventDefault(),$(".mirror-section-2").is(":visible")?($(".mirror-continent").slice(1).hide(),$("html, body").animate({scrollTop:$(".mirror-section-1").offset().top},500),$(this).text("Show all")):($(".mirror-continent").show(),$("html, body").animate({scrollTop:$(".mirror-section-2").offset().top},500,"swing",function(){$("#show_all_mirrors").text("Hide")})),FALSE}),$(".close-choose-mirror-well").click(function(){$(".collapse.in").collapse("hide")})})}(jQuery,window,document);