$(document).ready(function(){ 

		$("#ListStatusLinkCheckbox").click(function(){
			if($(this).prop("checked") ==true) {
			$(".ListAll").prop('checked',true);		
		} else { 
		$(".ListAll").prop('checked',false); }

	 })


	$(".crawlers").click(function(){				
		var currentChecked=$("#class_checkbox :checked").size();		
		var totalCheckBox=$("#checkHidden").val();		
		if(currentChecked==totalCheckBox)
		{
			$('#ListStatusLinkCheckbox').prop('checked',true);
		}
		else
		{
			$('#ListStatusLinkCheckbox').prop('checked',false);
		}
	 });

//delete individual crawlers 
$('.delete_button').click(function(){	
	var theHref	=	$(this).attr("rel");
	 jConfirm(msgDeleteSingleCrawlers, 'Delete', function(r) {
					if(r==true) { 
					var input = $("<input>").attr("type", "hidden").attr("name", "crawlers").val(theHref);
					$('#formCrawlers').append($(input));
					$('#formCrawlers').submit();
					}
	});
}) 	
//delete crawlers in bulk
$(".update_btn_table").click(function(){
   if($(".ListAll:checked").size()==0){
	   jAlert(msgSelectOneItem);
				   return false;
   } else {
	   jConfirm(msgDeleteCrawlerTest, 'Delete', function(r) {
			if(r==true) { 
				$('#formCrawlers').submit();
				
			}
	   });
   }         

 });
});