function filterProducts ( power ) {
	var machines = ['light', 'medium', 'heavy'];
	return machines[power];
}

$(document).ready(function() {
	$( '.slider-container .slider' ).each(function() {
		// read initial values from markup and remove that
		var value = parseInt( $(this).text(), 10 );
		$(this ).empty().slider({
			value: value,
			min: 0,
			max: 2,
			step: 1,
			create: function( event, ui ) {
				$("ul.products > li").show();
				$("ul.products article:not(." + filterProducts( value ) + ")" ).parent().hide();
			}, 
			slide: function( event, ui ) {
				$("ul.products > li").show();
				$("ul.products article:not(." + filterProducts( ui.value ) + ")" ).parent().hide();
			}
		});
	});
	
	$(".view-all").bind('click', function() {
		$("ul.products > li").show();
		return false;
	});
	
	$( "#tabs,#tabs-careers" ).tabs({
			event: "mouseover"
		});

});




