$(function() {
	
	$( "#m1" ).slider({
		orientation: "vertical",
		range: "min",
		min: 10,
		max: 50,
		value: 30,
		stop: function( event, ui ) {
			var x = ui.value;
			if( x === 45 ){
				$('#jplayer_well').jPlayer('play');
				$('.ekran').fadeIn(0).delay(3000).fadeOut(0);
			}else {
                            $('#jplayer_wrong').jPlayer('play');
                        }

		}
	});
	
	$( "#m2" ).slider({
		orientation: "vertical",
		range: "min",
		min: 10,
		max: 50,
		value: 30,
		stop: function( event, ui ) {
			var x = ui.value;
			if( x === 46 ){
				$('#jplayer_well').jPlayer('play');
				$('.ekran').fadeIn(0).delay(3000).fadeOut(0);
			}else {
                            $('#jplayer_wrong').jPlayer('play');
                        }
		}
	});
	$( "#m3" ).slider({
		orientation: "vertical",
		range: "min",
		min: 10,
		max: 50,
		value: 30,
		stop: function( event, ui ) {
			var x = ui.value;
			if( x === 49 ){
				$('#jplayer_well').jPlayer('play');
				$('.ekran').fadeIn(0).delay(3000).fadeOut(0);
			}
                        else {
                            $('#jplayer_wrong').jPlayer('play');
                        }
		}
	});
});

