	jQuery(function() {
		
		var tab20 = ["8,1","8,2","8,3","8,4","8,5","10,1","10,2","10,3","10,4","12,1","12,2","12,3","14,1","14,2","16,1","18,1"]; 
    var tab25 = ["8,6","8,7","10,5","10,6","12,4","14,3","16,2","18,2","20,1","22,1"];
    var tab35 = ["8,8","8,9","8,10","8,11","10,7","10,8","12,5","12,6","14,4","14,5","16,3","16,4","18,3","20,2","22,2","24,1","26,1"];
    var tab50 = ["8,12","8,13","8,14","8,15","8,16","10,9","10,10","10,11","10,12","12,7","12,8","12,9","14,6","14,7","16,5","16,6","18,4","18,5","20,3","20,4","22,3","24,2","26,2","28,1","30,1"];
    var tab60 = ["8,17","10,13","10,14","12,10","12,11","14,8","14,9","16,7","16,8","18,6","20,5","22,4","24,3","28,2","30,2","32,1"];
    var tab70 = ["8,18","8,19","8,19","8,20","8,21","8,22","10,15","10,16","10,17","12,12","14,10","16,9","18,7","20,6","22,5","24,4","26,3","28,3","32,2","34,1","36,1","38,1"];
    var tab80 = ["8,23","8,24","8,25","8,26","8,27","8,28","10,18","10,19","10,20","10,21","12,13","12,14","12,15","12,16","14,11","14,12","14,13","16,10","18,8","18,9","20,7","22,6","24,5","26,4","26,5","28,4","30,3","32,3","34,2","36,2","38,2","40,1","42,1"];
    var tab90 = ["8,29","8,30","8,31","8,32","10,22","10,23","10,24","12,17","12,18","14,14","16,11","18,10","20,8","20,9","22,7","22,8","24,6","26,6","28,5","30,4","32,4","34,3","36,3","40,2","44,1"];
    var tab100 = ["8,33","8,34","8,35","8,36","8,37","8,38","8,39","8,40","10,25","10,26","10,27","10,28","10,29","10,30","12,19","12,20","12,21","12,22","12,23","14,15","14,16","14,17","14,18","16,12","16,13","16,14","16,15","18,11","18,12","20,10","20,11","22,9","24,7","24,8","26,7","28,6","30,5","30,6","32,5","34,4","36,4","38,3","40,3","42,2","44,2","46,1"];
    var tab120 = ["10,31","10,32","10,33","10,34","10,35","12,24","12,25","12,26","12,27","12,28","14,19","14,20","14,21","14,22","14,23","16,16","16,17","16,18","16,19","18,13","18,14","18,15","18,16","20,12","20,13","20,14","22,10","22,11","22,12","24,9","26,8","26,9","28,7","28,8","30,7","32,6","34,5","36,5","38,4","40,4","42,3","44,3","46,2","48,1","48,2","50,1","52,1","54,1"];
    var tab160 = ["10,36","10,37","10,38","10,39","10,40","12,29","12,30","12,31","12,32","12,33","12,34","12,35","12,36","12,37","12,38","12,39","12,40","14,24","14,25","14,26","14,27","14,28","14,29","14,30","14,31","14,32","14,33","16,20","16,21","16,22","16,23","16,24","16,25","16,26","16,27","18,17","18,18","18,19","18,20","18,21","18,22","18,23","20,15","20,16","20,17","20,18","20,19","22,13","22,14","22,15","22,16","22,17","24,10","24,11","24,12","24,13","24,14","24,15","26,10","26,11","26,12","26,13","28,9","28,10","28,11","28,12","30,8","30,9","30,10","32,7","32,8","32,9","34,6","34,7","34,8","36,6","36,7","38,5","38,6","38,7","40,5","40,6","42,4","42,5","42,6","44,4","44,5","46,3","46,4","48,3","48,4","50,2","50,3","52,2","54,2"];
    var tab200 = ["14,34","14,35","14,36","14,37","14,38","16,28","16,29","16,30","18,24","18,25","18,26","18,27","18,28","20,20","20,21","20,22","20,23","20,24","22,18","22,19","22,20","22,21","24,16","24,17","24,18","24,19","26,14","26,15","26,16","28,13","28,14","30,11","30,12","30,13","32,10","34,9","36,8","38,8","40,7","42,7","44,6","46,5","48,5","50,4","52,3","54,3"];
    var tab225 = ["14,39","14,40","16,31","16,32","16,33","16,34","16,35","16,36","16,37","16,38","18,29","18,30",",18,31","18,32","18,33","20,25","20,26","20,27","20,28","22,22","22,23","22,24","22,25","24,20","24,21","24,22","24,23","26,17","26,18","26,19","26,20","28,15","28,16","28,17","30,14","30,15","32,11","32,12","32,13","34,10","34,11","34,12","36,9","36,10","38,9","38,10","40,8","40,9","42,8","44,7","46,6","46,7","48,6","50,5","50,6","52,4","54,4"];
    var tab250 = ["16,39","16,40","18,34","18,35","18,36","20,29","20,30","20,31","20,32","22,26","22,27","22,28","22,29","24,24","24,25","24,26","26,21","26,22","26,23","26,24","28,18","28,19","28,20","28,21","28,22","30,16","30,17","30,18","30,19","30,20","32,14","32,15","32,16","32,17","32,18","34,13","34,14","34,15","34,16","36,11","36,12","36,13","36,14","36,15","38,11","38,12","38,13","38,14","40,10","40,11","42,9","42,10","44,8","44,9","44,10","46,8","46,9","48,7","48,8","50,7","52,5","52,6"];
    var tab300 = ["18,37","18,38","18,39","18,40","20,33","20,34","20,35","20,36","20,37","20,38","20,39","20,40","22,30","22,31","22,32","22,33","22,34","22,35","22,36","24,27","24,28","24,29","24,30","26,25","26,26","26,27","26,28","26,29","26,30","28,23","28,24","28,25","28,26","30,21","30,22","30,23","32,19","32,20","34,17","34,18","36,16","36,17","38,15","40,12","40,13","40,14","42,11","42,12","42,13","44,11","44,12","46,10","46,11","48,9","48,10","50,8","50,9","52,7","52,8","54,5","54,6","54,7"];
    var tab400 = ["22,37","22,38","22,39","22,40","24,31","24,32","24,33","24,34","24,35","24,36","24,37","24,38","24,39","24,40","26,31","26,32","26,33","26,34","26,35","26,36","26,37","26,38","26,39","26,40","28,27","28,28","28,29","28,30","28,31","28,32","28,33","28,34","28,35","28,36","28,37","28,38","28,39","28,40","30,24","30,25","30,26","30,27","30,28","30,29","30,30","30,31","30,32","30,33","30,34","30,35","30,36","30,37","30,38","30,39","30,40","32,21","32,22","32,23","32,24","32,25","32,26","32,27","32,28","32,29","32,30","32,31","32,32","32,33","32,34","32,35","32,36","32,37","34,19","34,20","34,21","34,22","34,23","34,24","34,25","34,26","34,27","34,28","34,29","34,30","34,31","34,32","36,18","36,19","36,20","36,21","36,22","36,23","36,24","36,25","36,26","36,27","36,28","36,29","38,16","38,17","38,18","38,19","38,20","38,21","38,22","38,23","38,24","38,25","38,26","40,15","40,16","40,17","40,18","40,19","40,20","40,21","40,22","40,23","40,24","42,14","42,15","42,16","42,17","42,18","42,19","42,20","42,21","42,22","44,13","44,14","44,15","44,16","44,17","44,18","44,19","44,20","44,21","46,12","46,13","46,14","46,15","46,17","46,18"];
    var tab500 = ["32,38","32,39","32,40","34,33","34,34","34,35","34,36","34,37","34,38","34,39","34,40","36,30","36,31","36,32","36,33","36,34","36,35","36,36","36,37","36,38","36,39","36,40","38,27","38,28","38,29","38,30","38,31","38,32","38,33","38,34","38,35","40,25","40,26","40,27","40,28","40,29","40,30","40,31","40,32","40,33","42,23","42,24","42,25","42,26","42,27","42,28","42,29","44,22","44,23","44,24","44,25","44,26","46,18","46,19","46,20","46,21"];
    var tab800 = ["38,36","38,37","38,38","38,39","38,40","40,34","40,35","40,36","40,37","40,38","40,39","40,40","42,30","42,31","42,32","42,33","42,34","42,35","42,36","42,37","42,38","42,39","44,27","44,28","44,29","44,30","44,31","44,32","44,33","44,34","44,35","44,36","46,22","46,24","46,25","46,26","46,27","46,28","46,29","46,30","46,31","46,32","46,33","46,34","48,11","48,12","48,13","48,14","48,15","48,16","48,17","48,18","48,19","48,20","48,21","48,22","48,23","48,24","48,25","48,26","48,27","48,28","48,29","48,30","48,31","48,32","50,10","50,11","50,12","50,13","50,14","50,15","50,16","50,17","50,18","50,19","50,20","50,21","50,22","50,23","50,24","50,25","50,26","50,27","50,28","50,29","52,9","52,10","52,11","52,12","52,13","52,14","52,15","52,16","52,17","52,18","52,19","52,20","52,21","52,22","52,23","52,24","52,25","52,26","52,27","54,8","54,9","54,10","54,11","54,12","54,13","54,14","54,15","54,16","54,17","54,18","54,19","54,20","54,21","54,22","54,23","54,24","54,25","54,26"];
		
		
		jQuery( "#kalkulator" ).slider({
			value:10,
			min: 8,
			max: 54,
			step: 2,
			slide: function( event, ui ) {
				jQuery( "#promien" ).val( ui.value );
				
				var y = jQuery("#ciezar").val();
        if (jQuery.inArray(ui.value+','+y, tab20 ) > -1) { jQuery("#wynik").html('Wymagany udźwig żurawia: <b>25 ton</b>'); }
        else if (jQuery.inArray(ui.value+','+y, tab25 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>25 ton</b>'); }
        else if (jQuery.inArray(ui.value+','+y, tab35 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>35 ton</b>'); }
        else if (jQuery.inArray(ui.value+','+y, tab50 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>50 ton</b>'); }
        else if (jQuery.inArray(ui.value+','+y, tab60 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>60 ton</b>'); }
        else if (jQuery.inArray(ui.value+','+y, tab70 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>70 ton</b>'); }
        else if (jQuery.inArray(ui.value+','+y, tab80 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>80 ton</b>'); }
        else if (jQuery.inArray(ui.value+','+y, tab90 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>90 ton</b>'); }
        else if (jQuery.inArray(ui.value+','+y, tab100 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>100 ton</b>'); }
        else if (jQuery.inArray(ui.value+','+y, tab120 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>120 ton</b>'); }
        else if (jQuery.inArray(ui.value+','+y, tab160 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>160 ton</b>'); }
        else if (jQuery.inArray(ui.value+','+y, tab200 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>200 ton</b>'); }
        else if (jQuery.inArray(ui.value+','+y, tab225 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>225 ton</b>'); }
        else if (jQuery.inArray(ui.value+','+y, tab250 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>250 ton</b>'); }
        else if (jQuery.inArray(ui.value+','+y, tab300 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>300 ton</b>'); }
        else if (jQuery.inArray(ui.value+','+y, tab400 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>400 ton</b>'); }
        else if (jQuery.inArray(ui.value+','+y, tab500 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>500 ton</b>'); }
        else if (jQuery.inArray(ui.value+','+y, tab800 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>800 ton</b>'); }
        else { jQuery("#wynik").html('Wymagany udźwig żurawia: <b>>800 ton</b>'); }
				
			}
		});
//		jQuery( "#promien" ).val( jQuery( "#kalkulator" ).slider( "value" ));
		
		jQuery( "#kalkulator2" ).slider({
			value:1,
			min: 1,
			max: 40,
			step: 1,
			slide: function( event, ui ) {
				jQuery( "#ciezar" ).val( ui.value );
        
        var x = jQuery("#promien").val();
        if (jQuery.inArray(x+','+ui.value, tab20 ) > -1) { jQuery("#wynik").html('Wymagany udźwig żurawia: <b>25 ton</b>'); }
        else if (jQuery.inArray(x+','+ui.value, tab25 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>25 ton</b>'); }
        else if (jQuery.inArray(x+','+ui.value, tab35 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>35 ton</b>'); }
        else if (jQuery.inArray(x+','+ui.value, tab50 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>50 ton</b>'); }
        else if (jQuery.inArray(x+','+ui.value, tab60 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>60 ton</b>'); }
        else if (jQuery.inArray(x+','+ui.value, tab70 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>70 ton</b>'); }
        else if (jQuery.inArray(x+','+ui.value, tab80 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>80 ton</b>'); }
        else if (jQuery.inArray(x+','+ui.value, tab90 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>90 ton</b>'); }
        else if (jQuery.inArray(x+','+ui.value, tab100 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>100 ton</b>'); }
        else if (jQuery.inArray(x+','+ui.value, tab120 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>120 ton</b>'); }
        else if (jQuery.inArray(x+','+ui.value, tab160 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>160 ton</b>'); }
        else if (jQuery.inArray(x+','+ui.value, tab200 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>200 ton</b>'); }
        else if (jQuery.inArray(x+','+ui.value, tab225 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>225 ton</b>'); }
        else if (jQuery.inArray(x+','+ui.value, tab250 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>250 ton</b>'); }
        else if (jQuery.inArray(x+','+ui.value, tab300 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>300 ton</b>'); }
        else if (jQuery.inArray(x+','+ui.value, tab400 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>400 ton</b>'); }
        else if (jQuery.inArray(x+','+ui.value, tab500 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>500 ton</b>'); }
        else if (jQuery.inArray(x+','+ui.value, tab800 ) > -1){ jQuery("#wynik").html('Wymagany udźwig żurawia: <b>800 ton</b>'); }
        else { jQuery("#wynik").html('Wymagany udźwig żurawia: <b>>800 ton</b>'); }
			}
		});
	//	jQuery( "#ciezar" ).val( jQuery( "#kalkulator2" ).slider( "value" ));
		
		jQuery( "#promien" ).click(function() {

});
	});
