// JavaScript Document

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

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

$(function(){
	$("#col2-bar").slider({
		orientation: "vertical",
		animate: true,
		value:100,
		change: handleSliderChange,
		slide: handleSliderSlide
	});
	

});

//EVENTO

function handleSliderChange2(e, ui)
{
  var maxScroll = $("#col4").attr("scrollHeight") -  $("#col4").height();
  var scrollCurrent = (ui.value - 100) * (maxScroll/100);
  $("#col4").animate({scrollTop: (100 - ui.value) * (maxScroll / 100) }, 1000);
}

function handleSliderSlide3(e, ui)
{
  var maxScroll = $("#col3").attr("scrollHeight") -  $("#col3").height();
  $("#col3").attr({scrollTop: (100 - ui.value) * (maxScroll / 100) });
}

$(function(){
	$("#col3-bar").slider({
		orientation: "vertical",
		animate: true,
		value:100,
		change: handleSliderChange2,
		slide: handleSliderSlide3
	});
	

});

//ILUMINACAO
function handleSliderChange5(e, ui)
{
  var maxScroll = $("#col6").attr("scrollHeight") -  $("#col6").height();
  var scrollCurrent = (ui.value - 100) * (maxScroll/100);
  $("#col6").animate({scrollTop: (100 - ui.value) * (maxScroll / 100) }, 1000);
}

function handleSliderSlide5(e, ui)
{
  var maxScroll = $("#col5").attr("scrollHeight") -  $("#col5").height();
  $("#col5").attr({scrollTop: (100 - ui.value) * (maxScroll / 100) });
}

$(function(){
	$("#col5-bar").slider({
		orientation: "vertical",
		animate: true,
		value:100,
		change: handleSliderChange5,
		slide: handleSliderSlide5
	});
	

});

//VIDEO
function handleSliderChange7(e, ui)
{
  var maxScroll = $("#col8").attr("scrollHeight") -  $("#col8").height();
  var scrollCurrent = (ui.value - 100) * (maxScroll/100);
  $("#col8").animate({scrollTop: (100 - ui.value) * (maxScroll / 100) }, 1000);
}

function handleSliderSlide7(e, ui)
{
  var maxScroll = $("#col7").attr("scrollHeight") -  $("#col7").height();
  $("#col7").attr({scrollTop: (100 - ui.value) * (maxScroll / 100) });
}

$(function(){
	$("#col7-bar").slider({
		orientation: "vertical",
		animate: true,
		value:100,
		change: handleSliderChange7,
		slide: handleSliderSlide7
	});
	

});

/*MUSICIA ELETRONICA*/
function handleSliderChange8(e, ui)
{
  var maxScroll = $("#col10").attr("scrollHeight") -  $("#col10").height();
  var scrollCurrent = (ui.value - 100) * (maxScroll/100);
  $("#col10").animate({scrollTop: (100 - ui.value) * (maxScroll / 100) }, 1000);
}

function handleSliderSlide8(e, ui)
{
  var maxScroll = $("#col9").attr("scrollHeight") -  $("#col9").height();
  $("#col9").attr({scrollTop: (100 - ui.value) * (maxScroll / 100) });
}

$(function(){
	$("#col9-bar").slider({
		orientation: "vertical",
		animate: true,
		value:100,
		change: handleSliderChange8,
		slide: handleSliderSlide8
	});
	

});



