$(document).ready(function(){
	$('#categorias').tabs();
	$("#content-slider").slider({
	orientation: "vertical",
	value: 50,
    animate: true,
    change: handleSliderChange,
    slide: handleSliderSlide
  });
  });


function handleSliderChange(e, ui)
{
  var maxScroll = $("#trabajos").attr("scrollHeight") - $("#trabajos").width();
 $("#trabajos").animate({scrollTop: ui.value * (maxScroll / 100) }, 1000);
}

function handleSliderSlide(e, ui)
{
  var maxScroll = $("#trabajos").attr("scrollHeight") - $("#trabajos").width();
  /*alert(maxScroll); */
  $("#trabajos").attr({scrollTop: ui.value * (maxScroll / 100) });
}